/* ── CSS Variables ── */
:root {
  --navy: #0a0f1e;
  --navy-mid: #111827;
  --navy-light: #1e2a40;
  --navy-border: #263047;
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --text: #e8eaf0;
  --text-muted: #7a8499;
  --text-dim: #4a5568;
  --green: #2ecc71;
  --orange: #f39c12;
  --red: #e74c3c;
  --blue: #3b82f6;
  --card-bg: #131c2e;
  --card-border: #1e2d45;
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ── Background grid + glows ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Animations ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes stepBarFill {
  from { width: 0; }
  to   { width: 100%; }
}

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

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(201, 168, 76, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(201, 168, 76, 0); }
  100% { box-shadow: 0 0 0 0   rgba(201, 168, 76, 0); }
}

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

.anim-slide-up  { animation: slideUp  0.5s ease forwards; }
.anim-fade-in   { animation: fadeIn   0.4s ease forwards; }

/* ── Layout ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--card-bg);
  border-right: 1px solid var(--card-border);
  padding: 1.8rem 1rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 0.5rem;
  margin-bottom: 2.5rem;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.sidebar-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.nav-section-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  padding: 0 0.8rem;
  margin: 1.5rem 0 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 0.1rem;
  cursor: pointer;
}

.nav-item:hover        { background: var(--navy-light); color: var(--text); }
.nav-item.active       { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(201, 168, 76, 0.2); }

.nav-icon  { font-size: 1rem; width: 20px; text-align: center; }

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
}

.sidebar-version {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  padding: 0.5rem 0.8rem 0;
  text-align: left;
  opacity: 0.5;
}

.notif-arrow {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}

.notification-card:hover .notif-arrow { color: var(--gold); transform: translateX(3px); }

.sidebar-user {
  margin-top: auto;
  padding: 0.9rem 0.8rem;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #a8892e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  flex-shrink: 0;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.user-id {
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.logout-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.logout-btn:hover { background: rgba(231, 76, 60, 0.18); border-color: var(--red); color: var(--red); }

/* ── Notification Banners ── */
.notif-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideDown 0.4s ease;
}

.notif-banner.urgent    { background: linear-gradient(135deg, rgba(220,38,38,0.2), rgba(220,38,38,0.08)); border: 1px solid rgba(220,38,38,0.4); color: #fca5a5; }
.notif-banner.today     { background: linear-gradient(135deg, rgba(202,169,87,0.2), rgba(202,169,87,0.08)); border: 1px solid rgba(202,169,87,0.4); color: var(--gold); }
.notif-banner.tomorrow  { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.08)); border: 1px solid rgba(59,130,246,0.4); color: #93c5fd; }
.notif-banner.stage-change { background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.08)); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }

.notif-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.notif-banner-msg  { flex: 1; }

.notif-banner-join {
  padding: 0.4rem 1rem;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.notif-banner-join:hover { opacity: 0.85; }

.notif-banner-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.6;
  padding: 0.2rem 0.4rem;
  transition: opacity 0.2s;
}
.notif-banner-close:hover { opacity: 1; }

/* ── Main content ── */
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.page-sub   { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.2rem; }
.page-date  { font-size: 0.82rem; color: var(--text-muted); background: var(--card-bg); border: 1px solid var(--card-border); padding: 0.45rem 0.9rem; border-radius: 8px; }

/* ── Stat cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 16px 16px 0 0; }
.stat-accent.gold   { background: var(--gold); }
.stat-accent.green  { background: var(--green); }
.stat-accent.orange { background: var(--orange); }

.stat-icon  { position: absolute; right: 1.2rem; top: 1.2rem; font-size: 1.6rem; opacity: 0.3; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; margin: 0.3rem 0 0.2rem; }
.stat-meta  { font-size: 0.78rem; color: var(--text-muted); }

/* ── Section header ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title  { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; }

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--gold), #a8892e);
  border: none;
  border-radius: 10px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.03em;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-sm {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--navy-border);
  background: var(--card-bg);
  color: var(--text-muted);
  transition: all 0.15s;
}
.btn-sm:hover     { border-color: var(--gold); color: var(--gold); }
.btn-sm.gold      { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }

/* ── Form inputs ── */
.form-group  { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus       { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1); }
.form-input::placeholder { color: var(--text-dim); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.active  { background: rgba(46,204,113,0.12);  color: var(--green); }
.badge.pending { background: rgba(243,156,18,0.12);  color: var(--orange); }
.badge.closed  { background: rgba(122,132,153,0.12); color: var(--text-muted); }
.badge.review  { background: rgba(59,130,246,0.12);  color: var(--blue); }

/* ── Cases table ── */
.cases-table { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; margin-bottom: 2rem; }

.table-head {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr 1.2fr 1fr;
  padding: 0.85rem 1.5rem;
  background: var(--navy-light);
  border-bottom: 1px solid var(--card-border);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.table-row {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr 1.2fr 1fr;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  align-items: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: background 0.15s;
}
.table-row:last-child { border-bottom: none; }
.table-row:hover      { background: var(--navy-light); }

.case-id    { font-weight: 600; color: var(--gold); font-size: 0.82rem; }
.case-title { color: var(--text); }
.case-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.15rem; }
.cell-muted { font-size: 0.82rem; color: var(--text-muted); }

/* ── Card ── */
.card        { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 1.5rem; }
.card-title  { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 600; margin-bottom: 1.2rem; }

/* ── Case detail ── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  background: none;
  border: none;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--gold); }

.case-header-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.case-header-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold), #a8892e);
}

.case-header-top  { display: flex; justify-content: space-between; align-items: flex-start; }
.case-big-id      { font-size: 0.78rem; color: var(--gold); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.case-big-title   { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; margin: 0.4rem 0 0.3rem; }
.case-meta-row    { display: flex; gap: 2rem; margin-top: 1rem; }
.case-meta-label  { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.2rem; }
.case-meta-value  { font-size: 0.9rem; font-weight: 500; }

.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; }

/* ── Timeline (vertical, legacy) ── */
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 1px; background: var(--card-border); }

.timeline-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; position: relative; }

.timeline-dot { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; position: relative; z-index: 1; }
.timeline-dot.done     { background: rgba(46,204,113,0.15); border: 2px solid var(--green); color: var(--green); }
.timeline-dot.current  { background: var(--gold-dim);       border: 2px solid var(--gold);  color: var(--gold); }
.timeline-dot.upcoming { background: var(--navy-light);     border: 2px solid var(--navy-border); color: var(--text-dim); }

