/* ============================================================
   Portal — Main Stylesheet
   Design: Corporate Navy & Gold — Refined, Trustworthy
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --navy:    #0d1b2a;
  --navy2:   #1b2d42;
  --navy3:   #263d55;
  --gold:    #c9a84c;
  --gold2:   #e8c96f;
  --cream:   #f8f5ef;
  --white:   #ffffff;
  --gray1:   #f2f4f7;
  --gray2:   #e0e4ea;
  --gray3:   #aab0bb;
  --gray4:   #6b7280;
  --text:    #1a2535;
  --danger:  #dc3545;
  --success: #198754;
  --warn:    #e0a800;
  --info:    #0dcaf0;

  --radius:  10px;
  --radius2: 18px;
  --shadow:  0 4px 24px rgba(13,27,42,.10);
  --shadow2: 0 8px 40px rgba(13,27,42,.18);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --sidebar-w: 260px;
  --topbar-h:  64px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 50%, var(--navy3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(201,168,76,.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(201,168,76,.08) 0%, transparent 50%);
  pointer-events: none;
}
.auth-bg::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.08);
  top: -200px; right: -200px;
  pointer-events: none;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius2);
  box-shadow: var(--shadow2);
  width: 100%;
  max-width: 480px;
  padding: 48px 44px;
  position: relative;
  z-index: 1;
  animation: fadeUp .5s ease both;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.auth-logo .logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 1.3rem;
}
.auth-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  letter-spacing: -.5px;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--navy);
  margin-bottom: 6px;
}
.auth-sub {
  color: var(--gray4);
  font-size: .9rem;
  margin-bottom: 28px;
}

/* ── Form Elements ──────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.form-label .req { color: var(--gold); margin-left: 2px; }
.form-control, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray2);
  border-radius: var(--radius);
  font-size: .92rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid   { border-color: var(--success); }
.form-hint {
  font-size: .78rem;
  color: var(--gray4);
  margin-top: 4px;
}
.form-error {
  font-size: .78rem;
  color: var(--danger);
  margin-top: 4px;
}

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .form-control { padding-left: 40px; }
.input-icon-wrap .icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray3);
  font-size: .9rem;
}

.phone-wrap { display: flex; gap: 8px; }
.phone-code {
  flex: 0 0 90px;
  padding: 11px 10px;
  border: 1.5px solid var(--gray2);
  border-radius: var(--radius);
  background: var(--gray1);
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}
.phone-wrap .form-control { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all .2s;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(13,27,42,.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy2), var(--navy3));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13,27,42,.3);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(201,168,76,.3);
}
.btn-gold:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray2);
  color: var(--gray4);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-full { width: 100%; }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 22px 0;
  color: var(--gray3); font-size: .82rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--gray2);
}

.auth-link {
  text-align: center;
  font-size: .88rem;
  color: var(--gray4);
  margin-top: 20px;
}
.auth-link a { color: var(--gold); font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ── Alert Boxes ────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .88rem;
  margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px;
  border-left: 4px solid transparent;
}
.alert-danger  { background: #fff2f2; border-color: var(--danger); color: var(--danger); }
.alert-success { background: #f0fdf4; border-color: var(--success); color: #155724; }
.alert-info    { background: #f0f9ff; border-color: var(--info); color: #055160; }
.alert-warn    { background: #fffdf0; border-color: var(--warn); color: #856404; }

/* ── Layout ─────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s;
}
.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 1.1rem;
}
.sidebar-logo .logo-text {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.2rem;
}
.sidebar-logo .logo-badge {
  font-size: .65rem;
  background: var(--gold);
  color: var(--navy);
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 16px 8px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--white); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(201,168,76,.2), rgba(201,168,76,.1));
  color: var(--gold);
  border-left: 3px solid var(--gold);
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.user-snippet {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}
.user-snippet-info { flex: 1; min-width: 0; }
.user-snippet-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-snippet-role {
  font-size: .72rem;
  color: var(--gold);
  font-weight: 500;
}
.sidebar-logout {
  color: rgba(255,255,255,.4);
  font-size: .9rem;
  transition: color .2s;
}
.sidebar-logout:hover { color: var(--danger); }

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray2);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  width: 38px; height: 38px;
  border: none; background: var(--gray1);
  border-radius: 8px; color: var(--gray4);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; transition: all .2s; position: relative;
}
.topbar-btn:hover { background: var(--gray2); color: var(--navy); }
.topbar-btn .dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--white);
}
.mobile-toggle { display: none; }

.page-body {
  flex: 1;
  padding: 28px;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-left h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
}
.page-header-left p { color: var(--gray4); font-size: .88rem; margin-top: 2px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--gold); }
.card-body { padding: 22px; }

/* ── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius2);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: center;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow2); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.stat-icon.navy { background: rgba(13,27,42,.08); color: var(--navy); }
.stat-icon.gold  { background: rgba(201,168,76,.12); color: var(--gold); }
.stat-icon.green { background: rgba(25,135,84,.1);  color: var(--success); }
.stat-icon.red   { background: rgba(220,53,69,.1);  color: var(--danger); }
.stat-info { flex: 1; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--gray4); margin-top: 4px; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
thead th {
  background: var(--navy);
  color: rgba(255,255,255,.8);
  padding: 12px 16px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-align: left;
}
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray1);
  color: var(--text);
}
tbody tr:hover { background: var(--gray1); }
tbody tr:last-child td { border-bottom: none; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gold   { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-gray   { background: var(--gray1); color: var(--gray4); }

/* ── Profile / Info Page ────────────────────────────────── */
.profile-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  border-radius: var(--radius2);
  padding: 30px;
  color: var(--white);
  display: flex; align-items: center; gap: 22px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.profile-banner::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(201,168,76,.08);
}
.profile-avatar-large {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); font-size: 1.8rem; font-weight: 700;
  flex-shrink: 0; border: 3px solid rgba(255,255,255,.2);
}
.profile-banner-info h2 {
  font-family: var(--font-display); font-size: 1.4rem;
}
.profile-banner-info p { color: rgba(255,255,255,.65); font-size: .88rem; }
.profile-complete-bar {
  margin-top: 10px;
  background: rgba(255,255,255,.15);
  border-radius: 20px; height: 6px; width: 220px;
}
.profile-complete-fill {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  transition: width .4s ease;
}
.profile-complete-text { font-size: .75rem; color: var(--gold2); margin-top: 4px; }

