/* ── DHF Capital — Design tokens ───────────────────────────────────── */
:root {
  --navy:        #0D1B2A;
  --navy-2:      #12233A;
  --navy-3:      #1A2F48;
  --navy-4:      #1F3A5A;
  --navy-5:      #263F5E;
  --gold:        #C9A84C;
  --gold-light:  #E2C27A;
  --gold-dim:    #8A6E30;
  --text:        #E8E4DC;
  --text-2:      #BDB7AB;
  --text-3:      #7F7A70;
  --border:      #2A3F58;
  --border-2:    #38516E;
  --border-gold: rgba(201,168,76,.35);
  --danger:      #C0392B;
  --danger-bg:   rgba(192,57,43,.15);
  --success:     #27AE60;
  --success-bg:  rgba(39,174,96,.12);
  --warning:     #E67E22;
  --warning-bg:  rgba(230,126,34,.12);
  --info:        #3498DB;
  --info-bg:     rgba(52,152,219,.12);
  --radius:      5px;
  --radius-lg:   8px;
  --font-serif:  'Cormorant Garamond', serif;
  --font:        'Inter', sans-serif;
  --font-mono:   'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --topnav-h:    48px;
  --sidebar-w:   232px;
  --sidebar-col: 54px;
}

:root[data-theme="light"] {
  --navy:        #F4F6FA;
  --navy-2:      #FFFFFF;
  --navy-3:      #EEF3F8;
  --navy-4:      #E2EAF2;
  --navy-5:      #D4E0EA;
  --gold:        #9B7A24;
  --gold-light:  #B9912E;
  --gold-dim:    #7B641F;
  --text:        #172233;
  --text-2:      #435064;
  --text-3:      #728094;
  --border:      #D5DFEA;
  --border-2:    #B8C7D8;
  --border-gold: rgba(155,122,36,.35);
  --danger-bg:   rgba(192,57,43,.11);
  --success-bg:  rgba(39,174,96,.10);
  --warning-bg:  rgba(230,126,34,.10);
  --info-bg:     rgba(52,152,219,.10);
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--navy); color: var(--text); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font-family: var(--font); font-size: 14px; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════
   CONSOLE SHELL LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
#app {
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}

/* ── Top Navigation Bar ─────────────────────────────────────────────── */
.topnav {
  height: var(--topnav-h); flex-shrink: 0;
  background: var(--navy-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch;
  overflow: visible;
  transition: height .2s ease, opacity .15s ease;
  z-index: 100;
}
/* Immersive: topnav shrinks to 0 */
#app.immersive .topnav {
  height: 0; opacity: 0; pointer-events: none;
}

/* Brand/logo — left of topnav, clicking toggles immersive */
.topnav-brand {
  width: 58px; flex-shrink: 0;
  background: none; border: none; border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; padding: 0;
}
.topnav-brand:hover { background: var(--navy-3); }
.brand-logo {
  width: 44px; height: 44px; background: transparent; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; pointer-events: none;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Nav items (tabs) */
.topnav-nav { display: flex; align-items: stretch; flex: 0 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; }
.topnav-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 18px; height: 100%;
  font-size: 13px; color: var(--text-2); text-decoration: none;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  transition: all .12s; white-space: nowrap; cursor: pointer;
  position: relative;
}
.topnav-item:hover { color: var(--text-2); background: var(--navy-3); }
.topnav-item.active {
  color: var(--gold); border-bottom-color: var(--gold);
  background: rgba(201,168,76,.04);
}
.topnav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.topnav-badge {
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 99px; letter-spacing: .02em;
}
.topnav-live {
  background: var(--success); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  border-radius: 99px; letter-spacing: .05em;
  animation: pulse-live 2s ease-in-out infinite;
}

