/* ─────────────────────────────────────────────────────────────────────────
   Ptera Portal — Dark-Steel Theme
   ─────────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --night:       #07110f;
  --panel:       #12231d;
  --ivory:       #f2ead7;
  --mist:        #b8c3bb;
  --gold:        #c6a45c;
  --gold-pale:   #e4ce93;
  --serif:       Georgia, "Times New Roman", serif;
  --bg:          var(--night);
  --surface:     #12231d;
  --surface2:    #0d1c17;
  --surface3:    #183028;
  --border:      rgba(180, 155, 92, .35);
  --primary:     var(--gold);
  --primary-h:   var(--gold-pale);
  --accent-green:#78b995;
  --accent-amber:#c6a45c;
  --accent-red:  #dc8578;
  --accent-blue: #8d9d94;
  --text:        var(--ivory);
  --text-dim:    #8d9d94;
  --moss:
    radial-gradient(circle at 12% 0%, rgba(74, 126, 95, .18), transparent 33rem),
    radial-gradient(circle at 90% 12%, rgba(151, 115, 52, .12), transparent 27rem),
    linear-gradient(150deg, #07110f, #0b1612 45%, #060c0b);
  --radius:      0;
  --radius-sm:   0;
  --font:        Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:   ui-monospace, SFMono-Regular, Consolas, monospace;
  --nav-h:       5.4rem;
  --shadow:      0 12px 35px rgba(0, 0, 0, .13);
}

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

html { font-size: 16px; background: var(--night); }
body {
  font-family: var(--font);
  background: var(--moss);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
}
body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .18;
  background-image: repeating-linear-gradient(115deg, transparent 0 8px, rgba(255, 255, 255, .018) 9px 10px);
  z-index: 0;
}
.site-shell { position: relative; z-index: 1; width: min(1440px, calc(100% - 2rem)); margin: 0 auto; }
h1, h2, .page-hero h1, .login-brand h1 { font-family: var(--serif); }

a { color: var(--gold-pale); text-decoration: none; }
a:hover { color: #fff1c7; }

.muted { color: var(--text-dim); font-size: .85em; }
.empty-state { color: var(--text-dim); font-style: italic; padding: .6rem 0; text-align: center; }

/* ── Scrollbars ── */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface3); }

/* ──────────────────────────────────────────────────────────────────────
   TOP NAV
   ────────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.25rem 2rem;
  padding: 0 1.25rem;
  flex-wrap: wrap;
  background: rgba(7, 17, 15, .92);
  border-bottom: 1px solid rgba(180, 155, 92, .25);
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ivory);
  text-decoration: none;
  white-space: nowrap;
}
.brand strong, .login-brand h1 {
  display: block;
  font: 700 1.2rem/1.1 var(--serif);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0;
}
.brand small, .brand-line {
  display: block;
  margin: .15rem 0 0;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: .68rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.brand-mark {
  position: relative;
  width: 2.35rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(198, 164, 92, .2);
}
.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  content: "";
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--gold-pale);
  transform: rotate(45deg);
}
.brand-mark::after {
  width: .42rem;
  height: .42rem;
  background: var(--gold);
}
.primary-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 3rem);
  flex-wrap: wrap;
}
.nav-group { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.nav-label {
  color: #708078;
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.nav-group a {
  min-height: var(--nav-h);
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--mist);
  font-size: .8rem;
  letter-spacing: .04em;
  text-decoration: none;
}
.nav-group a:hover,
.nav-group a[aria-current="page"] { color: var(--ivory); border-color: var(--gold); }
.voice-slot { display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid rgba(180, 155, 92, .25);
  color: var(--text-dim);
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.topnav {
  display: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}
.brand-logo {
  width: 30px;
  height: 30px;
  background: linear-gradient(155deg, #24362c, #9ab8a0);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #f4f7f2;
  flex-shrink: 0;
}
.brand-name {
  letter-spacing: 0.08em;
  font-weight: 520;
  font-size: 0.92rem;
}

.nav-links { display: flex; gap: .1rem; flex: 1; }
.nav-link {
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-link:hover { background: var(--surface2); color: var(--text); text-decoration:none; }
.nav-link.active { color: #d7e6d6; background: rgba(154, 184, 160, 0.16); }

.nav-end { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav-user { font-size: .82rem; color: var(--text-dim); }
.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: .25rem .7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .82rem;
  transition: border-color .15s, color .15s;
}
.nav-btn:hover { border-color: var(--primary); color: var(--text); }

.phone-toggle {
  appearance: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  line-height: 0;
  cursor: pointer;
}
.phone-toggle svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.phone-toggle:hover { background: none; color: #fff; opacity: .72; }
.phone-toggle:focus { outline: none; }
.phone-toggle:focus-visible {
  opacity: 1;
  outline: 1px solid rgba(255, 255, 255, .55);
  outline-offset: 3px;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(180, 155, 92, .45);
  border-radius: 0;
  font-size: .72rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: .3rem;
}

/* ──────────────────────────────────────────────────────────────────────
   PHONE DRAWER
   ────────────────────────────────────────────────────────────────────── */
