/* ================================================================
   ACCELBIZ / SURYODAY1  —  main.css  v2
   Plus Jakarta Sans · Cyan-Navy Fintech · Light + Dark
   Exact match to reference dashboard DNA
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── CSS Variables ─ Light ────────────────────────────────── */
:root {
  --cyan:          #0EA5E9;
  --cyan-soft:     #38BDF8;
  --cyan-dim:      #0284C7;
  --cyan-glow:     rgba(14,165,233,.12);
  --cyan-glow2:    rgba(14,165,233,.06);
  --border-cyan:   rgba(14,165,233,.4);

  --red:           #EF4444;
  --red-glow:      rgba(239,68,68,.10);
  --green:         #22C55E;
  --green-glow:    rgba(34,197,94,.10);
  --amber:         #F59E0B;
  --amber-glow:    rgba(245,158,11,.10);
  --purple:        #8B5CF6;
  --purple-glow:   rgba(139,92,246,.10);

  --bg1:           #FFFFFF;
  --bg2:           #F8FAFC;
  --bg3:           #F1F5F9;
  --bg4:           #E2E8F0;

  --border:        #E2E8F0;
  --border2:       #CBD5E1;

  --text:          #0F172A;
  --text-dim:      #334155;
  --text-muted:    #94A3B8;
  --text-placeholder: #CBD5E1;

  --nav-h:         60px;
  --sidebar-w:     224px;
  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     20px;

  --shadow-sm:     0 1px 2px rgba(15,23,42,.06);
  --shadow:        0 1px 3px rgba(15,23,42,.08), 0 4px 12px rgba(15,23,42,.05);
  --shadow-lg:     0 8px 32px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.06);
  --shadow-cyan:   0 4px 20px rgba(14,165,233,.18);
  --transition:    .18s cubic-bezier(.4,0,.2,1);

  --bg-grid-line:  rgba(14,165,233,.07);
}

/* ── CSS Variables ─ Dark ─────────────────────────────────── */
[data-theme="dark"] {
  --cyan:          #38BDF8;
  --cyan-soft:     #7DD3FC;
  --cyan-dim:      #0EA5E9;
  --cyan-glow:     rgba(56,189,248,.13);
  --cyan-glow2:    rgba(56,189,248,.06);
  --border-cyan:   rgba(56,189,248,.35);

  --red:           #F87171;
  --red-glow:      rgba(248,113,113,.10);
  --green:         #4ADE80;
  --green-glow:    rgba(74,222,128,.10);
  --amber:         #FBBF24;
  --amber-glow:    rgba(251,191,36,.10);
  --purple:        #A78BFA;
  --purple-glow:   rgba(167,139,250,.10);

  --bg1:           #070D1A;
  --bg2:           #0C1322;
  --bg3:           #111B2E;
  --bg4:           #1A2640;

  --border:        #1E2D45;
  --border2:       #263650;

  --text:          #EFF6FF;
  --text-dim:      #94A3B8;
  --text-muted:    #475569;
  --text-placeholder: #2D3F58;

  --shadow-sm:     0 1px 2px rgba(0,0,0,.3);
  --shadow:        0 1px 4px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.5);
  --shadow-cyan:   0 4px 24px rgba(56,189,248,.15);

  --bg-grid-line:  rgba(56,189,248,.05);
}

/* ── Body ─────────────────────────────────────────────────── */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Grid Background ──────────────────────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--bg-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg1);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 16px;
  z-index: 100;
}
[data-theme="dark"] nav { background: rgba(7,13,26,.95); backdrop-filter: blur(16px); }

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-brand img {
  width: 36px; height: 36px;
  border-radius: 9px;
  object-fit: contain;
  background: var(--bg3);
  border: 1.5px solid var(--border);
}
.nav-title { display: block; font-size: 14px; font-weight: 800; letter-spacing: -.4px; line-height: 1.15; color: var(--text); }
.nav-sub   { display: block; font-size: 9.5px; font-weight: 600; color: var(--text-muted); letter-spacing: .6px; text-transform: uppercase; margin-top: 1px; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  cursor: default;
}
.nav-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--cyan) 0%, #6366F1 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14,165,233,.3);
}

