/* ============================================================
   KajerHisab — Premium App Stylesheet (v2)
   Fonts : Plus Jakarta Sans (Latin) + Hind Siliguri (Bangla) + JetBrains Mono (numbers)
   Works : Desktop · Tablet · Mobile (bottom navigation) · Light / Dark
   ============================================================ */

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --primary-soft: rgba(13,148,136,.10);
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;

  --grad-brand: linear-gradient(135deg, #0d9488 0%, #0891b2 55%, #2563eb 120%);
  --grad-gold:  linear-gradient(135deg, #f59e0b, #f97316);

  --sidebar-bg: #08111f;
  --sidebar-bg-2: #0b1d2e;
  --sidebar-text: #8fa3bd;
  --sidebar-active: #14b8a6;
  --sidebar-hover: rgba(20,184,166,.10);
  --sidebar-border: rgba(255,255,255,.06);
  --sidebar-width: 272px;

  --bg: #f3f6fb;
  --bg-card: #ffffff;
  --bg-soft: #f8fafc;
  --text: #0b1324;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --muted: #64748b;
  --border: #e5e9f2;
  --border-focus: #0d9488;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.05);
  --shadow-md: 0 8px 30px rgba(15,23,42,.10);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.18);
  --transition: .22s cubic-bezier(.4,0,.2,1);
  --topbar-h: 66px;
  --bottom-nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #060b14;
  --bg-card: #0e1626;
  --bg-soft: #0a1220;
  --text: #e8eefb;
  --text-muted: #8da0bd;
  --text-light: #5f7392;
  --muted: #8da0bd;
  --border: #1b2740;
  --primary-light: rgba(20,184,166,.16);
  --accent-light: rgba(245,158,11,.16);
  --danger-light: rgba(239,68,68,.16);
  --success-light: rgba(16,185,129,.16);
  --info-light: rgba(59,130,246,.18);
  --purple-light: rgba(139,92,246,.18);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-md: 0 10px 34px rgba(0,0,0,.5);
  --sidebar-bg: #050a14;
  --sidebar-bg-2: #08121f;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }
::selection { background: rgba(13,148,136,.25); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* ============ Sidebar ============ */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  z-index: 300;
  transition: transform var(--transition);
  border-right: 1px solid var(--sidebar-border);
}
.sidebar::before {
  content: ''; position: absolute; top: -80px; left: -80px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(20,184,166,.28), transparent 70%);
  pointer-events: none;
}
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; position: relative;
}
.sidebar-logo { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.logo-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(20,184,166,.35), inset 0 0 0 1px rgba(255,255,255,.3);
  overflow: hidden; padding: 4px;
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-text {
  font-size: 1.08rem; font-weight: 800; color: #f8fafc; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.logo-sub { display: block; font-size: .68rem; color: var(--sidebar-text); font-weight: 500; letter-spacing: .04em; }
.sidebar-close {
  display: none; background: rgba(255,255,255,.06); border: none; color: var(--sidebar-text);
  width: 34px; height: 34px; border-radius: 10px; font-size: 15px; cursor: pointer;
}
.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 14px 8px; padding: 12px 14px;
  background: rgba(255,255,255,.04); border: 1px solid var(--sidebar-border); border-radius: 14px;
  position: relative;
}
.user-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.15);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { min-width: 0; }
.user-company { font-size: .86rem; font-weight: 700; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.user-plan { font-size: .72rem; margin-top: 2px; font-weight: 600; }
.user-plan.plan-paid { color: #fbbf24; }
.user-plan.plan-free { color: var(--sidebar-text); }

.sidebar-nav { flex: 1; padding: 10px 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; position: relative; }
.nav-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: #52657f; padding: 12px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  color: var(--sidebar-text); text-decoration: none;
  font-size: .88rem; font-weight: 600;
  transition: all var(--transition); white-space: nowrap; position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: #f1f5f9; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(20,184,166,.28), rgba(8,145,178,.14));
  color: #5eead4; box-shadow: inset 0 0 0 1px rgba(20,184,166,.25);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 22%; bottom: 22%; width: 4px;
  background: var(--sidebar-active); border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 17px; width: 22px; text-align: center; }
.nav-divider { height: 1px; background: var(--sidebar-border); margin: 10px 4px; }
.nav-logout:hover { color: #fca5a5; background: rgba(239,68,68,.12); }
.sidebar-foot { padding: 12px 18px 18px; font-size: .7rem; color: #4b5d78; text-align: center; border-top: 1px solid var(--sidebar-border); }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(2,6,15,.6); backdrop-filter: blur(3px);
  z-index: 250; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.sidebar-overlay.show { opacity: 1; pointer-events: auto; }

/* ============ Main + Topbar ============ */
.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg-card) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px; position: sticky; top: 0; z-index: 100;
}
.topbar-menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 4.5px;
  width: 42px; height: 42px; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; padding: 0 11px;
}
.topbar-menu-btn span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.topbar-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-brand { display: none; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.topbar-brand img { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
.topbar-brand b { font-size: 1rem; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.topbar-ctrl-btn, .notif-btn {
  position: relative; height: 40px; min-width: 40px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--text); cursor: pointer; font-size: 15px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; transition: all var(--transition);
}
.topbar-ctrl-btn:hover, .notif-btn:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.topbar-lang-btn { font-size: .8rem; }
.notif-btn svg { width: 19px; height: 19px; }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 10px; font-size: .66rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-card);
}
.topbar-avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; overflow: hidden;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.main-content { padding: 26px 28px 40px; max-width: 1500px; width: 100%; margin: 0 auto; flex: 1; min-width: 0; }

/* ============ Page header ============ */
.page-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-header h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: var(--text-muted); font-size: .86rem; margin-top: 2px; }

