/* ============================================================
   medpaw.css — Medpaw Brand Stylesheet
   App: portal | Version: 1.0 | May 2026
   ============================================================
   TABLE OF CONTENTS
   1.  Google Fonts Import
   2.  CSS Custom Properties (Brand Tokens)
   3.  Reset & Base
   4.  Typography
   5.  Layout Utilities
   6.  Navigation (topnav + sidebar)
   7.  Logo Component
   8.  Buttons
   9.  Forms & Inputs
   10. Cards
   11. Badges & Status Pills
   12. Tables
   13. Landing Page
   14. Clinic Microsite
   15. Owner Dashboard
   16. Owner Profile
   17. Animal Card Partial
   18. Appointment Row Partial
   19. Footer
   20. Alerts & Messages
   21. Animations
   22. Responsive
   ============================================================ */


/* ── 1. GOOGLE FONTS ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;1,9..144,400&family=DM+Sans:wght@300;400;500;600&display=swap');


/* ── 2. CSS CUSTOM PROPERTIES ────────────────────────────── */
:root {
  /* Brand colours */
  --teal:         #0E9488;
  --teal-dark:    #0B7870;
  --teal-light:   #E6F7F7;
  --teal-mid:     rgba(14, 148, 136, 0.15);
  --terra:        #C4622D;
  --terra-dark:   #A8521F;
  --terra-light:  #FDF0E8;
  --midnight:     #1A1D2E;
  --midnight-soft:#252840;

  /* Neutrals */
  --white:        #FFFFFF;
  --bg:           #F7F8FC;
  --border:       #E8EAF0;
  --muted:        #8B8FA8;
  --text:         #1A1D2E;
  --text-soft:    #4B5563;

  /* Semantic colours */
  --green:        #10B981;
  --green-light:  #ECFDF5;
  --amber:        #F59E0B;
  --amber-light:  #FFFBEB;
  --blue:         #3B82F6;
  --blue-light:   #EFF6FF;
  --red:          #EF4444;
  --red-light:    #FEF2F2;

  /* Gradients */
  --grad-brand:   linear-gradient(135deg, var(--teal) 0%, var(--terra) 100%);
  --grad-banner:  linear-gradient(130deg, var(--teal) 0%, var(--teal-dark) 50%, #0A7571 100%);
  --grad-dark:    linear-gradient(135deg, var(--midnight) 0%, var(--midnight-soft) 100%);

  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', 'Segoe UI', Helvetica, sans-serif;

  /* Spacing */
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --radius-full:  9999px;

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(26, 29, 46, 0.06);
  --shadow-md:    0 4px 16px rgba(26, 29, 46, 0.08);
  --shadow-lg:    0 8px 32px rgba(26, 29, 46, 0.12);
  --shadow-teal:  0 4px 16px rgba(14, 165, 160, 0.2);

  /* Layout */
  --topnav-h:     60px;
  --sidebar-w:    54px;
  --content-max:  1200px;
}


/* ── 3. RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Push content below the notch/status bar in the native app shell (Capacitor
     WebView with viewport-fit=cover); a no-op 0px on browsers/devices without
     a safe-area inset, so this doesn't affect normal desktop/mobile-web use. */
  padding-top: env(safe-area-inset-top, 0px);
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover { color: var(--teal-dark); }

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: var(--font-body);
  font-size: 13px;
}


/* ── 4. TYPOGRAPHY ───────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--midnight);
  letter-spacing: -0.3px;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

.display-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.text-muted   { color: var(--muted); }
.text-teal    { color: var(--teal); }
.text-terra   { color: var(--terra); }
.text-success { color: var(--green); }
.text-warning { color: var(--amber); }
.text-danger  { color: var(--red); }

/* Gradient text */
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── 5. LAYOUT UTILITIES ─────────────────────────────────── */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-body {
  display: flex;
  min-height: calc(100vh - var(--topnav-h));
}

