/* ==========================================================================
   styles.css — Journal of Tibb Mufrad Aza
   Design language inspired by IEEE: IEEE blue, dark utility bar, white header
   with underlined menu, clean white cards, orange call-to-action.

   HOW THIS FILE IS ORGANISED
     1. Design tokens (colours, fonts, spacing) — change the look here
     2. Base / reset
     3. Layout helpers
     4. Components (utility bar, header, buttons, cards, forms, footer ...)
     5. Page-specific (hero, membership)
     6. Responsive rules — MOBILE FIRST: the rules above are for phones;
        the @media (min-width: ...) blocks at the bottom enlarge the layout
        for tablets and desktops.

   RTL NOTE: logical properties (margin-inline-start, text-align: start, ...)
   are used so the same CSS works for Urdu (right-to-left) and English.
   ========================================================================== */


/* ---------- 1. Design tokens ---------- */
:root {
  /* Colours */
  --blue: #00629b;          /* IEEE blue: links, buttons, accents */
  --blue-dark: #004b75;
  --navy: #002a42;          /* utility bar, hero, footer */
  --ink: #1d1d1b;           /* main text */
  --muted: #5f6b73;         /* secondary text */
  --line: #d9dee2;          /* borders */
  --bg: #f4f6f8;            /* page background */
  --white: #fff;
  --accent: #f7941d;        /* call-to-action orange */
  --ok: #1e7b45;
  --error: #b3261e;

  /* Shape and spacing */
  --radius: 4px;
  --gap: 16px;
  --tap-min: 44px;          /* minimum touch target size recommended for phones */

  /* Fonts: Urdu uses Naskh, English uses Open Sans */
  --font-en: "Open Sans", "Segoe UI", Arial, sans-serif;
  --font-ur: "Noto Naskh Arabic", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
}


/* ---------- 2. Base / reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute must win over rules such as display:flex */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-en);
  line-height: 1.6;
}
/* Urdu needs a different font, a little more size and taller lines */
html[lang="ur"] body { font-family: var(--font-ur); font-size: 1.1rem; line-height: 1.9; }

img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Visible keyboard focus for accessibility */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

[hidden] { display: none !important; }   /* make the hidden attribute always win */


/* ---------- 3. Layout helpers ---------- */
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }


/* ---------- 4. Components ---------- */

/* --- Utility bar (thin dark strip at the very top) --- */
.utility { background: var(--navy); color: #cfdde6; font-size: .85rem; }
.utility .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; min-height: 40px; padding-block: 8px;   /* breathing room above and below the strip's content */
}
.utility-text { display: none; }                      /* hidden on phones to save space */
.utility-actions { display: flex; align-items: center; gap: 14px; margin-inline-start: auto; }
.utility a { color: #fff; }

.lang-switch { display: inline-flex; border: 1px solid #4d7b94; border-radius: var(--radius); overflow: hidden; }
.lang-switch button {
  min-height: 32px; padding: 2px 14px;
  background: transparent; color: #fff; border: 0; cursor: pointer; font: inherit; font-size: .85rem;
}
.lang-switch button[aria-pressed="true"] { background: var(--blue); }

/* --- Header: logo + menu --- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--blue); color: #fff; border-radius: var(--radius);
  font: 800 .75rem var(--font-en);
}
.brand-name { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.brand-sub { color: var(--muted); font-size: .78rem; line-height: 1.3; }

/* "Menu" button, visible on phones only */
.nav-toggle {
  min-height: var(--tap-min); padding: 6px 16px;
  background: var(--white); color: var(--blue); border: 2px solid var(--blue);
  border-radius: var(--radius); font: inherit; font-weight: 700; cursor: pointer;
}

/* Menu list: phones show it stacked under the header, only when opened */
.main-nav { display: none; width: 100%; }
.main-nav.open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; min-height: var(--tap-min); padding: 10px 4px;
  color: var(--ink); font-weight: 600; border-top: 1px solid var(--line);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue); text-decoration: none; }

/* --- Buttons --- */
.btn {
  display: inline-block; min-height: var(--tap-min); padding: 10px 22px;
  background: var(--blue); color: #fff; border: 2px solid var(--blue); border-radius: var(--radius);
  font: inherit; font-weight: 700; text-align: center; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); text-decoration: none; }
