/* AntiBiom — ported from Next.js forest-green clinical UI */
:root {
  --background: #f4f7f5;
  --foreground: #122018;
  --surface: #ffffff;
  --surface-2: #f7faf8;
  --surface-elevated: #ffffff;
  --border: rgba(10, 107, 68, 0.1);
  --border-strong: rgba(10, 107, 68, 0.18);
  --muted: #6b7c72;
  --muted-foreground: #4a5c52;
  --accent: #0a6b44;
  --accent-soft: rgba(10, 107, 68, 0.12);
  --accent-hover: #085536;
  --accent-foreground: #ffffff;
  --accent-bright: #12a06a;
  --teal: #23a497;
  --teal-soft: rgba(35, 164, 151, 0.14);
  --navy: #002d54;
  --navy-soft: rgba(0, 45, 84, 0.1);
  --danger: #e53935;
  --warning: #fb8c00;
  --info: #1e88e5;
  --success: #0a6b44;
  --ring: rgba(10, 107, 68, 0.35);
  --nav: rgba(255, 255, 255, 0.96);
  --input: #ffffff;
  --input-border: #d7e0db;
  --radius: 1.25rem;
  --shadow-sm: 0 2px 8px rgba(10, 40, 28, 0.05);
  --shadow-md: 0 10px 28px rgba(10, 40, 28, 0.08);
  --tile-green: #e8f5ee;
  --tile-red: #fdecee;
  --tile-blue: #e8f1fb;
  --tile-purple: #f1eaf8;
  --tile-orange: #fff1e6;
  --tile-pink: #fce8f0;
  --tile-teal: #e6f7f4;
  --tile-green-text: #0a6b44;
  --tile-red-text: #c62828;
  --tile-blue-text: #1565c0;
  --tile-purple-text: #6a1b9a;
  --tile-orange-text: #ef6c00;
  --tile-pink-text: #ad1457;
  --hero-green: #0a6b44;
  --hero-green-deep: #064d31;
  --hero-green-mid: #0d7a4f;
  --brand-gradient: linear-gradient(160deg, #064d31 0%, #0a6b44 48%, #0f8a58 100%);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --bottom-nav-h: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --header-h: 3.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: clip;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html[dir="rtl"] body { font-family: var(--font-arabic); }

img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(10, 107, 68, 0.2); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 1023px) {
  input, select, textarea { font-size: 16px !important; }
}

/* —— Brand —— */
.brand-wordmark { font-weight: 800; letter-spacing: -0.02em; }
.brand-wordmark .anti { color: var(--navy); }
.brand-wordmark .biom { color: var(--teal); }

.ab-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.ab-logo img {
  display: block;
  border-radius: 0.85rem;
  object-fit: contain;
  background: #fff;
}
.ab-logo.sm img { width: 2rem; height: 2rem; }
.ab-logo.md img { width: 2.75rem; height: 2.75rem; }
.ab-logo.lg img { width: 4rem; height: 4rem; }
.ab-logo.xl img { width: 5.5rem; height: 5.5rem; }

/* Header logo — PNG already includes wordmark (Next AntibiomLogo sm) */
.ab-logo-mark {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  width: 7.25rem;
  flex-shrink: 0;
  text-decoration: none;
}
.ab-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center left;
}
.ab-search-desktop { display: none; }
@media (min-width: 768px) {
  .ab-search-desktop { display: inline-flex; }
}

/* —— Layout shell —— */
.ab-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.ab-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 max(1rem, var(--safe-left)) 0 max(1rem, var(--safe-right));
  background: var(--nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .ab-header { height: 4rem; }
  :root { --header-h: 4rem; }
}

.ab-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ab-hospital-pill {
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) {
  .ab-hospital-pill { display: inline-flex; }
}

.ab-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}
.ab-icon-btn:hover { background: var(--accent-soft); color: var(--accent); }