.main-content {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-gap    { display: flex; align-items: center; gap: 0.75rem; }

.spacer { flex: 1; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }


/* ── 6. NAVIGATION ───────────────────────────────────────── */

/* Top nav */
.topnav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
  height: var(--topnav-h);
  background: var(--white);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

/* Gradient pulse underline beneath logo in topnav */
.topnav::after {
  content: '';
  position: absolute;
  left: 16px;
  bottom: 0;
  width: 210px;
  height: 2.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--teal) 20%,
    var(--terra) 80%,
    transparent 100%);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  border: none;
  background: none;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link:hover { color: var(--text); background: var(--bg); }

.nav-link.active {
  color: var(--teal);
  background: var(--teal-light);
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted);
  flex: 0 1 200px;   /* Can shrink when nav is tight */
  min-width: 120px;
  cursor: text;
  transition: border-color 0.15s;
}

.search-bar:focus-within { border-color: var(--teal); }

.search-bar input {
  border: none;
  background: none;
  outline: none;
  color: var(--text);
  width: 100%;
}

/* Notification button */
.notif-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.notif-btn:hover { background: var(--teal-light); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--terra);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}

/* User pill */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 14px 4px 4px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
}

.user-pill:hover { border-color: var(--teal); }

.user-ava {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* Icon sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--midnight);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-ico {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  text-decoration: none;
}

.sidebar-ico:hover { background: rgba(255, 255, 255, 0.09); }

.sidebar-ico.active { background: rgba(14, 165, 160, 0.18); }

.sidebar-ico.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--grad-brand);
  border-radius: 0 3px 3px 0;
}

.sidebar-spacer { flex: 1; }

.sidebar-logo {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0.45;
  transition: opacity 0.15s;
  cursor: pointer;
}

.sidebar-logo:hover { opacity: 0.85; }


/* ── 7. LOGO COMPONENT ───────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}

.logo-icon { width: 38px; height: 38px; flex-shrink: 0; }

.logo-text { display: flex; flex-direction: column; line-height: 1; }

.logo-wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.logo-wordmark .paw    { color: var(--midnight); }
.logo-wordmark .portal { background: var(--grad-brand); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.logo-tagline {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
  text-transform: uppercase;
}


/* ── 8. BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-brand);
  color: var(--white);
  box-shadow: var(--shadow-teal);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 160, 0.3);
  color: var(--white);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-white {
  background: var(--white);
  color: var(--teal-dark);
}

.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.15);
  color: var(--teal-dark);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.24);
  color: var(--white);
}

.btn-whatsapp {
  background: #25D366;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #1EB558;
  color: var(--white);
  transform: translateY(-1px);
}

.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }


/* ── 9. FORMS & INPUTS ───────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 1rem;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--teal);
  background: var(--white);
}

.form-input::placeholder { color: var(--muted); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238B8FA8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-error {
  font-size: 11px;
  color: var(--red);
  margin-top: 3px;
}

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle {
  width: 36px; height: 20px;
  border-radius: 10px;
  background: var(--border);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle.on { background: var(--teal); }

.toggle::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--white);
  top: 2px; left: 2px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle.on::after { left: 18px; }

.toggle-label { font-size: 13px; font-weight: 500; }


/* ── 10. CARDS ───────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--midnight);
}

.card-action {
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.card-action:hover { text-decoration: underline; color: var(--teal-dark); }

.card-body { padding: 1.5rem; }

/* Empty-state messages inside cards — match card-body padding so text
   aligns with the card title and doesn't clip against the rounded edge. */
.card-empty {
  padding: 1rem 1.5rem;
  font-size: 13px;
  color: var(--muted);
}