.phone-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(720px, 100vw);
  height: 100vh;
  background: #090a0e;
  color: #e7e9ee;
  color-scheme: dark;
  border-left: 1px solid rgba(180, 155, 92, .25);
  display: flex;
  flex-direction: column;
  z-index: 300;
  box-shadow: -4px 0 20px rgba(0,0,0,.5);
}
.phone-drawer[hidden] { display: none; }
.phone-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  background: #090a0e;
  color: #e7e9ee;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-weight: 600;
}
.phone-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

/* ──────────────────────────────────────────────────────────────────────
   PAGE WRAP + HEADER
   ────────────────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: none;
  margin: 0;
  padding: 1.4rem 0 2rem;
}
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  flex: 1;
}
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.6rem;
  padding-bottom: 1rem;
  animation: page-hero-in .45s ease both;
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0.15rem 0 0;
}
.page-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.page-hero-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding-bottom: 0.15rem;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.28), rgba(255,255,255,.08) 46%, transparent 82%);
}
.page-sep {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 2.75rem 0 1.15rem;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(8, 12, 10, 0.9);
}
.page-sep::before,
.page-sep::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
}
@keyframes page-hero-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero { animation: none; }
}
.back-link { color: var(--text-dim); font-size: .85rem; }

/* ──────────────────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface3); border-color: var(--text-dim); text-decoration:none; color:var(--text); }
.btn-primary { background: var(--gold-pale); border-color: var(--gold); color: #0b1512; }
.btn-primary:hover { background: #f4dfa4; border-color: var(--gold); color: #050908; }
.btn.ghost { color: var(--gold-pale); background: transparent; border-color: var(--gold); }
.btn.compact { min-height: 2rem; padding: .3rem .7rem; font-size: .7rem; letter-spacing: .04em; }
.login-brand { display: flex; flex-direction: column; align-items: center; }
.login-brand .brand-mark { margin-bottom: .7rem; }
.btn-danger { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }
.btn-danger:hover { opacity: .88; }
.btn-sm { padding: .28rem .6rem; font-size: .8rem; }
.btn-xs { padding: .18rem .48rem; font-size: .76rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.float-right { float: right; }

/* ──────────────────────────────────────────────────────────────────────
   FLASH MESSAGES
   ────────────────────────────────────────────────────────────────────── */