.ab-body {
  display: flex;
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.ab-sidebar {
  display: none;
  width: 15rem;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  align-self: flex-start;
  height: calc(100dvh - var(--header-h));
  padding: 1rem 0.85rem;
  overflow-y: auto;
  border-inline-end: 1px solid var(--border);
  background: var(--surface);
}
@media (min-width: 1024px) {
  .ab-sidebar { display: block; width: 15.5rem; }
}

.ab-sidebar nav { display: flex; flex-direction: column; gap: 0.2rem; }
.ab-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.85rem;
  color: var(--muted-foreground);
  font-weight: 500;
  font-size: 0.875rem;
}
.ab-sidebar a svg { flex-shrink: 0; opacity: 0.9; }
.ab-sidebar a:hover { background: var(--surface-2); color: var(--foreground); }
.ab-sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.ab-main {
  flex: 1;
  min-width: 0;
  padding: 1rem max(1rem, var(--safe-left)) calc(var(--bottom-nav-h) + 0.75rem) max(1rem, var(--safe-right));
}
@media (min-width: 768px) {
  .ab-main { padding: 1.25rem 1.5rem 2rem; }
}
@media (min-width: 1024px) {
  .ab-main { padding-bottom: 2rem; }
}

.page-shell {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .page-shell { max-width: 48rem; }
}
@media (min-width: 1024px) {
  .page-shell { max-width: none; }
}

/* —— Floating bottom nav (mockup) —— */
.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  pointer-events: none;
  padding: 0 max(0.75rem, var(--safe-left)) calc(0.55rem + var(--safe-bottom)) max(0.75rem, var(--safe-right));
  background: transparent;
  border: 0;
  box-shadow: none;
}
@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

.bottom-nav-inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.1rem;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0.45rem 0.35rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 1.65rem;
  box-shadow: 0 10px 32px rgba(10, 40, 28, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.bottom-nav a.bottom-nav-item,
.bottom-nav .bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.1rem;
  min-width: 44px;
  padding: 0.2rem 0.1rem;
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.bottom-nav a .nav-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.85rem;
  color: inherit;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a.active .nav-ico {
  background: var(--accent-soft);
  color: var(--accent);
}
.bottom-nav a span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Cards / surfaces —— */
.glass, .ab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
@media (min-width: 768px) {
  .glass, .ab-card { padding: 1.15rem 1.25rem; border-radius: 1.25rem; }
}

.glass-soft {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}

.ab-muted { color: var(--muted); }
.ab-title {
  margin: 0 0 0.3rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.ab-subtitle { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.95rem; }
.ab-section { margin-top: 1.15rem; }
.ab-section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--navy);
}
.ab-kpi {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.ab-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 0.55rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.ab-badge.reserve { background: #fdecee; color: #c62828; }
.ab-badge.watch { background: #fff1e6; color: #ef6c00; }
.ab-badge.info { background: var(--tile-blue); color: var(--tile-blue-text); }
.ab-badge.teal { background: var(--teal-soft); color: var(--teal); }

.ab-chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1rem; }

.ab-input, .ab-select {
  width: 100%;
  height: 3rem;
  padding: 0 0.95rem;
  border: 1px solid var(--input-border);
  border-radius: 0.85rem;
  background: var(--input);
  color: var(--foreground);
  font: inherit;
}
.ab-input:focus, .ab-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.ab-field { margin: 0.85rem 0; }
.ab-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.ab-btn {
  appearance: none;
  border: 0;
  border-radius: 1rem;
  padding: 0.8rem 1.15rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(10, 107, 68, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.ab-btn:hover { filter: brightness(1.05); }
.ab-btn:active { transform: scale(0.98); }
.ab-btn.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.ab-btn.ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}
.ab-btn.soft {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: none;
}
.ab-error { color: var(--danger); margin: 0.5rem 0; font-weight: 600; }

.ab-pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.9rem;
  line-height: 1.55;
  font-size: 0.95rem;
}

.ab-grid { display: grid; gap: 0.9rem; }
.ab-grid-2 { grid-template-columns: 1fr; }
.ab-grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .ab-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .ab-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .ab-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* —— Lists / resource rows —— */
.ab-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.ab-list > li { margin: 0; }
.ab-list a,
.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ab-list a:hover,
.resource-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.ab-list .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.2rem;
}

.search-field {
  position: relative;
}
.search-field .search-ico {
  position: absolute;
  inset-inline-start: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 1rem;
}
.search-field .ab-input { padding-inline-start: 2.6rem; }

.search-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
}
@media (min-width: 640px) {
  .search-cta { font-size: 0.875rem; }
}
.search-cta:hover { border-color: var(--border-strong); }
.search-cta .search-cta-ico { flex-shrink: 0; color: var(--muted); }
.search-cta > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-cta .mic {
  margin-inline-start: auto;
  color: var(--accent);
  display: inline-flex;
  flex-shrink: 0;
}

