/* ============================================================
   LoanFinal — Indigo Prime theme
   Light theme · deep indigo primary · offline-first PWA
   Vanilla CSS, no dependencies.
   ============================================================ */

:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-darker: #312E81;
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --text: #1E1B3A;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(30, 27, 58, 0.08), 0 4px 12px rgba(30, 27, 58, 0.06);
  --shadow-lg: 0 8px 28px rgba(49, 46, 129, 0.18);
  --green: #16A34A; --green-bg: #DCFCE7;
  --red: #DC2626;   --red-bg: #FEE2E2;
  --amber: #D97706; --amber-bg: #FEF3C7;
  --blue: #2563EB;  --blue-bg: #DBEAFE;
  --gray: #6B7280;  --gray-bg: #F3F4F6;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px; font-weight: 600; font-family: var(--font);
  cursor: pointer; min-height: 44px; /* big touch targets */
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: #EEF2FF; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--gray-bg); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: 13.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: none; background: transparent; color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--gray-bg); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; color: var(--text); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="tel"], select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: var(--font); background: #fff; color: var(--text);
  min-height: 46px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; min-width: 0; }
.form-error { color: var(--red); font-size: 13.5px; min-height: 20px; margin: 4px 0 8px; font-weight: 500; }
.form-hint { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary-darker) 0%, var(--primary-dark) 55%, #6D28D9 100%);
}
.login-card {
  background: #fff; border-radius: 18px; padding: 32px 30px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
}
.login-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-logo-mark {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, var(--primary-darker), var(--primary));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.login-logo h1 { margin: 0; font-size: 24px; letter-spacing: -0.3px; }
.login-logo p { margin: 2px 0 0; color: var(--text-muted); font-size: 13.5px; }
.tabs { display: flex; gap: 6px; background: var(--gray-bg); border-radius: 12px; padding: 5px; margin-bottom: 20px; }
.tab {
  flex: 1; border: none; background: transparent; border-radius: 9px;
  padding: 10px; font-size: 14.5px; font-weight: 600; font-family: var(--font);
  color: var(--text-muted); cursor: pointer; min-height: 42px;
}
.tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.login-note { text-align: center; color: var(--text-muted); font-size: 13px; margin: 18px 0 0; }