/* Theme Toggle */
.theme-toggle {
  width: 52px; height: 28px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  display: flex; align-items: center;
  padding: 0 5px;
  justify-content: space-between;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-cyan); }
.toggle-track { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.toggle-track i { font-size: 10px; color: var(--text-muted); z-index: 1; pointer-events: none; }
.toggle-thumb {
  position: absolute; left: 3px;
  width: 20px; height: 20px;
  background: var(--cyan);
  border-radius: 50%;
  transition: left .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 6px var(--cyan-glow);
}
[data-theme="dark"] .toggle-thumb { left: calc(100% - 23px); }

.btn-logout {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); background: var(--red-glow); }

/* ── Layout ───────────────────────────────────────────────── */
.app-layout {
  display: flex;
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
  position: relative; z-index: 1;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  left: 0; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  background: var(--bg2);
  border-right: 1.5px solid var(--border);
  padding: 14px 10px 24px;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 10px 5px;
  margin-top: 2px;
}
.sidebar-label:first-child { padding-top: 4px; margin-top: 0; }

.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-dim);
  font-weight: 600; font-size: 13px;
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
}
.sidebar-item i { font-size: 15px; flex-shrink: 0; }
.sidebar-item:hover { background: var(--bg3); color: var(--text); border-color: var(--border); }
.sidebar-item.active {
  background: var(--cyan-glow);
  color: var(--cyan);
  border-color: var(--border-cyan);
}
.sidebar-item.active i { color: var(--cyan); }

.sidebar-badge {
  margin-left: auto;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 50px;
  line-height: 1.7;
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; padding: 32px 28px; min-width: 0;
}

.fade-up { animation: fadeUp .32s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header-row {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 28px; font-weight: 800;
  letter-spacing: -.6px; color: var(--text);
  line-height: 1.2; margin: 7px 0 8px;
}
.page-header p { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }

.tool-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px 4px 8px;
  background: var(--cyan-glow2);
  border: 1.5px solid var(--border-cyan);
  border-radius: 50px;
  font-size: 11px; font-weight: 700;
  color: var(--cyan);
  letter-spacing: .5px; text-transform: uppercase;
}
.dot {
  width: 7px; height: 7px;
  background: var(--cyan); border-radius: 50%;
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.75); }
}

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px; margin-bottom: 22px;
}
.stat {
  background: var(--bg1);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), #6366F1);
  opacity: 0; transition: opacity .2s;
}
.stat:hover { border-color: var(--border-cyan); box-shadow: 0 0 0 3px var(--cyan-glow2), var(--shadow); }
.stat:hover::before { opacity: 1; }
.stat-value {
  font-size: 30px; font-weight: 800;
  letter-spacing: -1.5px; color: var(--text);
  line-height: 1; margin-bottom: 7px;
}
.stat-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .4px; text-transform: uppercase;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg1);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 0;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.card-desc  { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }
.card-body  { padding: 18px 22px 22px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px;
  background: var(--cyan); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: var(--transition); white-space: nowrap;
  box-shadow: 0 2px 8px rgba(14,165,233,.25);
}
.btn-primary:hover { background: var(--cyan-soft); box-shadow: var(--shadow-cyan); transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: var(--transition); white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--border-cyan); color: var(--cyan); background: var(--cyan-glow2); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--red-glow); border: 1.5px solid var(--red);
  border-radius: var(--radius-sm); color: var(--red);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: var(--transition);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-sm  { padding: 5px 12px !important; font-size: 12px !important; }