/* —— Home dashboard —— */
.home-greeting {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}
.home-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.home-greeting h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.home-greeting .hello {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.home-hospital {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  max-width: 100%;
}
.home-hospital span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}
.section-head a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.quick-actions-card {
  border-radius: 1.5rem;
  padding: 1.1rem 0.75rem;
}
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  min-width: 0;
  color: var(--muted-foreground);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.25;
}
@media (min-width: 640px) {
  .quick-action { font-size: 0.6875rem; }
}
.quick-action-icon {
  display: flex;
  height: 3.1rem;
  width: 3.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  transition: transform 0.2s ease;
}
.quick-action:hover .quick-action-icon { transform: scale(1.05); }
.qa-green { background: var(--tile-green); color: var(--tile-green-text); }
.qa-red { background: var(--tile-red); color: var(--tile-red-text); }
.qa-blue { background: var(--tile-blue); color: var(--tile-blue-text); }
.qa-purple { background: var(--tile-purple); color: var(--tile-purple-text); }
.qa-navy { background: var(--navy-soft); color: var(--navy); }
.qa-orange { background: var(--tile-orange); color: var(--tile-orange-text); }
.qa-teal { background: var(--tile-teal); color: var(--teal); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  border-radius: 1.35rem;
  padding: 1.1rem;
  min-height: 7.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}
.category-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-tile:active { transform: translateY(0); }
.category-tile .tile-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
}
.category-tile .tile-label {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--foreground);
}
.category-tile .tile-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.tile-ico.green { background: var(--tile-green); color: var(--tile-green-text); }
.tile-ico.red { background: var(--tile-red); color: var(--tile-red-text); }
.tile-ico.blue { background: var(--tile-blue); color: var(--tile-blue-text); }
.tile-ico.purple { background: var(--tile-purple); color: var(--tile-purple-text); }
.tile-ico.orange { background: var(--tile-orange); color: var(--tile-orange-text); }
.tile-ico.teal { background: var(--tile-teal); color: var(--tile-green-text); }
.tile-ico.pink { background: var(--tile-pink); color: var(--tile-pink-text); }

.resistance-cta {
  display: block;
  margin-top: 1.25rem;
  border-radius: 1.35rem;
  padding: 1.25rem 1.35rem;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.resistance-cta::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  inset-inline-end: -40px;
  top: -40px;
}
.resistance-cta strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  position: relative;
}
.resistance-cta span {
  font-size: 0.88rem;
  opacity: 0.92;
  position: relative;
}

/* —— Login —— */
.ab-login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.ab-green-scene {
  background: var(--brand-gradient);
  position: relative;
  overflow: hidden;
  min-height: 32vh;
  padding: 1.25rem 1.25rem 3rem;
}
.ab-green-scene::before,
.ab-green-scene::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.ab-green-scene::before {
  width: 280px; height: 280px;
  top: -90px; inset-inline-end: -70px;
}
.ab-green-scene::after {
  width: 220px; height: 220px;
  bottom: -80px; inset-inline-start: -60px;
}

.ab-skyline {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 88px;
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  opacity: 0.22;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 120' fill='%23ffffff'%3E%3Cpath d='M0 120V78h28v42H0zm36 0V55h18v20h14V55h18v65H36zm58 0V70h22v50H94zm30 0V48h12v18h16V40h14v18h12V48h14v72H124zm80 0V62h26v58h-26zm34 0V35h10v22h20V28h12v29h18V35h10v85H238zm82 0V58h40V42h16v16h12v62H320zm76 0V50h18v70h-18zm26 0V68h30v52h-30zm38 0V44h14v22h22V36h16v30h14V44h12v76H460zm90 0V60h36v60h-36zm44 0V72h24v48h-24zm32 0V40h12v18h20V32h14v26h16V40h12v80H626zm92 0V66h28v54h-28zm36 0V52h40v68h-40zM0 120h800v0H0z'/%3E%3Cpath d='M540 120V20c18-18 38-18 56 0v100h-56zm-8 0c0-28 16-48 36-62 20 14 36 34 36 62h-72z'/%3E%3C/svg%3E");
}