/* ── 11. BADGES & STATUS PILLS ───────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-teal    { background: var(--teal-light);  color: var(--teal-dark); }
.badge-terra   { background: var(--terra-light);  color: var(--terra-dark); }
.badge-green   { background: var(--green-light);  color: #065F46; }
.badge-amber   { background: var(--amber-light);  color: #92400E; }
.badge-blue    { background: var(--blue-light);   color: #1D4ED8; }
.badge-red     { background: var(--red-light);    color: #991B1B; }
.badge-gray    { background: var(--bg);           color: var(--muted); border: 1px solid var(--border); }

/* Status pills for appointments */
.status-pill {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  white-space: nowrap;
}

.s-now      { background: var(--teal-light);  color: var(--teal); }
.s-confirmed{ background: var(--blue-light);  color: var(--blue); }
.s-pending  { background: var(--amber-light); color: var(--amber); }
.s-done     { background: var(--bg);          color: var(--muted); }
.s-cancelled{ background: var(--red-light);   color: var(--red); }


/* ── 12. TABLES ──────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-bottom: 1.5px solid var(--border);
  font-weight: 700;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(26, 29, 46, 0.05);
  font-size: 13px;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(14, 165, 160, 0.03); }


/* ── 13. LANDING PAGE ────────────────────────────────────── */
.landing-hero {
  background: var(--grad-banner);
  padding: 6rem 0 5rem;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Heartbeat watermark in hero */
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200'%3E%3Cpolyline points='0,100 200,100 280,100 330,30 390,170 440,10 500,190 550,100 700,100 800,100 860,70 900,130 940,100 1200,100' fill='none' stroke='white' stroke-width='2' opacity='0.08' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.landing-hero .container { position: relative; z-index: 1; }

.landing-hero h1 {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.landing-hero h1 em { font-style: italic; opacity: 0.85; }

.landing-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Hero brand logo ── */
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 2.25rem;
}

.hero-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.hero-logo-svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.18));
}

.hero-wordmark {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
}