.btn-outline { background: transparent; color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #e0830f; border-color: #e0830f; }
.btn-light { background: transparent; border-color: #fff; color: #fff; }   /* for dark backgrounds */
.btn-light:hover { background: #fff; color: var(--blue); }

/* --- Section headings --- */
.block { padding: 36px 0; }
.block-white { background: var(--white); }
.section-title { margin: 0 0 6px; font-size: 1.4rem; color: var(--navy); }
.section-title-bar { width: 56px; height: 4px; margin-bottom: 22px; background: var(--accent); }

/* --- Cards --- */
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }   /* 1 column on phones */
.card {
  padding: 20px; background: var(--white);
  border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius);
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--blue-dark); }
.card p { margin: 0; color: var(--muted); }
.card .card-actions { margin-top: 12px; }
.step-no {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 10px;
  background: var(--blue); color: #fff; border-radius: 50%; font: 700 1rem var(--font-en);
}

/* --- Page title band (used on inner pages) --- */
.page-band { padding: 20px 0; background: var(--white); border-bottom: 1px solid var(--line); }
.page-band h1 { margin: 0; font-size: 1.6rem; color: var(--navy); }
.policy-back { margin-top: 12px; min-height: 38px; padding: 5px 14px; font-size: .9rem; }
html[dir="rtl"] .policy-back::before { content: "→ "; }
html[dir="ltr"] .policy-back::before { content: "← "; }
.home-disclosure { margin-block: 16px; padding: 14px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.home-disclosure summary { color: var(--blue); font-weight: 700; cursor: pointer; }
.home-disclosure p { margin: 12px 0; }

/* --- Panels (white boxes) --- */
.panel { padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { margin: 0 0 14px; font-size: 1.2rem; color: var(--navy); }
.panel h3 { margin: 0 0 8px; font-size: 1.05rem; }

/* --- Forms --- */
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }   /* 1 column on phones */
.field { display: flex; flex-direction: column; }
.field label { margin-bottom: 4px; font-weight: 700; font-size: .95rem; }
.req { margin-inline-start: 4px; color: var(--error); }

/* font-size 16px+ stops iPhones zooming in when a field is tapped */
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--tap-min); padding: 10px 12px;
  background: #fff; border: 1px solid #aab4bb; border-radius: var(--radius);
  font: inherit; font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(0, 98, 155, .3); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }

/* Multi-line boxes can only be stretched up and down */
.field textarea { resize: vertical; line-height: 1.6; }

/* Numbers (CNIC, phone) are always typed left-to-right, even on the Urdu page */
.field input.num { direction: ltr; }
html[dir="rtl"] .field input.num { text-align: right; }