.ab-login-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ab-login-hero-logo {
  background: #fff;
  border-radius: 1rem;
  padding: 0.45rem 0.55rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.ab-login-hero-logo img { width: 2.4rem; height: 2.4rem; display: block; }

.ab-tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  backdrop-filter: blur(6px);
}

.ab-sheet {
  position: relative;
  z-index: 2;
  margin-top: -2.5rem;
  flex: 1;
  background: var(--surface);
  border-radius: 1.75rem 1.75rem 0 0;
  box-shadow: 0 -8px 30px rgba(10, 40, 28, 0.1);
  padding: 1.75rem 1.35rem 2rem;
  max-width: 32rem;
  width: 100%;
  margin-inline: auto;
}
@media (min-width: 768px) {
  .ab-sheet {
    margin-top: -3rem;
    border-radius: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
  }
  .ab-login-page { background: var(--brand-gradient); }
}

.ab-sheet h1 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.ab-sheet .lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.field-with-ico { position: relative; }
.field-with-ico .field-ico {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 2.35rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
}
.field-with-ico .ab-input { padding-inline-start: 3.1rem; }

.demo-box {
  margin-top: 1.25rem;
  padding: 0.9rem;
  border-radius: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.demo-box h3 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.demo-row {
  display: flex;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.4rem;
  border-radius: 0.65rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.demo-row:hover { background: var(--accent-soft); }
.demo-row strong { display: block; font-size: 0.88rem; }
.demo-row span { font-size: 0.78rem; color: var(--muted); }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* —— Profile —— */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.profile-hero .home-avatar { width: 4rem; height: 4rem; font-size: 1.25rem; }
.profile-meta { display: grid; gap: 0.65rem; }
.profile-meta .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.profile-meta .row:last-child { border-bottom: 0; }

/* —— Coming soon / empty —— */
.coming-soon {
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.coming-soon .big-ico {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 1.25rem;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}

/* —— Motion —— */
@keyframes brand-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: brand-fade-up 0.45s ease both; }
.animate-fade-up-delay { animation: brand-fade-up 0.55s ease 0.08s both; }

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.skeleton-pulse {
  animation: skeleton-pulse 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, rgba(10,107,68,0.06), rgba(0,172,193,0.1), rgba(10,107,68,0.06));
  background-size: 200% 100%;
  border-radius: 1rem;
  min-height: 4rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* —— Mockup UX polish (splash / login / home) —— */
.ab-app-home .ab-main {
  padding-top: max(1rem, var(--safe-top));
}
.page-shell-home {
  max-width: 28rem;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .page-shell-home { max-width: 36rem; }
}
@media (min-width: 1024px) {
  .page-shell-home { max-width: none; }
}

.ab-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem 1rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.ab-sidebar-brand img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  border-radius: 0.65rem;
}

.ab-bell-btn { position: relative; }
.ab-notif-badge {
  position: absolute;
  top: 0.15rem;
  inset-inline-end: 0.15rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}
.home-top .home-greeting { margin-bottom: 0; flex: 1; min-width: 0; }
.home-greeting-text h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.home-bell {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.filter-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.85rem 0 0.15rem;
  margin-bottom: 0.35rem;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}
.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.search-cta {
  border-radius: 1.35rem !important;
  min-height: 3.35rem !important;
}

.ab-btn-block { width: 100%; display: block; text-align: center; }
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.35rem 0 1rem;
  font-size: 0.875rem;
}
.ab-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted-foreground);
  font-weight: 600;
  cursor: pointer;
}
.ab-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}
.login-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.login-link:hover { text-decoration: underline; }

