@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand palette — matches the candidate platform exactly */
  --blue-bg:      #1635A8;
  --blue-dark:    #0F2480;
  --blue-mid:     #1E44C4;
  --blue-bright:  #2563EB;
  --blue-btn:     #1D4ED8;
  --white:        #FFFFFF;
  --off-white:    #F0F4FF;
  --card-text:    #1A2F6B;
  --text-muted:   #5B6FA8;
  --text-light:   rgba(255,255,255,0.78);
  --border-card:  rgba(255,255,255,0.18);
  --shadow:       0 4px 24px rgba(0,0,0,0.18);
  --shadow-card:  0 2px 16px rgba(15,36,128,0.18);
  --radius:       16px;
  --radius-sm:    10px;

  --green:        #10B981;
  --green-light:  #34D399;
  --red:          #EF4444;
  --amber:        #F59E0B;
  --purple:       #8B5CF6;

  /* Legacy names kept so existing class rules still resolve */
  --bg:        var(--blue-bg);
  --bg2:       var(--blue-dark);
  --bg3:       rgba(255,255,255,0.06);
  --border:    rgba(255,255,255,0.12);
  --border2:   rgba(255,255,255,0.18);
  --text:      var(--white);
  --text2:     var(--text-light);
  --text3:     rgba(255,255,255,0.55);
  --blue:      var(--blue-bright);
  --blue-light:#93C5FD;
  --black:     #0a0a0a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--blue-bg);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Watermark pattern — matches candidate platform, larger + more visible */
.app::before, .login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='180'%3E%3Cg transform='rotate(-15 160 90)'%3E%3Ctext x='20' y='60' font-family='Arial,sans-serif' font-size='26' font-weight='900' fill='white' opacity='0.14'%3EWORK%40HOME%3C/text%3E%3Ctext x='130' y='140' font-family='Arial,sans-serif' font-size='44' font-weight='900' fill='white' opacity='0.11'%3E%40%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-size: 320px 180px;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

/* ── LOGIN ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  position: relative;
}
.login-box {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%; max-width: 420px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative; z-index: 1;
}
.login-head {
  padding: 32px 28px 24px;
  text-align: center;
  border-bottom: 1px solid #E0E7FF;
}
.login-head img {
  display: block;
  height: 110px;
  width: auto;
  max-width: 220px;
  margin: 0 auto 16px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(15,36,128,0.25));
}
.login-head h2 {
  font-family: 'Inter', sans-serif;
  font-size: 22px; font-weight: 800; letter-spacing: -0.3px;
  color: var(--card-text); margin-bottom: 4px;
  text-transform: none;
}
.login-head p { font-size: 12px; color: var(--text-muted); }
.login-body { padding: 28px; }
.lfld { margin-bottom: 16px; }
.lfld label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.6px; margin-bottom: 6px;
}
.lfld input {
  width: 100%; font-family: inherit; font-size: 14px;
  padding: 11px 13px;
  border: 1.5px solid #D1D8F0; border-radius: 8px;
  background: #F8FAFF; color: var(--card-text);
  transition: border-color 0.2s;
}
.lfld input:focus { outline: none; border-color: var(--blue-btn); background: white; }
.login-error {
  font-size: 12px; color: var(--red); margin-bottom: 12px;
  display: none; font-weight: 600;
}
.login-footer {
  text-align: center; padding: 0 28px 24px;
  font-size: 11px; color: #9CA8CC;
}

/* ── APP SHELL ─────────────────────────────────────── */
.app {
  display: flex; height: 100vh; overflow: hidden;
  position: relative;
}
.sidebar {
  width: 224px;
  background: var(--blue-dark);
  border-right: 1px solid var(--border-card);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: relative; z-index: 2;
}
.sb-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-card);
  display: flex; align-items: center; gap: 10px;
}
.sb-logo img {
  height: 38px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}