.hero-paw    { color: #ffffff; }
.hero-portal { color: rgba(255,255,255,0.7); }

.hero-tagline-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

/* Stats section */
.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 4rem 0;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Features section */
.features-section {
  padding: 5rem 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
  background: var(--white);
}

.feature-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* Clinic list section */
.clinics-section { padding: 5rem 0; }

.clinic-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.clinic-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.clinic-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.clinic-card-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.clinic-card-city { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* CTA section */
.cta-section {
  background: var(--midnight);
  padding: 5rem 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-section h2 { color: var(--white); margin-bottom: 1rem; }
.cta-section p  { opacity: 0.7; margin-bottom: 2rem; max-width: 500px; margin-inline: auto; }


/* ── 14. CLINIC MICROSITE ────────────────────────────────── */
.microsite-header {
  background: var(--grad-banner);
  padding: 2.5rem 0 3rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.microsite-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 100'%3E%3Cpolyline points='0,50 100,50 140,20 180,80 220,5 260,95 300,50 500,50 800,50' fill='none' stroke='white' stroke-width='1.5' opacity='0.1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: cover;
  pointer-events: none;
}

.microsite-header .container { position: relative; z-index: 1; }

.microsite-clinic-name {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.microsite-city { font-size: 14px; opacity: 0.8; margin-bottom: 1rem; }

.microsite-hours {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.microsite-hours-pill {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  color: var(--white);
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 1.5rem 0;
}

.service-tile {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--white);
}

.service-tile:hover,
.service-tile.selected {
  border-color: var(--teal);
  background: var(--teal-light);
}

.service-tile-icon { font-size: 24px; margin-bottom: 6px; }
.service-tile-name { font-size: 12px; font-weight: 600; }
.service-tile-dur  { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Phone lookup */
.phone-lookup-wrap {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.phone-result { margin-top: 1rem; }

/* Access methods */
.access-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.access-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  text-align: center;
}

.access-icon { font-size: 28px; margin-bottom: 8px; }
.access-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.access-desc  { font-size: 11px; color: var(--muted); line-height: 1.5; }


/* ── 15. OWNER DASHBOARD ─────────────────────────────────── */
.welcome-banner {
  background: var(--grad-banner);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Paw watermark in banner */
.welcome-banner::after {
  content: '🐾';
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  font-size: 90px;
  opacity: 0.06;
  pointer-events: none;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
  color: var(--white);
}

.welcome-title em { font-style: italic; }

.welcome-sub {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  transition: box-shadow 0.2s;
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-ico {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 10px;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.stat-lbl { font-size: 12px; color: var(--muted); }

.stat-delta {
  font-size: 11px;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-block;
  font-weight: 600;
}

.delta-up   { background: var(--green-light); color: #065F46; }
.delta-warn { background: var(--amber-light); color: #92400E; }

/* Dashboard content grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 1.25rem;
}

/* Filter tabs */
.filter-tabs { display: flex; gap: 3px; }

.ftab {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  font-weight: 500;
  border: none;
  background: none;
}

.ftab.active { background: var(--teal-light); color: var(--teal); font-weight: 600; }
.ftab:hover:not(.active) { color: var(--text); background: var(--bg); }

/* Quick actions dark card */
.quick-actions {
  background: var(--grad-dark);
  border-radius: var(--radius-xl);
  padding: 1rem 1.1rem;
}

.qa-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 10px;
  font-family: var(--font-display);
}

.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.qa-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  font-family: var(--font-body);
  text-align: left;
  text-decoration: none;
}

.qa-btn:hover {
  background: rgba(255,255,255,0.14);
  color: var(--white);
  transform: translateY(-1px);
}

/* Vaccination alert */
.vax-alert {
  background: var(--amber-light);
  border: 1.5px solid rgba(245,158,11,0.22);
  border-radius: var(--radius-xl);
  padding: 1rem 1.1rem;
}

.vax-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vax-title { font-size: 12px; font-weight: 700; color: #92400E; }
.vax-count { font-size: 11px; color: var(--amber); font-weight: 700; }

.vax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(245,158,11,0.16);
  font-size: 11px;
}

.vax-pet { color: var(--text); font-weight: 500; }
.vax-due { color: var(--amber); font-weight: 600; }
.vax-due.overdue { color: var(--red); }


/* ── 16. OWNER PROFILE ───────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profile-sidebar-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  margin: 0 auto 1rem;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-clinic { font-size: 12px; color: var(--muted); }

.profile-meta {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.profile-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
}

.profile-meta-row span:first-child { color: var(--muted); }
.profile-meta-row span:last-child  { font-weight: 600; }


/* ── 17. ANIMAL CARD PARTIAL ─────────────────────────────── */
.animal-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.animal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.animal-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.animal-avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.animal-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.animal-breed { font-size: 11px; color: var(--muted); margin-top: 1px; }

.animal-next {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
}

.animal-next-label { font-size: 10px; color: var(--muted); }
.animal-next-date  { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 2px; }

.animal-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.animal-chip {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
}

.animal-chip.alert {
  border-color: rgba(196, 98, 45, 0.3);
  color: var(--terra);
  background: var(--terra-light);
  font-weight: 600;
}

.animal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.animal-next-apt { font-size: 11px; color: var(--muted); }
.animal-next-apt strong { color: var(--text); font-weight: 600; }


/* ── 18. APPOINTMENT ROW PARTIAL ─────────────────────────── */
.apt-list { padding: 6px; }

.apt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--text);
}

.apt-row:hover { background: var(--bg); }
.apt-row.now   { background: var(--teal-light); }

.apt-time {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  min-width: 38px;
  flex-shrink: 0;
}

.apt-row.now .apt-time { color: var(--teal); }

.apt-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.apt-info { flex: 1; min-width: 0; }
.apt-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apt-sub  { font-size: 11px; color: var(--muted); margin-top: 1px; }

.apt-sep { height: 1px; background: var(--border); margin: 2px 10px; opacity: 0.6; }


/* ── 19. FOOTER ──────────────────────────────────────────── */
.site-footer {
  background: var(--midnight);
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 2rem;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p { font-size: 13px; line-height: 1.7; margin-top: 0.75rem; max-width: 260px; }

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

.footer-links { display: flex; flex-direction: column; gap: 8px; }

.footer-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer-link:hover { color: var(--teal); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-size: 12px; }

.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-legal a:hover { color: var(--teal); }


/* ── 20. ALERTS & MESSAGES ───────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success { background: var(--green-light); border-color: var(--green);  color: #065F46; }
.alert-warning { background: var(--amber-light); border-color: var(--amber);  color: #92400E; }
.alert-error   { background: var(--red-light);   border-color: var(--red);    color: #991B1B; }
.alert-info    { background: var(--teal-light);  border-color: var(--teal);   color: var(--teal-dark); }

/* Django messages */
.messages-container {
  position: fixed;
  top: calc(var(--topnav-h) + 12px);
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.message-toast {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 10px;
  align-items: center;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ── 21. ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.anim-fade-up    { animation: fadeUp   0.4s ease both; }
.anim-fade-down  { animation: fadeDown 0.4s ease both; }
.anim-fade-in    { animation: fadeIn   0.3s ease both; }

.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.10s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.20s; }


/* ── 22. CLINIC CTA SECTION ──────────────────────────────── */
.clinic-cta-section {
  padding: 4rem 0;
  background: var(--midnight);
}
.clinic-cta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.clinic-cta-card h2 { color: white; }
.clinic-cta-card p  { color: rgba(255,255,255,0.7); margin-top: 0.5rem; }
.clinic-cta-actions { display: flex; flex-direction: column; gap: 0.75rem; flex-shrink: 0; }
.clinic-cta-plans {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 640px) {
  .clinic-cta-card { flex-direction: column; }
  .clinic-cta-actions { width: 100%; }
  .clinic-cta-actions .btn { width: 100%; justify-content: center; }
}


/* ── 23. PLAN TILES (clinic registration) ────────────────── */
.plan-tile {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.625rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: var(--white);
  user-select: none;
}
.plan-tile:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}
.plan-tile.selected {
  border-color: var(--teal);
  background: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(14,165,160,0.15);
}

/* ── 23. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4      { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .dash-grid   { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links     { display: none; }
  .sidebar       { display: none; }
  .landing-hero h1    { font-size: 2.25rem; }
  .features-grid      { grid-template-columns: 1fr; }
  .clinic-cards       { grid-template-columns: 1fr; }
  .landing-stats      { grid-template-columns: 1fr; }
  .profile-layout     { grid-template-columns: 1fr; }
  .grid-2, .grid-3    { grid-template-columns: 1fr; }
  .footer-grid        { grid-template-columns: 1fr; }
  .access-methods     { grid-template-columns: 1fr; }
  .main-content       { padding: 1rem; }
}

@media (max-width: 480px) {
  .topnav          { padding: 0 1rem; }
  .search-bar      { display: none; }
  .welcome-banner  { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .stats-strip     { grid-template-columns: 1fr 1fr; }
  .services-grid   { grid-template-columns: 1fr; }
  .hero-actions    { flex-direction: column; align-items: center; }
}

/* ── 24. MULTILINGUAL / THAI FONT ────────────────────────── */
:lang(th),
html[lang="th"] {
  font-family: 'Sarabun', 'DM Sans', sans-serif;
  line-height: 1.8;
}

:lang(th) .topnav,
html[lang="th"] .topnav {
  font-family: 'Sarabun', sans-serif;
}

/* ── 25. LANGUAGE SWITCHER ───────────────────────────────── */
.lang-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-dropdown-trigger {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.lang-caret {
  font-size: 10px;
  color: var(--muted);
}

.lang-dropdown-trigger:hover {
  background: var(--bg);
}

.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(26,29,46,.1);
  padding: 6px;
  z-index: 1000;
  flex-direction: row;
  gap: 4px;
}

.lang-dropdown-menu.open {
  display: flex;
}

.lang-option {
  background: none;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s;
}

.lang-option:hover {
  background: var(--bg);
}

.lang-option.active {
  background: var(--teal-light);
  outline: 2px solid var(--teal);
  border-radius: 6px;
}

/* Catalan has no ISO country flag of its own — a small text badge instead of
   an emoji, sized to sit alongside the flag emoji used for every other
   language in this switcher. */
.lang-text-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: 3px;
  background: var(--teal-light);
  color: var(--teal);
  vertical-align: middle;
}

/* ── 26. PROFILE PILL DROPDOWN ───────────────────────────── */

/* Staff nav — tighter padding for 7 nav items */
.staff-nav .nav-link {
  padding: 6px 9px;
  font-size: 12px;
}

@media (max-width: 1366px) {
  .staff-nav .search-bar input::placeholder {
    font-size: 11px;
  }
}

/* Profile dropdown container */
.profile-dropdown {
  position: relative;
}

/* Profile pill button */
.profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  transition: border-color 0.15s;
  max-width: 160px;
}

.profile-pill:hover {
  border-color: var(--teal);
}

/* Profile name inside pill — first name only, truncated */
.profile-pill .profile-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  font-family: var(--font-body); /* Override display font from sidebar .profile-name */
}

/* Caret */
.profile-caret {
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Dropdown menu */
.profile-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(26,29,46,.12);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}

.profile-dropdown-menu.open {
  display: block;
}

/* Dropdown header — full name + email */
.profile-menu-header {
  padding: 12px 16px 8px;
}

.profile-menu-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.profile-menu-email {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.profile-menu-role {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* Role chips in the nav pill */
.role-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: .3px;
  white-space: nowrap;
}
.role-chip-owner {
  background: #D1FAE5;
  color: #065F46;
}
.role-chip-staff {
  background: #DBEAFE;
  color: #1E40AF;
}

/* Divider */
.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Menu items */
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.profile-menu-item:hover {
  background: var(--bg);
}

/* Sign out — red destructive action */
.profile-menu-signout {
  color: #991B1B;
}

.profile-menu-signout:hover {
  background: #FEF2F2;
  color: #991B1B;
}

/* ── 27. CLINIC SETTINGS HUB ─────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 2rem auto;
}

.settings-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s, border-color .15s;
}

.settings-card:hover {
  box-shadow: 0 4px 16px rgba(26,29,46,.08);
  border-color: var(--teal);
}

.settings-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.settings-card-body {
  flex: 1;
}

.settings-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.settings-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.settings-card-arrow {
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Section 28 · OTP Verification ──────────────────────────────────────── */

.otp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

.otp-icon {
  font-size: 40px;
  margin-bottom: .75rem;
}

.otp-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 .5rem;
  color: var(--text);
}

.otp-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.otp-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
  border-radius: 8px;
  padding: .65rem 1rem;
  font-size: 13px;
  margin-bottom: 1rem;
  text-align: left;
}

.otp-form {
  margin-bottom: 1rem;
}

/* Six individual digit boxes */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.otp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  caret-color: transparent;
}

.otp-digit:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14,165,160,.18);
}