.field-with-trailing .ab-input { padding-inline-end: 2.85rem; }
.field-trailing {
  position: absolute;
  inset-inline-end: 0.55rem;
  top: 2.35rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.ab-login-hero { min-height: 28vh; }
.ab-login-hero-logo {
  padding: 0.55rem 0.65rem 0.45rem !important;
  border-radius: 1.15rem !important;
}
.ab-login-hero-logo img {
  width: 4.5rem !important;
  height: auto !important;
  max-height: 3.25rem;
  object-fit: contain;
}
.ab-sheet h1 { font-size: 1.7rem !important; }
.ab-sheet .lead { margin-bottom: 1.35rem !important; }

/* Splash */
.ab-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--brand-gradient);
  color: #fff;
  overflow: hidden;
  padding: 2rem 1.25rem calc(2rem + var(--safe-bottom));
}
.ab-splash.is-hidden { display: none; }
.ab-splash-orb {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.ab-splash-orb-1 { width: 280px; height: 280px; top: -80px; inset-inline-end: -60px; }
.ab-splash-orb-2 { width: 220px; height: 220px; bottom: 18%; inset-inline-start: -70px; }
.ab-splash-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: -2rem;
}
.ab-logo-card {
  background: #fff;
  border-radius: 1.85rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  padding: 1.35rem 1.6rem 1.15rem;
  width: min(12.5rem, 58vw);
  text-align: center;
}
.ab-logo-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.ab-splash .ab-tag-pill {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.14);
}
.ab-splash-foot {
  position: absolute;
  inset-inline: 1.5rem;
  bottom: calc(5.5rem + var(--safe-bottom));
  z-index: 2;
  text-align: center;
}
.ab-splash-bar {
  width: min(12rem, 50vw);
  height: 3px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.ab-splash-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #5ec8ff;
  transition: width 1.45s ease;
}
.ab-splash-tagline {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.95);
}
.ab-splash-hospital {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}
.ab-skyline-splash { opacity: 0.28; height: 110px; }

@keyframes splash-out {
  to { opacity: 0; transform: scale(1.03); visibility: hidden; }
}
.splash-exit { animation: splash-out 0.45s ease forwards; }

/* —— AI chat / envelope —— */
.ai-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.ai-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.25rem 0 0.9rem;
}
.ai-chat-shell {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 36rem);
  padding: 0.85rem !important;
}
.ai-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.ai-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.35rem 0.15rem 0.85rem;
  max-height: 50vh;
  scroll-behavior: smooth;
}
.ai-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}
.ai-bubble { max-width: 100%; }
.ai-bubble.is-user {
  align-self: flex-end;
  max-width: 85%;
}
.ai-bubble.is-user .ai-bubble-text {
  background: var(--accent);
  color: #fff;
  border-radius: 1.15rem 1.15rem 0.35rem 1.15rem;
  padding: 0.75rem 0.95rem;
  font-weight: 550;
}
.ai-bubble.is-ai { align-self: stretch; }
.ai-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
.ai-envelope {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  padding: 0.95rem 1rem;
}
.ai-envelope-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  color: var(--navy);
}
.ai-warn-list {
  margin: 0.65rem 0 0;
  padding-inline-start: 1.1rem;
  color: #b54708;
  font-size: 0.88rem;
}
.ai-missing {
  margin-top: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.85rem;
  background: rgba(181, 71, 8, 0.08);
  border: 1px solid rgba(181, 71, 8, 0.18);
}
.ai-missing h3 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: #9a3412;
}
.ai-missing ul {
  margin: 0;
  padding-inline-start: 1.1rem;
  font-size: 0.86rem;
  color: #9a3412;
}
.ai-evidence { margin-top: 0.75rem; }
.ai-evidence h3 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--navy);
}
.ai-evidence-item {
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}
.ai-evidence-item p { margin: 0.2rem 0 0; color: var(--muted); }
.ai-disclaimer {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.ab-badge.soft-pill {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}
.ab-btn.soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Specialty picker */
.specialty-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .specialty-grid { grid-template-columns: 1fr 1fr; }
}
.specialty-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  text-align: start;
  padding: 1.1rem 1.15rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.specialty-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.specialty-card strong { font-size: 1.05rem; }