.timeline-content { padding-top: 0.35rem; }
.timeline-title   { font-size: 0.88rem; font-weight: 600; }
.timeline-desc    { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.timeline-date    { font-size: 0.72rem; color: var(--text-dim);   margin-top: 0.2rem; }

/* ── Upload zone ── */
.upload-zone {
  border: 2px dashed var(--navy-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
}
.upload-zone:hover { border-color: var(--gold); background: var(--gold-dim); }
.upload-icon  { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-text  { font-size: 0.88rem; color: var(--text-muted); }
.upload-hint  { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.3rem; }

/* ── Doc list ── */
.doc-list { list-style: none; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}
.doc-name            { flex: 1; font-weight: 500; }
.doc-size            { font-size: 0.72rem; color: var(--text-muted); }
.doc-status-uploaded { font-size: 0.72rem; color: var(--green); }
.doc-status-pending  { font-size: 0.72rem; color: var(--orange); }


/* ════════════════════════════════════════════════════════════
   LOGIN — Single centered card
   ════════════════════════════════════════════════════════════ */

/* ── Outer wrapper — centers the card ── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding: 2rem;
}

/* ── Glassmorphism card ── */
.login-card {
  width: 100%;
  max-width: 460px;
  background: rgba(19, 28, 46, 0.92);
  border: 1px solid rgba(201, 168, 76, 0.14);
  border-radius: 24px;
  padding: 2.8rem 2.5rem;
  position: relative;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 32px 80px rgba(0,0,0,0.55),
    0 0 60px rgba(201, 168, 76, 0.05);
  overflow: hidden;
  animation: loginFadeIn 0.7s ease both;
}

/* Gold shimmer line on top of card */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(201, 168, 76, 0.7) 30%,
    rgba(232, 201, 106, 0.95) 50%,
    rgba(201, 168, 76, 0.7) 70%,
    transparent
  );
  background-size: 400px 1px;
  animation: shimmer 3s linear infinite;
  pointer-events: none;
  z-index: 10;
}

/* ── Step progress bar ── */
.login-step-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 2rem;
}

.login-step-seg {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  transition: background 0.3s;
}
.login-step-seg.done   { background: var(--gold); }
.login-step-seg.active {
  background: rgba(201, 168, 76, 0.25);
  position: relative;
  overflow: hidden;
}
.login-step-seg.active::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 100%;
  background: var(--gold);
  animation: stepBarFill 0.4s ease forwards;
}

/* ── Logo area ── */
.logo-area {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(201,168,76,0.08));
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
  animation: pulse-ring 3s ease infinite;
}

.logo-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Step headings ── */
.login-step-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
  text-align: center;
}

.login-step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
  line-height: 1.55;
  text-align: center;
}

/* ── Override form inputs inside login card ── */
.login-card .form-group  { margin-bottom: 1.4rem; }

.login-card .form-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.login-card .form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  transition: all 0.25s;
  color: var(--text);
}
.login-card .form-input:hover  { border-color: rgba(201,168,76,0.3); background: rgba(255,255,255,0.05); }
.login-card .form-input:focus  { background: rgba(201,168,76,0.05); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12), 0 0 20px rgba(201,168,76,0.06); }
.login-card .form-input::placeholder { color: rgba(122,132,153,0.6); }
.login-card .form-input:disabled     { opacity: 0.4; cursor: not-allowed; }

/* Larger OTP input */
.login-card .otp-field {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 1rem;
  color: var(--gold);
  font-family: 'DM Mono', 'DM Sans', monospace;
}

/* ── Primary button override for login card ── */
.login-card .btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #d4a843 50%, #a8892e 100%);
  border: none;
  border-radius: 12px;
  padding: 0.95rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0a0f1e;
  letter-spacing: 0.04em;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(201,168,76,0.3), 0 1px 0 rgba(255,255,255,0.2) inset;
  position: relative;
  overflow: hidden;
}
.login-card .btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}
.login-card .btn-primary:hover:not(:disabled)::after { left: 100%; }
.login-card .btn-primary:hover:not(:disabled)  { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,0.45), 0 1px 0 rgba(255,255,255,0.2) inset; }
.login-card .btn-primary:active:not(:disabled) { transform: translateY(0); }
.login-card .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Error banner ── */
.error-box {
  background: linear-gradient(135deg, rgba(231,76,60,0.12), rgba(231,76,60,0.06));
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.83rem;
  color: #fc8a7e;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: detectFade 0.3s ease;
}
.error-box::before { content: '⚠'; font-size: 0.9rem; flex-shrink: 0; }

/* ── Auto-detect badge ── */
.detect-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  padding: 0.3rem 0.75rem;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  animation: detectFade 0.25s ease;
}
.detect-badge::before { content: '✦'; font-size: 0.6rem; }

/* ── OTP context box ── */
.otp-context {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
}
.otp-icon  { font-size: 1.6rem; flex-shrink: 0; margin-top: 0.1rem; }
.otp-title { font-weight: 700; font-size: 0.92rem; color: var(--text); margin-bottom: 0.2rem; }
.otp-sub   { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.otp-sub strong { color: var(--gold); }

/* ── OTP timer row ── */
.otp-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  min-height: 32px;
}

.otp-timer { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.4rem; }
.otp-timer strong { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); min-width: 2.5ch; display: inline-block; }
.otp-timer.danger strong { color: var(--red); }

.otp-expired { font-size: 0.82rem; color: var(--red); font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
.otp-expired::before { content: '✕'; font-size: 0.75rem; }

/* ── Resend button ── */
.btn-resend {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-resend:hover:not(:disabled) { background: rgba(201,168,76,0.1); border-color: var(--gold); }
.btn-resend:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Back / alt link ── */
.btn-back {
  display: block;
  text-align: center;
  width: 100%;
  margin-top: 0.9rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
  padding: 0.4rem;
}
.btn-back:hover { color: var(--text); }

/* ── Login hint ── */
.login-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.9rem;
  text-align: center;
  line-height: 1.5;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  z-index: 999;
  animation: toastIn 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Loading spinner ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--navy-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}

/* ── Horizontal timeline ── */
.h-timeline { display: flex; align-items: flex-start; overflow-x: auto; padding: 0.5rem 0 1rem; }

.h-step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 110px; }

.h-dot-row { display: flex; align-items: center; width: 100%; }

.h-connector           { flex: 1; height: 2px; background: var(--navy-border); }
.h-connector-invisible { flex: 1; height: 2px; background: transparent; }

.h-dot { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; z-index: 1; }
.h-dot.done     { background: rgba(46,204,113,0.15); border: 2px solid var(--green); color: var(--green); }
.h-dot.current  { background: var(--gold-dim);       border: 2px solid var(--gold);  color: var(--gold); }
.h-dot.upcoming { background: var(--navy-light);     border: 2px solid var(--navy-border); color: var(--text-dim); }

.h-step-label { font-size: 0.72rem; font-weight: 600; color: var(--text); text-align: center; margin-top: 0.5rem; line-height: 1.3; padding: 0 4px; }
.h-step-date  { font-size: 0.65rem; color: var(--text-muted); text-align: center; margin-top: 0.2rem; }