/* ---------- App layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 16px;
  background: #fff; border-bottom: 1px solid var(--border);
}
#hamburger { display: none; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-darker), var(--primary));
  color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
img.brand-logo {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  object-fit: contain; background: #fff; box-shadow: var(--shadow);
}
img.login-logo-img {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  object-fit: contain; background: #fff; box-shadow: var(--shadow);
}
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; color: var(--primary-darker); }
.topbar-spacer { flex: 1; }

.offline-banner {
  background: var(--amber-bg); color: #92400E; border: 1px solid #FDE68A;
  font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sync-badge {
  border: none; cursor: default; border-radius: 999px;
  padding: 8px 14px; font-size: 13.5px; font-weight: 700; font-family: var(--font);
  white-space: nowrap;
}
.sync-green { background: var(--green-bg); color: #15803D; }
.sync-orange { background: var(--amber-bg); color: #B45309; }
.sync-gray { background: var(--gray-bg); color: var(--gray); }

.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 5px 12px 5px 5px; cursor: pointer; font-family: var(--font);
}
.user-chip:hover { background: var(--gray-bg); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary), #6D28D9);
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.user-meta span { font-size: 14px; font-weight: 700; }
.user-meta small { font-size: 11.5px; color: var(--text-muted); text-transform: capitalize; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); min-width: 220px; overflow: hidden; z-index: 60;
}
.dropdown-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dropdown-head strong { display: block; font-size: 14.5px; }
.dropdown-head small { color: var(--text-muted); font-size: 12.5px; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border: none; background: none;
  font-size: 14.5px; font-family: var(--font); font-weight: 600;
  color: var(--red); cursor: pointer; text-align: left;
}
.dropdown-item:hover { background: #FEF2F2; }

.app-body { display: flex; min-height: calc(100vh - 64px); }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 248px; flex: none;
  background: linear-gradient(180deg, var(--primary-darker) 0%, var(--primary-dark) 100%);
  color: #E0E7FF;
  display: flex; flex-direction: column;
  position: sticky; top: 64px; height: calc(100vh - 64px);
}
.nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  color: #C7D2FE; text-decoration: none; font-size: 15px; font-weight: 600;
  min-height: 48px;
}
.nav-link svg { flex: none; opacity: 0.85; }
.nav-link:hover { background: rgba(255,255,255,0.10); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.16); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.12); }
.sidebar-hint { margin: 8px 0 0; font-size: 11.5px; color: #A5B4FC; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 48; }

/* ---------- Main content ---------- */
.content { flex: 1; min-width: 0; padding: 24px; max-width: 1180px; margin: 0 auto; width: 100%; }
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.view-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.3px; }
.view-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; }
.view-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 18px;
}
.card h2 { margin: 0 0 14px; font-size: 17px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; gap: 14px; align-items: center;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.stat-icon.indigo { background: linear-gradient(135deg, var(--primary-darker), var(--primary)); }
.stat-icon.red { background: linear-gradient(135deg, #B91C1C, #EF4444); }
.stat-icon.amber { background: linear-gradient(135deg, #B45309, #F59E0B); }
.stat-icon.green { background: linear-gradient(135deg, #15803D, #22C55E); }
.stat-body small { display: block; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.stat-body strong { font-size: 22px; letter-spacing: -0.5px; }

/* Status pills */
.pill {
  display: inline-flex; align-items: center; padding: 4px 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.pill-green { background: var(--green-bg); color: #15803D; }
.pill-red { background: var(--red-bg); color: #B91C1C; }
.pill-amber { background: var(--amber-bg); color: #B45309; }
.pill-blue { background: var(--blue-bg); color: #1D4ED8; }
.pill-gray { background: var(--gray-bg); color: #4B5563; }
.plan-badge .pill { font-size: 13px; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { background: #F8FAFC; color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFAFF; }
td .cell-sub { display: block; color: var(--text-muted); font-size: 12.5px; font-weight: 400; }
tr.clickable { cursor: pointer; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1.5px solid var(--border); background: #fff; border-radius: 999px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; font-family: var(--font);
  color: var(--text-muted); cursor: pointer; min-height: 38px;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Search + toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.search-box input { padding-left: 40px; margin: 0; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* Customer cards (mobile-friendly list) */
.entity-list { display: grid; gap: 10px; }
.entity-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); cursor: pointer;
}
.entity-card:hover { border-color: var(--primary); }
.entity-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: #EEF2FF; color: var(--primary); font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.entity-main { flex: 1; min-width: 0; }
.entity-main strong { font-size: 15.5px; display: block; }
.entity-main small { color: var(--text-muted); font-size: 13px; display: block; }
.entity-side { text-align: right; flex: none; }

/* Detail header */
.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.detail-head .entity-avatar { width: 64px; height: 64px; font-size: 24px; }
.detail-head h1 { margin: 0; font-size: 22px; }
.detail-head p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }

/* Charts */
.chart-wrap { position: relative; width: 100%; }
canvas.chart { width: 100%; height: 240px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; }

/* Modal */
.modal-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30,27,58,0.5); }
.modal {
  position: relative; background: #fff; border-radius: 18px;
  width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Toasts */
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 420px); }
.toast {
  background: var(--primary-darker); color: #fff; border-radius: 12px;
  padding: 13px 18px; font-size: 14.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); width: 100%; text-align: center;
  animation: toast-in 0.25s ease;
}
.toast.error { background: #B91C1C; }
.toast.ok { background: #15803D; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Quick actions */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* Schedule preview table */
.preview-note { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

/* Empty states */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty svg { margin-bottom: 10px; opacity: 0.5; }
.empty p { margin: 6px 0 16px; }

/* WhatsApp button */
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1DA851; }

/* Detail rows */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.kv div small { display: block; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; }
.kv div span { font-size: 15px; font-weight: 600; }

/* Notice box (advance only / info) */
.notice {
  border: 1.5px dashed var(--primary); background: #EEF2FF; color: var(--primary-darker);
  border-radius: var(--radius); padding: 22px; text-align: center; font-weight: 600;
}
.notice p { margin: 8px 0 0; font-weight: 400; font-size: 14px; color: var(--text-muted); }

/* Health grid (super admin) */
.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  #hamburger { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh; z-index: 49;
    transform: translateX(-105%); transition: transform 0.22s ease;
    width: 264px;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .content { padding: 16px; }
  .view-head h1 { font-size: 20px; }
  .offline-banner { display: none; } /* keep topbar compact on mobile */
  .user-meta { display: none; }
  .brand-name { display: none; }
  .form-row { flex-direction: column; gap: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  th, td { padding: 10px 10px; font-size: 13.5px; }
  .modal { max-width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-body strong { font-size: 18px; }
  .btn { min-height: 46px; }
  .quick-actions .btn { flex: 1 1 100%; }
}

/* Print-friendly for reports */
@media print {
  .sidebar, .topbar, .quick-actions, .view-actions, .modal-root, .toast-root { display: none !important; }
  .content { max-width: none; padding: 0; }
}

/* ============================================================
 * LANDING PAGE (index.html at /)
 * ============================================================ */
body.landing { background: #fff; }

.land-wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* Nav */
.land-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.land-nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.land-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.land-links { display: flex; gap: 24px; }
.land-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.land-links a:hover { color: var(--primary); }

/* Hero */
.land-hero { background: linear-gradient(135deg, #312E81 0%, #4F46E5 60%, #6366F1 100%); color: #fff; overflow: hidden; }
.land-hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 84px 22px 96px; }
.land-badge { display: inline-block; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; }
.land-hero h1 { font-size: 46px; line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.5px; }
.land-hero h1 .hl { color: #FCD34D; }
.land-sub { font-size: 18px; line-height: 1.65; color: rgba(255,255,255,.85); margin: 0 0 30px; max-width: 520px; }
.land-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.land-micro { font-size: 13.5px; color: rgba(255,255,255,.65); margin: 0; }
.land-center { text-align: center; }

/* CSS dashboard mock */
.mock-window { background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; transform: rotate(1.5deg); }
.mock-bar { display: flex; gap: 7px; padding: 12px 16px; background: #F3F4F6; }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: #D1D5DB; }
.mock-body { padding: 18px; }
.mock-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mock-stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.mock-stat small { display: block; font-size: 10px; color: var(--text-muted); margin-bottom: 4px; }
.mock-stat strong { font-size: 16px; color: var(--text); }
.mock-stat strong.red { color: var(--red); }
.mock-stat strong.amber { color: var(--amber); }
.mock-chart { height: 90px; background: linear-gradient(180deg, #EEF2FF, #F8FAFF); border-radius: 10px; margin-bottom: 14px; position: relative; overflow: hidden; }
.mock-line { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: linear-gradient(180deg, rgba(79,70,229,.35), rgba(79,70,229,.05)); clip-path: polygon(0 80%, 15% 55%, 30% 65%, 45% 35%, 60% 45%, 75% 20%, 90% 30%, 100% 5%, 100% 100%, 0 100%); }
.mock-rows { display: grid; gap: 8px; }
.mock-row { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 8px; padding: 9px 12px; }
.mock-row i { width: 26px; height: 26px; border-radius: 50%; background: #C7D2FE; flex-shrink: 0; }
.mock-row b { flex: 1; height: 10px; border-radius: 5px; background: #E5E7EB; }
.mock-row em { width: 54px; height: 18px; border-radius: 999px; font-style: normal; }
.mock-row em.pill-green { background: var(--green-bg); }
.mock-row em.pill-red { background: var(--red-bg); }
.mock-row em.pill-amber { background: var(--amber-bg); }

/* Trust strip */
.land-strip { border-bottom: 1px solid var(--border); background: #fff; }
.land-strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 22px; }
.strip-item { text-align: center; }
.strip-item strong { display: block; font-size: 30px; color: var(--primary); letter-spacing: -0.5px; }
.strip-item span { font-size: 14px; color: var(--text-muted); }

/* Sections */
.land-section { padding: 88px 0; }
.land-alt { background: var(--bg); }
.land-eyebrow { color: var(--primary); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 12px; }
.land-section h2 { font-size: 34px; letter-spacing: -0.5px; margin: 0 0 14px; }
.land-lead { font-size: 17px; color: var(--text-muted); max-width: 640px; margin: 0 0 44px; }

/* Feature grid */
/* Feature grid — compact cards with 3D depth */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px;
  box-shadow:
    0 1px 2px rgba(30,27,58,.05),
    0 12px 28px -14px rgba(79,70,229,.38),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(30,27,58,.06),
    0 20px 42px -14px rgba(79,70,229,.5),
    inset 0 1px 0 rgba(255,255,255,.9);
}
.land-alt .feat-card { border-color: transparent; }
.feat-icon {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 12px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--primary-darker), var(--primary) 60%, #818CF8);
  box-shadow: 0 8px 16px -8px rgba(79,70,229,.65), inset 0 1px 0 rgba(255,255,255,.35);
}
.feat-icon svg { width: 24px; height: 24px; }
.feat-card h3 { margin: 0 0 6px; font-size: 16px; }
.feat-card p { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); position: relative; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* Plans */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 880px; margin: 0 auto 26px; }
.plan-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow); position: relative; }
.plan-hot { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
.plan-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 16px; border-radius: 999px; white-space: nowrap; }
.plan-card h3 { font-size: 24px; margin: 0 0 4px; }
.plan-for { color: var(--text-muted); font-size: 14.5px; margin: 0 0 22px; }
.plan-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 11px; }
.plan-list li { position: relative; padding-left: 28px; font-size: 15px; }
.plan-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* CTA band */
.land-cta { background: linear-gradient(135deg, #312E81, #4F46E5); color: #fff; text-align: center; padding: 76px 22px; }
.land-cta h2 { font-size: 32px; margin: 0 0 10px; }
.land-cta p { color: rgba(255,255,255,.8); font-size: 17px; margin: 0 0 28px; }

/* Footer */
.land-footer { border-top: 1px solid var(--border); padding: 34px 0; background: #fff; }
.land-footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.land-copy { margin: 0 0 0 auto; font-size: 13.5px; color: var(--text-muted); }

/* Buttons: large + light variants */
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; min-height: 52px; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: #EEF2FF; }

/* ============================================================
 * AUTH PAGES (/login, /server)
 * ============================================================ */
body.auth-page { background: linear-gradient(135deg, #312E81 0%, #4F46E5 100%); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); padding: 36px 32px; width: 100%; max-width: 400px; }
.auth-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth-logo h1 { font-size: 22px; margin: 0; }
.auth-logo p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.auth-back { text-align: center; margin: 18px 0 0; font-size: 14px; }
.auth-back a { color: var(--primary); text-decoration: none; font-weight: 600; }
.brand-sub { font-size: 12px; font-weight: 500; color: var(--text-muted); }

/* Landing responsive */
@media (max-width: 900px) {
  .land-hero-inner { grid-template-columns: 1fr; padding: 60px 22px 70px; }
  .land-hero h1 { font-size: 34px; }
  .feat-grid, .steps { grid-template-columns: 1fr; }
  .land-strip-inner { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .land-links { display: none; }
  .land-copy { margin: 12px 0 0; }
}

/* ============================================================
 * LANDING REDESIGN v2 — glass nav, mesh hero, rich mockup,
 * floating cards, testimonials, FAQ accordion
 * ============================================================ */

/* Glassmorphism nav */
.land-nav-glass {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(229,231,235,.65);
  box-shadow: 0 4px 24px rgba(30,27,58,.06);
}
.land-nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.land-nav .land-brand { margin-right: 0; }

/* Hero mesh gradient */
.land-hero-mesh {
  background:
    radial-gradient(640px 420px at 12% 18%, rgba(165,180,252,.5), transparent 62%),
    radial-gradient(720px 520px at 88% 8%, rgba(109,40,217,.55), transparent 62%),
    radial-gradient(560px 560px at 72% 92%, rgba(79,70,229,.5), transparent 62%),
    linear-gradient(135deg, #1E1B4B 0%, #312E81 55%, #4F46E5 100%);
  color: #fff; position: relative; overflow: hidden;
}
.land-h1 {
  font-size: 54px; line-height: 1.06; letter-spacing: -1.2px;
  margin: 0 0 22px; font-weight: 800;
}
.land-h1 .hl {
  color: #FCD34D;
  background: linear-gradient(120deg, #FCD34D, #FDE68A);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.btn-outline-light {
  background: rgba(255,255,255,.08); color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
}
.btn-outline-light:hover { background: rgba(255,255,255,.18); }
.land-hero-fade {
  height: 56px; margin-top: -56px; position: relative;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.95));
}

/* Rich dashboard mockup */
.land-hero-visual { position: relative; }
.mock-rich { transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform .4s ease; }
.mock-rich:hover { transform: perspective(1200px) rotateY(-2deg) rotateX(0deg); }
.mock-bar em {
  margin-left: auto; font-style: normal; font-size: 11px; color: #9CA3AF;
  background: #fff; border: 1px solid #E5E7EB; border-radius: 6px; padding: 3px 10px;
}
.mock-body { display: flex; gap: 0; padding: 0; }
.mock-side {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 4px 18px 16px;
}
.mock-side i { width: 34px; height: 10px; border-radius: 5px; background: #E5E7EB; }
.mock-side i.on { background: var(--primary); width: 40px; }
.mock-main { flex: 1; padding: 16px; min-width: 0; }
.mock-chart-label {
  font-size: 11px; color: var(--text-muted); font-weight: 700;
  display: block; margin-bottom: 8px; letter-spacing: .3px;
}
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; }
.mock-bars i {
  flex: 1; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #4F46E5, #A5B4FC);
  height: var(--h); transform-origin: bottom;
  animation: bar-grow 1.1s cubic-bezier(.2,.8,.3,1) both;
}
.mock-bars i:nth-child(2) { animation-delay: .08s; }
.mock-bars i:nth-child(3) { animation-delay: .16s; }
.mock-bars i:nth-child(4) { animation-delay: .24s; }
.mock-bars i:nth-child(5) { animation-delay: .32s; }
.mock-bars i:nth-child(6) { animation-delay: .4s; background: linear-gradient(180deg, #16A34A, #86EFAC); }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Floating notification cards */
.float-card {
  position: absolute; z-index: 2;
  display: flex; gap: 10px; align-items: center;
  background: #fff; border-radius: 14px; padding: 12px 16px 12px 12px;
  box-shadow: 0 18px 44px rgba(30,27,58,.28);
  animation: float-y 5.5s ease-in-out infinite;
  max-width: 250px;
}
.float-card-1 { top: 6%; right: -18px; }
.float-card-2 { bottom: 8%; left: -26px; animation-delay: 2.6s; }
@keyframes float-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.float-ic {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
}
.float-ic.ok { background: linear-gradient(135deg, #15803D, #22C55E); }
.float-ic.wa { background: linear-gradient(135deg, #1DA851, #25D366); }
.float-card strong { display: block; font-size: 13.5px; color: var(--text); }
.float-card small { color: var(--text-muted); font-size: 12px; }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow); margin: 0;
  display: flex; flex-direction: column; gap: 20px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testi-card blockquote { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--text); flex: 1; }
.testi-card figcaption { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary-darker), var(--primary));
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.testi-card figcaption strong { display: block; font-size: 14.5px; }
.testi-card figcaption small { color: var(--text-muted); font-size: 13px; }

/* FAQ accordion */
.land-narrow { max-width: 780px; margin: 0 auto; padding: 0 22px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .18s ease;
}
.faq-item.open { box-shadow: var(--shadow); border-color: #C7D2FE; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 19px 22px; background: none; border: none; cursor: pointer; text-align: left;
  font-size: 16px; font-weight: 700; font-family: var(--font); color: var(--text);
}
.faq-q i { font-style: normal; font-size: 24px; line-height: 1; color: var(--primary); transition: transform .22s ease; flex: none; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.open .faq-a { max-height: 260px; }
.faq-a p { margin: 0; padding: 0 22px 22px; color: var(--text-muted); font-size: 15px; line-height: 1.65; }

/* ============================================================
 * SIGNUP PAGE
 * ============================================================ */
.auth-card-wide { max-width: 580px; }

/* ---------- Signup: 2-part split (form left, text right), compact ---------- */
.signup-split {
  display: flex; width: 100%; max-width: 920px; background: #fff;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.32);
}
.signup-form { flex: 1.12; padding: 26px 26px 22px; min-width: 0; }
.auth-logo-sm { margin-bottom: 18px; }
.auth-logo-sm .login-logo-img { width: 44px; height: 44px; border-radius: 12px; }
.auth-logo-sm h1 { font-size: 19px; }
.auth-logo-sm p { font-size: 13px; }
.signup-form-compact label { font-size: 13px; margin-bottom: 10px; }
.signup-form-compact input { padding: 9px 11px; font-size: 14px; }
.signup-form-compact .plan-pick-label { margin: 12px 0 8px; font-size: 13px; }
.signup-form-compact .plan-pick { gap: 8px; margin-bottom: 10px; }
.signup-form-compact .plan-pick-body { padding: 10px 12px; }
.signup-form-compact .plan-pick-body strong { font-size: 14px; }
.signup-form-compact .plan-pick-body small { font-size: 12px; }
.signup-form-compact .trial-badge { font-size: 11px; padding: 2px 8px; }
.signup-form-compact .btn-block { padding: 11px; font-size: 15px; }
.signup-form-compact .trial-note { margin: 10px 0 0; font-size: 12.5px; }
.auto-plan-box {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 12px;
  background: #EEF2FF; border: 1px solid #C7D2FE; border-radius: 12px; padding: 10px 14px;
}
.auto-plan-box strong { font-size: 14px; color: var(--primary-darker); }
.auto-plan-box span { font-size: 12.5px; color: var(--text-muted); }
.signup-side {
  flex: 1; color: #fff; padding: 34px 30px;
  background: linear-gradient(160deg, #1E1B4B 0%, #312E81 45%, #4F46E5 100%);
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.signup-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(320px 220px at 85% 12%, rgba(129,140,248,.45), transparent 65%),
    radial-gradient(280px 280px at 8% 95%, rgba(99,102,241,.35), transparent 65%);
}
.signup-side > * { position: relative; }
.signup-side-logo { width: 58px; height: 58px; border-radius: 16px; object-fit: contain; background: #fff; margin-bottom: 18px; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.signup-side h2 { margin: 0 0 10px; font-size: 25px; letter-spacing: -.4px; color: #fff; line-height: 1.25; }
.signup-side-sub { margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: #C7D2FE; }
.signup-points { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.signup-points li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.signup-points .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.signup-side-badge {
  align-self: flex-start; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  padding: 8px 14px; border-radius: 999px; color: #fff;
}
@media (max-width: 760px) {
  .signup-split { flex-direction: column; max-width: 480px; }
  .signup-side { padding: 24px 22px; }
  .signup-side h2 { font-size: 21px; }
  .signup-points { grid-template-columns: 1fr 1fr; gap: 8px; }
  .signup-points li { font-size: 12.5px; }
}
.plan-pick-label { font-weight: 700; font-size: 14px; margin: 8px 0 10px; color: var(--text); }
.plan-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.plan-pick-card { display: block; cursor: pointer; position: relative; }
.plan-pick-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick-body {
  display: block; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 14px 16px; height: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.plan-pick-body strong { display: block; font-size: 15.5px; margin-bottom: 4px; color: var(--text); }
.plan-pick-body small { color: var(--text-muted); font-size: 12.5px; line-height: 1.5; display: block; }
.plan-pick-card input:checked + .plan-pick-body {
  border-color: var(--primary); background: #EEF2FF;
  box-shadow: 0 0 0 3px rgba(79,70,229,.16);
}
.plan-pick-card input:focus-visible + .plan-pick-body { outline: 2px solid var(--primary); outline-offset: 2px; }
.form-ok {
  background: var(--green-bg); color: #15803D;
  border-radius: 10px; padding: 12px 16px;
  font-size: 14px; font-weight: 600; margin: 0 0 16px;
}
/* Trial badges + notes (signup page, staff app banner) */
.trial-badge {
  display: inline-block; margin-top: 8px; padding: 4px 10px;
  background: var(--green-bg); color: #15803D; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.trial-note {
  text-align: center; color: var(--text-muted); font-size: 13px; margin: 12px 0 0;
}
.trial-banner {
  background: var(--amber-bg); color: #92400E;
  border-bottom: 1px solid #FDE68A;
  font-size: 13.5px; font-weight: 600; text-align: center;
  padding: 8px 16px;
}

/* Landing v2 responsive */
@media (max-width: 900px) {
  .land-h1 { font-size: 37px; letter-spacing: -.6px; }
  .testi-grid { grid-template-columns: 1fr; }
  .float-card-1 { right: 0; }
  .float-card-2 { left: 0; }
  .mock-rich { transform: none; }
  .plan-pick { grid-template-columns: 1fr; }
  .land-nav-actions .btn-ghost { display: none; }
  .land-nav-actions { gap: 8px; }
}

/* ============================================================
 * CONTROL ROOM (/server) — mega panel components
 * ============================================================ */

/* KPI cards (clickable) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
  text-decoration: none; color: var(--text);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
a.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #C7D2FE; }

/* Row action button clusters (fleet table) */
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Expiry radar */
.radar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.radar-bucket {
  background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--gray);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.rb-red { border-top-color: #DC2626; }
.rb-orange { border-top-color: #EA580C; }
.rb-amber { border-top-color: #D97706; }
.rb-blue { border-top-color: #2563EB; }
.rb-purple { border-top-color: #7C3AED; }
.radar-bucket h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.radar-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 0; border-top: 1px dashed var(--border); }

/* Pure-CSS trend bars */
.css-bars { display: flex; align-items: stretch; gap: 8px; height: 190px; padding: 10px 4px 0; }
.css-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.css-bar {
  width: 100%; max-width: 44px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--primary), #A5B4FC);
  min-height: 4px;
}
.css-bar-label { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }

/* Rank medals */
.medal {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff;
}
.medal.gold { background: linear-gradient(135deg, #B45309, #FBBF24); }
.medal.silver { background: linear-gradient(135deg, #6B7280, #D1D5DB); }
.medal.bronze { background: linear-gradient(135deg, #92400E, #D97706); }

/* Pending-collection alert */
.alert-box {
  border: 1.5px solid #FCA5A5; background: #FEF2F2;
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
}
.alert-box h3 { margin: 0 0 8px; color: #B91C1C; font-size: 15px; }

/* Click-to-copy IP badge */
.ip-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; background: var(--gray-bg);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 8px; cursor: pointer; color: var(--text);
}
button.ip-badge:hover { background: #E5E7EB; }

/* Pagination */
.pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; justify-content: center; }
.pager .page-info { font-size: 13.5px; color: var(--text-muted); }

/* Big activation code display */
.code-big {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px; font-weight: 800; letter-spacing: 2px;
  background: #EEF2FF; border: 2px dashed var(--primary);
  border-radius: 12px; padding: 18px; text-align: center; margin: 14px 0;
}

/* AI chat */
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 380px; overflow-y: auto; padding: 6px 2px; margin-bottom: 12px; }
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; }
.chat-user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-ai { align-self: flex-start; background: var(--gray-bg); color: var(--text); border-bottom-left-radius: 4px; }
.chat-row { display: flex; gap: 10px; }
.chat-row input { margin: 0; flex: 1; }

/* Status dot (fleet health) */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; vertical-align: middle; }
.dot.on { background: #16A34A; box-shadow: 0 0 0 3px #DCFCE7; }
.dot.off { background: #9CA3AF; box-shadow: 0 0 0 3px #F3F4F6; }

/* Secret settings rows (integrations) */
.secret-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.secret-row label { flex: 1; min-width: 180px; margin: 0; }

/* Ticket rows + replies */
.ticket-row { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.ticket-row:hover { background: #FAFAFF; }
.reply { background: var(--gray-bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.reply small { display: block; color: var(--text-muted); margin-bottom: 4px; }
.reply.mine { background: #EEF2FF; }

/* Printer template picker + code editor */
.pt-grid { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.tpl-item {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer; background: #fff;
}
.tpl-item:hover { border-color: #C7D2FE; }
.tpl-item.active { border-color: var(--primary); background: #EEF2FF; }
.code-editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 280px; }

/* Info box */
.info-box {
  background: #EEF2FF; border: 1px solid #C7D2FE; color: var(--primary-darker);
  border-radius: var(--radius); padding: 14px 18px; font-size: 14px; margin-bottom: 18px;
}

/* Two-column cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
  .pt-grid { grid-template-columns: 1fr; }
  .code-big { font-size: 20px; letter-spacing: 1px; }
}
