/* V-Claim Voice Dashboard */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f0f2f5;
  --white: #fff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --light: #94a3b8;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #d97706;
  --purple: #7c3aed;
  --header: #1a1f2e;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  font-size: 15px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Login ── */
.login-overlay {
  position: fixed; inset: 0;
  background: rgba(15,19,32,.88);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--white); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  width: 100%; max-width: 360px;
  padding: 40px 32px 28px; text-align: center;
}
.login-logo { font-size: 28px; font-weight: 800; color: var(--blue); margin-bottom: 4px; }
.login-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.login-field {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; margin-bottom: 12px; outline: none;
}
.login-field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.login-btn {
  width: 100%; padding: 14px;
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 700; cursor: pointer;
}
.login-btn:hover { background: #1d4ed8; }
.login-error { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 20px; }

/* ── Header ── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 52px; background: var(--header); color: #e8eaf0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 100;
}
.top-bar-left { display: flex; align-items: center; gap: 10px; }
.logo-title { font-size: 17px; font-weight: 700; color: #fff; }
.top-bar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  background: rgba(255,255,255,.1); border: none; color: #e8eaf0;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.2); }

/* WS */
.ws-indicator { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.ws-connected { background: #14532d; color: #86efac; }
.ws-disconnected { background: #3f1515; color: #fca5a5; }
.ws-connecting { background: #422006; color: #fde68a; }

/* ── App Content ── */
.app-content {
  position: fixed; top: 52px; left: 0; right: 0; bottom: 64px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.tab-page {
  display: none;
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.tab-page.active { display: block; }

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px; background: var(--white);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none;
  color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; padding: 8px 16px; border-radius: 12px;
  transition: all .15s; position: relative; min-width: 60px;
}
.nav-item.active { color: var(--blue); }
.nav-item.active svg { stroke: var(--blue); stroke-width: 2.5; }
.nav-item:hover { background: rgba(37,99,235,.06); }
.nav-dot {
  position: absolute; top: 4px; right: 12px;
  width: 8px; height: 8px; background: var(--green);
  border-radius: 50%; border: 2px solid var(--white);
}

/* ── Stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.stat-card.stat-active .stat-value { color: var(--green); }
.stat-card.stat-completed .stat-value { color: var(--blue); }
.stat-card.stat-noanswer .stat-value { color: var(--orange); }

/* ── Search ── */
.search-box { position: relative; margin-bottom: 16px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.search-input {
  width: 100%; padding: 14px 14px 14px 42px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; background: var(--white); outline: none;
}
.search-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }

/* ── Filter Pills ── */
.filter-pills { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--white); color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap; min-height: 36px;
}
.filter-pill:hover { border-color: var(--blue); background: #f0f7ff; }
.filter-pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.filter-pill.active .pill-count { background: rgba(255,255,255,.25); }
.pill-count {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
  background: var(--gray-50); min-width: 20px; text-align: center;
}

/* ── Sections ── */
.section-group { margin-bottom: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.clr-customer { color: var(--green); }
.clr-employee { color: var(--blue); }
.header-actions { display: flex; gap: 6px; }

/* ── Contact Cards ── */
.card-list { display: flex; flex-direction: column; gap: 6px; }
.contact-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .15s; gap: 12px;
}
.contact-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.contact-card:active { transform: scale(.98); }
.card-main { flex: 1; min-width: 0; }
.card-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.card-phone { font-size: 12px; font-family: "SF Mono", monospace; color: var(--muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .15s; white-space: nowrap; min-height: 44px;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 40px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-customer { background: var(--green); color: #fff; }
.btn-employee { background: var(--blue); color: #fff; }
.btn-outline { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-excel { background: #217346; color: #fff; }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite; margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status Badges ── */
.status-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; padding: 3px 10px; border-radius: 20px;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-completed { background: #dbeafe; color: #1e40af; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-noanswer { background: #fef9c3; color: #92400e; }
.badge-initiated { background: #e0f2fe; color: #0369a1; }
.badge-unknown { background: #f3f4f6; color: #6b7280; }

/* ── Empty State ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center; color: var(--muted); gap: 8px;
}
.empty-state p { font-size: 16px; }
.empty-state .hint { font-size: 13px; color: var(--light); }

/* ── Live Call ── */
.call-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px;
}
.call-info { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.call-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.call-timer { font-size: 20px; font-weight: 800; font-family: "SF Mono", monospace; color: var(--blue); }
.call-meta { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.meta-chip { font-size: 12px; padding: 4px 12px; background: var(--white); border: 1px solid var(--border); border-radius: 20px; color: var(--muted); }
.meta-chip.mono { font-family: "SF Mono", monospace; font-size: 11px; }
.transcript-area {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; min-height: 300px; max-height: 60vh; overflow-y: auto; margin-bottom: 8px;
}
.transcript-msg { margin-bottom: 12px; display: flex; flex-direction: column; gap: 3px; }
.msg-meta { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.msg-bubble { display: inline-block; max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.msg-ai .msg-bubble { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-bottom-left-radius: 4px; }
.msg-user .msg-bubble { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-user { align-items: flex-end; }
.msg-system .msg-bubble { background: #fef9c3; color: #92400e; font-style: italic; font-size: 13px; }
.call-actions { padding: 0; }

/* ── Session List ── */
.session-list { display: flex; flex-direction: column; gap: 6px; }
.session-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .15s; gap: 12px;
}
.session-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.session-card:active { transform: scale(.98); }
.session-left { flex: 1; min-width: 0; }
.session-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.session-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.session-duration { font-size: 13px; font-weight: 700; font-family: "SF Mono", monospace; }

/* ── Session Detail ── */
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--blue);
  font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 0; margin-bottom: 12px;
}
.btn-back:hover { text-decoration: underline; }
.detail-header {
  background: linear-gradient(135deg, #1e3a5f, var(--blue));
  color: #fff; padding: 20px; border-radius: var(--radius); margin-bottom: 12px;
}
.detail-info-row { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; }
.detail-label { font-size: 12px; opacity: .8; min-width: 70px; }
.detail-value { font-size: 14px; font-weight: 600; }
.detail-chat { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.chat-bubble-row { display: flex; flex-direction: column; gap: 3px; }
.chat-bubble-row.bubble-ai .chat-bubble-msg { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-bubble-row.bubble-human .chat-bubble-msg { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-bubble-row.bubble-human { align-items: flex-end; }
.chat-bubble-row.bubble-system .chat-bubble-msg { background: #fef3c7; border: 1px solid #fde68a; color: #78350f; align-self: center; font-style: italic; }
.chat-bubble-msg { display: inline-block; max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.chat-bubble-label { font-size: 10px; color: var(--muted); font-weight: 600; }
.detail-audio { padding: 12px 0; }

/* ── Sub Tabs ── */
.sub-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.sub-tab {
  padding: 10px 18px; border: 1px solid var(--border); background: var(--white);
  border-radius: 20px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; white-space: nowrap; transition: all .15s;
}
.sub-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.sub-tab:hover:not(.active) { background: #f1f5f9; }
.sub-page { display: none; }
.sub-page.active { display: block; }
.tab-count { font-size: 10px; font-weight: 700; background: rgba(0,0,0,.1); padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.sub-tab.active .tab-count { background: rgba(255,255,255,.25); }

/* ── Config ── */
.config-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 12px; }
.config-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.config-form { display: flex; flex-direction: column; gap: 12px; }
.form-label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.form-input { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; min-height: 44px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.retry-badge { font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 700; }
.retry-enabled { background: #dcfce7; color: #166534; }
.retry-disabled { background: #fee2e2; color: #991b1b; }

/* ── Extracted Cards ── */
.extracted-cards { display: flex; flex-direction: column; gap: 12px; }
.ext-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ext-card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: linear-gradient(135deg, #1e3a5f, var(--blue)); color: #fff; }
.ext-card-header-left { display: flex; align-items: center; gap: 10px; }
.ext-card-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.ext-card-name { font-size: 15px; font-weight: 700; }
.ext-card-company { font-size: 11px; opacity: .8; }
.ext-card-id { font-size: 10px; font-family: "SF Mono", monospace; background: rgba(255,255,255,.15); padding: 2px 8px; border-radius: 10px; }
.ext-card-body { padding: 0; }
.ext-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ext-info-item { padding: 10px 16px; border-right: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; }
.ext-info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.ext-info-value { font-size: 13px; font-weight: 600; }
.ext-info-value.phone-value { font-family: "SF Mono", monospace; color: var(--blue); }
.ext-detail-chip { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #eff6ff; color: #1e40af; }
.chip-green { background: #dcfce7; color: #166534; }
.chip-orange { background: #fef9c3; color: #92400e; }
.chip-red { background: #fee2e2; color: #991b1b; }
.chip-purple { background: #f3e8ff; color: #6b21a8; }
.ext-inspector-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.ext-section { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ext-section:last-child { border-bottom: none; }
.ext-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.section-customer-calls { color: var(--green); }
.section-inspector-calls { color: var(--blue); }
.ext-timeline { display: flex; flex-direction: column; gap: 6px; }
.ext-timeline-item { display: flex; gap: 10px; padding: 8px 12px; background: #fafbfc; border-radius: 6px; border-left: 3px solid var(--blue); font-size: 12px; }
.ext-timeline-item.timeline-customer { border-left-color: var(--green); }
.ext-timeline-item.timeline-inspector { border-left-color: var(--blue); }
.ext-timeline-time { font-size: 11px; color: var(--muted); font-family: "SF Mono", monospace; min-width: 100px; white-space: nowrap; }
.ext-timeline-body { flex: 1; }
.ext-timeline-detail { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ext-inspector-block { display: flex; flex-direction: column; gap: 2px; }

/* ── Chart ── */
.chart-bar-container { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 0 4px; }
.chart-bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 28px; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }
.bar-completed { background: var(--green); }
.bar-noanswer { background: var(--orange); }
.bar-total { background: var(--blue); }
.chart-bar-label { font-size: 9px; color: var(--muted); margin-top: 4px; }
.chart-bar-value { font-size: 10px; font-weight: 600; margin-bottom: 2px; }
.chart-legend { display: flex; gap: 12px; margin-top: 8px; justify-content: center; }
.chart-legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.chart-legend-dot { width: 8px; height: 8px; border-radius: 2px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--header); color: #fff;
  padding: 12px 24px; border-radius: var(--radius);
  font-size: 14px; box-shadow: var(--shadow-md);
  z-index: 9999; max-width: 90vw; text-align: center;
}
.toast-error { background: #991b1b; }
.toast-success { background: #166534; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-content { background: var(--white); border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,.3); display: flex; flex-direction: column; max-height: 90vh; overflow: hidden; }
.modal-wide { width: 95vw; max-width: 900px; height: 80vh; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 16px; font-weight: 700; }
.modal-body-split { display: flex; flex: 1; min-height: 0; }
.db-sidebar { width: 240px; border-right: 1px solid var(--border); overflow-y: auto; background: #fafbfc; flex-shrink: 0; }
.db-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.db-file-list { padding: 8px; }
.db-file-item { padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; margin-bottom: 4px; }
.db-file-item:hover { background: #eff6ff; border-color: #bfdbfe; }
.db-file-item.active { background: #dbeafe; border-color: var(--blue); }
.db-file-item-name { font-size: 13px; font-weight: 600; }
.db-file-item-meta { font-size: 10px; color: var(--muted); display: flex; gap: 8px; margin-top: 2px; }
.db-file-header { padding: 12px 16px; border-bottom: 1px solid var(--border); background: #f8fafc; font-size: 14px; font-weight: 700; font-family: "SF Mono", monospace; }
.db-file-stats { padding: 8px 16px; display: flex; gap: 8px; border-bottom: 1px solid var(--border); }
.stat-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; background: #eff6ff; color: #1e40af; }
.db-json-view { flex: 1; overflow: auto; }
.db-json-pre { margin: 0; padding: 14px 16px; font-family: "SF Mono", monospace; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.json-key { color: var(--purple); font-weight: 600; }
.json-string { color: var(--green); }
.json-number { color: var(--blue); }
.json-bool { color: var(--orange); font-weight: 600; }
.json-null { color: var(--light); font-style: italic; }

/* ── Misc ── */
.loading-msg { text-align: center; color: var(--muted); font-style: italic; padding: 30px; }
.phone { font-family: "SF Mono", monospace; font-size: 12px; color: var(--muted); }

/* ── Mobile ── */
@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .ext-info-grid { grid-template-columns: 1fr 1fr; }
  .ext-inspector-row { grid-template-columns: 1fr; }
  .modal-wide { width: 100vw; height: 100vh; border-radius: 0; }
  .modal-body-split { flex-direction: column; }
  .db-sidebar { width: 100%; max-height: 180px; border-right: none; border-bottom: 1px solid var(--border); }
}

@media (min-width: 1200px) {
  .tab-page { max-width: 1000px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