/* ── Detail tabs ── */
.detail-tabs { display: flex; gap: 0; border-bottom: none; }

.detail-tab {
  padding: 0.75rem 1.4rem;
  background: var(--navy-light);
  border: 1px solid var(--card-border);
  border-bottom: none;
  border-right: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.detail-tab:first-child { border-radius: 12px 0 0 0; }
.detail-tab:last-child  { border-radius: 0 12px 0 0; border-right: 1px solid var(--card-border); }
.detail-tab:hover       { color: var(--text); background: var(--card-bg); }
.detail-tab.active      { background: var(--card-bg); color: var(--gold); font-weight: 600; border-bottom: 2px solid var(--card-bg); margin-bottom: -1px; }

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Previous Meetings Table ── */
.prev-meetings-section  { margin-top: 1.5rem; border-top: 1px solid var(--navy-border); padding-top: 1.2rem; }
.prev-meetings-title    { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.8rem; }
.prev-meetings-table    { border-radius: 10px; overflow: hidden; border: 1px solid var(--navy-border); }

.pm-table-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 0.6fr;
  background: var(--navy-light);
  padding: 0.7rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pm-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 0.6fr;
  padding: 0.7rem 0.9rem;
  font-size: 0.84rem;
  color: var(--text);
  border-top: 1px solid var(--navy-border);
  transition: background 0.2s;
}
.pm-table-row:hover { background: var(--navy-light); }
.pm-cell       { display: flex; align-items: center; }
.pm-passcode   { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8rem; color: var(--gold); }
.pm-join-link  { color: var(--gold); font-weight: 600; font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }
.pm-join-link:hover { color: var(--text); }

/* ── Notices Tab ── */
.notices-container { display: flex; flex-direction: column; gap: 1.2rem; }
.notice-group      { border: 1px solid var(--navy-border); border-radius: 12px; overflow: hidden; }

.notice-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--navy-light);
  font-weight: 600;
}
.notice-group-left { display: flex; align-items: center; gap: 0.6rem; }

.notice-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.04));
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}
.notice-download-btn:hover { background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(201,168,76,0.08)); border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 2px 12px rgba(201,168,76,0.2); }

.notice-group-icon { font-size: 1.2rem; }
.notice-group-name { font-size: 0.92rem; color: var(--text); }
.notice-list       { display: flex; flex-direction: column; }

.notice-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-muted);
  border-top: 1px solid var(--navy-border);
  transition: background 0.2s, color 0.2s;
}
.notice-item:hover { background: var(--navy-light); color: var(--text); }

.notice-file-icon  { font-size: 1.1rem; flex-shrink: 0; }
.notice-file-name  { flex: 1; font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-download-icon { font-size: 1rem; color: var(--gold); flex-shrink: 0; transition: transform 0.2s; }
.notice-item:hover .notice-download-icon { transform: translateY(2px); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.empty-icon  { font-size: 2.5rem; margin-bottom: 0.5rem; filter: grayscale(0.3); }
.empty-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }
.empty-desc  { font-size: 0.82rem; color: var(--text-dim); max-width: 300px; }

/* ── Tab content card ── */
.tab-content-card { border-radius: 0 0 16px 16px; border-top: none; min-height: 200px; }

/* ═══════════════════════════════════════════════════════════════════
   COMMS TIMELINE — Stage-based Accordion Layout
   ═══════════════════════════════════════════════════════════════════ */

.stage-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.stage-timeline::before {
  content: '';
  position: absolute;
  left: 23px; top: 30px; bottom: 30px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(201,168,76,0.15));
  border-radius: 2px;
}

.stage-block { position: relative; padding-left: 54px; padding-bottom: 1.5rem; }
.stage-block:last-child { padding-bottom: 0; }

.stage-header { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; gap: 0.8rem; }
.stage-header-left { display: flex; align-items: center; gap: 0.7rem; }

.stage-icon {
  position: absolute;
  left: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--navy-light);
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--gold);
  z-index: 1;
  box-shadow: 0 0 15px rgba(201,168,76,0.15);
}

.stage-name { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.stage-header-right { display: flex; align-items: center; gap: 0.5rem; }

.stage-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.04));
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.stage-download-btn:hover { background: linear-gradient(135deg, rgba(201,168,76,0.2), rgba(201,168,76,0.08)); border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 2px 12px rgba(201,168,76,0.2); }

.download-icon { font-size: 0.9rem; }
.stage-channels { display: flex; flex-direction: column; gap: 0.4rem; }