/* Antibiogram heatmap */
.ab-table-scroll {
  overflow-x: auto;
  margin-top: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.ab-heatmap {
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 0.75rem;
  min-width: 100%;
}
.ab-heatmap th,
.ab-heatmap td {
  padding: 0.4rem 0.45rem;
  text-align: center;
  border-radius: 0.35rem;
}
.ab-heatmap thead th {
  background: var(--surface-2);
  color: var(--muted-foreground);
  font-weight: 600;
  white-space: nowrap;
}
.ab-heatmap tbody th {
  text-align: start;
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 1;
}
.hm-high { background: #c8e6c9; color: #1b5e20; font-weight: 700; }
.hm-mid { background: #ffe0b2; color: #e65100; font-weight: 700; }
.hm-low { background: #ffcdd2; color: #b71c1c; font-weight: 700; }
.hm-empty { background: var(--surface-2); color: var(--muted); }

.syndrome-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.qa-edit-actions {
  display: inline-flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
button.filter-chip {
  border: none;
  cursor: pointer;
  font: inherit;
}

/* —— Public / App Store legal pages —— */
.ab-public {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 80% at 10% -10%, rgba(18, 160, 106, 0.12), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, rgba(0, 45, 84, 0.08), transparent 50%),
    var(--background);
  color: var(--foreground);
}
.ab-public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  padding-top: calc(0.85rem + var(--safe-top));
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.ab-public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  font-weight: 750;
}
.ab-public-brand img {
  border-radius: 0.65rem;
}
.ab-public-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
}
.ab-public-nav a {
  color: var(--muted-foreground);
  text-decoration: none;
}
.ab-public-nav a:hover { color: var(--accent); }
.ab-public-signin {
  color: #fff !important;
  background: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}
.ab-public-signin:hover { background: var(--accent-hover); color: #fff !important; }
.ab-public-main {
  flex: 1;
  width: min(44rem, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.15rem 2.5rem;
}
.ab-public-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.15rem calc(1.25rem + var(--safe-bottom));
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
}
.ab-public-footer-brand {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
}
.ab-public-footer-links {
  margin: 0.55rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 600;
}
.ab-public-footer-links a {
  color: var(--accent);
  text-decoration: none;
}
.ab-public-footer-meta {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.ab-legal h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
  color: var(--navy);
}
.ab-legal-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--accent);
}
.ab-legal-updated {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.ab-legal-section {
  margin: 0 0 1.35rem;
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ab-legal-section h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  color: var(--navy);
}
.ab-legal-section p {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  color: var(--muted-foreground);
}
.ab-legal-section p:last-child { margin-bottom: 0; }
.ab-legal-list {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.15rem;
  color: var(--muted-foreground);
  line-height: 1.55;
}
.ab-legal-list li { margin: 0.25rem 0; }
.ab-legal a { color: var(--accent); font-weight: 650; }

.ab-marketing-hero {
  margin-bottom: 1.25rem;
  padding: 1.35rem 1.2rem 1.4rem;
  border-radius: 1.4rem;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.ab-marketing-hero .ab-legal-kicker { color: rgba(255, 255, 255, 0.78); }
.ab-marketing-hero h1 {
  color: #fff;
  margin: 0.35rem 0 0.55rem;
  font-size: clamp(2rem, 6vw, 2.6rem);
}
.ab-marketing-lead {
  margin: 0;
  max-width: 36rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}
.ab-marketing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.ab-marketing-cta .ab-btn.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.ab-marketing-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 720px) {
  .ab-marketing-grid { grid-template-columns: repeat(3, 1fr); }
}
.ab-marketing-grid > div {
  padding: 1rem 1.05rem;
  border-radius: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ab-marketing-grid h2 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--navy);
}
.ab-marketing-grid p {
  margin: 0;
  color: var(--muted-foreground);
  line-height: 1.5;
  font-size: 0.92rem;
}

.ab-login-legal {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  justify-content: center;
}
.ab-login-legal a {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 640px) {
  .ab-public-nav a:not(.ab-public-signin) { display: none; }
}