.flash {
  padding: .6rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .88rem;
}
.flash--error, .flash--danger { background: rgba(231,76,60,.15); color:#e74c3c; border:1px solid #e74c3c44; }
.flash--success { background: rgba(39,174,96,.15); color:#27ae60; border:1px solid #27ae6044; }
.flash--warning { background: rgba(243,156,18,.15); color:#f39c12; border:1px solid #f39c1244; }

/* ──────────────────────────────────────────────────────────────────────
   TOOLBAR (search + filters row)
   ────────────────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  gap: .75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: .4rem .75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .88rem;
  outline: none;
}
.search-input:focus { border-color: var(--primary); }
.filter-select {
  padding: .38rem .65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .85rem;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); outline: none; }

/* ──────────────────────────────────────────────────────────────────────
   DATA TABLE
   ────────────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .88rem;
  background: rgba(14, 22, 18, 0.94);
  border: 1px solid rgba(183, 203, 182, 0.18);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(8, 12, 10, 0.16);
}
.data-table th {
  text-align: left;
  padding: .55rem .85rem;
  background: var(--surface2);
  border-bottom: 2px solid var(--border);
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
}
.data-table th:first-child { border-top-left-radius: 10px; }
.data-table th:last-child { border-top-right-radius: 10px; }
.data-table tr:last-child td:first-child { border-bottom-left-radius: 10px; }
.data-table tr:last-child td:last-child { border-bottom-right-radius: 10px; }
.data-table td {
  padding: .5rem .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,.03); }

/* ──────────────────────────────────────────────────────────────────────
   STAT GRID
   ────────────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
}
.stat-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.stat-label { font-size: .78rem; color: var(--text-dim); margin-top: .35rem; }

.accent-green .stat-val,
.accent-amber .stat-val,
.accent-red .stat-val,
.accent-blue .stat-val { color: var(--ivory); }

/* ──────────────────────────────────────────────────────────────────────
   PANELS + DASH COLUMNS
   ────────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.panel-title {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  margin-bottom: .75rem;
}
.panel-link { font-size: .82rem; color: var(--primary); }

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

/* ──────────────────────────────────────────────────────────────────────
   ACTIVITY FEED
   ────────────────────────────────────────────────────────────────────── */
.activity-feed, .activity-feed-tall {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .85rem;
}
.activity-icon { font-size: 1rem; flex-shrink:0; margin-top:.1rem; }
.activity-body { flex:1; }
.activity-summary { display:block; }
.activity-client { font-size:.8rem; color: var(--text-dim); }
.activity-time { font-size: .78rem; color: var(--text-dim); white-space:nowrap; }

/* ──────────────────────────────────────────────────────────────────────
   RENEWAL LIST
   ────────────────────────────────────────────────────────────────────── */
.renewal-list { list-style: none; display:flex; flex-direction:column; gap:.5rem; }
.renewal-item { display:flex; align-items:center; gap:.6rem; font-size:.88rem; }
.renewal-name { flex:1; }
.renewal-lob  { flex-shrink:0; }
.renewal-date { flex-shrink:0; }

/* ──────────────────────────────────────────────────────────────────────
   STAGE / LOB BADGES
   ────────────────────────────────────────────────────────────────────── */
.stage-badge,
.tag {
  display: inline-block;
  padding: .12rem .45rem;
  border: 1px solid rgba(180, 155, 92, .45);
  border-radius: 0;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: transparent;
  color: var(--ivory);
}

/* ──────────────────────────────────────────────────────────────────────
   FORMS
   ────────────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 800px;
}
.form-section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin: 1.1rem 0 .65rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .35rem;
}
.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  flex: 1;
  min-width: 160px;
  font-size: .85rem;
  color: var(--text-dim);
}
.form-group--wide { flex: 2; min-width: 320px; }
.form-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .4rem .7rem;
  font-size: .88rem;
  outline: none;
  font-family: var(--font);
  width: 100%;
}
.form-input:focus { border-color: var(--primary); }
.form-input--sm { padding: .22rem .5rem; font-size: .82rem; }
textarea.form-input { resize: vertical; }
select.form-input { cursor: pointer; }
.form-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}
.form-error { color: var(--accent-red); font-size: .85rem; margin-top: .5rem; }

/* ──────────────────────────────────────────────────────────────────────
   PAGER
   ────────────────────────────────────────────────────────────────────── */
.pager {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  justify-content: center;
}
.pager .muted {
  color: #1c2e24;
  background: rgba(232, 239, 230, 0.82);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* ──────────────────────────────────────────────────────────────────────
   ITEM LIST (generic small list)
   ────────────────────────────────────────────────────────────────────── */
.item-list { list-style:none; display:flex; flex-direction:column; gap:.4rem; }
.item-list-row {
  display:flex;
  align-items:center;
  gap:.6rem;
  font-size:.85rem;
  padding:.35rem .5rem;
  border-radius:var(--radius-sm);
  background:var(--surface2);
}
.task-done { opacity: .5; text-decoration: line-through; }

/* ──────────────────────────────────────────────────────────────────────
   DETAIL LIST
   ────────────────────────────────────────────────────────────────────── */
.detail-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .35rem .75rem;
  font-size: .86rem;
}
.detail-list dt { color: var(--text-dim); font-weight: 600; align-self: start; }
.detail-list .note-text { white-space: pre-wrap; }

/* ──────────────────────────────────────────────────────────────────────
   POLICY CARDS
   ────────────────────────────────────────────────────────────────────── */
.policy-cards { display:flex; flex-direction:column; gap:.5rem; }
.policy-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .75rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .84rem;
}
.pc-lob { flex-shrink:0; }
.pc-info { flex:1; display:flex; flex-direction:column; gap:.15rem; }
.pc-dates { font-size:.78rem; }

/* ──────────────────────────────────────────────────────────────────────
   MODAL
   ────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  display: grid;
  place-items: center;
  z-index: 500;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 480px;
  max-width: 96vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.modal-close {
  background:transparent; border:none; cursor:pointer;
  color:var(--text-dim); font-size:1.4rem; line-height:1;
}

/* ──────────────────────────────────────────────────────────────────────
   LOGIN
   ────────────────────────────────────────────────────────────────────── */
.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: var(--moss);
  background-attachment: fixed;
}
.login-split {
  display: block;
  background: #111;
}
.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-pane {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: #111;
}
.login-void { background: #000; }
@media (max-width: 800px) {
  .login-stage { grid-template-columns: 1fr; }
  .login-void { display: none; }
}
.login-box {
  width: 380px;
  max-width: 94vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.login-split .login-box {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.75rem 1.5rem 1.25rem;
  box-shadow: none;
}
.login-split h1 { font-family: var(--font); }
.login-split .login-box h1 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
  color: #f3f3f3;
}
.login-split .login-box.is-code {
  width: 350px;
  background: #181818;
  border: 1px solid rgba(107, 114, 128, 0.2);
  border-radius: 4px;
  padding: 28px 35px 22px;
}
.login-code-step { gap: 0.2rem; }
.login-code-step .otp { align-self: center; }
.login-split .login-code-title {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 700;
  color: #fff;
}
.login-code-sub {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  text-align: center;
}
.login-identity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.15rem 0 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
}
.login-edit {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: #9289fe;
  cursor: pointer;
}
.otp { position: relative; width: 245px; height: 32px; margin: 0 0 0.7rem; }
.otp-boxes { display: flex; gap: 7px; height: 32px; }
.otp-boxes span {
  position: relative;
  width: 35px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.11), 0 0 1px rgba(255, 255, 255, 0.07);
}
.otp-boxes span.is-active {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 1px rgba(255, 255, 255, 0.11),
    0 0 0 4px rgba(255, 255, 255, 0.15);
}
.otp-boxes span.is-active:not(.is-filled)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 1px;
  height: 14px;
  background: #fff;
  animation: otp-caret 1s step-end infinite;
}
@keyframes otp-caret {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.login-split .login-form input.otp-capture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  opacity: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
}
.login-resend { margin: 0.15rem 0 0.45rem; text-align: center; }
.login-resend button {
  border: 0;
  background: none;
  color: #9289fe;
  font-size: 0.66rem;
  font-weight: 500;
  cursor: pointer;
}
.login-resend button:disabled { cursor: default; }
.login-code-step .login-continue {
  margin-top: 0.35rem;
  padding: 0.42rem 1rem;
  border-radius: 4px;
  background: #5f4cfe;
  color: #111;
  font-size: 0.78rem;
  font-weight: 500;
}
.login-code-step .login-continue:hover { background: #6d5efc; }
.login-code-step .login-switch {
  margin-top: 0.7rem;
  color: #9289fe;
  font-size: 0.72rem;
  font-weight: 500;
}
.login-code-step .login-switch:hover { color: #c4bfff; }
.login-code-step .login-error { width: 100%; margin: 0 0 0.55rem; }
.login-lead {
  margin: 0 0 1.2rem;
  text-align: center;
  color: #9a9a9a;
  font-size: 0.82rem;
}
.login-split .login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #c8c8c8;
  font-size: 0.78rem;
}
.login-split .login-form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f4f4f4;
  font-size: 0.92rem;
}
.login-split .login-form input:focus {
  outline: none;
  border-color: #6d5efc;
}
input.login-code {
  letter-spacing: 0.28em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.login-continue {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 8px;
  background: #5b4dff;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.login-continue:hover { background: #6d5efc; }
.login-switch {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.2rem;
  border: 0;
  background: none;
  color: #bdbdbd;
  font-size: 0.82rem;
  text-align: center;
  cursor: pointer;
}
.login-switch:hover { color: #fff; }
.login-error, .login-note {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.8rem;
}
.login-error { color: #e7b2ae; }
.login-note { color: #bdbdbd; }
.login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}
.login-brand .brand-logo {
  width: 48px; height: 48px;
  font-size: 1.4rem;
  margin: 0 auto .5rem;
}
.login-brand h1 {
  font-size: 1.7rem;
  font-weight: 520;
  letter-spacing: 0.12em;
  text-transform: none;
}
.login-form { display:flex; flex-direction:column; gap:.75rem; }
.login-form[hidden] { display: none; }
.login-divider {
  text-align: center;
  color: var(--text-dim);
  font-size: .82rem;
  margin: 1rem 0;
  position: relative;
}
.login-divider::before, .login-divider::after {
  content:''; position:absolute; top:50%;
  width:42%; height:1px; background:var(--border);
}
.login-divider::before { left:0; }
.login-divider::after  { right:0; }

/* Sign-in: one centered card in pterasoft.com's slate palette. */
.login-split {
  --pt-text: #e8ecef; --pt-head: #f2f5f7; --pt-mark: #8a9aa8; --pt-dim: #7a8a97; --pt-label: #93a2ae;
  --pt-line: rgba(232, 236, 239, .14); --pt-focus: rgba(180, 200, 215, .55);
  color: var(--pt-text);
  font-family: "Avenir Next", "Segoe UI", Candara, sans-serif;
  background-color: #0b0e11;
  background-attachment: fixed;
  background-image:
    radial-gradient(900px 520px at 18% 12%, rgba(90, 120, 140, .18), transparent 58%),
    radial-gradient(800px 480px at 88% 78%, rgba(40, 55, 65, .55), transparent 55%),
    linear-gradient(165deg, #0b0e11 0%, #12171c 48%, #0a0d10 100%);
}
.login-split .login-stage { grid-template-columns: 1fr; }
.login-split .login-pane { background: transparent; padding: 2.5rem 1.25rem; }
.login-split .login-box,
.login-split .login-box.is-code {
  width: min(100%, 23.5rem);
  max-width: 94vw;
  padding: 1.9rem 1.6rem 1.4rem;
  background: rgba(10, 13, 16, .72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 236, 239, .1);
  border-radius: 4px;
  box-shadow: none;
  animation: login-rise .7s ease both;
}
@keyframes login-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.login-mark {
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  margin: -.2rem 0 1.5rem; padding-bottom: 1.35rem; position: relative;
}
.login-mark::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: 3.5rem; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(215, 226, 234, .55), transparent);
}
.login-crest {
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  border: 1px solid rgba(215, 226, 234, .35);
  box-shadow: inset 0 0 0 3px rgba(11, 14, 17, .9), inset 0 0 0 4px rgba(215, 226, 234, .14);
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .08), transparent 60%);
  color: var(--pt-head);
  font: 500 .95rem/1 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: .08em;
}
.login-club {
  font: 500 1.32rem/1.15 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: .14em; text-transform: uppercase; text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, #f6f8fa 0%, #c3cdd5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-firm { color: var(--pt-mark); font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
@media (max-width: 420px) { .login-club { font-size: 1.05rem; letter-spacing: .1em; } }
.login-split h1,
.login-split .login-box h1,
.login-split .login-code-title {
  margin: 0 0 .35rem;
  color: var(--pt-head);
  font: 500 1.7rem/1.2 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  text-align: center;
}
.login-split .login-lead,
.login-split .login-code-sub,
.login-split .login-identity { color: var(--pt-dim); font-size: .86rem; }
.login-split .login-lead { margin-bottom: 1.35rem; }
.login-split .login-form label { color: var(--pt-label); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.login-split .login-form input {
  font: inherit;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--pt-line);
  border-radius: 3px;
  color: #eef2f5;
  text-transform: none;
  letter-spacing: 0;
}
.login-split .login-form input:focus { border-color: var(--pt-focus); box-shadow: 0 0 0 3px rgba(120, 150, 170, .15); }
.login-split .login-continue,
.login-split .login-code-step .login-continue {
  border-radius: 3px;
  background: #d7dee4;
  color: #0b0e11;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .8rem .9rem;
  transition: background .15s ease;
}
.login-split .login-continue:hover,
.login-split .login-code-step .login-continue:hover { background: #f0f4f7; }
.login-split .login-switch,
.login-split .login-code-step .login-switch { color: var(--pt-dim); font-size: .82rem; }
.login-split .login-switch:hover,
.login-split .login-code-step .login-switch:hover { color: #d7e2ea; }
.login-split .login-edit,
.login-split .login-resend button { color: #d7e2ea; }
.login-split .login-resend button { font-size: .76rem; }
.login-split .login-resend button:disabled { color: var(--pt-dim); }
.login-split .login-error { padding: .55rem .7rem; border: 1px solid rgba(196, 92, 74, .45); background: rgba(196, 92, 74, .12); color: #f0c4bc; }
.login-split .login-error[hidden] { display: none; }
.login-split .login-hint { margin: .2rem 0 .9rem; color: var(--pt-dim); font-size: .78rem; text-align: center; }
.login-split .otp { width: 270px; height: 44px; margin-bottom: .6rem; }
.login-split .otp-boxes { gap: 9px; height: 44px; }
.login-split .otp-boxes span {
  width: 37px;
  height: 44px;
  border-radius: 3px;
  color: var(--pt-head);
  font: 500 1.1rem/1 var(--font-mono);
  background: rgba(0, 0, 0, .35);
  box-shadow: 0 0 0 1px var(--pt-line);
}
.login-split .otp-boxes span.is-active { box-shadow: 0 0 0 1px var(--pt-focus), 0 0 0 4px rgba(120, 150, 170, .15); }
.login-split .otp-boxes span.is-active:not(.is-filled)::after { background: #d7e2ea; top: 14px; }

/* ──────────────────────────────────────────────────────────────────────
   CLIENT 360 — base
   ────────────────────────────────────────────────────────────────────── */
.c360-header { align-items: flex-start; }
.c360-actions { display:flex; gap:.5rem; flex-wrap:wrap; }

.c360-grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .c360-grid { grid-template-columns: 1fr 1fr; }
  .c360-policies { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .c360-grid { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────────────────
   COMPOSE
   ────────────────────────────────────────────────────────────────────── */
.compose-tabs { display:flex; gap:.25rem; margin-bottom:.75rem; }
.compose-tab {
  padding:.3rem .8rem;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:var(--surface2);
  color:var(--text-dim);
  cursor:pointer; font-size:.82rem;
}
.compose-tab.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.compose-status { font-size:.82rem; margin-top:.4rem; height:1rem; }

/* ──────────────────────────────────────────────────────────────────────
   QUOTE CAPTURE
   ────────────────────────────────────────────────────────────────────── */
.capture-controls { display:flex; gap:1rem; flex-wrap:wrap; align-items:flex-end; }
.capture-controls .form-group { min-width:220px; flex:1; position:relative; }
.dropzone {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
  color: var(--text-dim);
  background: var(--surface2);
  cursor: pointer;
  margin: .6rem 0;
}
.dropzone.is-hot { border-color: var(--primary); color: var(--text); }
.capture-thumb {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin: .4rem 0 .8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.client-results {
  position: absolute;
  z-index: 5;
  left: 0; right: 0; top: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 180px;
  overflow-y: auto;
}
.client-result-item {
  padding: .4rem .7rem;
  cursor: pointer;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
}
.client-result-item:hover { background: var(--surface3); }
.qc-row input { width: 100%; }

/* ──────────────────────────────────────────────────────────────────────
   ADMIN GRID
   ────────────────────────────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* ──────────────────────────────────────────────────────────────────────
   PHONE LINK
   ────────────────────────────────────────────────────────────────────── */
.phone-link { color: var(--accent-green); }
.phone-link:hover { color:#2ecc71; }
.client-link { font-weight:600; }

@media (max-width: 900px) {
  .dash-columns { grid-template-columns: 1fr; }
  .admin-grid   { grid-template-columns: 1fr; }
}