.btn-lg  { padding: 11px 24px !important; font-size: 14px !important; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-dim);
  cursor: pointer; font-size: 15px; transition: var(--transition);
  text-decoration: none;
}
.btn-icon:hover { border-color: var(--border-cyan); color: var(--cyan); background: var(--cyan-glow2); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 50px;
  font-size: 11px; font-weight: 700; letter-spacing: .1px; white-space: nowrap;
}
.badge i { font-size: 10px; }
.badge-cyan   { background: var(--cyan-glow);   color: var(--cyan);   border: 1px solid var(--border-cyan); }
.badge-green  { background: var(--green-glow);  color: var(--green);  border: 1px solid rgba(34,197,94,.28); }
.badge-red    { background: var(--red-glow);    color: var(--red);    border: 1px solid rgba(239,68,68,.28); }
.badge-amber  { background: var(--amber-glow);  color: var(--amber);  border: 1px solid rgba(245,158,11,.28); }
.badge-gray   { background: var(--bg3);         color: var(--text-muted); border: 1px solid var(--border); }
.badge-purple { background: var(--purple-glow); color: var(--purple); border: 1px solid rgba(139,92,246,.28); }

/* ── Campaign Cards ───────────────────────────────────────── */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.campaign-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px; cursor: pointer;
  transition: var(--transition);
}
.campaign-card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow2), var(--shadow);
  transform: translateY(-2px);
}
.cc-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.cc-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-muted); font-weight: 500;
  margin-bottom: 12px;
}
.cc-meta i { font-size: 11px; }
.cc-progress { margin-bottom: 12px; }
.cc-progress-bar { height: 5px; background: var(--bg4); border-radius: 50px; overflow: hidden; margin-bottom: 6px; }
.cc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), #6366F1);
  border-radius: 50px; transition: width .6s ease;
}
.cc-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); font-weight: 500; }
.cc-footer { display: flex; align-items: center; justify-content: space-between; }
.cc-channels { display: flex; gap: 6px; }
.cc-ch { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.cc-ch.wa { background: rgba(37,211,102,.12); color: #25D366; border: 1px solid rgba(37,211,102,.28); }
.cc-ch.em { background: var(--cyan-glow); color: var(--cyan); border: 1px solid var(--border-cyan); }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 10px 14px; text-align: left;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-muted); letter-spacing: .5px; text-transform: uppercase;
  background: var(--bg2); border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-dim); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg2); }
.td-primary { color: var(--text) !important; font-weight: 600; }
.td-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 12px; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 7px; letter-spacing: .1px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 13px;
  background: var(--bg1); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 500;
  transition: var(--transition); outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-placeholder); }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow2); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 36px; cursor: pointer; }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; font-weight: 500; }
.input-group { display: flex; gap: 8px; }
.input-group .form-input { flex: 1; }

/* ── File Drop ────────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border2); border-radius: var(--radius);
  padding: 34px 24px; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--bg2);
}
.file-drop:hover, .file-drop.drag-over { border-color: var(--cyan); background: var(--cyan-glow2); }
.file-drop-icon { font-size: 38px; color: var(--text-muted); margin-bottom: 10px; display: block; }
.file-drop h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.file-drop p  { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.file-drop input[type="file"] { display: none; }
.file-selected { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--bg3); border: 1.5px solid var(--border-cyan); border-radius: var(--radius-sm); margin-top: 10px; }
.file-selected i { color: var(--green); font-size: 18px; flex-shrink: 0; }
.file-selected-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-selected-size { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.file-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 2px; flex-shrink: 0; }
.file-clear:hover { color: var(--red); }

/* ── Template Cards ───────────────────────────────────────── */
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.template-card { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; transition: var(--transition); }
.template-card:hover { border-color: var(--border-cyan); box-shadow: 0 0 0 3px var(--cyan-glow2); }
.template-lang { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.template-lang-flag { width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--cyan-glow); border: 1.5px solid var(--border-cyan); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.template-lang-name { font-size: 15px; font-weight: 700; color: var(--text); }
.template-lang-code { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.template-status { margin-bottom: 14px; }
.template-uploaded { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-dim); font-weight: 500; }
.template-uploaded i { font-size: 13px; }
.template-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Live Tracking ────────────────────────────────────────── */
.live-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; margin-bottom: 20px; }
.live-stat { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.live-stat-val { font-size: 24px; font-weight: 800; letter-spacing: -1px; color: var(--text); line-height: 1; margin-bottom: 5px; }
.live-stat-lbl { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }

.big-progress { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.big-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.big-progress-pct { font-size: 34px; font-weight: 800; color: var(--cyan); letter-spacing: -2px; }
.big-progress-bar { height: 10px; background: var(--bg4); border-radius: 50px; overflow: hidden; }
.big-progress-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), #6366F1); border-radius: 50px; transition: width 1s ease; }
.big-progress-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--text-muted); font-weight: 500; }