/* ── Progress Steps ─────────────────────────────────────── */
.steps-row {
  display: flex; align-items: flex-start;
  gap: 0; margin-bottom: 30px;
  overflow-x: auto; padding-bottom: 6px;
}
.step {
  flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 80px;
}
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
  border: 2px solid var(--gray2);
  background: var(--white); color: var(--gray3);
  position: relative; z-index: 1;
  transition: all .2s;
}
.step.done .step-circle { background: var(--success); border-color: var(--success); color: #fff; }
.step.active .step-circle { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.step-label { font-size: .72rem; color: var(--gray4); margin-top: 6px; text-align: center; }
.step.active .step-label { color: var(--navy); font-weight: 600; }
.step-line {
  flex: 1; height: 2px;
  background: var(--gray2); margin-top: 17px;
}
.step-line.done { background: var(--success); }

/* ── Chat ───────────────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  height: calc(100vh - var(--topbar-h) - 56px);
}
.chat-sidebar {
  background: var(--white);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray2);
}
.chat-sidebar-title { font-family: var(--font-display); font-size: 1rem; color: var(--navy); }
.channel-list { flex: 1; overflow-y: auto; padding: 10px; }
.channel-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 4px;
}
.channel-item:hover { background: var(--gray1); }
.channel-item.active { background: rgba(13,27,42,.06); border-left: 3px solid var(--navy); }
.channel-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
  background: rgba(13,27,42,.07); color: var(--navy);
}
.channel-info { flex: 1; min-width: 0; }
.channel-name { font-size: .9rem; font-weight: 600; color: var(--navy); }
.channel-type { font-size: .75rem; color: var(--gray4); text-transform: capitalize; }
.channel-unread {
  background: var(--danger); color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}

.chat-main {
  background: var(--white);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-topbar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray2);
  display: flex; align-items: center; gap: 12px;
}
.chat-topbar-info { flex: 1; }
.chat-topbar-name { font-weight: 600; color: var(--navy); }
.chat-topbar-sub { font-size: .78rem; color: var(--gray4); }
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--gray1);
}
.msg { display: flex; gap: 10px; max-width: 75%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy2);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: .75rem; font-weight: 700;
  flex-shrink: 0;
}
.msg.user .msg-avatar { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--navy); }
.msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: .88rem; line-height: 1.5;
}
.msg.admin .msg-bubble { background: var(--white); color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.msg.user  .msg-bubble { background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; }
.msg-time { font-size: .68rem; color: var(--gray3); margin-top: 4px; }
.msg.user .msg-time { text-align: right; }

.chat-input-bar {
  padding: 16px 20px;
  border-top: 1px solid var(--gray2);
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input-bar textarea {
  flex: 1; border: 1.5px solid var(--gray2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: .9rem; resize: none;
  outline: none; transition: border-color .2s;
  max-height: 120px; min-height: 44px;
}
.chat-input-bar textarea:focus { border-color: var(--gold); }
.chat-send-btn {
  width: 44px; height: 44px;
  background: var(--navy);
  border: none; border-radius: var(--radius);
  color: var(--gold); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--gold); color: var(--navy); }

.chat-placeholder {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gray4); gap: 12px; padding: 40px;
}
.chat-placeholder i { font-size: 3rem; color: var(--gray2); }
.chat-placeholder p { text-align: center; font-size: .9rem; }

/* ── Support Channel Card (User View) ───────────────────── */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.channel-card {
  background: var(--white);
  border: 2px solid var(--gray2);
  border-radius: var(--radius2);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}
.channel-card:hover, .channel-card.selected {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(201,168,76,.15);
  transform: translateY(-2px);
}
.channel-card.selected { background: rgba(201,168,76,.04); }
.channel-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(13,27,42,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--navy);
  margin: 0 auto 14px;
}
.channel-card h3 { font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.channel-card p { font-size: .82rem; color: var(--gray4); }
.channel-card .channel-link {
  display: inline-block;
  margin-top: 10px;
  font-size: .8rem;
  color: var(--gold);
  font-weight: 600;
  word-break: break-all;
}

/* ── Complete Profile Banner ────────────────────────────── */
.complete-notice {
  background: linear-gradient(135deg, #fff8e7, #fffbf0);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius2);
  padding: 18px 22px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.complete-notice i { color: var(--gold); font-size: 1.4rem; flex-shrink: 0; }
.complete-notice-text h4 { color: var(--navy); font-weight: 600; }
.complete-notice-text p { font-size: .85rem; color: var(--gray4); }
.complete-notice .btn { flex-shrink: 0; }

/* ── Modals ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,42,.5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius2);
  width: 100%; max-width: 520px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow2);
  transform: translateY(16px);
  transition: transform .25s;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray2);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-display); color: var(--navy); font-size: 1.1rem; }
.modal-close { background: none; border: none; color: var(--gray4); font-size: 1.2rem; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray2);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ── Utilities ──────────────────────────────────────────── */
.row { display: flex; gap: 18px; flex-wrap: wrap; }
.col { flex: 1; min-width: 200px; }
.col-2 { flex: 0 0 calc(50% - 9px); }
.col-3 { flex: 0 0 calc(33.333% - 12px); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--gray4); }
.text-navy   { color: var(--navy); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.fw-600 { font-weight: 600; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mb-4 { margin-bottom: 24px; }
.gap-2 { gap: 10px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .chat-sidebar.open { display: flex; }
}
@media (max-width: 600px) {
  .auth-card { padding: 28px 20px; }
  .page-body { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .col-2, .col-3 { flex: 0 0 100%; }
  .profile-banner { flex-direction: column; text-align: center; }
}