/* ============ Cards ============ */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
a.card { text-decoration: none; color: inherit; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: .98rem; font-weight: 800; letter-spacing: -.01em; }
.card-body { padding: 22px; }

/* ============ Hero balance (dashboard) ============ */
.hero-balance {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; color: #fff;
  background: linear-gradient(135deg, #064e4b 0%, #0d9488 45%, #0891b2 100%);
  box-shadow: 0 18px 40px rgba(13,148,136,.28);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-balance.loss { background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 55%, #f97316 120%); box-shadow: 0 18px 40px rgba(220,38,38,.28); }
.hero-balance::before, .hero-balance::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none;
}
.hero-balance::before { width: 260px; height: 260px; right: -60px; top: -110px; }
.hero-balance::after  { width: 180px; height: 180px; right: 120px; bottom: -110px; }
.hb-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; opacity: .8; font-weight: 700; }
.hb-value { font-family: var(--mono); font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -.03em; margin: 4px 0; line-height: 1.1; word-break: break-word; }
.hb-formula { font-size: .78rem; opacity: .8; }
.hb-side { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.hb-pill { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 16px; min-width: 120px; }
.hb-pill small { display: block; font-size: .68rem; opacity: .8; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.hb-pill b { font-family: var(--mono); font-size: .98rem; }
.hb-main { position: relative; z-index: 1; min-width: 0; }

/* ============ Stats ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; }
.stat-card.green::before  { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.teal::before   { background: linear-gradient(90deg, var(--primary), #22d3ee); }
.stat-card.amber::before, .stat-card.yellow::before, .stat-card.orange::before { background: linear-gradient(90deg, var(--accent), #fcd34d); }
.stat-card.red::before    { background: linear-gradient(90deg, var(--danger), #fb7185); }
.stat-card.blue::before   { background: linear-gradient(90deg, var(--info), #60a5fa); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #c4b5fd); }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 14px; }
.stat-card.green .stat-icon  { background: var(--success-light); }
.stat-card.teal .stat-icon   { background: var(--primary-light); }
.stat-card.amber .stat-icon, .stat-card.yellow .stat-icon, .stat-card.orange .stat-icon { background: var(--accent-light); }
.stat-card.red .stat-icon    { background: var(--danger-light); }
.stat-card.blue .stat-icon   { background: var(--info-light); }
.stat-card.purple .stat-icon { background: var(--purple-light); }
.stat-value { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; word-break: break-word; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 5px; font-weight: 600; }
.stat-sub { font-size: .68rem; color: var(--text-light); margin-top: 2px; }

/* ============ Tables ============ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 13px 18px; text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 800; background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td, tfoot td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: .88rem; vertical-align: middle; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--primary-soft); }
tbody tr:last-child td { border-bottom: none; }
tfoot td { background: var(--primary-light); font-weight: 800; border-top: 2px solid var(--primary); border-bottom: none; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ Badges ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 99px; font-size: .74rem; font-weight: 700; }
.badge-success { background: var(--success-light); color: #047857; }
.badge-danger  { background: var(--danger-light);  color: #b91c1c; }
.badge-warning { background: var(--accent-light);  color: #b45309; }
.badge-info    { background: var(--info-light);    color: #1d4ed8; }
.badge-gray    { background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border); }
.badge-purple  { background: var(--purple-light);  color: #6d28d9; }
[data-theme="dark"] .badge-success { color: #6ee7b7; }
[data-theme="dark"] .badge-danger  { color: #fca5a5; }
[data-theme="dark"] .badge-warning { color: #fcd34d; }
[data-theme="dark"] .badge-info    { color: #93c5fd; }
[data-theme="dark"] .badge-purple  { color: #c4b5fd; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font-family: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: all var(--transition); line-height: 1.2; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 16px rgba(13,148,136,.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(13,148,136,.38); filter: brightness(1.05); }
.btn-accent { background: var(--grad-gold); color: #fff; box-shadow: 0 6px 16px rgba(245,158,11,.28); }
.btn-accent:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-danger { background: var(--danger-light); color: #b91c1c; border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-whatsapp { background: #25d366; color: #fff; box-shadow: 0 6px 16px rgba(37,211,102,.3); }
.btn-whatsapp:hover { background: #1fb957; }
.btn-sm { padding: 7px 13px; font-size: .78rem; border-radius: 10px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }
[data-theme="dark"] .btn-danger { color: #fca5a5; }

/* ============ Forms ============ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 7px; letter-spacing: .01em; }
.form-control {
  width: 100%; padding: 12px 14px; background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 12px; font-family: inherit; font-size: .92rem;
  transition: border-color var(--transition), box-shadow var(--transition); appearance: none; -webkit-appearance: none;
  min-height: 46px;
}
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,148,136,.14); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { min-height: 96px; resize: vertical; }
[data-theme="dark"] input[type="date"] { color-scheme: dark; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.form-hint { font-size: .76rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 5px; }

/* ============ Filter bar + Quick Filters ============ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 16px 20px; }
.filter-bar > div { min-width: 0; }
.filter-bar .form-control { width: auto; min-width: 150px; min-height: 42px; padding: 9px 12px; }
.filter-bar .form-label { margin-bottom: 5px; }

.quick-filters {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.qf-title { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.qf-ico { font-style: normal; }
.qf-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; flex: 1; -webkit-overflow-scrolling: touch; }
.qf-scroll::-webkit-scrollbar { display: none; }
.qf-chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 99px; font-size: .8rem; font-weight: 700;
  background: var(--bg-soft); color: var(--text-muted); border: 1.5px solid var(--border);
  text-decoration: none; transition: all var(--transition); white-space: nowrap;
}
.qf-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.qf-chip.active { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(13,148,136,.3); }

/* ============ Empty state ============ */
.empty-state { text-align: center; padding: 54px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 46px; margin-bottom: 14px; filter: grayscale(.15); }
.empty-state h3 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: .88rem; }

/* ============ Alerts ============ */
.alert { padding: 13px 16px; border-radius: 12px; font-size: .88rem; margin-bottom: 18px; font-weight: 600; border: 1px solid transparent; }
.alert-success { background: var(--success-light); color: #047857; border-color: rgba(16,185,129,.3); }
.alert-danger  { background: var(--danger-light);  color: #b91c1c; border-color: rgba(239,68,68,.3); }
.alert-info    { background: var(--info-light);    color: #1d4ed8; border-color: rgba(59,130,246,.3); }
.alert-warning { background: var(--accent-light);  color: #b45309; border-color: rgba(245,158,11,.3); }
.alert a { color: inherit; text-decoration: underline; }
[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .alert-info    { color: #93c5fd; }
[data-theme="dark"] .alert-warning { color: #fcd34d; }

/* ============ Modal (bottom-sheet on mobile) ============ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(2,6,15,.62); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 400; padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: var(--bg-card); border-radius: 22px; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: popIn .26s cubic-bezier(.2,.9,.3,1.2);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.modal-header h3 { font-size: 1.02rem; font-weight: 800; }
.modal-close { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-muted); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.modal-close:hover { color: var(--danger); border-color: var(--danger); }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--bg-soft); }

/* ============ Pagination ============ */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.page-link { padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; font-size: .84rem; color: var(--text-muted); font-weight: 700; background: var(--bg-card); }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--grad-brand); color: #fff; border-color: transparent; }

/* ============ Dashboard layout ============ */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; margin-bottom: 20px; }
.chart-box { position: relative; height: 300px; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.act-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; }
.act-ico.in { background: var(--success-light); } .act-ico.out { background: var(--danger-light); }
.act-main { flex: 1; min-width: 0; }
.act-title { font-size: .86rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-date { font-size: .74rem; color: var(--text-muted); }
.act-amt { font-family: var(--mono); font-size: .86rem; font-weight: 700; white-space: nowrap; }
.act-amt.in { color: var(--success); } .act-amt.out { color: var(--danger); }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.quick-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.quick-card .qi { width: 50px; height: 50px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.quick-card b { display: block; font-size: .9rem; font-weight: 800; }
.quick-card small { color: var(--text-muted); font-size: .78rem; }

/* ============ Plan cards ============ */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.plan-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 22px; padding: 28px; position: relative; box-shadow: var(--shadow); }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 5px rgba(13,148,136,.12); }
.plan-card.featured { border-color: var(--accent); }
.plan-card-badge { position: absolute; top: -13px; left: 24px; background: var(--grad-gold); color: #fff; font-size: .7rem; font-weight: 800; padding: 5px 14px; border-radius: 99px; letter-spacing: .05em; }
.plan-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.plan-price { font-family: var(--mono); font-size: 2.3rem; font-weight: 700; color: var(--primary); letter-spacing: -.04em; }
.plan-price span { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.plan-features { list-style: none; margin: 18px 0 24px; }
.plan-features li { padding: 9px 0; font-size: .88rem; display: flex; gap: 10px; align-items: center; border-bottom: 1px dashed var(--border); }
.plan-features li:last-child { border: none; }
.plan-features li::before { content: '✓'; width: 20px; height: 20px; border-radius: 50%; background: var(--success-light); color: var(--success); font-weight: 800; font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ============ Auth pages ============ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(20,184,166,.35), transparent 60%),
    radial-gradient(800px 500px at 100% 110%, rgba(37,99,235,.28), transparent 60%),
    linear-gradient(160deg, #050b16, #0a1626 60%, #07111d);
  position: relative; overflow: hidden;
}
.auth-page::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at center, #000, transparent 75%); -webkit-mask-image: radial-gradient(circle at center, #000, transparent 75%); }
.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo .logo-icon-lg { width: 76px; height: 76px; margin: 0 auto 14px; background: #fff; border-radius: 22px; display: flex; align-items: center; justify-content: center; padding: 8px; box-shadow: 0 14px 40px rgba(20,184,166,.45); overflow: hidden; }
.auth-logo .logo-icon-lg img { width: 100%; height: 100%; object-fit: contain; }
.auth-logo h1 { font-size: 1.7rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.auth-logo p { color: #7f93b0; font-size: .9rem; margin-top: 4px; }
.auth-card { background: rgba(14,22,38,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.09); border-radius: 24px; padding: 30px; box-shadow: 0 30px 70px rgba(0,0,0,.5); }
.auth-card .form-label { color: #9fb1cb; }
.auth-card .form-control { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #f1f5f9; }
.auth-card .form-control:focus { border-color: #14b8a6; background: rgba(255,255,255,.07); }
.auth-card .form-control::placeholder { color: #55688a; }
.auth-footer { text-align: center; margin-top: 22px; font-size: .88rem; color: #7f93b0; }
.auth-footer a { color: #5eead4; text-decoration: none; font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }
.auth-tools { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; gap: 8px; }
.auth-tools .topbar-ctrl-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #e2e8f0; }

/* ============ Bottom navigation (mobile) ============ */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  height: calc(var(--bottom-nav-h) + var(--safe-b)); padding: 8px 8px calc(8px + var(--safe-b));
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(15,23,42,.08);
  justify-content: space-around; align-items: stretch;
}
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--text-muted); font-size: .66rem; font-weight: 700; border-radius: 14px; position: relative; -webkit-tap-highlight-color: transparent; }
.bn-item .bn-ico { font-size: 20px; line-height: 1; transition: transform var(--transition); }
.bn-item.active { color: var(--primary); }
.bn-item.active .bn-ico { transform: translateY(-2px) scale(1.12); }
.bn-item.active::after { content: ''; position: absolute; top: -9px; width: 26px; height: 4px; border-radius: 0 0 6px 6px; background: var(--primary); }
.bn-item.center .bn-ico { width: 50px; height: 50px; margin-top: -26px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 10px 24px rgba(13,148,136,.45); border: 4px solid var(--bg-card); }
.bn-item.center.active::after { display: none; }

/* ============ Notification dropdown ============ */
.notif-wrap { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 12px); right: 0; width: 360px; max-width: calc(100vw - 24px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; transition: all .2s ease; z-index: 500; overflow: hidden;
}
.notif-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.np-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: .92rem; }
.np-list { max-height: 340px; overflow-y: auto; }
.np-item { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.np-item:hover { background: var(--primary-soft); }
.np-item.unread { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.np-dot { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.np-dot.success { background: var(--success-light); } .np-dot.warning { background: var(--accent-light); } .np-dot.info { background: var(--info-light); }
.np-msg { font-size: .84rem; font-weight: 600; line-height: 1.4; }
.np-time { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.np-empty { padding: 30px 18px; text-align: center; color: var(--text-muted); font-size: .86rem; }
.np-foot { display: block; text-align: center; padding: 12px; font-size: .82rem; font-weight: 800; color: var(--primary); text-decoration: none; background: var(--bg-soft); }

/* ============ Notification popups (toast / modal / banner) ============ */
.kh-toasts { position: fixed; top: 18px; right: 18px; z-index: 900; display: flex; flex-direction: column; gap: 12px; width: 380px; max-width: calc(100vw - 24px); pointer-events: none; }
.kh-toast {
  pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 13px; align-items: flex-start;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-left: 5px solid var(--info);
  border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-lg);
  animation: toastIn .4s cubic-bezier(.2,.9,.3,1.2) both;
}
.kh-toast.out { animation: toastOut .3s ease forwards; }
.kh-toast .kt-ico { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; background: var(--info-light); }
.kh-toast .kt-body { flex: 1; min-width: 0; }
.kh-toast .kt-title { font-size: .88rem; font-weight: 800; }
.kh-toast .kt-msg { font-size: .83rem; color: var(--text-muted); margin-top: 2px; word-wrap: break-word; }
.kh-toast .kt-x { background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 15px; padding: 2px 4px; }
.kh-toast .kt-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: currentColor; opacity: .5; animation: ktBar linear forwards; }
.kh-toast.success { border-left-color: var(--success); color: var(--success); } .kh-toast.success .kt-ico { background: var(--success-light); }
.kh-toast.error, .kh-toast.danger { border-left-color: var(--danger); color: var(--danger); } .kh-toast.error .kt-ico, .kh-toast.danger .kt-ico { background: var(--danger-light); }
.kh-toast.warning { border-left-color: var(--accent); color: var(--accent); } .kh-toast.warning .kt-ico { background: var(--accent-light); }
.kh-toast.info { border-left-color: var(--info); color: var(--info); }
.kh-toast .kt-title, .kh-toast .kt-msg { color: inherit; }
.kh-toast .kt-title { color: var(--text); } .kh-toast .kt-msg { color: var(--text-muted); }

/* centered popup */
.kh-popup-bd { position: fixed; inset: 0; z-index: 950; background: rgba(2,6,15,.6); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s ease; }
.kh-popup { background: var(--bg-card); border: 1px solid var(--border); border-radius: 26px; width: 100%; max-width: 400px; text-align: center; padding: 34px 28px 26px; box-shadow: var(--shadow-lg); animation: popIn .35s cubic-bezier(.2,.9,.3,1.3) both; position: relative; overflow: hidden; }
.kh-popup::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--info); }
.kh-popup.success::before { background: linear-gradient(90deg, var(--success), #34d399); }
.kh-popup.warning::before { background: linear-gradient(90deg, var(--accent), #fb923c); }
.kh-popup.error::before, .kh-popup.danger::before { background: linear-gradient(90deg, var(--danger), #fb7185); }
.kh-popup.info::before { background: linear-gradient(90deg, var(--info), #22d3ee); }
.kh-popup .kp-ico { width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; background: var(--info-light); animation: ringPulse 2s infinite; }
.kh-popup.success .kp-ico { background: var(--success-light); } .kh-popup.warning .kp-ico { background: var(--accent-light); } .kh-popup.error .kp-ico, .kh-popup.danger .kp-ico { background: var(--danger-light); }
.kh-popup h4 { font-size: 1.12rem; font-weight: 800; margin-bottom: 6px; }
.kh-popup p { color: var(--text-muted); font-size: .9rem; margin-bottom: 22px; }
.kh-popup .kp-actions { display: flex; gap: 10px; justify-content: center; }
.kh-popup .kp-actions .btn { flex: 1; }

/* top banner */
.kh-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 920; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 13px 52px 13px 18px; color: #fff; font-size: .88rem; font-weight: 700; background: var(--info); animation: bannerIn .4s ease both; box-shadow: 0 8px 30px rgba(0,0,0,.2); text-align: center; }
.kh-banner.success { background: linear-gradient(90deg, #059669, #10b981); } .kh-banner.warning { background: linear-gradient(90deg, #d97706, #f59e0b); }
.kh-banner.error, .kh-banner.danger { background: linear-gradient(90deg, #dc2626, #ef4444); } .kh-banner.info { background: linear-gradient(90deg, #0369a1, #0891b2); }
.kh-banner button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.2); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.kh-banner.out { animation: bannerOut .3s ease forwards; }

/* ============ Support toggle widget ============ */
/* container is only as big as the button and ignores taps; only the button + open panel receive them */
.support-widget { position: fixed; right: 20px; bottom: 20px; z-index: 600; display: flex; justify-content: flex-end; width: max-content; pointer-events: none; }
.sw-toggle {
  pointer-events: auto;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; color: #fff; position: relative;
  background: var(--grad-brand); box-shadow: 0 14px 34px rgba(13,148,136,.5);
  display: flex; align-items: center; justify-content: center; transition: transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.sw-toggle:hover { transform: scale(1.07); }
.sw-toggle::before { pointer-events: none; content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; z-index: -1; animation: swPulse 2.4s infinite; }
.support-widget.open .sw-toggle::before { animation: none; }
.sw-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px); visibility: hidden;
  width: 300px; max-width: calc(100vw - 32px); background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; transform: translateY(16px) scale(.94); transform-origin: bottom right; pointer-events: none; transition: opacity .28s ease, transform .28s cubic-bezier(.2,.9,.3,1.2), visibility 0s linear .28s;
}
.support-widget.open .sw-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.sw-head { background: var(--grad-brand); color: #fff; padding: 18px 20px; position: relative; overflow: hidden; }
.sw-head::after { content: ''; position: absolute; width: 120px; height: 120px; right: -30px; top: -50px; border-radius: 50%; background: rgba(255,255,255,.14); }
.sw-head b { display: block; font-size: 1rem; font-weight: 800; position: relative; z-index: 1; }
.sw-head small { font-size: .76rem; opacity: .85; position: relative; z-index: 1; }
.sw-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sw-link { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 14px; text-decoration: none; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border); transition: all var(--transition); }
.sw-link:hover { transform: translateX(-3px); border-color: currentColor; }
.sw-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.sw-ico svg { width: 21px; height: 21px; }
.sw-link b { display: block; font-size: .88rem; font-weight: 800; color: var(--text); }
.sw-link small { font-size: .72rem; color: var(--text-muted); }
.sw-link.whatsapp:hover { color: #25d366; } .sw-link.telegram:hover { color: #229ed9; } .sw-link.youtube:hover { color: #ff0000; } .sw-link.facebook:hover { color: #1877f2; }
.sw-ico.whatsapp { background: #25d366; } .sw-ico.telegram { background: #229ed9; } .sw-ico.youtube { background: #ff0000; } .sw-ico.facebook { background: #1877f2; }
.sw-arrow { margin-left: auto; color: var(--text-light); font-size: 14px; }

/* ============ Projects ============ */
.proj-switch { height: 40px; max-width: 190px; padding: 0 30px 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text); font: 700 .8rem var(--font); cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.proj-switch:hover { border-color: var(--primary); }
.proj-badge { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--primary-soft); border: 1px solid var(--primary); color: var(--primary); font-weight: 800; font-size: .8rem; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.proj-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.proj-card.active-p { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,148,136,.12), var(--shadow); }
.pc-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.pc-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.pc-name { font-weight: 800; font-size: 1.02rem; min-width: 0; word-break: break-word; }
.pc-sub { font-size: .76rem; color: var(--text-muted); }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 20px 14px; }
.pc-stats div { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px; text-align: center; min-width: 0; }
.pc-stats b { display: block; font-family: var(--mono); font-size: .86rem; word-break: break-word; }
.pc-stats small { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.pc-logins { padding: 12px 20px; border-top: 1px dashed var(--border); flex: 1; }
.pc-logins h5 { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px; }
.login-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); margin-bottom: 7px; }
.login-row .lr-main { flex: 1; min-width: 0; }
.login-row code { font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--primary); word-break: break-all; }
.login-row small { display: block; font-size: .7rem; color: var(--text-muted); }
.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.cred-box { background: linear-gradient(135deg, #052e2b, #0d9488); color: #fff; border-radius: 18px; padding: 20px; margin-bottom: 20px; position: relative; overflow: hidden; }
.cred-box h4 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.cred-box p { font-size: .8rem; opacity: .85; margin-bottom: 12px; }
.cred-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: .84rem; }
.cred-line span { opacity: .8; font-weight: 600; } .cred-line b { font-family: var(--mono); font-size: .95rem; word-break: break-all; }
@media (max-width: 900px) { .proj-switch { max-width: 120px; } .proj-badge { max-width: 130px; } .proj-grid { grid-template-columns: 1fr; } }

/* active-project banner (owner) */
.proj-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 16px; border-radius: 14px; background: var(--primary-soft); border: 1px solid var(--primary); color: var(--primary); font-size: .84rem; font-weight: 600; }
.proj-banner a { color: var(--primary); font-weight: 800; text-decoration: underline; white-space: nowrap; }

/* star rating input */
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 2.2rem; line-height: 1; color: var(--border); cursor: pointer; transition: color .15s, transform .15s; padding: 0 2px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f59e0b; }
.star-input label:hover { transform: scale(1.15); }

/* ============ Profile ============ */
.profile-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; margin-bottom: 20px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #064e4b 0%, #0d9488 55%, #0891b2 110%); box-shadow: 0 16px 36px rgba(13,148,136,.25); position: relative; overflow: hidden; }
.profile-hero::after { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); right: -60px; top: -90px; pointer-events: none; }
.ph-avatar { width: 76px; height: 76px; flex-shrink: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; overflow: hidden; position: relative; z-index: 1; }
.ph-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ph-info { min-width: 0; flex: 1; position: relative; z-index: 1; }
.ph-name { font-size: 1.3rem; font-weight: 800; line-height: 1.2; word-break: break-word; }
.ph-sub { font-size: .82rem; opacity: .9; margin-top: 3px; }
.ph-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ph-chips .badge { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.ph-btn { position: relative; z-index: 1; flex-shrink: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ae-pic { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: var(--grad-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; border: 3px solid var(--primary); flex-shrink: 0; }
.ae-pic img { width: 100%; height: 100%; object-fit: cover; }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 16px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.backup-test { border-top: 1px solid var(--border); padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--text-muted); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kv-grid > div { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.kv-grid small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.kv-grid b { display: block; margin-top: 3px; font-family: var(--mono); font-size: 1rem; word-break: break-word; }
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; gap: 16px; }
  .profile-hero { padding: 18px 16px; gap: 14px; flex-wrap: wrap; }
  .ph-avatar { width: 64px; height: 64px; }
  .ph-name { font-size: 1.1rem; }
  .ph-btn { width: 100%; justify-content: center; }
}

.rev-av-sm { width: 38px; height: 38px; border-radius: 50%; background: var(--grad-brand); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.rev-av-sm img { width: 100%; height: 100%; object-fit: cover; }


/* toggle icon: always centred (default SVG or the logo uploaded in admin) */
.sw-toggle .ic-open, .sw-toggle .ic-close { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity .3s ease, transform .3s ease; }
.sw-toggle svg { position: static !important; width: 28px; height: 28px; }
.sw-toggle .ic-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.support-widget.open .sw-toggle .ic-open { opacity: 0; transform: rotate(90deg) scale(.5); }
.support-widget.open .sw-toggle .ic-close { opacity: 1; transform: none; }
.sw-toggle.has-img { background: #fff; padding: 0; border: 3px solid #fff; overflow: visible; }
.sw-toggle.has-img .ic-open { border-radius: 50%; overflow: hidden; }
.sw-toggle.has-img .ic-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-toggle.has-img .ic-close { background: var(--grad-brand); border-radius: 50%; }

/* ============ Brand: logo + FULL site name everywhere ============ */
.logo-icon { width: auto; min-width: 42px; max-width: 132px; padding: 4px 6px; }
.logo-icon img { width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.logo-text { white-space: normal; max-width: none; line-height: 1.15; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.sidebar-logo { align-items: center; }
.topbar-brand { flex: 1; min-width: 0; gap: 8px; }
.topbar-brand img { height: 34px; width: auto; max-width: 112px; object-fit: contain; border-radius: 8px; flex-shrink: 1; min-width: 0; }
.topbar-brand b { white-space: normal; overflow: visible; text-overflow: clip; max-width: none; font-size: .95rem; line-height: 1.15; overflow-wrap: anywhere; }
.sidebar-tools { display: none; gap: 8px; padding: 0 14px 6px; }
.st-btn { flex: 1; height: 40px; border-radius: 12px; border: 1px solid var(--sidebar-border); background: rgba(255,255,255,.05); color: #cbd5e1; font-weight: 700; font-size: .82rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.st-btn:active { transform: scale(.97); }
@media (max-width: 520px) { .hide-xs { display: none !important; } .sidebar-tools { display: flex; } }

/* balance card: amounts never overflow their pills */
.hb-pill { min-width: 0; flex: 1 1 140px; }
.hb-pill b { display: block; font-size: clamp(.85rem, 3.4vw, 1rem); overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 560px) {
  .hb-side { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
  .hb-pill { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
  .hb-pill small { margin: 0; }
}

/* ============ Animations ============ */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(.94) } to { opacity: 1; transform: none } }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px) scale(.94) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateX(60px) scale(.94) } }
@keyframes bannerIn { from { transform: translateY(-100%) } to { transform: none } }
@keyframes bannerOut { to { transform: translateY(-100%) } }
@keyframes ktBar { from { width: 100% } to { width: 0 } }
@keyframes swPulse { 0% { transform: scale(1); opacity: .55 } 100% { transform: scale(1.75); opacity: 0 } }
@keyframes ringPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(13,148,136,.25) } 50% { box-shadow: 0 0 0 14px rgba(13,148,136,0) } }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: min(300px, 86vw); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
  .main-wrapper { margin-left: 0; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-menu-btn { display: flex; }
  .topbar-title { display: none; }
  .topbar-brand { display: inline-flex; flex: 1; }
  .topbar-lang-btn { padding: 0 10px; }
  .main-content { padding: 18px 14px calc(var(--bottom-nav-h) + var(--safe-b) + 28px); }
  .bottom-nav { display: flex; }
  .support-widget { right: 14px; bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 16px); }
  .sw-toggle { width: 54px; height: 54px; }
  .page-header h2 { font-size: 1.15rem; }
  .hero-balance { padding: 22px 20px; border-radius: 20px; }
  .hb-side { width: 100%; }
  .hb-pill { flex: 1; min-width: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 1.15rem; }
  .stat-icon { width: 40px; height: 40px; font-size: 18px; margin-bottom: 10px; }
  .filter-bar { padding: 14px; gap: 10px; }
  .filter-bar > div:not([style*="flex:1"]) { flex: 1 1 calc(50% - 6px); }
  .filter-bar .form-control { width: 100%; min-width: 0; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 24px 24px 0 0; max-height: 94vh; animation: sheetUp .3s cubic-bezier(.2,.9,.3,1) both; }
  .modal-footer { position: sticky; bottom: 0; padding-bottom: calc(16px + var(--safe-b)); }
  .notif-panel { position: fixed; top: calc(var(--topbar-h) + 8px); left: 12px; right: 12px; width: auto; max-width: none; }
  .kh-toasts { top: 10px; right: 10px; left: 10px; width: auto; max-width: none; }
  .quick-filters { padding: 10px; gap: 8px; }
  .qf-title span { display: none; }
}
@keyframes sheetUp { from { transform: translateY(100%) } to { transform: none } }

@media (max-width: 640px) {
  html { font-size: 14.5px; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick-card { flex-direction: column; text-align: center; padding: 16px 10px; gap: 8px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
  .logo-text { max-width: 120px; }

  /* tables become stacked cards (labels injected by main.js) */
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead { display: none; }
  table.rt tbody tr { padding: 12px 14px; border-bottom: 8px solid var(--bg); }
  table.rt tbody tr:hover { background: transparent; }
  table.rt tbody td { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); text-align: right; font-size: .86rem; }
  table.rt tbody td:last-child { border-bottom: none; }
  table.rt tbody td[data-label]::before { content: attr(data-label); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); text-align: left; flex-shrink: 0; }
  table.rt tbody td.no-stack { display: table-cell; text-align: center; }
  table.rt tfoot, table.rt tfoot tr { display: block; }
  table.rt tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 12px 14px; background: var(--primary-light); border-top: 2px solid var(--primary); }
  table.rt tfoot td { display: block; width: auto; padding: 2px 4px; background: transparent; border: none; }
  table.rt tfoot td:empty { display: none; }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-brand b { max-width: 90px; }
}

/* ============ Print ============ */
@media print {
  .sidebar, .topbar, .bottom-nav, .support-widget, .kh-toasts, .quick-filters, .sidebar-overlay { display: none !important; }
  .main-wrapper { margin: 0 !important; }
  .main-content { padding: 0 !important; max-width: none; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   ✨ Light & glow effects (app, auth, admin)
   --glow / --glow2 are RGB triplets so every theme can recolour them
   ============================================================ */
:root { --glow: 13,148,136; --glow2: 8,145,178; }
body.admin-body { --glow: 124,58,237; --glow2: 167,139,250; }

/* ambient light behind the whole app */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 400px at 88% -6%, rgba(var(--glow), .15), transparent 70%),
    radial-gradient(540px 360px at -6% 104%, rgba(var(--glow2), .12), transparent 70%),
    radial-gradient(380px 260px at 50% 40%, rgba(var(--glow), .05), transparent 70%);
  animation: khAmbient 14s ease-in-out infinite alternate; }
[data-theme="dark"] body::before { background:
    radial-gradient(640px 420px at 88% -6%, rgba(var(--glow), .26), transparent 70%),
    radial-gradient(560px 380px at -6% 104%, rgba(var(--glow2), .20), transparent 70%),
    radial-gradient(380px 260px at 50% 40%, rgba(var(--glow), .08), transparent 70%); }

/* soft light line under the top bar */
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--glow), .7), transparent); opacity: .7; pointer-events: none; }

/* sidebar light */
.sidebar::after { content: ''; position: absolute; left: -40px; bottom: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(var(--glow2), .22), transparent 70%); pointer-events: none; }
.logo-icon { animation: khLogoGlow 4s ease-in-out infinite; }
.nav-item.active { box-shadow: inset 0 0 0 1px rgba(var(--glow), .3), 0 0 26px -8px rgba(var(--glow), .7); }
.nav-item:hover { box-shadow: 0 0 20px -10px rgba(var(--glow), .8); }

/* buttons: glow + moving shine */
.btn-primary, .btn-accent { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary { box-shadow: 0 10px 26px -8px rgba(var(--glow), .65), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary::after, .btn-accent::after { content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent); transform: skewX(-20deg); animation: khShine 5s ease-in-out infinite; }
.btn-primary:hover { box-shadow: 0 14px 34px -6px rgba(var(--glow), .8), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-accent { box-shadow: 0 10px 26px -8px rgba(245,158,11,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-whatsapp { box-shadow: 0 10px 24px -8px rgba(37,211,102,.7); }

/* cards: light up on hover */
.card:hover, .stat-card:hover, .proj-card:hover, .plan-card:hover { box-shadow: 0 0 0 1px rgba(var(--glow), .35), 0 22px 48px -16px rgba(var(--glow), .5); border-color: rgba(var(--glow), .5); }
.stat-card::before { box-shadow: 0 2px 14px rgba(var(--glow), .55); }
.stat-icon { box-shadow: 0 10px 22px -8px rgba(var(--glow), .55); }
.stat-value { text-shadow: 0 0 22px rgba(var(--glow), .15); }

/* hero cards */
.hero-balance, .profile-hero { box-shadow: 0 22px 50px -14px rgba(var(--glow), .6), inset 0 1px 0 rgba(255,255,255,.18); }
.hero-balance::before, .profile-hero::after { animation: khFloat 9s ease-in-out infinite; }
.hero-balance::after { animation: khFloat 12s ease-in-out infinite reverse; }
.hb-value { text-shadow: 0 0 28px rgba(255,255,255,.35); }
.hb-pill { box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.cred-box { box-shadow: 0 18px 40px -12px rgba(var(--glow), .6); }

/* chips, badges, nav */
.qf-chip.active { box-shadow: 0 8px 22px -6px rgba(var(--glow), .8), inset 0 1px 0 rgba(255,255,255,.3); }
.notif-badge { animation: khPulseRed 2s ease-in-out infinite; }
.bn-item.center .bn-ico { animation: khPulseGlow 2.6s ease-in-out infinite; }
.bn-item.active .bn-ico { filter: drop-shadow(0 0 8px rgba(var(--glow), .6)); }
.topbar-ctrl-btn:hover, .notif-btn:hover { box-shadow: 0 0 18px -4px rgba(var(--glow), .6); }
.form-control:focus { box-shadow: 0 0 0 4px rgba(var(--glow), .16), 0 0 22px -6px rgba(var(--glow), .5); }
.modal, .kh-popup, .notif-panel, .sw-panel { box-shadow: var(--shadow-lg), 0 0 60px -20px rgba(var(--glow), .55); }
.kh-toast { box-shadow: var(--shadow-lg), 0 0 30px -12px currentColor; }
.sw-toggle { box-shadow: 0 14px 34px rgba(var(--glow), .55), 0 0 40px -6px rgba(var(--glow), .75); }
.page-header h2 { text-shadow: 0 0 30px rgba(var(--glow), .18); }

/* auth pages: floating light orbs + glowing card */
.auth-page::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; left: -120px; bottom: -140px; background: radial-gradient(circle, rgba(var(--glow2), .35), transparent 68%); animation: khFloat 11s ease-in-out infinite; pointer-events: none; }
.auth-card { box-shadow: 0 0 0 1px rgba(94,234,212,.14), 0 40px 90px -24px rgba(var(--glow), .55); }
.auth-logo .logo-icon-lg { animation: khLogoGlow 4s ease-in-out infinite; }

@keyframes khShine { 0%, 55% { left: -70%; } 100% { left: 140%; } }
@keyframes khFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-16px, 14px) scale(1.06); } }
@keyframes khAmbient { 0% { opacity: .75; } 100% { opacity: 1; } }
@keyframes khLogoGlow { 0%, 100% { box-shadow: 0 6px 20px rgba(var(--glow), .35); } 50% { box-shadow: 0 8px 34px rgba(var(--glow), .75); } }
@keyframes khPulseGlow { 0%, 100% { box-shadow: 0 10px 24px rgba(var(--glow), .45); } 50% { box-shadow: 0 10px 38px rgba(var(--glow), .85); } }
@keyframes khPulseRed { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }
@media (prefers-reduced-motion: reduce) {
  body::before, .logo-icon, .btn-primary::after, .btn-accent::after, .hero-balance::before, .hero-balance::after, .profile-hero::after,
  .notif-badge, .bn-item.center .bn-ico, .auth-page::after, .auth-logo .logo-icon-lg { animation: none !important; }
}
@media print { body::before { display: none; } }

/* ===== v5.1: header = logo only, install button ===== */
.topbar-brand img { height: 38px; width: auto; max-width: min(170px, 38vw); object-fit: contain; border-radius: 8px; }
.topbar-brand b { font-size: 1rem; }
.sidebar-tools { display: none !important; }
@media (max-width: 520px) { .hide-xs { display: inline-flex !important; } .topbar { gap: 6px; } .topbar-actions { gap: 6px; } .topbar-ctrl-btn, .notif-btn { min-width: 38px; padding: 0 9px; } }
.sidebar-install { padding: 4px 14px 10px; }
.install-btn {
  -webkit-appearance: none; appearance: none; margin: 0; width: 100%; position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 12px; text-align: left; font-family: inherit; color: #fff; cursor: pointer;
  padding: 11px 12px; border-radius: 16px; border: 1px solid rgba(255,255,255,.22);
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 55%, #2563eb 120%);
  box-shadow: 0 14px 30px -10px rgba(13,148,136,.85), 0 0 26px -6px rgba(8,145,178,.7), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent;
}
.install-btn::after { content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); animation: khShine 4.5s ease-in-out infinite; }
.install-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -8px rgba(13,148,136,.95), 0 0 34px -4px rgba(8,145,178,.85), inset 0 1px 0 rgba(255,255,255,.35); }
.install-btn:active { transform: scale(.98); }
.ib-ico { position: relative; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; animation: ibPulse 2.6s ease-in-out infinite; }
.ib-ico svg { width: 24px; height: 24px; }
.ib-text { flex: 1; min-width: 0; line-height: 1.2; }
.ib-text b { display: block; font-size: .92rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-text small { display: block; margin-top: 2px; font-size: .72rem; opacity: .88; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-go { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; line-height: 1; flex-shrink: 0; padding-bottom: 2px; }
@keyframes ibPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); } 50% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }
@media (prefers-reduced-motion: reduce) { .install-btn::after, .ib-ico { animation: none !important; } }

/* ===== v5.3: layout safety (nothing may push a page wider than the phone) ===== */
.split-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .split-grid { grid-template-columns: minmax(0, 1fr); } }
.main-content > *, .card, .card-body, .card-header, .page-header > *, .filter-bar > div { min-width: 0; }
.main-content img, .main-content video { max-width: 100%; height: auto; }
.card-title { overflow-wrap: anywhere; }
@media (max-width: 900px) { .card-header { gap: 8px; } .page-header { gap: 10px; } .page-header .btn { flex-shrink: 0; } }

.bk-log { border-top: 1px solid var(--border); padding: 14px 22px 18px; }
.bk-log-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: .84rem; margin-bottom: 8px; }
.bk-log-h small { color: var(--text-muted); font-weight: 600; }
.bk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); margin-bottom: 6px; font-size: .82rem; }
.bk-row small { color: var(--text-muted); flex: 1; min-width: 160px; overflow-wrap: anywhere; }

/* ===== App lock card ===== */
.lock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.lock-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 18px; padding: 16px; min-width: 0; }
.lock-box h4 { font-size: .95rem; font-weight: 800; margin-bottom: 4px; }
.lock-hint { font-size: .78rem; color: var(--text-muted); margin-bottom: 10px; }
.pk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border); margin-bottom: 6px; }
.pk-row span { display: flex; flex-direction: column; min-width: 0; font-size: .86rem; } .pk-row small { color: var(--text-muted); font-size: .72rem; }
.lock-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
@media (max-width: 900px) { .lock-grid { grid-template-columns: 1fr; } }
