/* ═══════════════════════════════════════════════════════════════
   KINGS AQOMPLICE — COMMAND INTERFACE
   "The War Room" — Elite Legal Intelligence Dashboard
   ═══════════════════════════════════════════════════════════════ */

   @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=DM+Mono:wght@300;400;500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

   /* ── DESIGN TOKENS ── */
   :root {
     /* Brand Colors — immutable */
     --brand-crimson:     #5C0601;
     --brand-crimson-mid: #7a0902;
     --brand-crimson-deep:#3d0400;
     --brand-amber:       #C85103;
     --brand-amber-mid:   #e06820;
     --brand-teal:        #003C45;
     --brand-teal-light:  #004d59;
   
     /* Surface system — warm-dark */
     --shell:             #0e0908;        /* outermost background */
     --sidebar:           #130b0a;        /* sidebar */
     --sidebar-raised:    #1a0f0d;        /* sidebar hover surface */
     --canvas:            #f0ece8;        /* main content bg */
     --surface-0:         #ffffff;        /* cards */
     --surface-1:         #faf7f4;        /* slightly warm */
     --surface-2:         #f4f0ec;        /* input bg */
   
     /* Border system */
     --border-warm:       rgba(200,81,3,0.13);
     --border-cool:       rgba(0,60,69,0.10);
     --border-hair:       rgba(0,60,69,0.07);
     --border-glass:      rgba(255,255,255,0.06);
   
     /* Sidebar text hierarchy */
     --sb-text-bright:    rgba(240,232,225,0.90);
     --sb-text-mid:       rgba(240,232,225,0.58);
     --sb-text-dim:       rgba(240,232,225,0.30);
     --sb-text-label:     rgba(200,81,3,0.55);
     --sb-active-bg:      rgba(200,81,3,0.13);
     --sb-active-border:  #C85103;
     --sb-active-text:    #f5a868;
     --sb-hover-bg:       rgba(240,232,225,0.05);
   
     /* Content text */
     --text-primary:      #1a0c09;
     --text-body:         #2d1e18;
     --text-muted:        rgba(0,60,69,0.55);
     --text-faint:        rgba(0,60,69,0.32);
   
     /* Semantic */
     --success:           #15803d;
     --success-bg:        rgba(34,197,94,0.09);
     --warning:           #a85402;
     --warning-bg:        rgba(200,81,3,0.09);
     --neutral:           #004d59;
     --neutral-bg:        rgba(0,60,69,0.08);
   
     /* Elevation */
     --shadow-glow:       0 0 0 1px rgba(200,81,3,0.08), 0 2px 12px rgba(0,0,0,0.08);
     --shadow-card:       0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.06);
     --shadow-card-hover: 0 2px 8px rgba(0,0,0,0.07), 0 12px 36px rgba(0,0,0,0.10);
     --shadow-modal:      0 8px 32px rgba(0,0,0,0.20), 0 32px 80px rgba(0,0,0,0.28);
     --shadow-sidebar:    8px 0 48px rgba(0,0,0,0.40);
   
     /* Geometry */
     --r-xs:  4px;
     --r-sm:  6px;
     --r-md:  10px;
     --r-lg:  14px;
     --r-xl:  20px;
   
     /* Gradients */
     --grad-brand:    linear-gradient(135deg, #5C0601 0%, #8b1510 50%, #C85103 100%);
     --grad-bar:      linear-gradient(90deg, #5C0601 0%, #C85103 100%);
     --grad-bar-vert: linear-gradient(180deg, #5C0601 0%, #C85103 100%);
     --grad-amber:    linear-gradient(135deg, #C85103 0%, #e07030 100%);
     --grad-dark:     linear-gradient(180deg, #130b0a 0%, #0e0908 100%);
   
     /* Dimensions */
     --sidebar-w:  268px;
     --topbar-h:   58px;
   }
   
   /* ═══════════════════════════════════════════════════════════════
      RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
   *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   
   body.admin-body {
     font-family: 'DM Sans', system-ui, sans-serif;
     background: var(--canvas);
     color: var(--text-body);
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
     font-size: 13.5px;
     line-height: 1.55;
     overflow-x: hidden;
   }
   
   /* ═══════════════════════════════════════════════════════════════
      LAYOUT SHELL
   ═══════════════════════════════════════════════════════════════ */
   .admin-shell {
     display: flex;
     min-height: 100vh;
     background: var(--shell);
   }
   
   /* ═══════════════════════════════════════════════════════════════
      SIDEBAR — THE SPINE
   ═══════════════════════════════════════════════════════════════ */
   .dash-sidebar {
     width: var(--sidebar-w);
     min-width: var(--sidebar-w);
     background: var(--sidebar);
     height: 100vh;
     position: sticky;
     top: 0;
     display: flex;
     flex-direction: column;
     overflow: hidden;
     border-right: 1px solid var(--border-warm);
     box-shadow: var(--shadow-sidebar);
     z-index: 50;
     transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
   }
   
   /* Subtle grain texture */
   .dash-sidebar::before {
     content: '';
     position: absolute;
     inset: 0;
     background-image:
       url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.04'/%3E%3C/svg%3E");
     background-size: 300px;
     pointer-events: none;
     z-index: 0;
   }
   
   /* Amber glow at top of sidebar */
   .dash-sidebar::after {
     content: '';
     position: absolute;
     top: -60px;
     left: 50%;
     transform: translateX(-50%);
     width: 200px;
     height: 120px;
     background: radial-gradient(ellipse, rgba(200,81,3,0.12) 0%, transparent 70%);
     pointer-events: none;
     z-index: 0;
   }
   
   .dash-sidebar > * { position: relative; z-index: 1; }
   
   /* ── Brand Block ── */
   .sidebar-brand {
     padding: 1.4rem 1.2rem 1.2rem;
     border-bottom: 1px solid var(--border-glass);
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 0.5rem;
   }
   
   .sidebar-brand-link {
     display: flex;
     align-items: center;
     gap: 0.8rem;
     text-decoration: none;
   }
   
   .sidebar-monogram {
     position: relative;
     width: 38px;
     height: 38px;
     border-radius: 9px;
     background: var(--grad-brand);
     display: flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
     box-shadow: 0 2px 12px rgba(92,6,1,0.55), inset 0 1px 0 rgba(255,255,255,0.1);
   }
   
   .sidebar-monogram span {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 1.05rem;
     font-weight: 700;
     color: #fff;
     letter-spacing: 0.02em;
   }
   
   .sidebar-brand-wordmark { display: flex; flex-direction: column; gap: 1px; }
   
   .sidebar-brand-name {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 0.95rem;
     font-weight: 600;
     color: var(--sb-text-bright);
     letter-spacing: 0.01em;
     line-height: 1.2;
   }
   
   .sidebar-brand-tag {
     font-size: 0.58rem;
     font-weight: 500;
     letter-spacing: 0.14em;
     text-transform: uppercase;
     color: var(--sb-text-label);
   }
   
   #dash-close {
     background: none;
     border: none;
     color: var(--sb-text-dim);
     cursor: pointer;
     padding: 0.3rem;
     font-size: 0.9rem;
     display: none;
     transition: color 0.2s;
     border-radius: var(--r-xs);
   }
   #dash-close:hover { color: var(--sb-text-mid); background: var(--sb-hover-bg); }
   
   /* ── Status Bar ── */
   .sidebar-status {
     display: flex;
     align-items: center;
     gap: 0.5rem;
     padding: 0.6rem 1.2rem;
     background: rgba(200,81,3,0.06);
     border-bottom: 1px solid var(--border-glass);
   }
   
   .status-dot {
     width: 6px;
     height: 6px;
     border-radius: 50%;
     background: #22c55e;
     flex-shrink: 0;
     box-shadow: 0 0 6px rgba(34,197,94,0.6);
     animation: statusPulse 2.5s ease infinite;
   }
   
   @keyframes statusPulse {
     0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34,197,94,0.6); }
     50%       { opacity: 0.7; box-shadow: 0 0 12px rgba(34,197,94,0.9); }
   }
   
   .status-text {
     font-size: 0.62rem;
     font-weight: 500;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     color: rgba(34,197,94,0.7);
   }
   
   /* ── Navigation ── */
   .sidebar-nav {
     flex: 1;
     overflow-y: auto;
     padding: 0.75rem 0.85rem;
     scrollbar-width: none;
   }
   .sidebar-nav::-webkit-scrollbar { display: none; }
   
   .sidebar-section {
     margin-bottom: 0.25rem;
   }
   
   .sidebar-section-label {
     font-size: 0.57rem;
     font-weight: 600;
     letter-spacing: 0.18em;
     text-transform: uppercase;
     color: var(--sb-text-label);
     padding: 0.85rem 0.6rem 0.3rem;
     display: flex;
     align-items: center;
     gap: 0.5rem;
   }
   
   .sidebar-section-label::after {
     content: '';
     flex: 1;
     height: 1px;
     background: linear-gradient(90deg, rgba(200,81,3,0.2), transparent);
   }
   
   .sidebar-nav ul { list-style: none; }
   .sidebar-nav li { margin: 1px 0; }
   
   .sidebar-nav a {
     display: flex;
     align-items: center;
     gap: 0.7rem;
     padding: 0.52rem 0.7rem;
     border-radius: var(--r-sm);
     font-size: 0.79rem;
     font-weight: 400;
     color: var(--sb-text-mid);
     text-decoration: none;
     border-left: 2px solid transparent;
     transition: all 0.16s ease;
     letter-spacing: 0.01em;
     position: relative;
     overflow: hidden;
   }
   
   .sidebar-nav a::before {
     content: '';
     position: absolute;
     left: 0; top: 0; bottom: 0;
     width: 0;
     background: var(--grad-bar);
     opacity: 0.12;
     transition: width 0.2s ease;
   }
   
   .sidebar-nav a:hover::before { width: 100%; }
   
   .sidebar-nav a svg {
     width: 14px;
     height: 14px;
     flex-shrink: 0;
     opacity: 0.55;
     transition: opacity 0.16s;
   }
   
   .sidebar-nav a:hover {
     color: var(--sb-text-bright);
     background: var(--sb-hover-bg);
   }
   .sidebar-nav a:hover svg { opacity: 0.85; }
   
   .sidebar-nav a.active {
     background: var(--sb-active-bg);
     color: var(--sb-active-text);
     border-left-color: var(--sb-active-border);
     font-weight: 500;
   }
   .sidebar-nav a.active svg { opacity: 1; }
   .sidebar-nav a.active::before { display: none; }
   
   /* Nav item count badge */
   .nav-count {
     margin-left: auto;
     font-size: 0.62rem;
     font-family: 'DM Mono', monospace;
     font-weight: 500;
     padding: 0.1rem 0.38rem;
     border-radius: 99px;
     background: rgba(200,81,3,0.15);
     color: var(--sb-text-label);
     min-width: 20px;
     text-align: center;
   }
   
   .sidebar-divider {
     height: 1px;
     background: var(--border-glass);
     margin: 0.6rem 0.6rem;
   }
   
   /* ── Sidebar Footer ── */
   .sidebar-footer {
     padding: 0.85rem 1rem 1rem;
     border-top: 1px solid var(--border-glass);
     display: flex;
     flex-direction: column;
     gap: 0.05rem;
   }
   
   .sidebar-footer a {
     display: flex;
     align-items: center;
     gap: 0.55rem;
     font-size: 0.75rem;
     color: var(--sb-text-dim);
     text-decoration: none;
     padding: 0.42rem 0.6rem;
     border-radius: var(--r-sm);
     transition: all 0.18s;
     letter-spacing: 0.01em;
   }
   
   .sidebar-footer a svg { width: 13px; height: 13px; flex-shrink: 0; }
   .sidebar-footer a:hover { color: var(--sb-text-mid); background: var(--sb-hover-bg); }
   
   /* ── Sidebar user tag ── */
   .sidebar-user {
     display: flex;
     align-items: center;
     gap: 0.65rem;
     padding: 0.7rem 1rem;
     border-top: 1px solid var(--border-glass);
     background: rgba(255,255,255,0.02);
   }
   
   .sidebar-avatar {
     width: 30px;
     height: 30px;
     border-radius: 50%;
     background: var(--grad-bar);
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.7rem;
     font-weight: 700;
     color: #fff;
     flex-shrink: 0;
   }
   
   .sidebar-user-info { flex: 1; min-width: 0; }
   .sidebar-user-name  { font-size: 0.75rem; font-weight: 500; color: var(--sb-text-mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .sidebar-user-role  { font-size: 0.6rem;  color: var(--sb-text-label); letter-spacing: 0.06em; text-transform: uppercase; }
   
   /* ═══════════════════════════════════════════════════════════════
      MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════ */
   .admin-main {
     flex: 1;
     min-width: 0;
     display: flex;
     flex-direction: column;
     background: var(--canvas);
   }
   
   /* ── TOPBAR ── */
   .admin-topbar {
     height: var(--topbar-h);
     background: rgba(240,236,232,0.85);
     backdrop-filter: blur(12px);
     -webkit-backdrop-filter: blur(12px);
     border-bottom: 1px solid var(--border-cool);
     padding: 0 1.75rem;
     display: flex;
     align-items: center;
     justify-content: space-between;
     position: sticky;
     top: 0;
     z-index: 30;
     box-shadow: 0 1px 0 var(--border-hair), 0 2px 8px rgba(0,0,0,0.04);
   }
   
   .topbar-left {
     display: flex;
     align-items: center;
     gap: 1.1rem;
   }
   
   .dash-menu-btn {
     display: none;
     align-items: center;
     justify-content: center;
     width: 32px; height: 32px;
     border-radius: var(--r-sm);
     background: transparent;
     border: 1px solid var(--border-cool);
     color: var(--text-muted);
     cursor: pointer;
     transition: all 0.18s;
   }
   .dash-menu-btn:hover { background: rgba(92,6,1,0.05); border-color: rgba(92,6,1,0.15); color: var(--brand-crimson); }
   .dash-menu-btn svg { width: 15px; height: 15px; }
   
   .topbar-crumb {
     display: flex;
     align-items: center;
     gap: 0.55rem;
   }
   
   .topbar-crumb-firm {
     font-size: 0.7rem;
     color: var(--text-faint);
     font-family: 'DM Mono', monospace;
     letter-spacing: 0.03em;
   }
   
   .topbar-crumb-sep { color: var(--text-faint); font-size: 0.65rem; }
   
   .topbar-crumb-page {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 1.1rem;
     font-weight: 600;
     color: var(--brand-crimson);
     letter-spacing: -0.01em;
     line-height: 1;
   }
   
   .topbar-right {
     display: flex;
     align-items: center;
     gap: 0.75rem;
   }
   
.topbar-clock {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  color: #12363b;
  letter-spacing: 0.08em;
  padding: 0.42rem 0.8rem;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
  border-radius: var(--r-sm);
  border: 1px solid rgba(18, 54, 59, 0.35);
  box-shadow: 0 1px 3px rgba(8, 42, 46, 0.12);
}
   
   .topbar-divider-v {
     width: 1px;
     height: 20px;
     background: var(--border-cool);
   }
   
   .topbar-btn {
     display: flex;
     align-items: center;
     gap: 0.35rem;
     font-size: 0.69rem;
     font-weight: 500;
     color: var(--text-muted);
     padding: 0.3rem 0.7rem;
     border: 1px solid var(--border-cool);
     border-radius: var(--r-xs);
     text-decoration: none;
     transition: all 0.18s;
     letter-spacing: 0.03em;
     background: var(--surface-0);
     cursor: pointer;
     font-family: 'DM Sans', sans-serif;
   }
   
   .topbar-btn:hover {
     border-color: rgba(92,6,1,0.2);
     color: var(--brand-crimson);
     background: rgba(92,6,1,0.03);
   }
   
   .topbar-btn svg { width: 11px; height: 11px; }
   
   /* ═══════════════════════════════════════════════════════════════
      PAGE CONTENT
   ═══════════════════════════════════════════════════════════════ */
   .admin-content {
     flex: 1;
     padding: 2rem 2rem 4rem;
     animation: contentIn 0.4s cubic-bezier(0.22,1,0.36,1);
   }
   
   @keyframes contentIn {
     from { opacity: 0; transform: translateY(10px); }
     to   { opacity: 1; transform: translateY(0); }
   }
   
   /* ── Page Header ── */
   .page-header {
     margin-bottom: 2rem;
     display: flex;
     align-items: flex-end;
     justify-content: space-between;
     gap: 1.5rem;
     flex-wrap: wrap;
   }
   
   .page-header-meta { flex: 1; }
   
   .page-eyebrow {
     font-size: 0.59rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     letter-spacing: 0.18em;
     text-transform: uppercase;
     color: var(--brand-amber);
     margin-bottom: 0.4rem;
     display: flex;
     align-items: center;
     gap: 0.4rem;
   }
   
   .page-eyebrow::before {
     content: '';
     display: inline-block;
     width: 16px;
     height: 1px;
     background: var(--brand-amber);
   }
   
   .page-title {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 2.1rem;
     font-weight: 600;
     color: var(--brand-crimson);
     letter-spacing: -0.03em;
     line-height: 1;
     margin-bottom: 0.45rem;
   }
   
   .page-subtitle {
     font-size: 0.78rem;
     color: var(--text-muted);
     letter-spacing: 0.01em;
   }
   
   .page-actions {
     display: flex;
     align-items: center;
     gap: 0.6rem;
     flex-shrink: 0;
   }
   
   /* ── Rule line ── */
   .rule {
     height: 1px;
     background: linear-gradient(90deg, var(--border-cool) 0%, transparent 100%);
     margin-bottom: 2rem;
   }
   
   /* ═══════════════════════════════════════════════════════════════
      STAT CARDS
   ═══════════════════════════════════════════════════════════════ */
   .stat-grid {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 1.1rem;
     margin-bottom: 1.75rem;
   }
   
   .stat-card {
     background: var(--surface-0);
     border-radius: var(--r-lg);
     border: 1px solid var(--border-cool);
     box-shadow: var(--shadow-card);
     padding: 1.5rem 1.4rem 1.3rem;
     position: relative;
     overflow: hidden;
     display: flex;
     flex-direction: column;
     gap: 0;
     transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
     cursor: default;
   }
   
   .stat-card:hover {
     box-shadow: var(--shadow-card-hover);
     transform: translateY(-3px);
     border-color: rgba(92,6,1,0.12);
   }
   
   /* Accent bar top */
   .stat-card::before {
     content: '';
     position: absolute;
     top: 0; left: 0; right: 0;
     height: 2px;
     background: var(--grad-bar);
     border-radius: var(--r-lg) var(--r-lg) 0 0;
   }
   
   /* Watermark number in bg */
   .stat-card::after {
     content: attr(data-watermark);
     position: absolute;
     bottom: -0.75rem;
     right: -0.5rem;
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 5rem;
     font-weight: 700;
     color: rgba(92,6,1,0.04);
     line-height: 1;
     pointer-events: none;
     user-select: none;
     letter-spacing: -0.04em;
   }
   
   .stat-row-top {
     display: flex;
     align-items: flex-start;
     justify-content: space-between;
     margin-bottom: 1rem;
   }
   
   .stat-icon-wrap {
     width: 40px; height: 40px;
     border-radius: 9px;
     background: rgba(92,6,1,0.06);
     border: 1px solid rgba(92,6,1,0.09);
     display: flex;
     align-items: center;
     justify-content: center;
     transition: background 0.2s;
   }
   
   .stat-card:hover .stat-icon-wrap {
     background: rgba(92,6,1,0.1);
   }
   
   .stat-icon-wrap svg { width: 17px; height: 17px; color: var(--brand-crimson); }
   
   .stat-badge {
     font-size: 0.6rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     padding: 0.18rem 0.48rem;
     border-radius: 99px;
     letter-spacing: 0.06em;
     text-transform: uppercase;
   }
   
   .stat-badge-active  { background: rgba(34,197,94,0.1);   color: #15803d; }
   .stat-badge-pending { background: rgba(200,81,3,0.1);    color: var(--brand-amber); }
   .stat-badge-inbox   { background: rgba(0,60,69,0.09);    color: var(--brand-teal); }
   
   .stat-label {
     font-size: 0.63rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 0.13em;
     color: var(--text-faint);
     margin-bottom: 0.35rem;
     font-family: 'DM Mono', monospace;
   }
   
   .stat-number {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 3.5rem;
     font-weight: 600;
     color: var(--brand-teal);
     line-height: 1;
     letter-spacing: -0.04em;
     margin-bottom: 0.9rem;
   }
   
   .stat-footer {
     margin-top: auto;
     padding-top: 0.85rem;
     border-top: 1px solid var(--border-hair);
     display: flex;
     align-items: center;
     justify-content: space-between;
   }
   
   .stat-link {
     font-size: 0.7rem;
     font-weight: 500;
     color: var(--brand-amber);
     text-decoration: none;
     display: inline-flex;
     align-items: center;
     gap: 0.3rem;
     letter-spacing: 0.03em;
     transition: gap 0.2s, color 0.2s;
   }
   
   .stat-link:hover { gap: 0.55rem; color: var(--brand-crimson); }
   
   .stat-meta {
     font-size: 0.62rem;
     font-family: 'DM Mono', monospace;
     color: var(--text-faint);
   }
   
   /* ═══════════════════════════════════════════════════════════════
      DASHBOARD PANELS
   ═══════════════════════════════════════════════════════════════ */
   .dash-grid {
     display: grid;
     grid-template-columns: 1fr 300px;
     gap: 1.1rem;
   }
   
   /* Panel base */
   .panel {
     background: var(--surface-0);
     border-radius: var(--r-lg);
     border: 1px solid var(--border-cool);
     box-shadow: var(--shadow-card);
     overflow: hidden;
     display: flex;
     flex-direction: column;
   }
   
   .panel-head {
     padding: 1rem 1.3rem;
     border-bottom: 1px solid var(--border-hair);
     display: flex;
     align-items: center;
     justify-content: space-between;
     background: var(--surface-1);
   }
   
   .panel-title {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 0.95rem;
     font-weight: 600;
     color: var(--brand-crimson);
     display: flex;
     align-items: center;
     gap: 0.5rem;
   }
   
   .panel-title svg { width: 13px; height: 13px; opacity: 0.7; }
   
   .panel-action {
     font-size: 0.68rem;
     font-weight: 500;
     color: var(--brand-amber);
     text-decoration: none;
     transition: color 0.2s;
     font-family: 'DM Mono', monospace;
     letter-spacing: 0.03em;
   }
   .panel-action:hover { color: var(--brand-crimson); }
   
   .panel-body { padding: 1.25rem 1.3rem; flex: 1; }
   
   /* Empty state */
   .empty-state {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     padding: 2.5rem 1rem;
     text-align: center;
     gap: 0.75rem;
   }
   
   .empty-icon {
     width: 44px; height: 44px;
     border-radius: 11px;
     background: rgba(92,6,1,0.06);
     border: 1px solid rgba(92,6,1,0.08);
     display: flex;
     align-items: center;
     justify-content: center;
   }
   .empty-icon svg { width: 20px; height: 20px; color: var(--brand-crimson); opacity: 0.5; }
   
   .empty-state p {
     font-size: 0.78rem;
     color: var(--text-faint);
     font-style: italic;
     max-width: 220px;
   }
   
   /* Quick links panel */
   .quick-links { display: flex; flex-direction: column; gap: 0.45rem; }
   
   .quick-link {
     display: flex;
     align-items: center;
     gap: 0.75rem;
     padding: 0.7rem 0.875rem;
     border-radius: var(--r-sm);
     border: 1px solid var(--border-hair);
     text-decoration: none;
     background: var(--surface-1);
     transition: all 0.18s ease;
     position: relative;
     overflow: hidden;
   }
   
   .quick-link::before {
     content: '';
     position: absolute;
     left: 0; top: 0; bottom: 0;
     width: 3px;
     background: var(--grad-bar-vert);
     opacity: 0;
     transition: opacity 0.2s;
   }
   
   .quick-link:hover {
     border-color: rgba(92,6,1,0.14);
     background: rgba(92,6,1,0.025);
     transform: translateX(3px);
   }
   .quick-link:hover::before { opacity: 1; }
   
   .ql-icon {
     width: 30px; height: 30px;
     border-radius: 7px;
     background: rgba(92,6,1,0.06);
     display: flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
     transition: background 0.18s;
   }
   .quick-link:hover .ql-icon { background: rgba(92,6,1,0.11); }
   .ql-icon svg { width: 13px; height: 13px; color: var(--brand-crimson); }
   
   .ql-text { flex: 1; min-width: 0; }
   .ql-label { font-size: 0.78rem; font-weight: 500; color: var(--text-body); line-height: 1.2; }
   .ql-sub   { font-size: 0.67rem; color: var(--text-faint); }
   .ql-arrow { font-size: 0.75rem; color: var(--text-faint); transition: color 0.2s, transform 0.2s; }
   .quick-link:hover .ql-arrow { color: var(--brand-amber); transform: translateX(2px); }
   
   /* ═══════════════════════════════════════════════════════════════
      GENERIC CARDS
   ═══════════════════════════════════════════════════════════════ */
   .admin-card {
     background: var(--surface-0);
     border-radius: var(--r-lg);
     border: 1px solid var(--border-cool);
     box-shadow: var(--shadow-card);
     overflow: hidden;
     transition: box-shadow 0.22s;
   }
   .admin-card:hover { box-shadow: var(--shadow-card-hover); }
   
   .admin-card.edge-crimson { border-left: 3px solid var(--brand-crimson); }
   .admin-card.edge-amber   { border-left: 3px solid var(--brand-amber); }
   
   .admin-card-head {
     padding: 1rem 1.4rem;
     border-bottom: 1px solid var(--border-hair);
     background: var(--surface-1);
     display: flex;
     align-items: center;
     justify-content: space-between;
   }
   
   .admin-card-head h2 {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 1rem;
     font-weight: 600;
     color: var(--brand-crimson);
   }
   
   .admin-card-body { padding: 1.4rem; }
   
   /* Firm accent block */
   .firm-block {
     background: rgba(92,6,1,0.04);
     border: 1px solid rgba(92,6,1,0.1);
     border-radius: var(--r-sm);
     padding: 0.75rem 0.95rem;
     margin-bottom: 1.1rem;
   }
   .firm-block-name { font-weight: 600; font-size: 0.83rem; color: var(--brand-crimson); }
   .firm-block-sub  { font-size: 0.72rem; color: var(--text-muted); }
   
   /* ═══════════════════════════════════════════════════════════════
      TABLE SYSTEM
   ═══════════════════════════════════════════════════════════════ */
   .table-shell {
     background: var(--surface-0);
     border-radius: var(--r-lg);
     border: 1px solid var(--border-cool);
     box-shadow: var(--shadow-card);
     overflow: hidden;
   }
   
   .admin-table {
     width: 100%;
     border-collapse: collapse;
     font-size: 0.79rem;
   }
   
   /* Header row */
   .admin-table thead {
     background: var(--sidebar);
   }
   
   .admin-table th {
     padding: 0.8rem 1rem;
     text-align: left;
     font-size: 0.6rem;
     font-weight: 500;
     font-family: 'DM Mono', monospace;
     text-transform: uppercase;
     letter-spacing: 0.12em;
     color: rgba(240,232,225,0.55);
     white-space: nowrap;
     border: none;
     position: relative;
   }
   
   .admin-table th::after {
     content: '';
     position: absolute;
     right: 0; top: 25%; bottom: 25%;
     width: 1px;
     background: rgba(255,255,255,0.05);
   }
   .admin-table th:last-child::after { display: none; }
   
   .admin-table th:first-child { padding-left: 1.5rem; }
   .admin-table th:last-child  { padding-right: 1.5rem; }
   
   /* Body rows */
   .admin-table td {
     padding: 0.78rem 1rem;
     color: var(--text-body);
     border-bottom: 1px solid var(--border-hair);
     vertical-align: middle;
   }
   
   .admin-table td:first-child { padding-left: 1.5rem; }
   .admin-table td:last-child  { padding-right: 1.5rem; }
   
   .admin-table tbody tr { transition: background 0.12s; }
   .admin-table tbody tr:hover { background: rgba(92,6,1,0.022); }
   .admin-table tbody tr:last-child td { border-bottom: none; }
   
   .admin-table .empty-row td {
     text-align: center;
     padding: 3.5rem 1rem;
     color: var(--text-faint);
     font-style: italic;
     font-size: 0.8rem;
   }
   
   /* Email chip */
   .email-chip {
     font-family: 'DM Mono', monospace;
     font-size: 0.73rem;
     color: var(--brand-teal);
     background: rgba(0,60,69,0.07);
     padding: 0.18rem 0.48rem;
     border-radius: 4px;
   }
   
   /* Date chip */
   .date-chip {
     font-family: 'DM Mono', monospace;
     font-size: 0.67rem;
     color: var(--text-faint);
     background: var(--surface-2);
     padding: 0.18rem 0.48rem;
     border-radius: 4px;
     white-space: nowrap;
     border: 1px solid var(--border-hair);
   }
   
   /* Status badges */
   .badge {
     display: inline-flex;
     align-items: center;
     gap: 0.28rem;
     padding: 0.18rem 0.52rem;
     border-radius: 99px;
     font-size: 0.62rem;
     font-weight: 600;
     letter-spacing: 0.06em;
     text-transform: uppercase;
     font-family: 'DM Mono', monospace;
   }
   
   .badge::before {
     content: '';
     width: 5px; height: 5px;
     border-radius: 50%;
     background: currentColor;
     opacity: 0.65;
   }
   
   .badge-pending  { background: var(--warning-bg);  color: var(--warning); }
   .badge-active   { background: var(--success-bg);  color: var(--success); }
   .badge-closed   { background: var(--neutral-bg);  color: var(--neutral); }
   
   /* ═══════════════════════════════════════════════════════════════
      FORM SYSTEM
   ═══════════════════════════════════════════════════════════════ */
   .f-group { margin-bottom: 0.9rem; }
   
   .f-label {
     display: block;
     font-size: 0.63rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     color: var(--text-faint);
     margin-bottom: 0.35rem;
     letter-spacing: 0.08em;
     text-transform: uppercase;
   }
   
   .f-input,
   .input-field,
   input[type="text"],
   input[type="email"],
   input[type="number"],
   input[type="date"],
   input[type="time"],
   input[type="password"],
   textarea,
   select {
     width: 100%;
     padding: 0.58rem 0.85rem;
     border: 1px solid var(--border-cool);
     border-radius: var(--r-sm);
     font-size: 0.83rem;
     color: var(--text-body);
     background: var(--surface-2);
     font-family: 'DM Sans', sans-serif;
     transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
     box-sizing: border-box;
     outline: none;
   }
   
   .f-input:focus,
   .input-field:focus,
   input:focus,
   textarea:focus,
   select:focus {
     border-color: var(--brand-crimson);
     background: var(--surface-0);
     box-shadow: 0 0 0 3px rgba(92,6,1,0.08);
   }
   
   textarea { resize: vertical; line-height: 1.6; }
   
   /* ═══════════════════════════════════════════════════════════════
      BUTTON SYSTEM
   ═══════════════════════════════════════════════════════════════ */
   .btn {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 0.4rem;
     font-family: 'DM Sans', sans-serif;
     font-weight: 500;
     font-size: 0.72rem;
     letter-spacing: 0.06em;
     text-transform: uppercase;
     cursor: pointer;
     border-radius: var(--r-sm);
     padding: 0.55rem 1.1rem;
     text-decoration: none;
     transition: all 0.2s ease;
     border: none;
     white-space: nowrap;
   }
   
   .btn-primary {
     background: var(--brand-crimson);
     color: #fff;
     border: 1.5px solid var(--brand-crimson);
     box-shadow: 0 2px 8px rgba(92,6,1,0.2);
   }
   .btn-primary:hover {
     background: var(--brand-crimson-mid);
     transform: translateY(-1px);
     box-shadow: 0 4px 16px rgba(92,6,1,0.32);
   }
   
   .btn-accent {
     background: var(--brand-amber);
     color: #fff;
     border: 1.5px solid var(--brand-amber);
     box-shadow: 0 2px 8px rgba(200,81,3,0.2);
   }
   .btn-accent:hover {
     background: #b04600;
     transform: translateY(-1px);
     box-shadow: 0 4px 16px rgba(200,81,3,0.32);
   }
   
   .btn-ghost {
     background: var(--surface-0);
     color: var(--text-muted);
     border: 1px solid var(--border-cool);
   }
   .btn-ghost:hover {
     border-color: rgba(92,6,1,0.18);
     color: var(--brand-crimson);
     background: rgba(92,6,1,0.03);
   }
   
   .btn-full { width: 100%; }
   
   /* ═══════════════════════════════════════════════════════════════
      CALENDAR
   ═══════════════════════════════════════════════════════════════ */
   .cal-toolbar {
     display: flex;
     align-items: center;
     justify-content: space-between;
     margin-bottom: 1rem;
     gap: 1rem;
     flex-wrap: wrap;
   }
   
   .cal-view-group {
     display: inline-flex;
     border-radius: var(--r-sm);
     overflow: hidden;
     border: 1px solid var(--border-cool);
     background: var(--surface-0);
   }
   
   .cal-view-group button {
     border: none;
     padding: 0.4rem 0.95rem;
     font-size: 0.72rem;
     font-weight: 500;
     font-family: 'DM Sans', sans-serif;
     color: var(--text-muted);
     background: transparent;
     cursor: pointer;
     transition: all 0.15s;
     letter-spacing: 0.04em;
   }
   .cal-view-group button:not(:last-child) { border-right: 1px solid var(--border-hair); }
   .cal-view-group button.btn-view-active  { background: var(--brand-crimson); color: #fff; }
   .cal-view-group button:not(.btn-view-active):hover { background: rgba(92,6,1,0.05); color: var(--brand-crimson); }
   
   .calendar-wrapper {
     background: var(--surface-0);
     border-radius: var(--r-lg);
     border: 1px solid var(--border-cool);
     box-shadow: var(--shadow-card);
     overflow: hidden;
   }
   
   .calendar-header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 0.95rem 1.25rem;
     border-bottom: 1px solid var(--border-hair);
     background: var(--surface-1);
   }
   
   .calendar-title {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 1.15rem;
     font-weight: 600;
     color: var(--brand-crimson);
     letter-spacing: -0.02em;
   }
   
   .calendar-nav { display: flex; gap: 0.35rem; }
   
   .calendar-nav button {
     padding: 0.32rem 0.65rem;
     font-size: 0.72rem;
     border-radius: var(--r-sm);
     border: 1px solid var(--border-cool);
     background: var(--surface-0);
     color: var(--text-muted);
     cursor: pointer;
     font-family: 'DM Sans', sans-serif;
     transition: all 0.15s;
   }
   .calendar-nav button:hover { background: rgba(92,6,1,0.05); border-color: rgba(92,6,1,0.15); color: var(--brand-crimson); }
   
   .cal-weekday-header {
     display: grid;
     grid-template-columns: repeat(7, 1fr);
     background: rgba(0,60,69,0.03);
     font-size: 0.6rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     text-transform: uppercase;
     letter-spacing: 0.09em;
     color: var(--text-faint);
     border-bottom: 1px solid var(--border-hair);
   }
   .cal-weekday-header > div { padding: 0.55rem 0.5rem; text-align: center; }
   
   .cal-month-grid {
     display: grid;
     grid-template-columns: repeat(7, 1fr);
     grid-auto-rows: minmax(84px, 1fr);
   }
   
   .cal-day-cell {
     min-height: 84px;
     padding: 0.45rem;
     border: 1px solid rgba(0,60,69,0.042);
     background: #fff;
     transition: background 0.12s;
   }
   .cal-day-cell:hover { background: rgba(237,233,230,0.5); }
   .cal-day-cell.other-month { background: rgba(250,248,246,0.9); }
   .cal-day-cell.today { background: rgba(92,6,1,0.025); border-left: 2.5px solid var(--brand-crimson); }
   
   .cal-day-num {
     font-size: 0.7rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     color: var(--brand-teal);
     margin-bottom: 0.28rem;
   }
   .cal-day-cell.other-month .cal-day-num { color: var(--text-faint); }
   .cal-day-cell.today .cal-day-num { color: var(--brand-crimson); }
   
   .cal-event-pill {
     font-size: 0.63rem;
     padding: 0.14rem 0.36rem;
     border-radius: 3px;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
     display: block;
     margin-bottom: 2px;
   }
   .cal-event-pill.type-case  { background: rgba(200,81,3,0.1);  color: #a85402; }
   .cal-event-pill.type-time  { background: rgba(34,197,94,0.1); color: #166534; }
   .cal-event-pill.type-event { background: rgba(92,6,1,0.08);   color: var(--brand-crimson); }
   
   .cal-day-add {
     margin-top: 0.2rem;
     font-size: 0.63rem;
     color: var(--brand-amber);
     background: none;
     border: none;
     cursor: pointer;
     padding: 0;
     transition: color 0.15s;
   }
   .cal-day-add:hover { color: var(--brand-crimson); text-decoration: underline; }
   
   .cal-week-grid {
     display: grid;
     grid-template-columns: repeat(7, 1fr);
     gap: 0.55rem;
     padding: 0.85rem;
   }
   .cal-week-day {
     background: var(--surface-0);
     border-radius: var(--r-sm);
     border: 1px solid var(--border-hair);
     padding: 0.65rem;
     min-height: 130px;
   }
   .cal-week-day-header {
     font-size: 0.65rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     color: var(--brand-crimson);
     margin-bottom: 0.45rem;
     padding-bottom: 0.35rem;
     border-bottom: 1px solid var(--border-hair);
   }
   .cal-week-event {
     padding: 0.32rem 0.48rem;
     border-radius: 4px;
     font-size: 0.7rem;
     background: var(--surface-1);
     border-left: 2.5px solid var(--brand-amber);
     margin-bottom: 0.32rem;
   }
   .cal-week-event.type-case  { border-left-color: var(--brand-amber); }
   .cal-week-event.type-time  { border-left-color: #22c55e; }
   .cal-week-event.type-event { border-left-color: var(--brand-crimson); }
   
   .cal-day-event-card {
     padding: 0.85rem 1rem;
     border-radius: var(--r-sm);
     border: 1px solid var(--border-hair);
     background: var(--surface-0);
     margin-bottom: 0.55rem;
     transition: box-shadow 0.18s, border-color 0.18s;
   }
   .cal-day-event-card:hover { box-shadow: var(--shadow-card); border-color: rgba(92,6,1,0.12); }
   
   .cal-event-modal { backdrop-filter: blur(6px); }
   .cal-event-modal .modal-inner {
     border-radius: var(--r-lg);
     box-shadow: var(--shadow-modal);
     animation: modalIn 0.24s cubic-bezier(0.34,1.56,0.64,1);
     border-top: 3px solid var(--brand-crimson);
   }
   @keyframes modalIn {
     from { opacity: 0; transform: translateY(-14px) scale(0.97); }
     to   { opacity: 1; transform: translateY(0)     scale(1); }
   }
   
   /* ═══════════════════════════════════════════════════════════════
      NETWORK RADAR
   ═══════════════════════════════════════════════════════════════ */
   .radar-grid {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 1.1rem;
   }
   
   .radar-card {
     background: var(--surface-0);
     border-radius: var(--r-lg);
     border: 1px solid var(--border-cool);
     box-shadow: var(--shadow-card);
     padding: 2rem 1.75rem 1.6rem;
     text-align: center;
     position: relative;
     overflow: hidden;
     transition: box-shadow 0.25s, transform 0.25s;
   }
   
   .radar-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
   
   .radar-card::before {
     content: '';
     position: absolute;
     top: 0; left: 0; right: 0;
     height: 2px;
     background: var(--grad-bar);
   }
   
   .radar-card::after {
     content: '';
     position: absolute;
     bottom: -40px; right: -40px;
     width: 120px; height: 120px;
     border-radius: 50%;
     background: radial-gradient(circle, rgba(92,6,1,0.04) 0%, transparent 70%);
     pointer-events: none;
   }
   
   .radar-label {
     font-size: 0.6rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     text-transform: uppercase;
     letter-spacing: 0.14em;
     color: var(--text-faint);
     margin-bottom: 0.85rem;
   }
   
   .radar-number {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 4.5rem;
     font-weight: 600;
     color: var(--brand-crimson);
     line-height: 1;
     letter-spacing: -0.04em;
   }
   
   .radar-sub {
     font-size: 0.69rem;
     color: var(--text-faint);
     margin-top: 0.45rem;
   }
   
   /* ═══════════════════════════════════════════════════════════════
      MEMO DRAFTER
   ═══════════════════════════════════════════════════════════════ */
   #memo-title {
     border: none !important;
     border-bottom: 2px solid var(--border-cool) !important;
     border-radius: 0 !important;
     font-family: 'Cormorant Garamond', Georgia, serif !important;
     font-size: 1.5rem !important;
     font-weight: 600 !important;
     color: var(--brand-crimson) !important;
     padding-left: 0 !important;
     padding-right: 0 !important;
     background: transparent !important;
     box-shadow: none !important;
     width: 100%;
   }
   #memo-title:focus {
     border-bottom-color: var(--brand-crimson) !important;
     box-shadow: none !important;
   }
   
   #memo-editor {
     border: none !important;
     border-top: 1px solid var(--border-hair) !important;
     border-radius: 0 !important;
     font-family: 'DM Mono', monospace !important;
     font-size: 0.82rem !important;
     line-height: 1.8 !important;
     resize: vertical;
     background: transparent !important;
     box-shadow: none !important;
     padding-left: 0 !important;
     padding-right: 0 !important;
     color: var(--text-body) !important;
     width: 100%;
   }
   
   /* ═══════════════════════════════════════════════════════════════
      MOBILE
   ═══════════════════════════════════════════════════════════════ */
   @media (max-width: 767px) {
     .dash-sidebar {
       position: fixed;
       left: 0; top: 0; bottom: 0;
       height: 100vh;
       transform: translateX(-100%);
       transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
     }
     .dash-sidebar.open { transform: translateX(0); }
     #dash-close { display: block; }
     .dash-menu-btn { display: flex; }
     .admin-content { padding: 1.25rem 1rem 3rem; }
     .stat-grid   { grid-template-columns: 1fr; }
     .dash-grid   { grid-template-columns: 1fr; }
     .radar-grid  { grid-template-columns: 1fr; }
   .topbar-clock {
     font-size: 0.78rem;
     padding: 0.35rem 0.58rem;
   }
    .topbar-divider-v { display: none; }
     .admin-topbar { padding: 0 1rem; }
     .page-header { flex-direction: column; align-items: flex-start; }
   }
   
   @media (max-width: 1100px) {
     .dash-grid { grid-template-columns: 1fr; }
   }
   
   @media (max-width: 900px) {
     .stat-grid  { grid-template-columns: repeat(2, 1fr); }
     .radar-grid { grid-template-columns: repeat(2, 1fr); }
   }
   
   .dash-overlay {
     display: none;
     position: fixed;
     inset: 0;
     background: rgba(8,4,3,0.65);
     backdrop-filter: blur(4px);
     z-index: 40;
   }
   .dash-overlay.open { display: block; }
   
   /* ═══════════════════════════════════════════════════════════════
      SECTION HEADING (legacy compat)
   ═══════════════════════════════════════════════════════════════ */
   .section-heading {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 1.7rem;
     font-weight: 600;
     color: var(--brand-crimson);
     letter-spacing: -0.025em;
     position: relative;
     padding-bottom: 0.6rem;
   }
   .section-heading::after {
     content: '';
     position: absolute;
     bottom: 0; left: 0;
     width: 2rem;
     height: 2px;
     background: var(--grad-bar);
   }
   
   /* ═══════════════════════════════════════════════════════════════
      LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
   .login-shell {
     min-height: 100vh;
     display: flex;
     background: var(--shell);
   }
   
   /* Left column — cinematic brand */
   .login-cinematic {
     flex: 1;
     position: relative;
     display: flex;
     flex-direction: column;
     justify-content: flex-end;
     padding: 3rem;
     overflow: hidden;
     background: var(--sidebar);
   }
   
   /* Deep atmospheric layers */
   .login-cinematic::before {
     content: '';
     position: absolute;
     inset: 0;
     background:
       radial-gradient(ellipse at 30% 30%, rgba(92,6,1,0.45) 0%, transparent 60%),
       radial-gradient(ellipse at 80% 80%, rgba(200,81,3,0.15) 0%, transparent 55%),
       radial-gradient(ellipse at 60% 10%, rgba(92,6,1,0.2) 0%, transparent 45%);
     pointer-events: none;
   }
   
   /* Large editorial letterform */
   .login-cinematic::after {
     content: 'KA';
     position: absolute;
     bottom: -3rem;
     right: -2rem;
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 20rem;
     font-weight: 700;
     color: rgba(255,255,255,0.025);
     line-height: 1;
     pointer-events: none;
     user-select: none;
     letter-spacing: -0.05em;
   }
   
   /* Grid lines overlay */
   .login-grid-lines {
     position: absolute;
     inset: 0;
     background-image:
       linear-gradient(rgba(200,81,3,0.04) 1px, transparent 1px),
       linear-gradient(90deg, rgba(200,81,3,0.04) 1px, transparent 1px);
     background-size: 48px 48px;
     pointer-events: none;
   }
   
   .login-cinematic-content {
     position: relative;
     z-index: 1;
     max-width: 480px;
   }
   
   .login-cin-eyebrow {
     font-size: 0.6rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     letter-spacing: 0.2em;
     text-transform: uppercase;
     color: var(--brand-amber);
     margin-bottom: 1.1rem;
     display: flex;
     align-items: center;
     gap: 0.6rem;
   }
   
   .login-cin-eyebrow::before {
     content: '';
     width: 24px; height: 1px;
     background: var(--brand-amber);
   }
   
   .login-cin-headline {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: clamp(2.5rem, 4vw, 3.8rem);
     font-weight: 600;
     color: rgba(240,232,225,0.92);
     line-height: 1.05;
     letter-spacing: -0.04em;
     margin-bottom: 1.1rem;
   }
   
   .login-cin-headline em {
     font-style: italic;
     color: rgba(200,81,3,0.85);
   }
   
   .login-cin-desc {
     font-size: 0.82rem;
     color: rgba(240,232,225,0.4);
     line-height: 1.75;
     max-width: 340px;
   }
   
   /* Right column — form panel */
   .login-panel {
     width: 460px;
     min-height: 100vh;
     display: flex;
     align-items: center;
     justify-content: center;
     background: var(--canvas);
     padding: 3rem 3.5rem;
     position: relative;
   }
   
   /* Subtle edge line */
   .login-panel::before {
     content: '';
     position: absolute;
     left: 0; top: 15%; bottom: 15%;
     width: 1px;
     background: linear-gradient(180deg, transparent, var(--border-warm), transparent);
   }
   
   .login-form-wrap { width: 100%; max-width: 360px; }
   
   .login-logo-block {
     display: flex;
     align-items: center;
     gap: 0.85rem;
     margin-bottom: 2.5rem;
   }
   
   .login-monogram {
     width: 42px; height: 42px;
     border-radius: 10px;
     background: var(--grad-brand);
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: 0 4px 16px rgba(92,6,1,0.4);
   }
   .login-monogram span {
     font-family: 'Cormorant Garamond', serif;
     font-size: 1.1rem;
     font-weight: 700;
     color: #fff;
   }
   .login-logo-name {
     font-family: 'Cormorant Garamond', serif;
     font-size: 1rem;
     font-weight: 600;
     color: var(--brand-crimson);
     line-height: 1.2;
   }
   .login-logo-tag {
     font-size: 0.58rem;
     letter-spacing: 0.14em;
     text-transform: uppercase;
     color: var(--text-faint);
   }
   
   .login-form-heading {
     font-family: 'Cormorant Garamond', Georgia, serif;
     font-size: 1.75rem;
     font-weight: 600;
     color: var(--brand-crimson);
     letter-spacing: -0.025em;
     margin-bottom: 0.3rem;
   }
   
   .login-form-sub {
     font-size: 0.77rem;
     color: var(--text-muted);
     margin-bottom: 2rem;
   }
   
   .login-field { margin-bottom: 1rem; }
   
   .login-label {
     display: block;
     font-size: 0.63rem;
     font-weight: 600;
     font-family: 'DM Mono', monospace;
     color: var(--text-faint);
     margin-bottom: 0.38rem;
     letter-spacing: 0.09em;
     text-transform: uppercase;
   }
   
   .login-input {
     width: 100%;
     padding: 0.72rem 1rem;
     border: 1px solid var(--border-cool);
     border-radius: var(--r-sm);
     font-size: 0.88rem;
     color: var(--text-body);
     background: var(--surface-0);
     font-family: 'DM Sans', sans-serif;
     transition: border-color 0.18s, box-shadow 0.18s;
     box-sizing: border-box;
     outline: none;
   }
   .login-input:focus {
     border-color: var(--brand-crimson);
     box-shadow: 0 0 0 3px rgba(92,6,1,0.09);
   }
   
   .login-submit {
     width: 100%;
     padding: 0.82rem;
     background: var(--brand-crimson);
     color: #fff;
     border: none;
     border-radius: var(--r-sm);
     font-size: 0.75rem;
     font-weight: 600;
     font-family: 'DM Sans', sans-serif;
     letter-spacing: 0.1em;
     text-transform: uppercase;
     cursor: pointer;
     margin-top: 0.75rem;
     transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
     box-shadow: 0 2px 8px rgba(92,6,1,0.25);
   }
   .login-submit:hover {
     background: var(--brand-crimson-mid);
     transform: translateY(-1px);
     box-shadow: 0 6px 20px rgba(92,6,1,0.35);
   }
   .login-submit--signin {
     text-transform: none;
     letter-spacing: 0.04em;
     font-size: 0.9rem;
   }
   
   .login-create-wrap {
     margin-top: 1.25rem;
     text-align: center;
     font-size: 0.82rem;
     color: var(--text-faint);
   }
   .login-create-label {
     margin-right: 0.35rem;
   }
   .login-create-account {
     color: var(--brand-crimson);
     font-weight: 600;
     text-decoration: none;
     transition: color 0.18s;
   }
   .login-create-account:hover {
     color: var(--brand-crimson-mid);
     text-decoration: underline;
   }
   .login-create-account--solo {
     display: inline-block;
     margin-top: 0.25rem;
   }
   
   .login-error {
     margin-top: 1rem;
     padding: 0.65rem 0.9rem;
     background: rgba(220,38,38,0.05);
     border: 1px solid rgba(220,38,38,0.15);
     border-radius: var(--r-sm);
     font-size: 0.77rem;
     color: #b91c1c;
   }
   .login-success {
     margin-top: 1rem;
     padding: 0.65rem 0.9rem;
     background: rgba(22,101,52,0.06);
     border: 1px solid rgba(22,101,52,0.2);
     border-radius: var(--r-sm);
     font-size: 0.77rem;
     color: #166534;
   }
   
   .login-back {
     display: inline-flex;
     align-items: center;
     gap: 0.35rem;
     margin-top: 2rem;
     font-size: 0.72rem;
     color: var(--text-faint);
     text-decoration: none;
     transition: color 0.18s;
     letter-spacing: 0.02em;
   }
   .login-back:hover { color: var(--brand-crimson); }
   .login-back svg { width: 11px; height: 11px; }
   
   @media (max-width: 768px) {
     .login-cinematic { display: none; }
     .login-panel { width: 100%; padding: 2rem 1.5rem; }
   }
   
   /* ═══════════════════════════════════════════════════════════════
      UTILITIES
   ═══════════════════════════════════════════════════════════════ */
   .admin-section { animation: contentIn 0.35s ease; }
   .overflow-x-auto { overflow-x: auto; }
   .space-y-3 > * + * { margin-top: 0.75rem; }
   
   /* Live clock animation */
   .clock-tick {
     animation: clockPulse 1s ease infinite;
   }
   @keyframes clockPulse {
     0%, 100% { opacity: 1; }
     50% { opacity: 0.82; }
   }

  /* ═══════════════════════════════════════════════════════════════
     COLLABORATION — MESSAGES
  ═══════════════════════════════════════════════════════════════ */
  .messages-shell {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    min-height: 68vh;
  }

  .messages-sidebar,
  .messages-main {
    background: var(--surface-0);
    border: 1px solid var(--border-cool);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    min-height: 0;
  }

  .messages-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .messages-sidebar-head {
    padding: 1rem 1rem 0.7rem;
    border-bottom: 1px solid var(--border-hair);
    background: var(--surface-1);
  }
  .messages-sidebar-head h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--brand-crimson);
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
  }
  .messages-me {
    font-size: 0.7rem;
    color: var(--text-faint);
  }

  .messages-thread-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
  }

  .messages-thread {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 0.65rem;
    align-items: center;
    width: 100%;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    padding: 0.55rem 0.6rem;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.16s ease;
  }
  .messages-thread:hover {
    background: rgba(92,6,1,0.04);
    border-color: rgba(92,6,1,0.10);
  }
  .messages-thread.active {
    background: rgba(92,6,1,0.08);
    border-color: rgba(92,6,1,0.2);
  }

  .messages-avatar,
  .account-avatar,
  .sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--grad-bar);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    overflow: hidden;
    text-transform: uppercase;
    flex-shrink: 0;
  }
  .sidebar-avatar {
    width: 30px;
    height: 30px;
  }
  .messages-avatar-img,
  .account-avatar-img,
  .sidebar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .messages-thread-meta {
    min-width: 0;
  }
  .messages-thread-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-thread-sub {
    font-size: 0.66rem;
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messages-thread-extra {
    text-align: right;
    min-width: 54px;
  }
  .messages-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    padding: 0 0.35rem;
    background: var(--brand-crimson);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    margin-top: 0.2rem;
  }

  .messages-sidebar-foot {
    border-top: 1px solid var(--border-hair);
    padding: 0.7rem;
    background: var(--surface-1);
  }

  .messages-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .messages-header {
    border-bottom: 1px solid var(--border-hair);
    padding: 0.9rem 1rem;
    background: var(--surface-1);
    min-height: 58px;
  }
  .messages-header .messages-peer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
  .messages-header .messages-peer-name {
    font-weight: 600;
    color: var(--brand-crimson);
    font-size: 0.9rem;
  }
  .messages-header .messages-peer-email {
    color: var(--text-faint);
    font-size: 0.68rem;
  }
  .messages-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(240,236,232,0.35), rgba(240,236,232,0.12));
  }
  .messages-empty {
    color: var(--text-faint);
    font-size: 0.78rem;
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
  }
  .msg-row {
    display: flex;
    margin-bottom: 0.6rem;
  }
  .msg-row.me {
    justify-content: flex-end;
  }
  .msg-bubble {
    max-width: 76%;
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    line-height: 1.45;
    font-size: 0.77rem;
    border: 1px solid var(--border-hair);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    white-space: pre-wrap;
    word-break: break-word;
  }
  .msg-row.me .msg-bubble {
    background: rgba(92,6,1,0.08);
    border-color: rgba(92,6,1,0.16);
    color: var(--text-body);
  }
  .msg-row.other .msg-bubble {
    background: #fff;
    color: var(--text-body);
  }
  .msg-meta {
    margin-top: 0.25rem;
    font-size: 0.62rem;
    color: var(--text-faint);
  }

  .messages-form {
    border-top: 1px solid var(--border-hair);
    padding: 0.8rem;
    background: var(--surface-1);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: end;
  }
  .messages-form textarea {
    min-height: 74px;
    resize: vertical;
    background: #fff;
  }

  /* ═══════════════════════════════════════════════════════════════
     ACCOUNT
  ═══════════════════════════════════════════════════════════════ */
  .account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    align-items: start;
  }
  .account-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  .account-avatar {
    width: 56px;
    height: 56px;
    font-size: 1rem;
  }
  .account-email {
    font-family: 'DM Mono', monospace;
    font-size: 0.73rem;
    color: var(--brand-teal);
    margin-bottom: 0.1rem;
  }
  .account-sub {
    font-size: 0.69rem;
    color: var(--text-faint);
  }
  .account-status {
    margin-top: 0.8rem;
    min-height: 1.2em;
    font-size: 0.75rem;
  }
  .account-status.error,
  .account-status.is-error {
    color: #b91c1c;
  }
  .account-status.success,
  .account-status.is-success {
    color: #166534;
  }

  .admin-notice-banner {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.1rem;
    background: rgba(0, 60, 69, 0.06);
    border: 1px solid var(--border-cool);
    border-radius: var(--r-md);
    font-size: 0.88rem;
    color: var(--text-body);
  }

  @media (max-width: 1100px) {
    .messages-shell {
      grid-template-columns: 1fr;
    }
    .account-grid {
      grid-template-columns: 1fr;
    }
  }
   