.channel-card { border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.channel-card:hover { border-color: rgba(255,255,255,0.08); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

.channel-whatsapp { border-left: 3px solid #25D366; }
.channel-sms      { border-left: 3px solid #3b82f6; }
.channel-email    { border-left: 3px solid #8b5cf6; }
.channel-post     { border-left: 3px solid #f59e0b; }
.channel-other    { border-left: 3px solid #6b7280; }

.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.channel-row:hover { background: rgba(255,255,255,0.02); }

.channel-left   { display: flex; align-items: center; gap: 0.6rem; }
.channel-icon   { font-size: 1.1rem; flex-shrink: 0; }
.channel-medium { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.channel-phone  { font-size: 0.78rem; color: var(--text-muted); margin-left: 0.3rem; }
.channel-phone::before { content: '·'; margin-right: 0.4rem; color: var(--text-dim); }

.channel-right { display: flex; align-items: center; gap: 0.35rem; }
.channel-date  { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.channel-expand-icon         { font-size: 0.9rem; color: var(--text-dim); transition: transform 0.2s; display: inline-block; }
.channel-expand-icon.expanded { transform: rotate(180deg); }

.channel-content {
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid rgba(30,45,69,0.5);
  background: rgba(201, 168, 76, 0.02);
  animation: contentSlideIn 0.2s ease-out;
}
.channel-content-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: 0.6rem 0.8rem;
  background: var(--navy-light);
  border-radius: 8px;
  border: 1px solid var(--navy-border);
}

.postal-details    { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.6rem; }
.postal-detail-row { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.65rem 0.9rem; background: var(--navy-light); border: 1px solid var(--navy-border); border-radius: 8px; }
.postal-label      { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; min-width: 120px; }
.postal-value      { font-size: 0.85rem; color: var(--text); font-weight: 500; line-height: 1.45; }

@keyframes contentSlideIn {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to   { opacity: 1; max-height: 200px; }
}

.comms-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  width: fit-content;
}
.comms-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; animation: statusPulse 2s ease-in-out infinite; }
.comms-status.delivered { background: rgba(46,204,113,0.12); color: #2ecc71; }
.comms-status.delivered::before { background: #2ecc71; }
.comms-status.sent      { background: rgba(59,130,246,0.12); color: #3b82f6; }
.comms-status.sent::before { background: #3b82f6; }
.comms-status.failed    { background: rgba(231,76,60,0.12);  color: #e74c3c; }
.comms-status.failed::before { background: #e74c3c; }
.comms-status.pending   { background: rgba(243,156,18,0.12); color: #f39c12; }
.comms-status.pending::before { background: #f39c12; }

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ═══════════════════════════════════════════════════════════════════
   CONTACTS TAB
   ═══════════════════════════════════════════════════════════════════ */

.contacts-container { display: flex; flex-direction: column; gap: 1.2rem; }

.contact-card {
  background: linear-gradient(145deg, rgba(19,28,46,0.9), rgba(30,42,64,0.6));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
}
.contact-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold)); opacity: 0; transition: opacity 0.3s; }
.contact-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.25); border-color: rgba(201,168,76,0.3); }
.contact-card:hover::before { opacity: 1; }

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, rgba(201,168,76,0.06), transparent);
  border-bottom: 1px solid var(--card-border);
}

.contact-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #a8892e);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(201,168,76,0.25);
}

.contact-name-area   { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-name        { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.contact-designation { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; }
.contact-primary-badge { color: var(--gold); font-weight: 600; font-size: 0.72rem; }

.contact-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid rgba(30,45,69,0.5);
  border-right: 1px solid rgba(30,45,69,0.5);
  transition: background 0.2s;
}
.contact-info-item:hover { background: rgba(201,168,76,0.04); }
.contact-info-item:nth-child(even) { border-right: none; }
.contact-info-item:last-child, .contact-info-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.contact-info-full { grid-column: 1 / -1; border-right: none; }

.contact-info-icon  { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.1rem; filter: grayscale(0.2); }
.contact-info-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 0.15rem; }
.contact-info-value { font-size: 0.88rem; font-weight: 500; color: var(--text); line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════
   MEETING TAB
   ═══════════════════════════════════════════════════════════════════ */

.meeting-container { display: flex; flex-direction: column; gap: 1.5rem; padding: 0.5rem 0; }

.meeting-hero       { text-align: center; padding: 2rem 1rem 1rem; }
.meeting-hero-icon  { font-size: 3rem; margin-bottom: 0.8rem; display: inline-block; background: var(--gold-dim); width: 80px; height: 80px; border-radius: 50%; line-height: 80px; border: 2px solid rgba(201,168,76,0.3); box-shadow: 0 0 30px rgba(201,168,76,0.1); }
.meeting-hero-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.meeting-hero-sub   { font-size: 0.85rem; color: var(--text-muted); }

.meeting-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; padding: 0 0.5rem; }

.meeting-detail-card {
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.meeting-detail-card::after { content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; transition: opacity 0.3s; }
.meeting-detail-card:hover  { transform: translateY(-2px); border-color: rgba(201,168,76,0.2); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.meeting-detail-card:hover::after { opacity: 1; }

.meeting-detail-icon  { font-size: 1.5rem; margin-bottom: 0.6rem; }
.meeting-detail-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-bottom: 0.3rem; }
.meeting-detail-value { font-size: 0.95rem; font-weight: 600; color: var(--text); }

.meeting-join-area { text-align: center; padding: 1rem 0; }

.meeting-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--gold), #a8892e);
  border: none;
  border-radius: 12px;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(201,168,76,0.25);
  animation: glowPulse 3s ease-in-out infinite;
}
.meeting-join-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 32px rgba(201,168,76,0.4); }
.meeting-join-icon { font-size: 1.1rem; }

.meeting-url-display { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.8rem; word-break: break-all; max-width: 400px; margin-left: auto; margin-right: auto; }

.meeting-pending-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  background: rgba(243,156,18,0.06);
  border: 1px dashed rgba(243,156,18,0.25);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0.5rem;
}
.meeting-pending-icon { font-size: 1.2rem; }

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(201,168,76,0.25); }
  50%       { box-shadow: 0 4px 30px rgba(201,168,76,0.4); }
}

.contact-detail-block { display: flex; flex-direction: column; gap: 0; }
.contact-detail-block .cd-row { display: grid; grid-template-columns: 180px 1fr; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(30,45,69,0.5); transition: background 0.15s; }
.contact-detail-block .cd-row:last-child { border-bottom: none; }
.contact-detail-block .cd-row:hover { background: rgba(201,168,76,0.04); }
.contact-detail-block .cd-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.contact-detail-block .cd-value { font-size: 0.88rem; font-weight: 500; color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════════════════════════════════ */

.profile-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-hero-card { background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(201,168,76,0.02)) !important; border-color: rgba(201,168,76,0.2) !important; }

.profile-hero { display: flex; align-items: center; gap: 1.5rem; padding: 0.5rem; }

.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #d4a843);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.profile-hero-info   { display: flex; flex-direction: column; gap: 0.3rem; }
.profile-name-lg     { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--text); }
.profile-designation { font-size: 0.85rem; color: var(--gold); font-weight: 500; }
.profile-id-badge    { font-size: 0.72rem; color: var(--text-dim); background: var(--navy-light); padding: 0.2rem 0.6rem; border-radius: 6px; border: 1px solid var(--navy-border); display: inline-block; width: fit-content; }

.card-section-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--card-border); }