.sb-logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 800;
  color: var(--white); letter-spacing: -0.3px;
  text-transform: none;
}
.sb-logo-sub {
  font-size: 10px; color: var(--text-light);
  font-weight: 500; text-transform: none;
}
.sb-section { padding: 10px 0; }
.sb-label {
  font-size: 9px; color: var(--text-light);
  padding: 8px 16px 4px;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  font-size: 12px; color: var(--text-light);
  border-left: 2px solid transparent;
  transition: 0.15s; user-select: none;
  font-weight: 600;
}
.sb-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.sb-item.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-left-color: var(--blue-bright);
  font-weight: 700;
}
.sb-icon { width: 16px; height: 16px; flex-shrink: 0; }

.nbadge {
  font-size: 10px; padding: 1px 7px; border-radius: 10px;
  margin-left: auto; font-weight: 700;
}
.nb-red    { background: rgba(239,68,68,0.25);  color: #FCA5A5; }
.nb-green  { background: rgba(16,185,129,0.25); color: #6EE7B7; }
.nb-blue   { background: rgba(37,99,235,0.3);   color: #93C5FD; }
.nb-amber  { background: rgba(245,158,11,0.25); color: #FCD34D; }
.nb-purple { background: rgba(139,92,246,0.25); color: #C4B5FD; }

.main-area {
  flex: 1; overflow-y: auto;
  background: linear-gradient(180deg, var(--blue-bg) 0%, var(--blue-mid) 100%);
  position: relative;
}
.view {
  display: none;
  padding: 24px 26px 40px;
  position: relative; z-index: 1;
}
.view.active { display: block; }
.page-title {
  font-family: 'Inter', sans-serif;
  font-size: 26px; font-weight: 900;
  color: var(--white); margin-bottom: 4px;
  letter-spacing: -0.5px; text-transform: none;
}
.page-sub {
  font-size: 13px; color: var(--text-light);
  margin-bottom: 22px;
}

/* ── METRICS ───────────────────────────────────────── */
.metrics-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.metric-card {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 16px 18px; box-shadow: var(--shadow-card);
}
.mc-val {
  font-family: 'Inter', sans-serif;
  font-size: 26px; font-weight: 900;
  color: var(--card-text); letter-spacing: -0.5px;
}
.mc-lbl {
  font-size: 11px; color: var(--text-muted);
  margin-top: 3px; font-weight: 600;
}
.mc-change {
  font-size: 10px; color: var(--green); margin-top: 4px; font-weight: 600;
}

/* ── TABLE ─────────────────────────────────────────── */
.table-card {
  background: var(--white); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.table-head {
  padding: 14px 18px;
  border-bottom: 1px solid #E0E7FF;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  background: #F8FAFF;
}
.table-head-title {
  font-size: 13px; font-weight: 800; color: var(--card-text);
}
.search-input, .filter-sel {
  font-family: inherit; font-size: 12px;
  padding: 8px 12px;
  border: 1.5px solid #D1D8F0; border-radius: 8px;
  background: var(--white); color: var(--card-text);
  font-weight: 500;
}
.search-input { width: 220px; }
.search-input:focus, .filter-sel:focus { outline: none; border-color: var(--blue-btn); }
.search-input::placeholder { color: #9CA8CC; }
.filter-sel option { background: var(--white); color: var(--card-text); }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
  font-weight: 700; color: var(--text-muted);
  padding: 11px 14px;
  border-bottom: 1px solid #E0E7FF;
  text-align: left; white-space: nowrap;
  background: #F8FAFF;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
td {
  padding: 11px 14px;
  border-bottom: 1px solid #EEF2FF;
  color: var(--card-text); max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle; font-weight: 500;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F0F6FF; cursor: pointer; }

.pill {
  font-size: 10px; padding: 3px 10px; border-radius: 10px;
  font-weight: 700; white-space: nowrap;
}
.p-applied    { background: #FEF3C7; color: #92400E; }
.p-interview  { background: #DBEAFE; color: #1E3A8A; }
.p-offer      { background: #DCFCE7; color: #166534; }
.p-hired      { background: #D1FAE5; color: #065F46; }
.p-onboarding { background: #EDE9FE; color: #5B21B6; }
.p-rejected   { background: #FEE2E2; color: #991B1B; }
.p-disq       { background: #F3F4F6; color: #6B7280; }
.p-noresponse { background: #FED7AA; color: #9A3412; }

.pagination {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: #F8FAFF;
  border-top: 1px solid #E0E7FF;
}
.pag-btn {
  font-size: 11px; padding: 6px 13px; border-radius: 7px;
  cursor: pointer; border: 1.5px solid #D1D8F0;
  background: var(--white); color: var(--text-muted);
  font-family: inherit; font-weight: 600;
}
.pag-btn:hover { background: #F0F6FF; color: var(--card-text); }
.pag-btn:disabled { opacity: 0.4; cursor: default; }

.btn {
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 7px 14px; border-radius: 7px; cursor: pointer;
  border: 1.5px solid #D1D8F0;
  background: var(--white); color: var(--text-muted);
  transition: 0.15s;
}
.btn:hover { background: #F0F6FF; color: var(--card-text); }
.btn-primary {
  background: var(--blue-btn); color: var(--white);
  border-color: var(--blue-btn);
  box-shadow: 0 2px 8px rgba(29,78,216,0.3);
}
.btn-primary:hover {
  background: #1D40AF; color: var(--white);
  border-color: #1D40AF;
}
.btn-green {
  background: var(--green); color: var(--white);
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.btn-green:hover { background: #059669; color: var(--white); border-color: #059669; }
.btn-red {
  background: rgba(239,68,68,0.1); color: var(--red);
  border-color: rgba(239,68,68,0.3);
}

/* ── DETAIL PANEL ──────────────────────────────────── */
.detail-panel {
  display: none; position: fixed; top: 0; right: 0;
  width: 440px; height: 100%;
  background: var(--white); border-left: 1px solid #E0E7FF;
  z-index: 50; flex-direction: column; overflow: hidden;
  box-shadow: -8px 0 32px rgba(15,36,128,0.25);
}
.detail-panel.open { display: flex; }
.dp-scroll { flex: 1; overflow-y: auto; padding: 22px; }
.dp-close {
  float: right; cursor: pointer; font-size: 18px;
  color: var(--text-muted);
  background: var(--off-white); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: 0.15s;
}
.dp-close:hover { background: #E0E7FF; color: var(--card-text); }
.dp-name {
  font-family: 'Inter', sans-serif;
  font-size: 22px; font-weight: 900;
  color: var(--card-text);
  margin: 8px 0 4px; letter-spacing: -0.3px;
  text-transform: none;
}
.dp-row {
  display: flex; padding: 7px 0;
  border-bottom: 1px solid #EEF2FF; font-size: 12px;
}
.dp-lbl { color: var(--text-muted); width: 110px; flex-shrink: 0; font-weight: 600; }
.dp-val { color: var(--card-text); flex: 1; word-break: break-word; font-weight: 500; }
.sec-title {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.6px;
}
.stage-sel {
  font-family: inherit; font-size: 13px;
  padding: 10px 12px;
  border: 1.5px solid #D1D8F0; border-radius: 8px;
  background: #F8FAFF; color: var(--card-text);
  width: 100%; font-weight: 600;
}
.stage-sel:focus { outline: none; border-color: var(--blue-btn); background: white; }
.tag-chip {
  display: inline-block; font-size: 10px;
  background: #EEF4FF; border: 1px solid #D1D8F0;
  border-radius: 6px; padding: 3px 8px;
  margin: 2px 2px 0 0; color: var(--card-text); font-weight: 600;
}
.sumbox {
  background: #F8FAFF; border: 1px solid #E0E7FF;
  border-radius: 8px; padding: 12px 14px;
  font-size: 12px; color: var(--text-muted);
  line-height: 1.7; margin: 6px 0;
}
.email-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; background: rgba(37,99,235,0.1);
  color: var(--blue-btn); border-radius: 5px;
  padding: 3px 8px; font-weight: 700; cursor: pointer;
}

/* ── NOTES ─────────────────────────────────────────── */
.notes-section {
  border-top: 1px solid #E0E7FF;
  background: #F8FAFF; flex-shrink: 0;
}
.notes-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px 6px;
}
.notes-title {
  font-size: 11px; font-weight: 700; color: var(--card-text);
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.notes-cnt {
  font-size: 10px; background: rgba(37,99,235,0.15);
  color: var(--blue-btn); border-radius: 7px;
  padding: 1px 7px; font-weight: 700;
}
.notes-list {
  max-height: 180px; overflow-y: auto;
  padding: 4px 18px 6px; background: var(--white);
  border-top: 1px solid #E0E7FF;
}
.note-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #EEF2FF;
}
.note-item:last-child { border: none; }
.note-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: #DBEAFE;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--blue-btn);
  flex-shrink: 0; margin-top: 1px;
}
.note-av.sys  { background: #DCFCE7; color: #166534; }
.note-av.auto { background: #EDE9FE; color: #5B21B6; }
.note-body { flex: 1; min-width: 0; }
.note-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 3px; flex-wrap: wrap;
}
.note-author { font-size: 11px; font-weight: 700; color: var(--card-text); }
.note-time   { font-size: 10px; color: #9CA8CC; }
.note-text   { font-size: 12px; color: var(--text-muted); line-height: 1.55; word-break: break-word; }
.ntbadge { font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 700; }
.nt-note { background: #DBEAFE; color: var(--blue-btn); }
.nt-call { background: #DCFCE7; color: #166534; }
.nt-flag { background: #FEE2E2; color: #991B1B; }
.nt-auto { background: #EDE9FE; color: #5B21B6; }
.empty-notes { text-align: center; padding: 16px; font-size: 11px; color: #9CA8CC; }
.note-input-area {
  padding: 12px 18px 14px;
  border-top: 1px solid #E0E7FF;
  background: var(--white);
}
.ntype-row { display: flex; gap: 6px; margin-bottom: 8px; }
.ntype {
  font-size: 10px; padding: 4px 10px; border-radius: 12px;
  cursor: pointer; border: 1.5px solid #D1D8F0;
  background: var(--white); color: var(--text-muted);
  font-weight: 600; font-family: inherit;
}
.ntype.sel { border-color: var(--blue-btn); color: var(--blue-btn); background: #EEF4FF; }
.ntarea {
  width: 100%; font-family: inherit; font-size: 13px;
  padding: 10px 12px;
  border: 1.5px solid #D1D8F0; border-radius: 8px;
  background: #F8FAFF; color: var(--card-text);
  resize: none; min-height: 60px; line-height: 1.5;
}
.ntarea:focus { outline: none; border-color: var(--blue-btn); background: white; }
.note-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.file-lbl {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted); cursor: pointer;
  padding: 5px 10px; border-radius: 5px;
  border: 1.5px solid #D1D8F0; background: var(--white);
  font-weight: 600;
}
.file-lbl:hover { background: #F0F6FF; color: var(--card-text); }
.file-lbl input { display: none; }
.ach {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; background: #EEF4FF;
  border: 1px solid #D1D8F0; border-radius: 4px;
  padding: 2px 7px; color: var(--blue-btn);
}
.ach-x { cursor: pointer; color: var(--red); margin-left: 2px; }

/* ── AUTOMATIONS ───────────────────────────────────── */
.auto-card {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.auto-title { font-size: 13px; font-weight: 800; color: var(--card-text); margin-bottom: 4px; }
.auto-preview {
  font-size: 12px; color: var(--text-muted);
  background: #F8FAFF; border-left: 3px solid var(--blue-btn);
  padding: 10px 13px; border-radius: 0 6px 6px 0;
  margin-top: 10px; line-height: 1.6;
}
.toggle-sw { position: relative; width: 40px; height: 22px; cursor: pointer; flex-shrink: 0; }
.toggle-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.t-track {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 11px; background: #D1D8F0; transition: 0.2s;
}
.toggle-sw input:checked + .t-track { background: var(--blue-btn); }
.t-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); transition: 0.2s; pointer-events: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-sw input:checked ~ .t-thumb { left: 21px; }
.ab-on  { background: #DCFCE7; color: #166534; font-size: 10px; padding: 3px 9px; border-radius: 8px; font-weight: 700; }
.ab-off { background: #F3F4F6; color: #6B7280; font-size: 10px; padding: 3px 9px; border-radius: 8px; font-weight: 700; }

/* ── ONBOARDING TRACKER ────────────────────────────── */
.ob-card {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.ob-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ob-av {
  width: 38px; height: 38px; border-radius: 50%;
  background: #DBEAFE;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--blue-btn);
  flex-shrink: 0;
}
.ob-name { font-size: 14px; font-weight: 800; color: var(--card-text); }
.ob-meta { font-size: 11px; color: var(--text-muted); }
.ob-prog {
  background: #E0E7FF; border-radius: 4px;
  height: 6px; overflow: hidden; margin: 10px 0;
}
.ob-fill {
  height: 6px; border-radius: 4px;
  background: linear-gradient(90deg, var(--blue-btn), #38BDF8);
  transition: width 0.5s ease;
}
.ob-steps-mini { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.obs { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.obs-dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; flex-shrink: 0;
}
.od-done { background: #DCFCE7; color: #166534; }
.od-act  { background: #DBEAFE; color: var(--blue-btn); }
.od-todo { background: #F3F4F6; color: #9CA8CC; }

/* Onboarding step text colors */
#view-onboarding .ob-card .obs span {
  color: var(--text-muted) !important;
}
#view-onboarding .ob-card .obs span[style*="line-through"] {
  color: var(--text-muted) !important; opacity: 0.6;
}

/* ── CHAT ──────────────────────────────────────────── */
.chat-layout {
  display: flex; height: calc(100vh - 50px);
  gap: 0; background: var(--white);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-top: -10px;
}
.room-list {
  width: 240px;
  border-right: 1px solid #E0E7FF;
  background: #F8FAFF;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.rl-head {
  padding: 14px 16px; font-size: 11px; font-weight: 800;
  color: var(--card-text);
  border-bottom: 1px solid #E0E7FF;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.rooms { overflow-y: auto; flex: 1; }
.room {
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid #EEF2FF; transition: 0.15s;
}
.room:hover { background: #EEF4FF; }
.room.active { background: #DBEAFE; }
.rn { font-size: 13px; font-weight: 700; color: var(--card-text); }
.rp {
  font-size: 11px; color: var(--text-muted);
  margin-top: 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.rt { font-size: 10px; color: #9CA8CC; margin-top: 2px; }

.chat-main {
  flex: 1; display: flex; flex-direction: column;
  background: var(--white);
}
.chat-top {
  padding: 14px 18px;
  border-bottom: 1px solid #E0E7FF;
  display: flex; align-items: center; gap: 12px;
  background: #F8FAFF;
}
.chat-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: #DBEAFE;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--blue-btn);
  flex-shrink: 0;
}
.chat-body {
  flex: 1; padding: 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  background: #F8FAFF;
}
.msg { max-width: 72%; }
.msg-in  { align-self: flex-start; }
.msg-out { align-self: flex-end; }
.bubble {
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; word-wrap: break-word;
}
.msg-in .bubble {
  background: var(--white); color: var(--card-text);
  border-radius: 12px 12px 12px 3px;
  box-shadow: 0 1px 4px rgba(15,36,128,0.08);
}
.msg-out .bubble {
  background: var(--blue-btn); color: var(--white);
  border-radius: 12px 12px 3px 12px;
}
.mmeta { font-size: 10px; color: #9CA8CC; margin-top: 3px; padding: 0 4px; }
.msg-out .mmeta { text-align: right; }
.chat-inp {
  padding: 12px 16px;
  border-top: 1px solid #E0E7FF;
  display: flex; gap: 10px;
  background: var(--white);
  position: relative;
}
.chat-inp input {
  flex: 1; font-family: inherit; font-size: 13px;
  padding: 10px 16px;
  border: 1.5px solid #D1D8F0; border-radius: 20px;
  background: #F8FAFF; color: var(--card-text);
}
.chat-inp input:focus { outline: none; border-color: var(--blue-btn); background: white; }
.chat-inp input::placeholder { color: #9CA8CC; }

.dot-on {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); display: inline-block; margin-left: 5px;
}

/* ── SCROLLBAR (subtle, blue tint) ─────────────────── */
.dp-scroll::-webkit-scrollbar,
.notes-list::-webkit-scrollbar,
.rooms::-webkit-scrollbar,
.chat-body::-webkit-scrollbar,
.main-area::-webkit-scrollbar {
  width: 8px; height: 8px;
}
.dp-scroll::-webkit-scrollbar-thumb,
.notes-list::-webkit-scrollbar-thumb,
.rooms::-webkit-scrollbar-thumb,
.chat-body::-webkit-scrollbar-thumb {
  background: #D1D8F0; border-radius: 4px;
}
.main-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
.dp-scroll::-webkit-scrollbar-track,
.notes-list::-webkit-scrollbar-track,
.rooms::-webkit-scrollbar-track,
.chat-body::-webkit-scrollbar-track {
  background: transparent;
}

/* ── AI Call modal ─────────────────────────────────── */
.ai-call-modal {
  background: var(--white);
  border-radius: 16px;
  width: 92%; max-width: 460px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15,36,128,0.35);
  position: relative;
}
.aic-head {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 22px 24px 18px;
  display: flex; align-items: center; gap: 14px; color: white;
  position: relative;
}
.aic-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.aic-head h3 {
  font-family: 'Inter', sans-serif;
  font-size: 20px; font-weight: 900; color: white;
  flex: 1; letter-spacing: -0.3px; text-transform: none;
}
.aic-close {
  background: rgba(255,255,255,0.18); border: none; color: white;
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 16px; right: 16px;
}
.aic-close:hover { background: rgba(255,255,255,0.3); }
.aic-sub {
  padding: 14px 24px 0;
  font-size: 12px; color: var(--text-muted);
  font-weight: 600;
}
.aic-field {
  padding: 14px 24px;
  border-bottom: 1px solid #EEF2FF;
}
.aic-field:last-of-type { border-bottom: none; padding-bottom: 8px; }
.aic-field-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px;
}
.aic-field-row {
  display: flex; align-items: center; gap: 10px;
  background: #F8FAFF; border: 1.5px solid #D1D8F0;
  border-radius: 10px; padding: 12px 14px;
}
.aic-value {
  flex: 1; font-family: 'Inter', monospace; font-size: 18px;
  font-weight: 800; color: var(--card-text); letter-spacing: 0.5px;
  text-decoration: none;
}
.aic-value-phone:hover { color: var(--blue-btn); text-decoration: underline; }
.aic-value-code { letter-spacing: 6px; }
.aic-copy {
  background: var(--white); border: 1.5px solid #D1D8F0;
  color: var(--text-muted); font-family: inherit; font-size: 11px;
  font-weight: 700; padding: 6px 12px; border-radius: 7px;
  cursor: pointer; transition: 0.15s;
}
.aic-copy:hover { background: #EEF4FF; color: var(--card-text); }
.aic-instructions {
  margin: 0 24px 16px;
  background: #EEF4FF; border: 1px solid #BFDBFE;
  border-radius: 10px; padding: 12px 16px;
  font-size: 12px; color: var(--card-text); line-height: 1.6;
}
.aic-instructions strong { color: var(--blue-btn); display: block; margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.aic-instructions ol { margin: 0; padding-left: 18px; }
.aic-instructions li { margin-bottom: 4px; }
.aic-instructions li:last-child { margin-bottom: 0; }
.aic-actions {
  display: flex; gap: 10px; padding: 0 24px 22px;
}
.aic-actions .btn { flex: 1; text-align: center; padding: 11px 16px; font-size: 13px; }
.aic-actions .btn-primary { text-decoration: none; }

/* ── Misc helpers ──────────────────────────────────── */
.hidden { display: none !important; }