.otp-submit {
  width: 100%;
  justify-content: center;
  padding: 12px;
}

.otp-resend {
  font-size: 13px;
  color: var(--muted);
  margin-top: .75rem;
}

.otp-resend-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.otp-resend-btn:hover {
  color: var(--teal-dark, #0d8a86);
}

@media (max-width: 400px) {
  .otp-digit {
    width: 38px;
    height: 46px;
    font-size: 1.1rem;
    border-radius: 8px;
    gap: .35rem;
  }
  .otp-card {
    padding: 1.5rem 1.25rem;
  }
}


/* ── 29. STAFF PAGE LAYOUTS ──────────────────────────────── */

/* Page header: page title + action buttons row */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Back link — breadcrumb-style navigation above the page title */
.back-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 0.2rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--midnight); }

/* Page title — main heading */
.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--midnight);
  margin: 0.2rem 0 0;
  line-height: 1.25;
}

/* Page subtitle — secondary line below the title */
.page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Page actions — right-side button group in the page header */
.page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

/* Detail strip — horizontal band of key metadata (e.g. animal summary) */
.detail-strip {
  display: flex;
  flex-wrap: wrap;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.detail-strip-item {
  flex: 1;
  min-width: 110px;
  padding: 0.7rem 1.25rem;
  border-right: 1.5px solid var(--border);
  font-size: 13px;
  color: var(--midnight);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-strip-item:last-child { border-right: none; }

/* The .label inside each strip item is already styled by the global .label rule;
   this just ensures it renders as a block so the value sits below it. */
.detail-strip-item .label { display: block; margin-bottom: 0.1rem; }

/* Two-column grid — equal-width columns with a gap.
   Used for both form input pairs and side-by-side card layouts. */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Medical record item — one visit entry inside the Medical Records card */
.record-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.record-item:last-child { border-bottom: none; }

.record-item p {
  margin: 0.2rem 0;
  font-size: 14px;
  line-height: 1.55;
}

/* Date / vet header above the record body */
.record-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* Responsive: stack two-col-grid to single column on small screens */
@media (max-width: 768px) {
  .two-col-grid { grid-template-columns: 1fr; }
  .detail-strip { flex-direction: column; }
  .detail-strip-item { border-right: none; border-bottom: 1.5px solid var(--border); }
  .detail-strip-item:last-child { border-bottom: none; }
  .page-header { flex-direction: column; gap: 0.75rem; }
  .page-actions { width: 100%; flex-wrap: wrap; }
}


/* ── 30. HELP & DOCUMENTATION SYSTEM ────────────────────────── */

.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.help-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.help-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.help-nav a {
  display: block;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 2px;
}

.help-nav a:hover { background: var(--bg); }

.help-nav a.active {
  background: var(--teal-light);
  color: var(--teal);
  font-weight: 600;
}

.help-content { min-width: 0; }

.help-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.help-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.help-breadcrumb a:hover { color: var(--teal); text-decoration: underline; }

.help-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--teal);
}