.speed-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: var(--cyan-glow); border: 1.5px solid var(--border-cyan); border-radius: 50px; font-size: 12px; font-weight: 700; color: var(--cyan); }

.log-feed { background: var(--bg1); border: 1.5px solid var(--border); border-radius: var(--radius-sm); height: 280px; overflow-y: auto; padding: 12px; font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 11.5px; scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }
.log-entry { padding: 2px 0; color: var(--text-dim); line-height: 1.7; }
.log-entry.log-ok   { color: var(--green); }
.log-entry.log-err  { color: var(--red); }
.log-entry.log-warn { color: var(--amber); }
.log-time { color: var(--text-muted); margin-right: 8px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius-lg); width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); transform: translateY(16px) scale(.98); transition: transform .25s cubic-bezier(.4,0,.2,1); }
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 22px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title  { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-close  { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; padding: 2px; }
.modal-close:hover { color: var(--red); }
.modal-body   { padding: 18px 24px; }
.modal-footer { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--border); margin-bottom: 20px; }
.tab-btn { padding: 9px 16px; background: none; border: none; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { padding: 48px 24px; text-align: center; }
.empty-state i { font-size: 40px; color: var(--text-muted); display: block; margin-bottom: 14px; opacity: .4; }
.empty-state h4 { font-size: 15px; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--text-muted); }

/* ── Toast ────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; right: 24px; display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 600; color: var(--text); z-index: 999; transform: translateY(100px); opacity: 0; transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s; pointer-events: none; }
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Spinner ──────────────────────────────────────────────── */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--border); border-top-color: var(--cyan); border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px; color: var(--text-muted); font-weight: 500; }

/* ── Login Page ───────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 410px; background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 40px 36px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-error { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--red-glow); border: 1.5px solid rgba(239,68,68,.28); border-radius: var(--radius-sm); color: var(--red); font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* ── Settings ─────────────────────────────────────────────── */
.settings-section { background: var(--bg1); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.settings-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1.5px solid var(--border); display: flex; align-items: center; gap: 8px; }
.settings-section-title i { color: var(--cyan); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

/* ── Version History ──────────────────────────────────────── */
.version-list { display: flex; flex-direction: column; gap: 8px; }
.version-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg3); border: 1.5px solid var(--border); border-radius: var(--radius-sm); }
.version-num { font-size: 12px; font-weight: 700; color: var(--cyan); min-width: 28px; }
.version-name { font-size: 13px; color: var(--text-dim); font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.version-current { border-color: var(--border-cyan) !important; background: var(--cyan-glow2) !important; }

/* ── Divider ──────────────────────────────────────────────── */
.divider { height: 1.5px; background: var(--border); margin: 20px 0; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utilities ────────────────────────────────────────────── */
.text-cyan   { color: var(--cyan)   !important; }
.text-red    { color: var(--red)    !important; }
.text-green  { color: var(--green)  !important; }
.text-amber  { color: var(--amber)  !important; }
.text-muted  { color: var(--text-muted)  !important; }
.text-dim    { color: var(--text-dim)    !important; }
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.mb-0   { margin-bottom: 0 !important; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-100  { width: 100%; }
.hidden { display: none !important; }