.profile-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.profile-detail-item { display: flex; flex-direction: column; gap: 0.25rem; }
.profile-detail-item.full-width { grid-column: 1 / -1; }
.profile-detail-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.profile-detail-value { font-size: 0.9rem; color: var(--text); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════
   NOTIFICATIONS PAGE
   ═══════════════════════════════════════════════════════════════════ */

.notifications-list { display: flex; flex-direction: column; gap: 0.8rem; }

.notification-card { position: relative; transition: transform 0.15s, box-shadow 0.15s; cursor: pointer; }
.notification-card:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.notification-card.unread { border-left: 3px solid var(--gold); }

.notif-indicator { position: absolute; top: 1rem; right: 1rem; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(201,168,76,0.4); }

.notif-content { display: flex; align-items: flex-start; gap: 1rem; }
.notif-icon    { font-size: 1.5rem; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--navy-light); display: flex; align-items: center; justify-content: center; }
.notif-body    { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.notif-title   { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.notif-desc    { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.notif-time    { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.2rem; }

/* ═══════════════════════════════════════════════════════════════════
   HELP & SUPPORT PAGE
   ═══════════════════════════════════════════════════════════════════ */

.help-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.faq-list  { display: flex; flex-direction: column; gap: 0.8rem; }

.faq-item { border: 1px solid var(--card-border); border-radius: 10px; padding: 1rem; transition: background 0.2s, border-color 0.2s; }
.faq-item:hover  { background: rgba(201,168,76,0.03); border-color: rgba(201,168,76,0.15); }
.faq-question    { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
.faq-answer      { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; }

.help-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.help-contact-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.2rem; background: var(--navy-light); border-radius: 12px; border: 1px solid var(--navy-border); text-align: center; }
.help-contact-icon  { font-size: 1.5rem; }
.help-contact-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.help-contact-value { font-size: 0.85rem; color: var(--gold); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   UPLOAD DOCUMENTS TAB
   ═══════════════════════════════════════════════════════════════════ */

.upload-container  { display: flex; flex-direction: column; gap: 1.5rem; }
.upload-hero       { text-align: center; padding: 1rem 0; }
.upload-hero-icon  { font-size: 2.5rem; margin-bottom: 0.5rem; }
.upload-hero-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.upload-hero-sub   { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.3rem; }

.upload-dropzone {
  border: 2px dashed rgba(201,168,76,0.3);
  border-radius: 14px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: rgba(201,168,76,0.02);
}
.upload-dropzone:hover { border-color: var(--gold); background: rgba(201,168,76,0.05); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(201,168,76,0.1); }

.upload-dropzone-icon { font-size: 2.5rem; margin-bottom: 0.8rem; opacity: 0.7; }
.upload-dropzone-text { font-size: 1rem; font-weight: 600; color: var(--text); }
.upload-dropzone-sub  { font-size: 0.82rem; color: var(--gold); margin-top: 0.3rem; }
.upload-dropzone-hint { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.8rem; }

.upload-categories      { display: flex; flex-direction: column; gap: 0.6rem; }
.upload-category-label  { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.upload-category-chips  { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.upload-chip { padding: 0.45rem 0.9rem; border-radius: 20px; border: 1px solid var(--card-border); background: transparent; color: var(--text-muted); font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.upload-chip:hover  { border-color: rgba(201,168,76,0.3); color: var(--text); }
.upload-chip.active { border-color: var(--gold); background: rgba(201,168,76,0.1); color: var(--gold); }

.upload-custom-type  { padding: 0 1rem; margin-top: 0.5rem; }
.upload-custom-input { width: 100%; padding: 0.65rem 1rem; background: var(--navy-light); border: 1px solid var(--navy-border); border-radius: 10px; color: var(--text); font-size: 0.85rem; font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.upload-custom-input::placeholder { color: var(--text-dim); }
.upload-custom-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,0.15); }

.upload-actions    { text-align: center; }
.upload-submit-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 2rem; background: linear-gradient(135deg, var(--gold), #d4a843); border: none; border-radius: 10px; color: var(--navy); font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 15px rgba(201,168,76,0.3); }
.upload-submit-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(201,168,76,0.4); }
.upload-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.upload-file-list { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.8rem; background: var(--navy-light); border: 1px solid var(--navy-border); border-radius: 10px; }
.upload-file-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem; border-radius: 8px; background: rgba(201,168,76,0.04); border: 1px solid rgba(201,168,76,0.1); }
.upload-file-icon { font-size: 1.1rem; flex-shrink: 0; }
.upload-file-name { flex: 1; font-size: 0.82rem; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-size { font-size: 0.72rem; color: var(--text-dim); flex-shrink: 0; }

.upload-success-list  { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.8rem; background: rgba(46,204,113,0.06); border: 1px solid rgba(46,204,113,0.2); border-radius: 10px; }
.upload-success-title { font-size: 0.82rem; font-weight: 600; color: #2ecc71; margin-bottom: 0.3rem; }
.upload-success-item  { font-size: 0.8rem; color: var(--text-muted); padding: 0.2rem 0; }
.upload-success-item span:first-child { color: #2ecc71; font-weight: 700; }

.upload-error { padding: 0.8rem 1rem; background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.25); border-radius: 10px; font-size: 0.82rem; color: #e74c3c; }

/* ═══════════════════════════════════════════════════════════════════
   ADVOCATE TAB
   ═══════════════════════════════════════════════════════════════════ */

.advocate-container { display: flex; flex-direction: column; gap: 1.5rem; }
.advocate-hero      { text-align: center; padding: 1rem 0; }
.advocate-hero-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.advocate-hero-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.advocate-hero-sub  { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.3rem; }

.advocate-form  { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; padding: 0 0.5rem; }
.advocate-field { display: flex; flex-direction: column; gap: 0.4rem; }
.advocate-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.advocate-required { color: #e74c3c; font-weight: 700; }

.advocate-input { width: 100%; padding: 0.7rem 1rem; background: var(--navy-light); border: 1px solid var(--navy-border); border-radius: 10px; color: var(--text); font-size: 0.88rem; font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.advocate-input::placeholder { color: var(--text-dim); }
.advocate-input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,0.15); }

.advocate-error   { padding: 0.8rem 1rem; background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.25); border-radius: 10px; font-size: 0.82rem; color: #e74c3c; }
.advocate-success { padding: 0.8rem 1rem; background: rgba(46,204,113,0.06); border: 1px solid rgba(46,204,113,0.2); border-radius: 10px; font-size: 0.82rem; color: #2ecc71; font-weight: 500; }
.advocate-actions { text-align: center; }

.advocate-save-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 2.2rem; background: linear-gradient(135deg, var(--gold), #d4a843); border: none; border-radius: 10px; color: var(--navy); font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 15px rgba(201,168,76,0.3); }
.advocate-save-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(201,168,76,0.4); }
.advocate-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Advocate field-row: City / State / Pincode side by side */
.advocate-field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; grid-column: 1 / -1; }

/* Advocate read-only card */
.advocate-readonly-card {
  display: flex; flex-direction: column; gap: 0;
  background: linear-gradient(145deg, rgba(19,28,46,0.9), rgba(30,42,64,0.6));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}
.advocate-readonly-row {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid rgba(30,45,69,0.5);
  transition: background 0.2s;
}
.advocate-readonly-row:last-child { border-bottom: none; }
.advocate-readonly-row:hover { background: rgba(201,168,76,0.04); }
.advocate-readonly-icon  { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
.advocate-readonly-label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 0.2rem; }
.advocate-readonly-value { font-size: 0.9rem; font-weight: 500; color: var(--text); line-height: 1.45; }


/* ═══════════════════════════════════════════════════════════════════
   HAMBURGER BUTTON & MOBILE SIDEBAR CONTROLS
   ═══════════════════════════════════════════════════════════════════ */

.hamburger-btn {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
}
.hamburger-btn:hover { background: var(--navy-light); border-color: rgba(201,168,76,0.3); }

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.2s;
}
.hamburger-btn:hover .hamburger-line { background: var(--gold); }

/* Dark overlay when sidebar is open on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Close button inside sidebar (mobile) */
.sidebar-close-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.sidebar-close-btn:hover { color: var(--red); background: rgba(231,76,60,0.1); }

/* ═══════════════════════════════════════════════════════════════════
   BOTTOM MOBILE NAV BAR
   ═══════════════════════════════════════════════════════════════════ */

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 0.5rem 0 env(safe-area-inset-bottom, 0.5rem);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}

.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 1rem;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
.mobile-nav-item:hover  { color: var(--text); background: var(--navy-light); }
.mobile-nav-item.active { color: var(--gold); }
.mobile-nav-icon { font-size: 1.3rem; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 900px
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Show hamburger + overlay */
  .hamburger-btn    { display: flex; }
  .sidebar-overlay  { display: block; }
  .sidebar-close-btn { display: block; }

  /* Sidebar slides in from left */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }
  .sidebar.open { transform: translateX(0); }

  /* Main content no longer offset */
  .main-content {
    margin-left: 0;
    padding: 1.5rem;
    padding-top: 4rem; /* room for hamburger */
  }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Two-column layouts */
  .two-col { grid-template-columns: 1fr; }

  /* Page header: stack title + date */
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.6rem; }

  /* Cases table: drop arbitrator + hearing columns */
  .table-head, .table-row { grid-template-columns: 1fr 2fr 1fr; }
  .table-head > *:nth-child(4), .table-head > *:nth-child(5),
  .table-row  > *:nth-child(4), .table-row  > *:nth-child(5) { display: none; }

  /* Case detail header */
  .case-header-top  { flex-direction: column; gap: 0.8rem; }
  .case-meta-row    { flex-wrap: wrap; gap: 0.8rem 1.5rem; }

  /* Detail tabs */
  .detail-tabs { flex-wrap: wrap; }
  .detail-tab  { flex: 1; text-align: center; font-size: 0.72rem; padding: 0.5rem 0.4rem; min-width: 0; }

  /* Stage timeline */
  .stage-timeline::before { left: 17px; }
  .stage-block { padding-left: 44px; }
  .stage-icon  { width: 36px; height: 36px; font-size: 1rem; }

  /* Channel rows */
  .channel-row   { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .channel-right { flex-wrap: wrap; }

  /* Meeting grid */
  .meeting-details-grid { grid-template-columns: 1fr 1fr; }

  /* Contact detail key-value */
  .contact-detail-block .cd-row { grid-template-columns: 1fr; gap: 0.2rem; }

  /* Contacts tab info grid */
  .contact-info-grid { grid-template-columns: 1fr; }
  .contact-info-item:nth-child(even) { border-right: 1px solid rgba(30,45,69,0.5); }
  .contact-info-full  { border-right: none; }

  /* Profile detail grid */
  .profile-detail-grid { grid-template-columns: 1fr; }

  /* Help contacts */
  .help-contact-grid { grid-template-columns: 1fr 1fr; }

  /* Advocate form */
  .advocate-form { grid-template-columns: 1fr; }
  .advocate-field-row { grid-template-columns: 1fr; }

  /* Previous meetings table */
  .pm-table-head, .pm-table-row { grid-template-columns: 1fr 1fr 1fr; font-size: 0.72rem; }
  .pm-table-head > *:nth-child(4), .pm-table-head > *:nth-child(5),
  .pm-table-row  > *:nth-child(4), .pm-table-row  > *:nth-child(5) { display: none; }

  /* Notices */
  .notice-item      { padding: 0.7rem; }
  .notice-file-name { font-size: 0.78rem; }

  /* Notification banners */
  .notif-banner { flex-wrap: wrap; }
  .notif-banner-join { width: 100%; text-align: center; margin-top: 0.3rem; }

  /* Login card */
  .login-card { padding: 2rem 1.8rem; }

  /* ── Case detail page fixes ── */

  /* Case header: status badge stacks below title on tablet */
  .case-header-top { flex-direction: column; gap: 0.6rem; align-items: flex-start; }

  /* Meta row wraps gracefully */
  .case-meta-row { flex-wrap: wrap; gap: 0.6rem 1.2rem; margin-top: 0.8rem; }
  .case-meta-item { min-width: 120px; }

  /* Horizontal timeline: allow scroll on tablet */
  .h-timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
  }
  .h-step { min-width: 90px; }
  .h-step-label { font-size: 0.68rem; }
  .h-step-date  { font-size: 0.6rem; }

  /* Stage timeline: tighten left indent */
  .stage-block { padding-left: 44px; }
  .stage-icon  { width: 34px; height: 34px; font-size: 0.85rem; }
  .stage-timeline::before { left: 17px; }

  /* Stage header: wraps on narrow tablet */
  .stage-header { flex-wrap: wrap; gap: 0.5rem; }
  .stage-header-right { flex-wrap: wrap; gap: 0.4rem; }
  .stage-name { font-size: 0.9rem; }

  /* Channel rows: stack on tablet */
  .channel-row { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .channel-right { flex-wrap: wrap; gap: 0.3rem; }

  /* Postal label min-width reduced */
  .postal-label { min-width: 90px; }

  /* Meeting details: 2 col on tablet (already set but reinforce) */
  .meeting-details-grid { grid-template-columns: 1fr 1fr; }

  /* Meetings table: hide duration + passcode on tablet */
  .pm-table-head, .pm-table-row { grid-template-columns: 1.2fr 1fr 1fr; }
  .pm-table-head > *:nth-child(4), .pm-table-head > *:nth-child(5),
  .pm-table-row  > *:nth-child(4), .pm-table-row  > *:nth-child(5) { display: none; }

  /* Advocate form: single column */
  .advocate-form { grid-template-columns: 1fr; }

  /* Upload dropzone tighter on tablet */
  .upload-dropzone { padding: 2rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 480px
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Show bottom nav bar */
  .mobile-nav { display: block; }

  .main-content {
    padding: 1rem;
    padding-top: 4rem;
    padding-bottom: 5rem; /* room for bottom nav */
  }

  /* Stats → single column */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.8rem; }

  /* Case header */
  .case-big-title { font-size: 1.15rem; }
  .case-header-card { padding: 1.2rem 1.2rem 1.2rem 1.6rem; }

  /* Tabs */
  .detail-tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; }
  .detail-tab  { font-size: 0.65rem; padding: 0.45rem 0.5rem; white-space: nowrap; flex: none; }
  .tab-badge   { min-width: 16px; height: 16px; font-size: 0.6rem; padding: 0 4px; margin-left: 3px; }

  /* Meeting grid → 1 column */
  .meeting-details-grid { grid-template-columns: 1fr; }

  /* Help contacts → single column */
  .help-contact-grid { grid-template-columns: 1fr; }

  /* Previous meetings table → 2 columns */
  .pm-table-head, .pm-table-row { grid-template-columns: 1fr 1fr; font-size: 0.7rem; }
  .pm-table-head > *:nth-child(3), .pm-table-head > *:nth-child(4), .pm-table-head > *:nth-child(5),
  .pm-table-row  > *:nth-child(3), .pm-table-row  > *:nth-child(4), .pm-table-row  > *:nth-child(5) { display: none; }

  /* Horizontal timeline */
  .h-timeline { overflow-x: auto; padding-bottom: 10px; }

  /* Notices */
  .notice-group-name { font-size: 0.85rem; }

  /* Profile hero */
  .profile-hero { flex-direction: column; text-align: center; }
  .profile-hero-info { align-items: center; }
  .profile-id-badge  { margin: 0 auto; }

  /* Toast — full width at bottom */
  .toast {
    bottom: 5.5rem; /* above mobile nav */
    left: 1rem;
    right: 1rem;
    width: auto;
  }

  /* Upload */
  .upload-dropzone { padding: 1.5rem 1rem; }

  /* Upload categories chips */
  .upload-category-chips { gap: 0.4rem; }
  .upload-chip { font-size: 0.73rem; padding: 0.35rem 0.7rem; }

  /* Stage timeline */
  .stage-header { flex-wrap: wrap; gap: 0.4rem; }
  .stage-header-right { flex-wrap: wrap; }

  /* Login */
  .login-wrap { padding: 1rem; }
  .login-card { padding: 2rem 1.2rem; border-radius: 18px; }
  .logo-title { font-size: 1.3rem; }

  /* Page header — hide date on tiny screens */
  .page-date { display: none; }
  .page-title { font-size: 1.35rem; }

  /* ══════════════════════════════════════════
     FIX: Case Detail Page — mobile layout
     ══════════════════════════════════════════ */

  /* Case header card: tighter left-border padding */
  .case-header-card { padding: 1rem 1rem 1rem 1.4rem; }
  .case-big-title   { font-size: 1.1rem; line-height: 1.35; }
  .case-big-id      { font-size: 0.72rem; }

  /* Status badge: inline below title, not absolute */
  .case-header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Meta row: each item full-width stack */
  .case-meta-row {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.8rem;
  }
  .case-meta-item { min-width: unset; width: 100%; }
  .case-meta-label { font-size: 0.65rem; }
  .case-meta-value { font-size: 0.85rem; }

  /* Case progress: compact horizontal — all steps fit in screen width */
  .h-timeline {
    flex-direction: row;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 0.25rem 0 0.5rem;
    gap: 0;
    align-items: flex-start;
    width: 100%;
  }
  .h-step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    min-width: 0;
  }
  .h-dot-row {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }
  .h-connector {
    flex: 1;
    height: 2px;
    width: auto;
    background: var(--navy-border);
    margin: 0;
  }
  .h-connector-invisible {
    flex: 1;
    height: 2px;
    width: auto;
    background: transparent;
    margin: 0;
  }
  .h-dot        { width: 20px; height: 20px; font-size: 0.55rem; flex-shrink: 0; }
  .h-step-label { font-size: 0.5rem; padding: 0 1px; text-align: center; margin-top: 0.3rem; line-height: 1.25; }
  .h-step-date  { font-size: 0.45rem; text-align: center; margin-top: 0.1rem; }


  /* Tabs: 3-per-row wrap grid on mobile (2 rows of 3, all visible) */
  .detail-tabs {
    flex-wrap: wrap;
    overflow: hidden;
    -webkit-overflow-scrolling: unset;
    scrollbar-width: auto;
    -webkit-mask-image: none;
    mask-image: none;
    gap: 0;
    border-radius: 12px 12px 0 0;
  }
  .detail-tabs::-webkit-scrollbar { display: block; }
  .detail-tab {
    flex: 1 1 calc(100% / 3);
    min-width: 0;
    font-size: 0.6rem;
    padding: 0.5rem 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
    border-radius: 0;
    border-right: none;
    border-bottom: 1px solid var(--card-border);
  }
  /* Reset first/last-child radii that break the grid layout */
  .detail-tab:first-child { border-radius: 0; }
  .detail-tab:last-child  { border-radius: 0; border-right: none; }
  /* Active: gold underline instead of desktop margin-bottom trick */
  .detail-tab.active { margin-bottom: 0; border-bottom: 2px solid var(--gold); }
  .tab-badge { min-width: 14px; height: 14px; font-size: 0.55rem; padding: 0 2px; margin-left: 2px; }
  /* Tab content card gets top border since tabs wrap */
  .tab-content-card { border-top: 1px solid var(--card-border); border-radius: 0 0 12px 12px; }

  /* Stage timeline: very tight on mobile */
  .stage-block { padding-left: 38px; padding-bottom: 1rem; }
  .stage-icon  { width: 28px; height: 28px; font-size: 0.75rem; top: 0.5rem; }
  .stage-timeline::before { left: 14px; top: 20px; }
  .stage-name  { font-size: 0.85rem; }
  .stage-header { flex-wrap: wrap; gap: 0.35rem; padding: 0.5rem 0; }
  .stage-header-right { flex-wrap: wrap; gap: 0.3rem; }
  .stage-download-btn { font-size: 0.7rem; padding: 0.3rem 0.6rem; }

  /* Channel cards: tighter */
  .channel-row { flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.6rem 0.8rem; }
  .channel-right { flex-wrap: wrap; gap: 0.25rem; }
  .channel-medium { font-size: 0.8rem; }
  .channel-phone  { font-size: 0.72rem; }
  .channel-date   { font-size: 0.68rem; }
  .channel-content { padding: 0.6rem 0.8rem; }
  .channel-content-text { font-size: 0.78rem; }

  /* Postal details */
  .postal-detail-row { flex-direction: column; gap: 0.2rem; }
  .postal-label { min-width: unset; font-size: 0.7rem; }
  .postal-value { font-size: 0.8rem; }

  /* Meeting details: 3 columns in a single horizontal row */
  .meeting-details-grid { grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; padding: 0; }
  .meeting-detail-card  { padding: 0.6rem 0.3rem; border-radius: 10px; }
  .meeting-detail-icon  { font-size: 1.1rem; margin-bottom: 0.3rem; }
  .meeting-detail-label { font-size: 0.55rem; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
  .meeting-detail-value { font-size: 0.72rem; font-weight: 700; word-break: break-word; }
  .meeting-hero-icon    { width: 60px; height: 60px; font-size: 2rem; line-height: 60px; }
  .meeting-hero-title   { font-size: 1.1rem; }
  .meeting-join-btn     { padding: 0.75rem 1.4rem; font-size: 0.88rem; }
  .meeting-url-display  { font-size: 0.65rem; }
  .meeting-pending-notice { padding: 0.75rem 1rem; font-size: 0.78rem; margin: 0; }

  /* Previous meetings table — only date + attended */
  .pm-table-head, .pm-table-row {
    grid-template-columns: 1fr 1fr;
    font-size: 0.72rem;
    padding: 0.5rem 0.7rem;
  }
  .pm-table-head > *:nth-child(3),
  .pm-table-head > *:nth-child(4),
  .pm-table-head > *:nth-child(5),
  .pm-table-row  > *:nth-child(3),
  .pm-table-row  > *:nth-child(4),
  .pm-table-row  > *:nth-child(5) { display: none; }

  /* Advocate form: single col, compact */
  .advocate-form { grid-template-columns: 1fr; gap: 0.8rem; padding: 0; }
  .advocate-input { padding: 0.6rem 0.8rem; font-size: 0.85rem; }
  .advocate-save-btn { padding: 0.65rem 1.5rem; font-size: 0.85rem; }

  /* Upload: compact on mobile */
  .upload-dropzone      { padding: 1.2rem 0.8rem; }
  .upload-dropzone-text { font-size: 0.88rem; }
  .upload-category-chips { gap: 0.35rem; }
  .upload-chip          { font-size: 0.72rem; padding: 0.3rem 0.65rem; }
  .upload-submit-btn    { padding: 0.65rem 1.5rem; font-size: 0.85rem; }

  /* Contact cards: tighter */
  .contact-card-header  { padding: 0.9rem 1rem; gap: 0.7rem; }
  .contact-avatar       { width: 36px; height: 36px; font-size: 0.85rem; }
  .contact-name         { font-size: 0.92rem; }
  .contact-info-item    { padding: 0.7rem 1rem; }
  .contact-info-value   { font-size: 0.82rem; }
  .contact-info-label   { font-size: 0.62rem; }

  /* Comms status badges: smaller */
  .comms-status { font-size: 0.65rem; padding: 0.15rem 0.5rem; }

  /* Tab content card: no top border-radius (tabs are scrollable above) */
  .tab-content-card { border-radius: 0 0 12px 12px; padding: 1rem; }

  /* ── FIX: Active Cases table → card layout on mobile ── */

  /* Hide the column header row entirely */
  .cases-table .table-head {
    display: none;
  }

  /* Each row becomes a vertical card */
  .cases-table .table-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--card-border);
    position: relative;
    align-items: flex-start;
  }

  /* Status badge pinned to top-right corner of card */
  .cases-table .table-row > div:nth-child(3) {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
  }

  /* Title block: give it right padding so it never slides under the badge */
  .cases-table .table-row > div:nth-child(2) {
    padding-right: 5.5rem;
    width: 100%;
  }

  /* Case ID label */
  .case-id {
    font-size: 0.78rem;
    letter-spacing: 0.03em;
  }

  /* Case title wraps cleanly */
  .case-title {
    font-size: 0.86rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
  }

  /* "vs" sub-line wraps cleanly */
  .case-sub {
    font-size: 0.72rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
  }

  /* Hide arbitrator / hearing cells on mobile */
  .cases-table .table-row > div:nth-child(4),
  .cases-table .table-row > div:nth-child(5) {
    display: none;
  }

  /* ── Back button — mobile ── */
  .back-btn {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.35rem 0;
  }

  /* ── Notification banner — mobile ── */
  .notif-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
  }
  .notif-banner-msg { font-size: 0.82rem; line-height: 1.45; }
  .notif-banner-join {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.82rem;
  }

  /* ── Profile detail grid — single column on mobile ── */
  .profile-detail-grid { grid-template-columns: 1fr; gap: 0.8rem; }
  .profile-detail-item.full-width { grid-column: 1; }
  .profile-name-lg  { font-size: 1.1rem; }
  .profile-avatar-lg { width: 58px; height: 58px; font-size: 1.3rem; }

  /* ── Contact info grid — fix border on single column ── */
  .contact-info-item:nth-child(even) { border-right: none; }
  .contact-info-full { border-right: none; }

  /* ── Notification cards — compact on mobile ── */
  .notif-icon  { width: 38px; height: 38px; font-size: 1.2rem; flex-shrink: 0; }
  .notif-title { font-size: 0.85rem; }
  .notif-desc  { font-size: 0.78rem; }
  .notif-time  { font-size: 0.65rem; }
  .notif-content { gap: 0.7rem; }

  /* ── Notices container gap ── */
  .notices-container { gap: 0.8rem; }
  .notice-group-name { font-size: 0.82rem; }
  .notice-group-icon { font-size: 1rem; }

  /* ── Help page ── */
  .faq-question { font-size: 0.85rem; }
  .faq-answer  { font-size: 0.78rem; }
  .help-contact-item { padding: 0.9rem 0.7rem; }
  .help-contact-value { font-size: 0.8rem; word-break: break-all; }

  /* ── Meeting join area ── */
  .meeting-join-area { padding: 0.6rem 0; }

  /* ── Card title ── */
  .card-title { font-size: 0.92rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL PHONE  ≤ 360px
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .main-content { padding: 0.75rem; padding-top: 3.8rem; padding-bottom: 5rem; }

  /* Case header */
  .case-header-card { padding: 0.85rem 0.85rem 0.85rem 1.2rem; }
  .case-big-title   { font-size: 1rem; }
  .case-big-id      { font-size: 0.68rem; }

  /* Tabs even smaller */
  .detail-tab { font-size: 0.58rem; padding: 0.4rem 0.45rem; }

  /* Stage name */
  .stage-name { font-size: 0.78rem; }
  .stage-download-btn { font-size: 0.65rem; padding: 0.25rem 0.5rem; }
  .stage-block { padding-left: 34px; }
  .stage-icon  { width: 24px; height: 24px; font-size: 0.65rem; }
  .stage-timeline::before { left: 12px; }

  /* Advocate */
  .advocate-input { padding: 0.55rem 0.7rem; font-size: 0.82rem; }
  .advocate-save-btn { padding: 0.6rem 1.2rem; font-size: 0.82rem; }

  /* Upload */
  .upload-dropzone { padding: 1rem 0.7rem; }
  .upload-submit-btn { padding: 0.6rem 1.2rem; font-size: 0.82rem; }
  .upload-chip { font-size: 0.68rem; padding: 0.28rem 0.55rem; }

  /* Previous meetings */
  .pm-table-head, .pm-table-row { padding: 0.4rem 0.5rem; font-size: 0.65rem; }

  /* Profile */
  .profile-avatar-lg { width: 50px; height: 50px; font-size: 1.1rem; }
  .profile-name-lg   { font-size: 1rem; }

  /* Notification cards */
  .notif-icon { width: 32px; height: 32px; font-size: 1rem; border-radius: 8px; }

  /* Meeting */
  .meeting-hero-title { font-size: 1rem; }
  .meeting-join-btn   { padding: 0.65rem 1.1rem; font-size: 0.82rem; }
  .meeting-details-grid { grid-template-columns: 1fr 1fr 1fr; gap: 0.35rem; }
  .meeting-detail-card  { padding: 0.5rem 0.2rem; }
  .meeting-detail-icon  { font-size: 0.95rem; margin-bottom: 0.2rem; }
  .meeting-detail-label { font-size: 0.48rem; }
  .meeting-detail-value { font-size: 0.65rem; }
}