.hint { margin-top: 3px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.error { margin-top: 3px; color: var(--error); font-size: .85rem; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.form-actions .btn { flex: 1 1 140px; }   /* buttons share the row, wrap on tiny screens */

/* --- Footer --- */
.site-footer { padding: 28px 0 18px; background: var(--navy); color: #b9ccd8; }
.footer-cols { display: grid; gap: 20px; grid-template-columns: 1fr; }
.site-footer h4 { margin: 0 0 8px; color: #fff; }
.site-footer p { margin: 0; }
.site-footer a { display: block; padding: 4px 0; color: #d6e4ec; }
.copyright { margin-top: 20px; padding-top: 14px; border-top: 1px solid #1f5370; font-size: .85rem; }


/* ---------- 5. Page-specific ---------- */

/* --- Home: hero banner --- */
.hero { padding: 40px 0; background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; }
.hero-grid { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
.hero h1 { margin: 0 0 12px; font-size: 1.7rem; line-height: 1.5; }
html[lang="en"] .hero h1 { line-height: 1.25; }
.hero p { margin: 0 0 22px; font-size: 1.05rem; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-membership { margin: 14px 0 0 !important; font-size: .95rem !important; }
.hero-membership a { color: #fff; text-decoration: underline; }
.home-note { margin-top: 18px; }

/* --- Membership page --- */
.member-layout { display: grid; gap: 20px; grid-template-columns: 1fr; padding-block: 20px 40px; align-items: start; }
.sidebar .panel + .panel { margin-top: 16px; }
.sidebar ul { margin: 0; padding-inline-start: 20px; color: var(--muted); }

/* Progress bar: Details > Payment > Registration number */
.stepper { display: flex; margin: 0 0 20px; padding: 0; list-style: none; }
.stepper li {
  flex: 1; padding: 8px 4px; text-align: center;
  color: var(--muted); font-size: .8rem; font-weight: 600; border-bottom: 4px solid var(--line);
}
.stepper li.active { color: var(--blue); border-bottom-color: var(--blue); }
.stepper li.done { color: var(--ok); border-bottom-color: var(--ok); }

.fee-box {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 18px; padding: 14px 16px; background: #eef6fb; border: 1px solid #b9d9ec; border-radius: var(--radius);
}
.fee-box strong { font-size: 1.5rem; color: var(--blue-dark); white-space: nowrap; }

.summary { width: 100%; margin-bottom: 18px; border-collapse: collapse; }
.summary th, .summary td { white-space: pre-line; padding: 8px 6px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.summary th { width: 38%; color: var(--muted); font-weight: 600; }

/* Highlighted drop area for the payment receipt */
.upload-box { padding: 16px; background: #f8fbfd; border: 2px dashed var(--blue); border-radius: var(--radius); }
.upload-box input[type="file"] { background: #fff; }

/* Payment account details (Easypaisa) */
.account-box { margin-bottom: 18px; padding: 0; background: #fff; border: 1px solid #b7dfc6; border-radius: var(--radius); overflow: hidden; }
.account-box h3 { margin: 0; padding: 12px 16px; background: var(--ok); color: #fff; font-size: 1.05rem; }
.account-fee { margin: 0; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; background: #f1faf4; border-bottom: 1px solid #b7dfc6; font-weight: 600; }
.account-fee strong { color: var(--blue-dark); font-size: 1.5rem; }
.account-fee small { color: var(--muted); font-weight: 400; }
.account-options { display: grid; gap: 14px; grid-template-columns: 1fr; padding: 14px 16px; }   /* stacked on phones */
.account-option { background: #fff; border: 1px solid #d5e3da; border-radius: var(--radius); overflow: hidden; }
.account-option h4 { margin: 0; padding: 8px 12px; background: #eef4f8; border-bottom: 1px solid #d5e3da; color: var(--navy); }
.account-list { display: grid; grid-template-columns: max-content 1fr; margin: 0; }
.account-list dt, .account-list dd { padding: 8px 12px; border-bottom: 1px solid #edf1ee; margin: 0; }
.account-list dt { color: var(--muted); font-weight: 600; }
.account-list dd { font-weight: 700; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-list dt:last-of-type, .account-list dd:last-of-type { border-bottom: 0; }
.copy-btn { font: inherit; font-size: .8rem; font-weight: 600; padding: 2px 10px; border: 1px solid var(--blue-dark); border-radius: 999px; background: #fff; color: var(--blue-dark); cursor: pointer; }
.copy-btn:hover { background: var(--blue-dark); color: #fff; }
.account-note { margin: 0; padding: 10px 16px; background: #fff8e1; border-top: 1px solid #ecd9a0; color: #6b5200; font-size: .9rem; }


/* ==========================================================================
   VISUAL POLISH — softer shapes, shadows, spacing and gentle motion.
   This block comes last so it overrides the plainer rules above.
   ========================================================================== */
:root {
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 42, 66, .08);
  --shadow-md: 0 8px 24px rgba(0, 42, 66, .10);
}

body { background: linear-gradient(180deg, #eef3f7 0, var(--bg) 320px); -webkit-font-smoothing: antialiased; }
html[lang="ur"] body { font-size: 1.15rem; }

/* Header stays visible while scrolling */
.site-header { position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.brand-mark { border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--navy)); box-shadow: var(--shadow-sm); }
.brand-name { color: var(--navy); }
.main-nav a { transition: color .15s, background .15s; }

/* Utility bar: a little more refined */
.utility { background: linear-gradient(90deg, var(--navy), #00395a); }

/* Buttons */
.btn { border-radius: 999px; padding-inline: 28px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline, .btn-light { box-shadow: none; }
.nav-toggle { border-radius: 999px; }

/* Section headings: accent bar sits as a rounded pill */
.section-title { font-size: 1.6rem; }
.section-title-bar { border-radius: 4px; width: 64px; }

/* Cards and panels */
.card, .panel {
  border: 1px solid #e3e9ee; border-radius: 14px; box-shadow: var(--shadow-sm);
}
.card { border-top: 4px solid var(--blue); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.panel { padding: 22px; }
.panel h2 { padding-bottom: 10px; border-bottom: 2px solid #e6edf2; position: relative; }
.panel h2::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -2px;
  width: 56px; height: 2px; background: var(--accent);
}
.step-no { background: linear-gradient(135deg, var(--blue), var(--navy)); box-shadow: var(--shadow-sm); }

/* Inner-page title band */
.page-band { background: linear-gradient(135deg, #ffffff, #eaf2f8); border-bottom: 3px solid var(--blue); padding: 26px 0; }
.page-band h1 { font-size: 1.9rem; }

/* Hero: depth with soft light spots */
.hero {
  padding: 64px 0;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(247, 148, 29, .22), transparent 70%),
    radial-gradient(500px 300px at 10% 100%, rgba(255, 255, 255, .10), transparent 70%),
    linear-gradient(135deg, var(--navy), var(--blue));
}
.hero h1 { font-size: 2.1rem; }
.hero-card { border-radius: 16px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); box-shadow: var(--shadow-md); }

/* Forms */
.field input, .field select, .field textarea { border-radius: 8px; border-color: #c3ccd3; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 4px rgba(0, 98, 155, .15); outline: none; }
.fee-box, .account-box, .account-option, .upload-box { border-radius: 12px; }

/* Progress steps */
.stepper li { transition: color .2s, border-color .2s; }

/* Footer */
.site-footer { padding-top: 40px; background: linear-gradient(180deg, var(--navy), #001d2e); }
.site-footer a { transition: color .15s, padding .15s; }
.site-footer a:hover { color: var(--accent); text-decoration: none; }

/* Respect users who prefer no animation */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:hover, .card:hover { transform: none; }
}
.ltr-value { direction: ltr; text-align: start; unicode-bidi: isolate; }
html[dir="rtl"] .ltr-value { text-align: right; }

.notice { margin-bottom: 16px; padding: 12px 14px; background: #fff8e8; border: 1px solid #f0d28a; border-radius: var(--radius); font-size: .92rem; }

/* --- Paper submission page --- */
.paper-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); padding-block: 20px 40px; }

.instructions summary { min-height: var(--tap-min); cursor: pointer; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.instructions ol, .instructions ul { margin: 0 0 14px; padding-inline-start: 22px; }
.instructions li + li { margin-top: 8px; }
.instructions .sub-heading { margin: 18px 0 8px; }
.ref-example { padding: 10px 14px; background: #eef6fb; border-inline-start: 4px solid var(--blue); }
.word-box { margin-top: 14px; padding: 12px 14px; background: #fff8ea; border-inline-start: 4px solid var(--accent); }
.word-box p { margin: 6px 0 10px; }
.ref-sample { margin-top: 4px; color: var(--blue-dark); font-weight: 600; }

.form-section { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section > h3 { margin: 0 0 12px; font-size: 1.15rem; color: var(--navy); }
.form-error { margin-top: 18px; font-weight: 700; }

/* One visit or one reference */
.entry { margin-bottom: 16px; padding: 14px; background: #f8fbfd; border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); border-radius: var(--radius); }
/* Visits sit inside a patient card: lighter background so the nesting is visible */
.entry .entry { background: #fff; }
.sub-heading { margin: 18px 0 10px; font-size: 1rem; color: var(--blue); }
.entry-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.entry-head h3 { margin: 0; color: var(--navy); }
.btn-small { min-height: 36px; padding: 4px 14px; font-size: .9rem; }

/* Review tables: wide tables scroll sideways inside their box instead of breaking the page */
#review-body h3 { margin: 24px 0 8px; color: var(--navy); }
.table-scroll { overflow-x: auto; margin-bottom: 18px; border: 1px solid var(--line); }
.review-table { width: 100%; min-width: 520px; border-collapse: collapse; }
.review-table th, .review-table td { min-width: 150px; padding: 8px 10px; text-align: start; vertical-align: top; border: 1px solid var(--line); white-space: pre-line; overflow-wrap: anywhere; }
.review-table thead th { background: #eef6fb; color: var(--navy); }
.review-table tbody th { background: #f8fbfd; font-weight: 600; }

/* Step 3: success message */
.success { padding: 8px 0; text-align: center; }
.success .tick {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px;
  background: var(--ok); color: #fff; border-radius: 50%; font-size: 2rem;
}
.reg-number {
  display: inline-block; max-width: 100%; margin: 12px 0; padding: 12px 18px;
  background: #eef6fb; border: 2px dashed var(--blue); color: var(--blue-dark);
  font: 800 1.3rem var(--font-en); letter-spacing: 1px; direction: ltr; overflow-wrap: anywhere;
}
.success .form-actions { justify-content: center; }


/* ==========================================================================
   6. Responsive rules (mobile first)
   ========================================================================== */

/* Tablets and up (>= 700px) */
@media (min-width: 700px) {
  .container { padding-inline: 40px; }
  .utility-text { display: inline; }

  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .account-options { grid-template-columns: 1fr 1fr; }   /* Easypaisa and bank side by side */
  .form-grid .full { grid-column: 1 / -1; }
  .footer-cols { grid-template-columns: 2fr 1fr 1fr; }

  .block { padding: 48px 0; }
  .section-title { font-size: 1.6rem; }
  .hero { padding: 56px 0; }
  .hero h1 { font-size: 2.1rem; }
  .panel { padding: 26px; }
  .page-band h1 { font-size: 1.9rem; }
  .stepper li { font-size: .9rem; }
  .form-actions .btn { flex: 0 0 auto; }
  .reg-number { font-size: 1.6rem; padding-inline: 26px; }
}

/* Desktop (>= 960px): menu becomes a horizontal bar, no "Menu" button */
@media (min-width: 960px) {
  .container { padding-inline: 56px; }
  .nav-toggle { display: none; }
  .header-row { flex-wrap: nowrap; min-height: 76px; }
  .brand-name { font-size: 1.2rem; }

  .main-nav { display: block; width: auto; }       /* always visible */
  .main-nav ul { display: flex; gap: 4px; }
  .main-nav a { padding: 28px 14px; border-top: 0; border-bottom: 3px solid transparent; }
  .main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--blue); }
  /* thin vertical line between tabs (a short line, not full header height) */
  .main-nav li + li { position: relative; }
  .main-nav li + li::before {
    content: ""; position: absolute; inset-inline-start: -2px; top: 50%;
    height: 22px; transform: translateY(-50%); border-inline-start: 1px solid #d5dee6;
  }

  .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 40px; }
  .member-layout { grid-template-columns: 2fr 1fr; gap: 28px; }
}

/* Printing (e.g. the registration number page): hide navigation and buttons */
@media print {
  .utility, .site-header, .site-footer, .form-actions, .sidebar, .page-band, .stepper { display: none !important; }
}

/* File-name rule under the upload box: its own lines, each line on a new row */
.hint-name { white-space: pre-line; font-weight: 600; color: var(--ink); }

/* About page: numbered lists inside panels, spacing for the cards */
.about-list ol { margin: 0; padding-inline-start: 22px; }
.about-list li + li { margin-top: 8px; }
.panel .card-grid { margin-top: 16px; }


/* ---------- Extra pages: papers, login, contact, IT panel ---------- */
.paper-layout.narrow { max-width: 560px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.toolbar .grow { flex: 1 1 240px; }

/* A single search result / issue card */
.result { padding: 16px 0; border-bottom: 1px solid #e6edf2; }
.result:last-child { border-bottom: 0; }
.result h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--blue-dark); }
.result p { margin: 0 0 4px; }
.result .btn { margin-top: 8px; min-height: 36px; padding: 4px 18px; }

.badge { display: inline-block; margin-inline-start: 10px; padding: 0 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; }
.badge.open { background: #fde8e6; color: var(--error); }
.badge.done { background: #e1f3e8; color: var(--ok); }

.two-col { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); margin-bottom: 20px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Chat window */
.chat { display: flex; flex-direction: column; gap: 10px; height: 320px; overflow-y: auto; padding: 12px; background: #f4f8fb; border: 1px solid #e0e8ee; border-radius: 12px; }
.bubble { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid #e0e8ee; }
.bubble strong, .bubble span, .bubble small { display: block; }
.bubble small { color: var(--muted); font-size: .72rem; }
.bubble.mine { align-self: flex-start; background: #dcecf7; border-color: #b9d9ec; }
.bubble.theirs { align-self: flex-end; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; min-height: var(--tap-min); padding: 8px 12px; border: 1px solid #c3ccd3; border-radius: 999px; font: inherit; }
.chat-form .btn { padding-inline: 20px; }

/* Data table */
.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { padding: 10px 8px; text-align: start; border-bottom: 1px solid #e6edf2; }
.data th { background: #f1f6fa; color: var(--navy); }
.data td:nth-child(2) { direction: ltr; text-align: end; }

.panel .card-grid + .card-grid { margin-top: 16px; }

.policy-read { margin: 0.5rem 0 0; font-weight: 600; }
.field label.check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; }
.field label.check input { width: auto; margin-top: 0.3rem; }

/* Signed-in user and sign-out in the utility bar */
.session-bar { display: inline-flex; align-items: center; gap: 10px; }
.session-name { color: #cfdde6; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-out {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45);
  border-radius: 3px; padding: 2px 10px; font: inherit; cursor: pointer;
}
.session-out:hover { background: rgba(255,255,255,.15); }

/* Membership form: grouped sections, 3 compact columns where there is room */
.group-title { margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--blue); color: var(--navy); font-size: 1.05rem; }
.form-grid.compact { gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid.compact .full { grid-column: 1 / -1; }
.form-grid.compact .hint { font-size: .8rem; margin-top: 2px; }
.form-grid.compact .field label { margin-bottom: 2px; }