/* Right side: theme, actions + user */
.topnav-right {
  display: flex; align-items: center; gap: 0;
  margin-left: auto; flex-shrink: 0;
  border-left: 1px solid var(--border);
}
.theme-toggle {
  width: 44px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.theme-toggle:hover {
  background: var(--navy-3);
  color: var(--gold-light);
}
.theme-icon {
  width: 17px;
  height: 17px;
}
.theme-icon-moon {
  display: none;
}
:root[data-theme="light"] .theme-icon-sun {
  display: none;
}
:root[data-theme="light"] .theme-icon-moon {
  display: block;
}
.topnav-actions {
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border-right: 1px solid var(--border); height: 100%;
}
.topnav-actions:empty { display: none; }
.topnav-user {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: 100%;
}
.topnav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold-dim); color: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  transition: box-shadow .2s;
}
.topnav-avatar.status-online  { box-shadow: 0 0 0 2px var(--success); }
.topnav-avatar.status-busy    { box-shadow: 0 0 0 2px var(--warning); }
.topnav-avatar.status-offline { box-shadow: none; }
.topnav-username { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.topnav-role     { font-size: 11px; color: var(--text-2); white-space: nowrap; }

/* ── Console Body (sidebar + content area) ────────────────────────── */
.console-body { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--navy-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  transition: width .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-col); }
/* Immersive: sidebar hides */
#app.immersive .sidebar { width: 0; border: none; }

/* Nav groups */
.nav-group { padding: 12px 8px 4px; flex-shrink: 0; }
.nav-section-label {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); padding: 0 10px 8px; white-space: nowrap;
  font-weight: 600;
}
.sidebar.collapsed .nav-section-label { display: none; }

.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px;
  border-radius: var(--radius); font-size: 13px; color: var(--text-2);
  cursor: pointer; transition: all .12s; user-select: none;
  text-decoration: none; white-space: nowrap; position: relative;
}
.nav-item:hover { background: var(--navy-3); color: var(--text); }
.nav-item.active {
  background: rgba(201,168,76,.1); color: var(--gold);
  border-left: 2px solid var(--gold); padding-left: 7px;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.nav-item.active svg { opacity: 1; }

.nav-label { transition: opacity .15s; }
.sidebar.collapsed .nav-label { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 8px; }
.sidebar.collapsed .nav-item.active { border-left: none; border-bottom: 2px solid var(--gold); padding: 8px; }

/* Tooltip on collapse */
.sidebar.collapsed .nav-item::after {
  content: attr(data-label);
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: var(--navy-4); color: var(--text); font-size: 11px;
  padding: 4px 10px; border-radius: var(--radius); white-space: nowrap;
  border: 1px solid var(--border-2); pointer-events: none;
  opacity: 0; z-index: 200; transition: opacity .1s;
}
.sidebar.collapsed .nav-item:hover::after { opacity: 1; }

.dept-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.dept-dot.empty { background: var(--border-2); }
.sidebar.collapsed .dept-dot { display: none; }

/* Online status dots in sidebar */
.online-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.online-dot.online { background: var(--success); }
.online-dot.busy   { background: var(--warning); }
.sidebar.collapsed .online-dot { margin: 0 auto; }

/* Nav badges */
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 99px; font-weight: 600;
}
.sidebar.collapsed .nav-badge { display: none; }

/* Live badge */
.live-badge {
  margin-left: auto; background: var(--success); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 99px; font-weight: 700;
  animation: pulse-live 2s infinite; letter-spacing: .04em;
}
.sidebar.collapsed .live-badge { display: none; }

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* Sidebar bottom: collapse toggle */
.sidebar-bottom { margin-top: auto; }
.sidebar-collapse-row {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; width: 100%; flex-shrink: 0;
  border: none; border-top: 1px solid var(--border);
  background: none; color: var(--text-3); cursor: pointer;
  font-size: 12px; transition: color .15s, background .15s;
}
.sidebar-collapse-row:hover { color: var(--gold-dim); background: var(--navy-3); }
.sidebar-collapse-row svg { width: 13px; height: 13px; flex-shrink: 0; transition: transform .22s; }
.sidebar.collapsed .sidebar-collapse-row svg { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-collapse-row { justify-content: center; padding: 9px; }

/* ── Content Area ────────────────────────────────────────────────── */
.content-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.content-header {
  height: 46px; flex-shrink: 0;
  padding: 0 16px; border-bottom: 1px solid var(--border);
  background: var(--navy-2);
  display: flex; align-items: center; gap: 10px;
}
.content-title {
  font-size: 13px; color: var(--text-2); font-weight: 500; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.content-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

/* ── View body (dashboard, generic pages) ────────────────────────── */
.view-body { flex: 1; overflow-y: auto; padding: 22px 24px; }

/* ── Immersive restore button ────────────────────────────────────── */
.immersive-restore {
  display: none; position: fixed; top: 8px; left: 8px; z-index: 9999;
  width: 46px; height: 46px; background: var(--navy-2); border-radius: 6px;
  border: 1px solid var(--border); cursor: pointer;
  align-items: center; justify-content: center;
  padding: 3px;
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
}
.immersive-restore img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
#app.immersive ~ .immersive-restore,
#app.immersive + .immersive-restore { display: flex; }
#app.immersive .content-area {
  padding-top: 52px;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  border-radius: var(--radius); border: 1px solid var(--border-2);
  background: var(--navy-3); color: var(--text-2);
  cursor: pointer; font-size: 13px; font-weight: 600; transition: all .12s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--gold-dim); color: var(--gold); background: var(--navy-4); }