.help-body h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.help-body p { line-height: 1.7; margin-bottom: 1rem; }

.help-body ol,
.help-body ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.help-body li { line-height: 1.7; margin-bottom: 0.4rem; }

.help-body a { color: var(--teal); }
.help-body a:hover { color: var(--teal-dark); }

/* Tip box — teal left border */
.help-tip {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--teal-dark);
  margin: 1rem 0;
  line-height: 1.6;
}

/* Warning box — amber left border */
.help-warning {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #92400E;
  margin: 1rem 0;
  line-height: 1.6;
}

/* Previous / Next navigation at the bottom of section pages */
.help-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.help-nav-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  padding: 6px 14px;
  border: 1.5px solid var(--teal);
  border-radius: var(--radius-md);
  transition: background 0.15s, color 0.15s;
}

.help-nav-btn:hover {
  background: var(--teal);
  color: var(--white);
}

/* Responsive: collapse to single column on mobile */
@media (max-width: 768px) {
  .help-layout {
    grid-template-columns: 1fr;
    margin: 1rem;
    padding: 0;
  }
  .help-sidebar { position: static; }
  .help-footer { flex-direction: column; gap: 0.75rem; }
}

/* ── Consent block ──────────────────────────────────────────────────────────── */
.consent-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 1.5rem 0;
}
.consent-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.consent-label input[type='checkbox'] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--teal);
}
.consent-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.consent-text a {
  color: var(--teal);
  text-decoration: underline;
}
.consent-error {
  color: #991B1B;
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  background: #FEF2F2;
  border-radius: 6px;
}