.btn svg { width: 15px; height: 15px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #0A0A0A; font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: #0A0A0A; }
.btn-danger { border-color: rgba(192,57,43,.4); color: #e74c3c; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-sm { padding: 7px 11px; font-size: 12px; }
.btn-icon { padding: 8px; }

/* ═══════════════════════════════════════════════════════════════════
   STATUS TOGGLE
   ═══════════════════════════════════════════════════════════════════ */
.status-menu {
  position: relative;
  flex-shrink: 0;
}
.status-menu summary {
  list-style: none;
}
.status-menu summary::-webkit-details-marker {
  display: none;
}
.status-toggle {
  background: none; border: 1px solid transparent; cursor: pointer; padding: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .15s, border-color .15s;
}
.status-toggle:hover,
.status-menu[open] .status-toggle {
  background: var(--navy-4);
  border-color: var(--border-2);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: block;
}
.status-dot.online  { background: var(--success); box-shadow: 0 0 0 2px rgba(39,174,96,.25); }
.status-dot.busy    { background: var(--warning); box-shadow: 0 0 0 2px rgba(230,126,34,.25); }
.status-dot.offline { background: var(--text-3); }
.status-menu-popover {
  position: absolute;
  z-index: 300;
  right: 0;
  top: calc(100% + 8px);
  min-width: 138px;
  padding: 6px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--navy-2);
  box-shadow: 0 12px 28px rgba(0,0,0,.32);
}
.status-menu-popover form {
  margin: 0;
}
.status-menu-popover button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.status-menu-popover button:hover,
.status-menu-popover button.active {
  background: rgba(201,168,76,.1);
  color: var(--gold);
}

.logout-btn {
  width: 30px; height: 30px; border-radius: var(--radius); border: 1px solid var(--border-2);
  background: transparent; color: var(--text-3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  text-decoration: none; transition: all .12s;
}
.logout-btn:hover { border-color: var(--gold-dim); color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════ */
.form-label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 7px; font-weight: 600; }
.form-input {
  width: 100%; background: var(--navy-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 11px 13px; color: var(--text); outline: none;
  transition: border-color .15s, background .15s;
}
.form-input:focus { border-color: var(--gold-dim); background: var(--navy-4); }
.form-input::placeholder { color: var(--text-3); }
.form-select {
  width: 100%; background: var(--navy-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 11px 13px; color: var(--text); outline: none;
  transition: border-color .15s; cursor: pointer; appearance: none;
}
.form-select:focus { border-color: var(--gold-dim); }
.form-row { margin-bottom: 18px; }
.form-error {
  background: var(--danger-bg); border: 1px solid rgba(192,57,43,.3);
  border-radius: var(--radius); padding: 9px 12px; color: #e74c3c; font-size: 12px; margin-bottom: 14px;
}
.form-success {
  background: var(--success-bg); border: 1px solid rgba(39,174,96,.3);
  border-radius: var(--radius); padding: 9px 12px; color: #2ecc71; font-size: 12px; margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.b-new      { background: var(--info-bg);         color: #5DADE2; border: 1px solid rgba(52,152,219,.3); }
.b-open     { background: var(--success-bg);      color: #2ECC71; border: 1px solid rgba(39,174,96,.3); }
.b-pending  { background: var(--warning-bg);      color: #E67E22; border: 1px solid rgba(230,126,34,.3); }
.b-resolved { background: rgba(80,80,80,.12);     color: var(--text-2); border: 1px solid var(--border-2); }
.b-closed   { background: rgba(40,40,40,.3);      color: var(--text-3); border: 1px solid var(--border); }
.b-spam     { background: var(--danger-bg);       color: #e74c3c; border: 1px solid rgba(192,57,43,.3); }
.b-chat     { background: rgba(201,168,76,.12);   color: var(--gold); border: 1px solid var(--border-gold); }
.b-urgent   { background: var(--danger-bg);       color: #E74C3C; border: 1px solid rgba(192,57,43,.3); }
.b-high     { background: var(--warning-bg);      color: #E67E22; border: 1px solid rgba(230,126,34,.3); }
.b-medium   { background: rgba(80,80,80,.1);      color: var(--text-2); border: 1px solid var(--border-2); }
.b-low      { background: rgba(30,30,30,.3);      color: var(--text-3); border: 1px solid var(--border); }
.b-sla-ok   { background: var(--success-bg);      color: #2ECC71; border: 1px solid rgba(39,174,96,.3); }
.b-sla-risk { background: var(--warning-bg);      color: #E67E22; border: 1px solid rgba(230,126,34,.3); }
.b-sla-over { background: var(--danger-bg);       color: #E74C3C; border: 1px solid rgba(192,57,43,.3); }
.b-reply    { background: var(--success-bg);      color: #2ECC71; border: 1px solid rgba(39,174,96,.3); }
.b-note     { background: var(--warning-bg);      color: #E67E22; border: 1px solid rgba(230,126,34,.3); }
.b-system   { background: rgba(60,60,60,.2);      color: var(--text-3); border: 1px solid var(--border); }
.b-customer { background: var(--info-bg);         color: #5DADE2; border: 1px solid rgba(52,152,219,.3); }
.b-online   { background: rgba(39,174,96,.12);    color: #2ECC71; border: 1px solid rgba(39,174,96,.3); }
.b-busy     { background: rgba(230,126,34,.12);   color: #E67E22; border: 1px solid rgba(230,126,34,.3); }
.b-offline  { background: rgba(80,80,80,.08);     color: var(--text-3); border: 1px solid var(--border-2); }

/* ═══════════════════════════════════════════════════════════════════
   TICKET LIST
   ═══════════════════════════════════════════════════════════════════ */
.tickets-layout,
.tickets-screen { display: grid; grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); flex: 1; min-height: 0; overflow: hidden; }
.ticket-list-pane {
  min-width: 0; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; background: var(--navy-2);
}
.ticket-filter-panel {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--navy-2);
  display: grid;
  gap: 9px;
}
.list-filters { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 6px; flex-wrap: wrap; }
.filter-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 32px;
}
.filter-label {
  width: 58px;
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font-size: 12px; line-height: 1; padding: 6px 10px; border-radius: 99px;
  border: 1px solid var(--border-2); color: var(--text-2);
  cursor: pointer; background: transparent; transition: all .12s;
}
.chip:hover { border-color: var(--gold-dim); color: var(--gold); }
.chip.active { background: rgba(201,168,76,.1); border-color: var(--gold-dim); color: var(--gold); }
.filter-menu {
  position: relative;
}
.filter-menu summary {
  list-style: none;
}
.filter-menu summary::-webkit-details-marker {
  display: none;
}
.filter-menu-btn {
  width: 32px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: 99px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .12s;
}
.filter-menu-btn:hover,
.filter-menu-btn.active {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(201,168,76,.1);
}
.filter-menu-btn svg {
  width: 15px;
  height: 15px;
}
.filter-menu-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--navy-2);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.filter-menu-popover a {
  display: flex;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
}
.filter-menu-popover a:hover,
.filter-menu-popover a.active {
  background: rgba(201,168,76,.1);
  color: var(--gold);
}
.ticket-items { overflow-y: auto; flex: 1; min-height: 0; }
.ticket-items.is-empty { display: flex; }
.t-row { padding: 14px 15px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .1s; text-decoration: none; display: block; }
.t-row:hover { background: var(--navy-3); }
.t-row.selected { background: rgba(201,168,76,.06); border-left: 2px solid var(--gold); }
.t-row-top { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; flex-wrap: wrap; }
.t-num { font-size: 11px; color: var(--gold); font-weight: 700; font-family: var(--font-mono); }
.t-subject { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-preview { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.t-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.t-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════
   TICKET DETAIL
   ═══════════════════════════════════════════════════════════════════ */
.detail-pane { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.detail-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--navy-2); flex-shrink: 0;
}
.detail-title { font-size: 18px; font-weight: 600; color: var(--text); flex: 1; line-height: 1.4; }
.detail-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.detail-body { flex: 1; display: flex; overflow: hidden; }
.thread-col { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.thread-scroll { flex: 1; overflow-y: auto; padding: 18px 22px; }

/* Timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: var(--border-2); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-dot {
  position: absolute; left: -21px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--navy-2); z-index: 1;
}
.tl-dot.dot-customer { background: var(--info); }
.tl-dot.dot-reply    { background: var(--success); }
.tl-dot.dot-note     { background: var(--warning); }
.tl-dot.dot-system   { background: var(--text-3); }
.tl-meta { font-size: 12px; color: var(--text-3); margin-bottom: 7px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-meta strong { color: var(--text-2); font-weight: 500; }
.tl-bubble {
  background: var(--navy-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 12px 14px; font-size: 14px;
  color: var(--text); line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.tl-bubble.bubble-reply  { background: rgba(39,174,96,.04);   border-color: rgba(39,174,96,.18); }
.tl-bubble.bubble-note   { background: rgba(230,126,34,.04);  border-color: rgba(230,126,34,.18); border-style: dashed; }
.tl-bubble.bubble-system { background: transparent; border: none; font-size: 11px; color: var(--text-3); padding: 1px 0; }

/* Reply area */
.reply-area { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--navy-2); flex-shrink: 0; }
.reply-tabs { display: flex; margin-bottom: 10px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-2); width: fit-content; }
.reply-tab { padding: 8px 14px; font-size: 13px; cursor: pointer; background: transparent; border: none; color: var(--text-2); transition: all .12s; }
.reply-tab.active { background: var(--gold); color: #0A0A0A; font-weight: 600; }
.reply-area textarea {
  width: 100%; background: var(--navy-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 12px 14px; color: var(--text); resize: vertical; outline: none;
  font-size: 14px; line-height: 1.55; transition: border-color .15s, background .15s;
}
.reply-area textarea:focus { border-color: var(--gold-dim); background: var(--navy-4); }
.reply-area textarea::placeholder { color: var(--text-3); }
.reply-toolbar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

/* Attachment controls */
.file-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px;
}
.public-file-row { margin-top: 0; }
.file-picker {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 8px 12px;
  border: 1px dashed var(--border-2); border-radius: var(--radius);
  background: rgba(201,168,76,.06); color: var(--gold);
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: border-color .15s, background .15s, color .15s;
}
.file-picker:hover {
  border-color: var(--gold-dim); background: rgba(201,168,76,.11); color: var(--gold-light);
}
.file-picker input { display: none; }
.file-picker-note { color: var(--warning); background: rgba(230,126,34,.07); }
.file-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--navy); font-weight: 800; line-height: 1;
}
.file-picker-note .file-icon { background: var(--warning); color: var(--navy); }
.file-preview { display: inline-flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.file-pill {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 220px; padding: 5px 8px; border-radius: 99px;
  background: var(--navy-4); border: 1px solid var(--border-2);
  color: var(--text-2); font-size: 12px;
}
.file-pill > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-pill em { color: var(--text-3); font-style: normal; flex-shrink: 0; }
.file-feedback {
  width: 100%;
  min-height: 18px;
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}
:root[data-theme="light"] .file-feedback {
  color: #A42C22;
}
.file-remove {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.file-remove:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* Info sidebar (right panel in ticket detail) */
.info-sidebar {
  width: 250px; border-left: 1px solid var(--border); overflow-y: auto;
  background: var(--navy-2); padding: 16px; flex-shrink: 0;
}
.is-section { margin-bottom: 20px; }
.is-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-weight: 700; }
.is-row { display: flex; flex-direction: column; margin-bottom: 10px; }
.is-key { font-size: 10px; color: var(--text-3); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .06em; }
.is-val { font-size: 13px; color: var(--text); font-weight: 600; }
.is-select {
  width: 100%; background: var(--navy-3); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 9px 10px; color: var(--text); outline: none; font-size: 13px;
  cursor: pointer; appearance: none;
}
.is-select:focus { border-color: var(--gold-dim); }
.sla-track { height: 3px; background: var(--border-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.sla-fill  { height: 100%; border-radius: 99px; }
.assignee-name { font-size: 11px; color: var(--text); font-weight: 500; }
.assignee-none { font-size: 11px; color: var(--text-3); font-style: italic; }
.customer-online-indicator { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 2px 7px; border-radius: 99px; }
.customer-online-indicator.online  { background: var(--success-bg); color: #2ECC71; border: 1px solid rgba(39,174,96,.3); }
.customer-online-indicator.offline { color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD — KPI CARDS & ANALYTICS
   ═══════════════════════════════════════════════════════════════════ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--navy-2); border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: 18px 18px 16px; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold-dim), transparent 70%); }
/* KPI numbers — clean tabular Inter, NOT serif */
.stat-num {
  font-family: var(--font); font-size: 24px; font-weight: 700; color: var(--gold);
  line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.stat-lbl { font-size: 11px; color: var(--text-3); margin-top: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* Trend chart */
.trend-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 80px; padding-top: 10px;
}
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.trend-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; justify-content: center; }
.trend-bar {
  width: 100%; max-width: 28px;
  background: linear-gradient(to top, var(--gold-dim), rgba(201,168,76,.3));
  border-radius: 2px 2px 0 0; min-height: 2px;
  transition: background .15s;
}
.trend-bar:hover { background: linear-gradient(to top, var(--gold), rgba(201,168,76,.5)); }
.trend-bar.today { background: linear-gradient(to top, var(--gold), var(--gold-light)); }
.trend-day { font-size: 9px; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.trend-count { font-size: 9px; color: var(--text-3); }
.trend-count.nonzero { color: var(--gold-dim); }

/* Priority breakdown bar */
.priority-bar { height: 6px; border-radius: 99px; overflow: hidden; display: flex; gap: 1px; margin: 8px 0; }
.p-seg { height: 100%; border-radius: 2px; }
.p-seg.urgent { background: var(--danger); }
.p-seg.high   { background: var(--warning); }
.p-seg.medium { background: var(--gold-dim); }
.p-seg.low    { background: var(--border-2); }

.priority-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.p-legend-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text-2); }
.p-legend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* Source breakdown */
.source-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.source-bar-bg { flex: 1; height: 4px; background: var(--border-2); border-radius: 99px; overflow: hidden; }
.source-bar-fill { height: 100%; background: var(--gold-dim); border-radius: 99px; }
.source-label { font-size: 10px; color: var(--text-2); width: 70px; flex-shrink: 0; }
.source-count { font-size: 10px; color: var(--text-3); width: 24px; text-align: right; flex-shrink: 0; }

/* Agent workload table */
.workload-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.workload-row:last-child { border-bottom: none; }
.workload-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold-dim); color: #0A0A0A;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.workload-name { font-size: 11px; font-weight: 500; color: var(--text); flex: 1; }
.workload-role { font-size: 10px; color: var(--text-3); }
.workload-count {
  font-size: 13px; font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums; min-width: 20px; text-align: right;
}

/* Analytics grid layout */
.analytics-grid { display: grid; gap: 12px; }
.analytics-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.analytics-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) { .analytics-grid.cols-2, .analytics-grid.cols-3 { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════════
   GENERIC CARDS & TABLES
   ═══════════════════════════════════════════════════════════════════ */
.card { background: var(--navy-2); border: 1px solid var(--border-2); border-radius: var(--radius-lg); padding: 18px 20px; }
.card-title { font-size: 11px; font-weight: 700; color: var(--text-3); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }
.card-title span { color: var(--text-2); font-size: 14px; text-transform: none; letter-spacing: 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); border-bottom: 1px solid var(--border-2); font-weight: 700; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.data-table tr:hover td { background: rgba(201,168,76,.02); }
.data-table tr:last-child td { border-bottom: none; }

.empty-state {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 14px; gap: 8px; padding: 48px 24px;
  text-align: center;
}
.empty-state svg {
  width: 40px;
  height: 40px;
  color: var(--border-2);
  margin-bottom: 4px;
}
.empty-state strong {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}

.ticket-placeholder {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--navy);
}
.ticket-placeholder-card {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--navy-2);
  color: var(--text-3);
  text-align: center;
}
.ticket-placeholder-card svg {
  width: 42px;
  height: 42px;
  color: var(--gold-dim);
  margin-bottom: 2px;
}
.ticket-placeholder-card strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.ticket-placeholder-card span {
  max-width: 290px;
  font-size: 13px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  background-image:
    radial-gradient(ellipse at 70% 30%, rgba(201,168,76,.07) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,.04) 0%, transparent 50%);
}
.login-card { width: 420px; background: var(--navy-2); border: 1px solid var(--border-gold); border-radius: var(--radius-lg); padding: 40px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .wordmark { font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.login-logo .sub { font-size: 11px; color: var(--text-2); letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; }
.login-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border-gold), transparent); margin: 0 0 24px; }
.btn-login { width: 100%; background: var(--gold); color: #0A0A0A; border: none; border-radius: var(--radius); padding: 13px; font-weight: 700; font-size: 13px; letter-spacing: .06em; cursor: pointer; transition: background .15s; margin-top: 6px; }
.btn-login:hover { background: var(--gold-light); }

/* ═══════════════════════════════════════════════════════════════════
   PUBLIC FORM
   ═══════════════════════════════════════════════════════════════════ */
.form-wrap {
  min-height: 100vh; background: var(--navy); display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px;
  background-image: radial-gradient(ellipse at 70% 20%, rgba(201,168,76,.06) 0%, transparent 55%);
}
.form-card { width: 100%; max-width: 620px; background: var(--navy-2); border: 1px solid var(--border-gold); border-radius: var(--radius-lg); padding: 38px; }
.form-card-title { font-family: var(--font-serif); font-size: 24px; font-weight: 500; color: var(--gold); margin-bottom: 5px; }
.form-card-sub { font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.public-embed-body {
  min-height: 100%;
  background: var(--navy);
}
.public-embed-body .form-wrap {
  min-height: 100vh;
  padding: 18px;
  align-items: flex-start;
}
.public-embed-body .form-card {
  max-width: 560px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(0,0,0,.16);
}
.public-success {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 30px 18px;
  border: 1px solid rgba(39,174,96,.32);
  border-radius: var(--radius-lg);
  background: var(--success-bg);
}
.public-success .success-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}
.public-success strong {
  color: var(--text);
  font-size: 17px;
}
.public-success span {
  color: var(--text-2);
  font-size: 13px;
}
.public-success-action {
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════════ */
.flash { padding: 11px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.flash-success { background: var(--success-bg); border: 1px solid rgba(39,174,96,.3); color: #2ecc71; }
.flash-error   { background: var(--danger-bg);  border: 1px solid rgba(192,57,43,.3); color: #e74c3c; }
.flash-info    { background: var(--info-bg);    border: 1px solid rgba(52,152,219,.3); color: #5DADE2; }
:root[data-theme="light"] .flash-success { color: #137A3A; }
:root[data-theme="light"] .flash-error { color: #A42C22; }
:root[data-theme="light"] .flash-info { color: #1F6FA8; }

/* ═══════════════════════════════════════════════════════════════════
   LIVE CHAT WIDGET
   ═══════════════════════════════════════════════════════════════════ */
.chat-wrap { min-height: 100vh; background: var(--navy); display: flex; align-items: center; justify-content: center; padding: 44px 20px; background-image: radial-gradient(ellipse at 50% 30%, rgba(201,168,76,.06) 0%, transparent 60%); }
.chat-window { width: 100%; max-width: 520px; background: var(--navy-2); border: 1px solid var(--border-gold); border-radius: var(--radius-lg); display: flex; flex-direction: column; height: 620px; max-height: 90vh; box-shadow: 0 14px 36px rgba(0,0,0,.16); }
.public-embed-body .chat-wrap {
  min-height: 100vh;
  padding: 14px;
  align-items: stretch;
}
.public-embed-body .chat-window {
  height: auto;
  min-height: calc(100vh - 28px);
  max-height: none;
}
.chat-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.chat-header-logo { width: 40px; height: 40px; background: transparent; border-radius: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-header-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.chat-header-text .h-name { font-family: var(--font-serif); font-size: 17px; color: var(--gold); font-weight: 600; }
.chat-header-text .h-sub  { font-size: 12px; color: var(--text-2); }
.chat-status-dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.chat-status-dot.online  { background: var(--success); }
.chat-status-dot.offline { background: var(--text-3); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 11px; }
.chat-entry {
  flex: 1;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.chat-entry-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.chat-entry-copy strong {
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}
.chat-entry-copy span {
  color: var(--text-2);
  font-size: 13px;
}
.chat-choice-list {
  display: grid;
  gap: 10px;
}
.chat-choice-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--navy-3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.chat-choice-card:hover {
  border-color: var(--gold-dim);
  background: var(--navy-4);
  transform: translateY(-1px);
}
:root[data-theme="light"] .chat-choice-card {
  background: #FFFFFF;
  border-color: #C4D1DE;
}
:root[data-theme="light"] .chat-choice-card:hover {
  background: #F4F7FA;
  border-color: var(--gold-dim);
}
.chat-choice-card span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.chat-choice-card strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.chat-choice-card em {
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}
:root[data-theme="light"] .chat-choice-card em {
  color: #526174;
}
.choice-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(201,168,76,.1);
  border: 1px solid var(--border-gold);
}
.choice-icon.online {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(39,174,96,.28);
}
.choice-icon svg {
  width: 19px;
  height: 19px;
}
.chat-msg { max-width: 75%; }
.chat-msg.msg-customer { align-self: flex-end; }
.chat-msg.msg-agent    { align-self: flex-start; }
.chat-bubble { padding: 10px 13px; border-radius: 10px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.msg-customer .chat-bubble { background: var(--gold); color: #0A0A0A; border-radius: 10px 10px 2px 10px; }
.msg-agent    .chat-bubble { background: var(--navy-3); border: 1px solid var(--border-2); color: var(--text); border-radius: 10px 10px 10px 2px; }
.chat-msg-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.msg-customer .chat-msg-meta { text-align: right; }
.chat-input-area { padding: 13px 14px; border-top: 1px solid var(--border); display: flex; gap: 9px; flex-shrink: 0; }
.chat-input-area input { flex: 1; background: var(--navy-3); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 11px 13px; color: var(--text); outline: none; font-size: 14px; }
.chat-input-area input:focus { border-color: var(--gold-dim); }
.chat-send-btn { background: var(--gold); border: none; border-radius: var(--radius); padding: 10px 14px; color: #0A0A0A; cursor: pointer; font-weight: 700; font-size: 13px; transition: background .12s; }
.chat-send-btn:hover { background: var(--gold-light); }
.chat-start-form { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.chat-back-btn { align-self: flex-start; }
.chat-waiting { padding: 12px 14px; text-align: center; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .info-sidebar { display: none; }
  .tickets-layout,
  .tickets-screen { grid-template-columns: 1fr; }
  .ticket-list-pane { width: 100%; }
  .ticket-placeholder { display: none; }
  .filter-label { width: 100%; }
  .topnav-username, .topnav-role { display: none; }
  .topnav { overflow-x: auto; }
  .topnav-item { padding: 0 12px; }
  .form-card { padding: 26px; }
  .detail-header { padding: 14px; }
  .thread-scroll { padding: 14px; }
  .reply-area { padding: 12px; }
  .public-embed-body .form-wrap,
  .public-embed-body .chat-wrap { padding: 10px; }
  .public-embed-body .form-card { padding: 20px; }
  .public-embed-body .chat-window { min-height: calc(100vh - 20px); }
  .chat-entry { padding: 18px; }
  .chat-start-form { padding: 18px; }
}
