/* KCut account portal + admin panel — shared dark theme. */
/* Light is the default palette; dark is opt-in via [data-theme="dark"]. */
:root {
  --bg: #f5f7fa;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f4f8;
  --border: #e2e7ef;
  --border-soft: #edf0f5;
  --text: #1b2130;
  --text-dim: #58616f;
  --text-faint: #8b94a3;
  --accent: #4d6bff;
  --accent-strong: #4d6bff;
  --good: #1f9d57;
  --warn: #b7791f;
  --bad: #e0455a;
  --nav-bg: rgba(255, 255, 255, 0.88);
  --grid-line-rgb: 77, 107, 255;
  --grid-glow-rgb: 99, 102, 241;
  --grid-dot-rgb: 77, 107, 255;
  --grid-line: rgba(var(--grid-line-rgb), var(--custom-grid-opacity, var(--grid-opacity, 0.16)));
  --grid-glow: rgba(var(--grid-glow-rgb), var(--custom-grid-glow, var(--grid-glow-val, 0.22)));
  --grid-dot: rgba(var(--grid-dot-rgb), calc(var(--custom-grid-opacity, var(--grid-opacity, 0.16)) * 3.5));
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(23, 33, 66, 0.10);
  --font-khmer: 'Noto Serif Khmer', 'Khmer OS Siemreap', 'Noto Sans Khmer', serif;
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, 'Noto Serif Khmer', 'Khmer OS Siemreap', serif, sans-serif;
}

:root[data-theme='dark'] {
  --nav-bg: rgba(13, 16, 23, 0.85);
  --grid-line-rgb: 140, 185, 255;
  --grid-glow-rgb: 77, 139, 255;
  --grid-dot-rgb: 140, 190, 255;
  --grid-line: rgba(var(--grid-line-rgb), var(--custom-grid-opacity, var(--grid-opacity, 0.18)));
  --grid-glow: rgba(var(--grid-glow-rgb), var(--custom-grid-glow, var(--grid-glow-val, 0.28)));
  --grid-dot: rgba(var(--grid-dot-rgb), calc(var(--custom-grid-opacity, var(--grid-opacity, 0.18)) * 3.5));
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --panel: #161a24;
  --panel-2: #1c2130;
  --border: #262c3a;
  --border-soft: #1f2431;
  --text: #e7ebf3;
  --text-dim: #9aa4b8;
  --text-faint: #6b7688;
  --accent: #6ea8fe;
  --accent-strong: #4d8bff;
  --good: #47c98a;
  --warn: #f0b64b;
  --bad: #f0616d;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

/* Always reserve the scrollbar gutter so short pages (no scrollbar) and tall
   pages (scrollbar) keep the same content width — otherwise the centered nav,
   and its logo, shift sideways between pages. */
html {
  background: var(--bg);
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* Sticky footer: body is a column and #main grows, pushing .foot to the bottom
   even when a page is short. The fixed .bg-glow stays out of flow. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}
main, #main {
  flex: 1 0 auto;
  min-height: calc(100vh - 64px);
  box-sizing: border-box;
  display: block;
}

.foot { flex-shrink: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }


/* ── Pure Tech Grid (ក្រឡាការ៉ូ) & Ambient Glow Styles ─────────────────── */
.bg-glow {
  position: fixed;
  inset: 0;

  z-index: -1;
  background-color: var(--bg);
  pointer-events: none;
}

/* 1. Cosmic Aurora Mesh Glow (404 Style) - Default across every page */
:root[data-bg-style='ambient_aurora_glow'] .bg-glow,
:root:not([data-bg-style]) .bg-glow {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 22%, rgba(77, 107, 255, 0.14), transparent 48%),
    radial-gradient(circle at 82% 78%, rgba(168, 85, 247, 0.14), transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.07), transparent 50%),
    linear-gradient(to right, var(--grid-line) var(--grid-line-width, 1px), transparent var(--grid-line-width, 1px)),
    linear-gradient(to bottom, var(--grid-line) var(--grid-line-width, 1px), transparent var(--grid-line-width, 1px)) !important;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat !important;
  background-size: 100% 100%, 100% 100%, 100% 100%, var(--custom-grid-size, 14px) var(--custom-grid-size, 14px), var(--custom-grid-size, 14px) var(--custom-grid-size, 14px) !important;
}

:root[data-theme='dark'][data-bg-style='ambient_aurora_glow'] .bg-glow,
:root[data-theme='dark']:not([data-bg-style]) .bg-glow {
  background-color: #090d16 !important;
  background-image:
    radial-gradient(circle at 18% 25%, rgba(77, 107, 255, 0.22), transparent 52%),
    radial-gradient(circle at 82% 75%, rgba(168, 85, 247, 0.22), transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.09), transparent 50%),
    linear-gradient(to right, var(--grid-line) var(--grid-line-width, 1px), transparent var(--grid-line-width, 1px)),
    linear-gradient(to bottom, var(--grid-line) var(--grid-line-width, 1px), transparent var(--grid-line-width, 1px)) !important;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat !important;
  background-size: 100% 100%, 100% 100%, 100% 100%, var(--custom-grid-size, 14px) var(--custom-grid-size, 14px), var(--custom-grid-size, 14px) var(--custom-grid-size, 14px) !important;
}

/* 2. Technical Blueprint Grids */
:root[data-bg-style='grid_ultra_micro'] .bg-glow,
:root[data-bg-style='grid_fine'] .bg-glow,
:root[data-bg-style='grid_medium'] .bg-glow,
:root[data-bg-style='grid_large'] .bg-glow,
:root[data-bg-style='grid_custom'] .bg-glow {
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-line) var(--grid-line-width, 1px), transparent var(--grid-line-width, 1px)),
    linear-gradient(to bottom, var(--grid-line) var(--grid-line-width, 1px), transparent var(--grid-line-width, 1px)) !important;
  background-repeat: repeat, repeat !important;
  background-size: var(--custom-grid-size, 12px) var(--custom-grid-size, 12px), var(--custom-grid-size, 12px) var(--custom-grid-size, 12px) !important;
}

/* 3. Dot Matrix Grid */
:root[data-bg-style='grid_vertex_dots'] .bg-glow {
  background-color: var(--bg);
  background-image: radial-gradient(var(--grid-line) 1.5px, transparent 1.5px) !important;
  background-repeat: repeat !important;
  background-size: var(--custom-grid-size, 18px) var(--custom-grid-size, 18px) !important;
}

/* 4. Pure Minimal Velvet (No Grid) */
:root[data-bg-style='pure_minimal'] .bg-glow {
  background-color: var(--bg);
  background-image: none !important;
}

/* ── Admin Grid Swatch Previews ───────────────────────────────────── */
.bg-glow-swatch {
  width: 100%;
  position: relative;
  background-color: var(--panel-2);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 8px 8px;
}

.bg-glow-swatch[data-bg-style='ambient_aurora_glow'] {
  background:
    radial-gradient(circle at 20% 30%, rgba(77, 107, 255, 0.45), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.45), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.25), transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    #090d16 !important;
  background-size: 100% 100%, 100% 100%, 100% 100%, 8px 8px, 8px 8px !important;
}

.bg-glow-swatch[data-bg-style='grid_ultra_micro'] {
  background-size: 6px 6px !important;
}
.bg-glow-swatch[data-bg-style='grid_fine'] {
  background-size: 10px 10px !important;
}
.bg-glow-swatch[data-bg-style='grid_medium'] {
  background-size: 16px 16px !important;
}
.bg-glow-swatch[data-bg-style='grid_vertex_dots'] {
  background-image: radial-gradient(var(--grid-line) 1.5px, transparent 1.5px) !important;
  background-size: 12px 12px !important;
}
.bg-glow-swatch[data-bg-style='pure_minimal'] {
  background-image: none !important;
}

/* ── layout ─────────────────────────────────────────────────────────── */
.auth-shell {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 17px;
}
.brand .name { font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.brand .sub { color: var(--text-faint); font-size: 12px; }

h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
.lead { color: var(--text-dim); margin: 0 0 22px; font-size: 14px; }

/* ── forms ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 600;
}
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(77, 139, 255, 0.18);
}
textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--border);
}
.btn:hover { border-color: var(--border); background: var(--border-soft); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.primary:hover { background: #3b7bff; }
.btn.store {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  border: 1px solid rgba(236, 72, 153, 0.45);
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.4);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.btn.store:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  border-color: rgba(236, 72, 153, 0.7);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}
.btn.danger { background: transparent; border-color: #5a2730; color: var(--bad); }
.btn.danger:hover { background: rgba(240, 97, 109, 0.12); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn.sm { padding: 6px 12px; font-size: 13px; line-height: 1.2; white-space: nowrap; }

.ic { flex: none; display: inline-block; vertical-align: -2px; }
.btn .ic { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; }
.badge .ic { width: 13px; height: 13px; }

/* password show/hide */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  border-radius: 6px;
}
.pw-toggle:hover { color: var(--text); background: var(--panel-2); }

/* input with action button (e.g. paste) */
.input-action-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-action-wrap input {
  padding-right: 86px;
}
.input-action-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.input-action-btn:hover {
  background: var(--border-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.input-action-btn:active {
  transform: translateY(-50%) scale(0.96);
}
.input-action-btn .ic {
  width: 13px;
  height: 13px;
}

.form-foot {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-dim);
  text-align: center;
}

.error-box {
  display: none;
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--bad) 38%, transparent);
  color: var(--bad);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.error-box.show { display: block; }

.note-box {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin: 12px 0;
}

/* ── app chrome (account + admin) ───────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(13, 16, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--text-dim); font-size: 13.5px; }
.topbar .who b { color: var(--text); font-weight: 600; }

/* Content shares the nav's width + horizontal padding, so its left edge lines up
   with the logo and its right edge with the profile menu. */
.wrap { max-width: 1250px; margin: 0 auto; padding: 24px 20px 60px; }
.wrap.wide { max-width: 1250px; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.section { padding: 20px 22px; margin-bottom: 18px; }
.section > .head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.section > .head .spacer { flex: 1; }

.stat {
  padding: 16px 18px;
}
.stat .num { font-size: 26px; font-weight: 750; letter-spacing: 0.3px; }
.stat .cap { color: var(--text-faint); font-size: 12.5px; margin-top: 2px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; color: var(--text); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
}
.badge.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); background: color-mix(in srgb, var(--good) 12%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.badge.dim { color: var(--text-faint); }
.badge.cyan { color: #06b6d4; border-color: color-mix(in srgb, #06b6d4 35%, transparent); background: color-mix(in srgb, #06b6d4 12%, transparent); }
.badge.online { color: #10b981; border-color: color-mix(in srgb, #10b981 40%, transparent); background: color-mix(in srgb, #10b981 14%, transparent); font-weight: 700; }

/* ── Live Presence & Online Indicator ────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulse-online 2s infinite ease-in-out;
}
.status-dot.desktop {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
  animation: pulse-desktop 2s infinite ease-in-out;
}
.status-dot.offline {
  background: var(--text-faint);
  opacity: 0.55;
}
@keyframes pulse-online {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
@keyframes pulse-desktop {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(56, 189, 248, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.presence-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
}
.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  width: fit-content;
  white-space: nowrap;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.presence-pill.is-online {
  background: color-mix(in srgb, #10b981 12%, transparent);
  border-color: color-mix(in srgb, #10b981 35%, transparent);
  color: #10b981;
}
.presence-pill.is-desktop-online {
  background: color-mix(in srgb, #38bdf8 12%, transparent);
  border-color: color-mix(in srgb, #38bdf8 35%, transparent);
  color: #38bdf8;
}
.presence-pill .time-sub {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 11px;
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
th { color: var(--text-faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
tbody tr { cursor: default; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--panel-2); }
td.mono, .mono { font-family: 'Cascadia Mono', ui-monospace, 'Consolas', monospace; font-size: 12.5px; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap-gap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--text-faint); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.hidden { display: none !important; }

.searchbar { display: flex; gap: 10px; margin-bottom: 14px; }
.searchbar input { flex: 1; }

/* ── modal ──────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.66);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  z-index: 50;
  overflow-y: auto;
}
.modal-backdrop.show { display: flex; }
.modal {
  width: 100%;
  max-width: 640px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal .m-head {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.modal .m-head h2 { margin: 0; }
.modal .m-body { padding: 20px; }
.modal .m-close {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-faint);
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
}

/* ── toasts ─────────────────────────────────────────────────────────── */
#toasts {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  max-width: 340px;
  animation: slidein 0.18s ease;
}
.toast.good { border-color: #1f4a37; }
.toast.bad { border-color: #4a2730; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.center-note { text-align: center; color: var(--text-dim); padding: 40px 0; }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--text-faint); border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; }
.btn.primary .spin { border-color: rgba(255, 255, 255, 0.6); border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Callout box (e.g. "Telegram not set up yet") + numbered steps list */
.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.callout .ic { color: var(--text-dim); margin-top: 2px; }
.steps { margin: 14px 0 0; padding-left: 20px; line-height: 1.9; }
.steps li { padding-left: 4px; }

/* Toggle switch (styled checkbox) for settings + notification toggles */
.switch { position: relative; display: inline-flex; flex: none; width: 42px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  width: 42px; height: 24px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-faint);
  transition: transform 0.18s ease, background 0.18s ease;
}
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

/* Admin filter row (Users & Licences) */
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.filter-row select.flt { width: auto; min-width: 130px; padding: 7px 10px; font-size: 13px; }

/* Settings row: label/description on the left, control on the right */
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--border-soft);
}
.set-row:first-child { border-top: 0; }
.set-row .set-label { font-size: 14px; }
.set-row .set-label .muted { display: block; margin-top: 2px; }

/* Telegram-branded button (Continue with Telegram) */
.btn.telegram {
  background: #229ed9;
  border-color: #229ed9;
  color: #fff;
}
.btn.telegram:hover { background: #1c8dc2; border-color: #1c8dc2; }
.btn.telegram .ic { color: #fff; }

/* "or continue with" divider on the auth pages */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--text-faint);
  font-size: 12px;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════════════════════════
   Site chrome: navbar, footer, marketing + app layouts
   ══════════════════════════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: block;
  padding: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  height: 36px;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand .logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
}
.nav-brand .name { font-size: 16.5px; letter-spacing: 0.2px; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; height: 36px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  padding: 0 12px;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  box-sizing: border-box;
}
.nav-link:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav-link .ic { width: 15px; height: 15px; }
.nav-link.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: none;
  border-radius: 8px;
}
.nav-link.active:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
}
/* Referral Card Flag Toggle Switch */
.ref-flag-toggle {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}
.ref-flag-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.16);
  transform: translateY(-1px);
}
.ref-toggle-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14), 0 1px 2px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-soft);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
:root[data-theme='dark'] .ref-toggle-thumb {
  background: #1e2433;
  border-color: #2e384d;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.ref-flag-toggle[data-lang='en'] .ref-toggle-thumb {
  transform: translateX(0);
}
.ref-flag-toggle[data-lang='km'] .ref-toggle-thumb {
  transform: translateX(100%);
}
.ref-toggle-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 68px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.15s ease;
  line-height: 1;
}
.ref-flag-toggle[data-lang='en'] .ref-toggle-btn.en {
  color: var(--accent-strong);
  font-weight: 750;
}
.ref-flag-toggle[data-lang='km'] .ref-toggle-btn.km {
  color: #10b981;
  font-weight: 750;
}
.ref-flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 12px;
  border-radius: 2.5px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.ref-flag-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 640px) {
  .ref-flag-toggle {
    top: 14px;
    right: 14px;
    padding: 2px;
  }
  .ref-toggle-thumb {
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc(50% - 2px);
  }
  .ref-toggle-btn {
    min-width: 58px;
    padding: 3px 7px;
    font-size: 11px;
    gap: 4px;
  }
  .ref-flag-icon {
    width: 15px;
    height: 10px;
  }
}
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap; height: 36px; }
.nav-right .btn.sm {
  height: 36px;
  padding: 0 13px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  box-sizing: border-box;
}
.nav-user { display: flex; align-items: center; gap: 8px; color: var(--text-dim); height: 36px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
}
@media (max-width: 720px) {
  .nav-user .small { display: none; }
}

.foot {
  position: relative;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.04);
  margin-top: 240px;
  padding: 48px 24px 32px;
}
:root[data-theme='dark'] .foot {
  background: #0d1017;
  border-top: 1px solid #232a39;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.55);
}
.foot::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, var(--accent) 30%, #a855f7 70%, transparent 95%);
  opacity: 0.65;
}

/* ── Cambodian Countryside & Pastoral Harvest Banner (Standing on top line) ── */
.foot-skyline-banner {
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  width: calc(100% - 52px);
  max-width: 1344px;
  height: 148px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border: none;
  color: #1e2f65;
  transition: color 0.3s ease;
}
.foot-skyline-banner svg {
  width: 100%;
  height: 148px;
  display: block;
  overflow: visible;
}
.foot-skyline-art {
  width: 100%;
  height: 148px;
  /* Relative so the mask also resolves inside subdirectory deployments
     (e.g. http://localhost/kcut.pro/), not only at a domain root. */
  -webkit-mask-image: url('../../img/khmer-countryside.svg');
  mask-image: url('../../img/khmer-countryside.svg');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  background: currentColor;
  opacity: 0.90;
  transition: opacity 0.3s ease;
}
:root[data-theme='dark'] .foot-skyline-banner {
  /* Clean, elegant architectural slate in dark mode without blown-out blue/glow artifacts */
  color: #4a5568;
}
:root[data-theme='dark'] .foot-skyline-art {
  opacity: 0.76;
}
@media (max-width: 768px) {
  .foot {
    margin-top: 160px;
  }
  .foot-skyline-banner {
    height: 90px;
  }
  .foot-skyline-banner svg {
    height: 90px;
  }
  .foot-skyline-art {
    height: 90px;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
  }
}

/* Footer layout container */
.foot-top {
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 900px) {
  .foot-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 580px) {
  .foot-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Col 1: Brand */
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 12px;
}
.foot-brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(77, 107, 255, 0.35);
}
.foot-brand .name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}
.foot-desc {
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 16px;
  max-width: 320px;
}
.foot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.foot-status-text {
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-dim);
}

/* Column headers & nav lists */
.foot-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text);
  margin: 0 0 14px;
}
.foot-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-nav-list a {
  color: var(--text-dim);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}
.foot-nav-list a:hover {
  color: var(--accent);
  transform: translateX(2px);
}
.foot-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--good);
  padding: 4px 10px;
  background: color-mix(in srgb, var(--good) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--good) 30%, transparent);
  border-radius: 6px;
  margin-top: 4px;
}

/* Middle: Payment badges bar */
.foot-middle {
  max-width: 1250px;
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.foot-payment-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.foot-payment-title {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.foot-payment-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.foot-pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid;
  letter-spacing: 0.2px;
}
.foot-pay-badge.khqr {
  color: #0284c7;
  background: #f0f9ff;
  border-color: #bae6fd;
}
:root[data-theme='dark'] .foot-pay-badge.khqr {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}
.foot-pay-badge .pay-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e11d48;
}
.foot-pay-badge.payway {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
}
:root[data-theme='dark'] .foot-pay-badge.payway {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.12);
  border-color: rgba(125, 211, 252, 0.3);
}
.foot-pay-badge.card-visa {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
:root[data-theme='dark'] .foot-pay-badge.card-visa {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
}
.foot-pay-badge.card-master {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
:root[data-theme='dark'] .foot-pay-badge.card-master {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}
.foot-delivery-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--text-dim);
  padding: 4px 8px;
}

/* Bottom: Copyright & Links */
.foot-bottom {
  max-width: 1250px;
  margin: 0 auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.foot-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.foot-copy-sub {
  font-size: 11.5px;
  color: var(--text-faint);
}
.foot-bottom-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.foot-bottom-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.foot-bottom-links a:hover {
  color: var(--accent);
}
.foot-bottom-links .sep {
  color: var(--border);
}

/* marketing */
.hero {
  max-width: 1000px; margin: 0 auto; padding: 48px 20px 52px; text-align: center;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--accent); font-size: 12.5px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 {
  font-size: 46px; line-height: 1.1; margin: 0 0 18px; font-weight: 800;
  letter-spacing: -0.5px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, #5b9cf6 0%, #b99af8 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 16.5px; line-height: 1.65; color: var(--text-dim); max-width: 720px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero .trust-badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; font-size: 13.5px; color: var(--text-dim); margin-top: 4px; }
.btn.lg { padding: 13px 24px; font-size: 15.5px; }
@media (max-width: 640px) { .hero h1 { font-size: 34px; } .hero { padding: 56px 20px 40px; } }

.container { max-width: 1250px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; margin: 6px 0 8px; font-size: 28px; font-weight: 750; }
.section-sub { text-align: center; color: var(--text-dim); margin: 0 auto 34px; max-width: 560px; }

.feature {
  padding: 22px;
}
.feature .ficon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--accent); margin-bottom: 14px;
}
.feature .ficon .ic { width: 20px; height: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 0 auto; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan {
  padding: 28px;
  position: relative;
  display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--accent-strong); box-shadow: 0 0 0 1px var(--accent-strong), var(--shadow); }
.plan .tag {
  position: absolute; top: -11px; right: 22px;
  background: var(--accent-strong); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 3px 11px; border-radius: 999px;
}
.plan .pname { font-size: 15px; color: var(--text-dim); font-weight: 600; }
.plan .price { font-size: 40px; font-weight: 800; margin: 8px 0 2px; }
.plan .price small { font-size: 15px; color: var(--text-faint); font-weight: 500; }
.plan .pdesc { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.plan li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
.plan li .ic { color: var(--good); margin-top: 2px; }
.plan li.off { color: var(--text-faint); }
.plan li.off .ic { color: var(--text-faint); }
.plan .btn { margin-top: auto; }

/* blog */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .posts { grid-template-columns: 1fr; } }
.post-card { padding: 22px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.post-card:hover { border-color: var(--accent-strong); transform: translateY(-2px); }
.post-card .tag { color: var(--accent); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.5px; }
.post-card h3 { margin: 8px 0 6px; font-size: 18px; }
.post-card p { margin: 0; color: var(--text-dim); font-size: 14px; }
.post-card .date { color: var(--text-faint); font-size: 12.5px; margin-top: 12px; }
.post-body p { color: var(--text); line-height: 1.7; }
.post-body h3 { margin: 20px 0 8px; }

/* app pages */
.page { max-width: 1250px; margin: 0 auto; padding: 18px 20px 24px; }
.page.narrow { max-width: 760px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 26px; margin: 0 0 4px; }
.page-head p { margin: 0; color: var(--text-dim); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .quick { grid-template-columns: 1fr; } }
.quick a {
  padding: 18px; display: flex; align-items: center; gap: 13px;
  transition: border-color 0.15s;
}
.quick a:hover { border-color: var(--accent-strong); text-decoration: none; }
.quick a .qi {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: var(--panel-2); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--accent);
}
.quick a .qt { color: var(--text); font-weight: 600; font-size: 14.5px; }
.quick a .qd { color: var(--text-faint); font-size: 12.5px; }

/* ══════════════════════════════════════════════════════════════════════
   Contained nav row + avatar dropdown (layout only — same theme colors)
   ══════════════════════════════════════════════════════════════════════ */
.nav { display: block; padding: 0; gap: 0; }
.nav-inner {
  max-width: 1250px;
  margin: 0 auto;
  width: 100%;
  height: 58px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  box-sizing: border-box;
}
.nav-inner > .nav-brand { flex-shrink: 0; }
.nav-inner > .nav-links { flex: 1; justify-content: center; }
.nav-inner > .nav-right { flex-shrink: 0; }

/* user trigger (avatar + name + caret) */
.user-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 2px 10px 2px 2px;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}
.user-trigger:hover { border-color: var(--border); background: var(--panel-2); }
.user-trigger .avatar { width: 30px; height: 30px; }
.ut-name { font-size: 14px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ut-caret { color: var(--text-faint); display: inline-flex; }
.ut-caret .ic { width: 14px; height: 14px; }
.menu-wrap.open .ut-caret { transform: rotate(180deg); }
.menu-sep { height: 1px; background: var(--border-soft); margin: 6px 4px; }
.menu-item.danger { color: var(--bad); }
.menu-item.danger:hover { background: rgba(240, 97, 109, 0.1); color: var(--bad); }

/* avatar can now carry an uploaded image */
.avatar { background-size: cover; background-position: center; overflow: hidden; }

.avatar-btn {
  background: none;
  border: none;
  padding: 2px;
  margin: 0;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  line-height: 0;
}
.avatar-btn:hover { box-shadow: 0 0 0 2px var(--border); }

.menu-wrap { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 230px;
  background: #ffffff !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  padding: 6px;
  display: none;
  z-index: 2000;
}
:root[data-theme='dark'] .menu {
  background: #111520 !important;
  border-color: #2b3345;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}
.menu-wrap.open .menu { display: block; }
.menu-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px 11px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 6px;
}
.menu-name { font-weight: 600; font-size: 14px; }
.menu-mail { color: var(--text-faint); font-size: 12px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.menu-item:hover { background: var(--panel-2); text-decoration: none; color: var(--text); }

/* edit-profile avatar picker */
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-lg {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  background-size: cover; background-position: center;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 30px;
  overflow: hidden; flex: none;
}

/* ══════════════════════════════════════════════════════════════════════
   Profile page (banner + avatar + tabs) — layout only, existing theme
   ══════════════════════════════════════════════════════════════════════ */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font: inherit; font-size: 14px; font-weight: 600;
}
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.active { background: var(--accent-strong); color: #fff; }
.tab.active .ic { color: #fff; }
.tab-panel { margin-top: 18px; }

.profile-grid { display: grid; grid-template-columns: 4fr 6fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-side { padding: 0; overflow: hidden; }
.pbanner { height: 120px; background: linear-gradient(120deg, var(--accent-strong), #8f6bff 55%, #d16bb7); }
.pbody { padding: 0 20px 22px; text-align: center; }
.pavatar {
  width: 108px; height: 108px; border-radius: 50%;
  margin: -54px auto 12px;
  background: var(--panel-2) center/cover no-repeat;
  border: 4px solid var(--panel);
  display: grid; place-items: center;
  position: relative; cursor: pointer; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pavatar:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 22px rgba(77, 107, 255, 0.28);
  transform: translateY(-2px);
}
.pavatar-initial {
  color: #fff; font-size: 38px; font-weight: 700; user-select: none;
}
.pavatar-hint {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  background: rgba(11, 15, 25, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}
.pavatar-hint .pavatar-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.75);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.pavatar-hint .pavatar-icon svg,
.pavatar-hint .pavatar-icon .ic {
  width: 26px; height: 26px;
  stroke: #fff; stroke-width: 2.2;
}
.pavatar-hint .pavatar-text {
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.95);
  transform: translateY(2px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.pavatar:hover .pavatar-hint { opacity: 1; }
.pavatar:hover .pavatar-hint .pavatar-icon { transform: scale(1); }
.pavatar:hover .pavatar-hint .pavatar-text { transform: translateY(0); }
.pname { font-size: 19px; font-weight: 700; }
.phandle { display: inline-block; font-size: 13.5px; margin-top: 2px; }
.pupload { margin-top: 16px; line-height: 1.7; }

.prefixed { display: flex; align-items: stretch; }
.prefixed .pfx {
  display: grid; place-items: center;
  padding: 0 12px;
  background: var(--bg-soft); border: 1px solid var(--border); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-faint); font-size: 14px;
}
.prefixed input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.tab-panel h2 .ic { vertical-align: -3px; }

/* public profile avatar keeps the bordered, banner-overlapping look */
.pavatar-static { margin: -54px auto 12px; border: 4px solid var(--panel); }

/* ══════════════════════════════════════════════════════════════════════
   Profile: Subscription & Licensing Modern UI
   ══════════════════════════════════════════════════════════════════════ */
.sub-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero card */
.sub-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sub-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-strong), #8f6bff, #ec4899);
}
.sub-hero.is-free::before {
  background: linear-gradient(90deg, var(--text-faint), var(--border));
}
.sub-hero-glow {
  position: absolute;
  top: -60px;
  right: -50px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(77, 107, 255, 0.16), transparent 70%);
  pointer-events: none;
  filter: blur(24px);
}
:root[data-theme='dark'] .sub-hero-glow {
  background: radial-gradient(circle, rgba(110, 168, 254, 0.22), transparent 70%);
}
.sub-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.sub-hero-main {
  flex: 1;
  min-width: 280px;
}
.sub-plan-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.sub-plan-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 4px 0 8px;
  line-height: 1.25;
}
.sub-plan-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  max-width: 620px;
  margin: 0;
  line-height: 1.55;
}
.sub-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
@media (max-width: 640px) {
  .sub-hero-meta {
    align-items: flex-start;
  }
}
.sub-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.sub-status-pill.active {
  background: color-mix(in srgb, var(--good) 12%, transparent);
  border-color: color-mix(in srgb, var(--good) 35%, transparent);
  color: var(--good);
}
.sub-expiry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.sub-expiry-pill.good {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 30%, transparent);
  background: color-mix(in srgb, var(--good) 10%, transparent);
}

/* Stats grid */
.sub-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) {
  .sub-stats-grid {
    grid-template-columns: 1fr;
  }
}
.sub-stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.sub-stat-card:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.sub-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sub-stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.sub-stat-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--accent);
  border: 1px solid var(--border-soft);
}
.sub-stat-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 4px;
}
.sub-stat-sub {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}
.sub-stat-action {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.sub-stat-action:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* Progress bar */
.sub-progress-wrap {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 10px 0 6px;
  border: 1px solid var(--border-soft);
}
.sub-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), #8f6bff);
  transition: width 0.4s ease;
}

/* Features showcase */
.sub-features-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
}
.sub-features-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.sub-features-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}
.sub-features-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0;
}
.sub-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 760px) {
  .sub-features-grid {
    grid-template-columns: 1fr;
  }
}
.sub-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sub-feature-item:hover {
  border-color: var(--border);
  background: var(--panel-2);
}
.sub-feature-item.locked {
  background: var(--panel-2);
  opacity: 0.72;
}
.sub-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--good) 12%, transparent);
  color: var(--good);
  border: 1px solid color-mix(in srgb, var(--good) 24%, transparent);
}
.sub-feature-item.locked .sub-feature-icon {
  background: var(--panel);
  color: var(--text-faint);
  border-color: var(--border);
}
.sub-feature-body {
  flex: 1;
  min-width: 0;
}
.sub-feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.sub-feature-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.sub-feature-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

/* CTA / Upgrade Banner */
.sub-cta-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent) 0%, color-mix(in srgb, #8f6bff 10%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius);
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.sub-cta-main {
  flex: 1;
  min-width: 280px;
}
.sub-cta-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sub-cta-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
  max-width: 580px;
}
.sub-cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Quick Actions Card for Pro */
.sub-actions-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.sub-actions-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sub-actions-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.sub-actions-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* FAQ / Help grid */
.sub-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 760px) {
  .sub-info-grid {
    grid-template-columns: 1fr;
  }
}
.sub-info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.sub-info-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--accent);
  flex-shrink: 0;
}
.sub-info-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.sub-info-text {
  font-size: 12.8px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   Client-nav fade + mobile menu + responsive polish
   ══════════════════════════════════════════════════════════════════════ */
.nav-loading #main { opacity: 0.45; transition: opacity 0.14s ease; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  place-items: center;
}
.nav-toggle:hover { color: var(--text); background: var(--panel-2); border-color: var(--border); }

@media (max-width: 860px) {
  .nav-inner { position: relative; padding: 8px 16px; min-height: 52px; }
  .nav-toggle { display: grid; }
  .nav-inner > .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto !important;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 16px 20px;
    background: #ffffff !important;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    display: none;
    z-index: 2000;
  }
  :root[data-theme='dark'] .nav-inner > .nav-links {
    background: #0f131c !important;
    border-color: #262c3a;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.75);
  }
  .nav.nav-open > .nav-inner > .nav-links { display: flex !important; }
  .nav-link {
    padding: 10px 14px;
    height: 42px;
    font-size: 14.5px;
    border-radius: 8px;
    background: var(--panel-2);
    border: 1px solid var(--border-soft);
    color: var(--text);
  }
  :root[data-theme='dark'] .nav-link {
    background: #171c28;
    border-color: #23293a;
  }
  .nav-link:hover {
    background: var(--panel);
    border-color: var(--border);
  }
  :root[data-theme='dark'] .nav-link:hover {
    background: #1f2535;
  }
  .nav-link.active {
    box-shadow: none;
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--accent);
    font-weight: 700;
  }
  /* keep the right cluster from crowding the small bar */
  .nav-right { gap: 6px; }
  .ut-name { display: none; }
  .menu {
    z-index: 2000;
    background: #ffffff !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid var(--border);
  }
  :root[data-theme='dark'] .menu {
    background: #111520 !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.75);
    border-color: #2b3345;
  }
}

@media (max-width: 560px) {
  .nav-right .btn.ghost { display: none; } /* Sign in also lives in the menu area */
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .section-title { font-size: 23px; }
  .page, .wrap { padding-left: 16px; padding-right: 16px; }
  .section { padding: 16px; }
  .modal { margin: 0 4px; }
  .kv { grid-template-columns: 1fr; gap: 3px 0; }
  .kv dt { margin-top: 8px; }
  /* wide tables scroll instead of overflowing */
  .section table, .tab-panel table, #users-body table, #devices-body table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ── admin user detail ──────────────────────────────────────────────── */
.udetail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
}
.udetail-head .avatar { flex: none; }
.ud-name { font-size: 19px; font-weight: 700; }
.ud-mail { color: var(--text-dim); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.ud-actions { display: flex; flex-direction: column; gap: 8px; }
.ud-actions .btn { width: 100%; }

/* ── admin hero stat cards (colourful) ──────────────────────────────── */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 900px) { .hero-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hero-stats { grid-template-columns: 1fr; } }
.hstat {
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hstat .hicon { position: absolute; right: 14px; top: 14px; opacity: 0.28; }
.hstat .hicon .ic { width: 40px; height: 40px; }
.hstat .hlabel { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; opacity: 0.92; }
.hstat .hnum { font-size: 30px; font-weight: 800; margin: 6px 0 2px; }
.hstat .hsub { font-size: 12.5px; opacity: 0.85; }
.hstat.green { background: linear-gradient(135deg, #13b26a, #0e9f74); }
.hstat.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.hstat.orange { background: linear-gradient(135deg, #f59e0b, #f97316); }
.hstat.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* ── filter chips ───────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}
.chip:hover { color: var(--text); }
.chip.chip-on { background: var(--good); border-color: var(--good); color: #fff; }
.chip .ic,
.chip svg.ic {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-bar input[type='date'] { width: auto; padding: 6px 10px; }
.filter-bar .sep { color: var(--text-faint); }

/* ── modern upload dropzone & progress bar ───────────────────────────── */
.dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent-strong);
  background: rgba(77, 107, 255, 0.05);
  transform: translateY(-1px);
}
.dropzone-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.dropzone-icon-circle .ic {
  width: 22px;
  height: 22px;
}
.dropzone-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.dropzone-title span {
  color: var(--accent);
  text-decoration: underline;
}
.dropzone-hint {
  font-size: 12px;
  color: var(--text-faint);
}

.file-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
  margin-top: 10px;
}
.file-preview-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-preview-info {
  flex: 1;
  min-width: 0;
}
.file-preview-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview-meta {
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}
.file-preview-remove {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 1;
}
.file-preview-remove:hover {
  color: var(--bad);
  background: rgba(240, 97, 109, 0.12);
}

.upload-progress-container {
  display: none;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.upload-progress-container.show {
  display: block;
}
.progress-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.progress-percentage {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}
.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), #8f6bff, #47c98a);
  transition: width 0.15s ease-out;
  position: relative;
  background-size: 200% 100%;
}
.progress-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.progress-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(77, 107, 255, 0.7);
  animation: pulse-dot 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
}
@keyframes pulse-dot {
  to {
    box-shadow: 0 0 0 8px rgba(77, 107, 255, 0);
  }
}

/* ── Plugin Thumbnails in Admin ── */
.pl-thumb-mini {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
  border: 1px solid var(--border);
  flex: none;
}
.pl-thumb-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(77, 107, 255, 0.15), rgba(143, 107, 255, 0.15));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex: none;
  font-size: 16px;
}
.thumb-upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.thumb-upload-preview {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
  border: 1px solid var(--border);
}

/* ── Web Plugin Store Aesthetic ── */
.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.filter-pill:hover {
  background: var(--panel-2);
  color: var(--text);
  border-color: var(--border-soft);
}
.filter-pill.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(77, 107, 255, 0.35);
}
.plugin-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* ── Blog Manager & Editor Aesthetic ── */
.blog-thumb-upload-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.blog-thumb-preview-wrap {
  width: 90px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-2);
  flex: none;
}
.blog-thumb-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  background: var(--panel-2);
}
.blog-editor-tabs {
  display: inline-flex;
  border-radius: 6px;
  background: var(--panel-2);
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--border);
}
.blog-editor-tabs button {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
}
.blog-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  flex-wrap: wrap;
}
.blog-toolbar + #bm-editor-wrap textarea {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ── Public Blog Page Aesthetics ── */
.blog-hero {
  text-align: center;
  padding: 40px 16px 28px;
}
.blog-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.blog-hero p {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 540px;
  margin: 0 auto;
}
.blog-search-bar {
  max-width: 560px;
  margin: 24px auto 0;
  position: relative;
  display: flex;
  align-items: center;
}
.blog-search-bar input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: 30px;
  font-size: 15px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.blog-search-bar .ic {
  position: absolute;
  left: 16px;
  color: var(--text-faint);
  pointer-events: none;
}
.blog-filters-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0 32px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}
.blog-card-thumb {
  width: 100%;
  height: 185px;
  object-fit: cover;
  background: var(--panel-2);
  display: block;
}
.blog-card-thumb-placeholder {
  width: 100%;
  height: 185px;
  background: linear-gradient(135deg, rgba(77, 107, 255, 0.12), rgba(143, 107, 255, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: var(--accent);
}
.blog-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.blog-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(77, 107, 255, 0.12);
  color: var(--accent);
  border: 1px solid rgba(77, 107, 255, 0.25);
}
.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ── Rich Markdown Post Body & Modal ── */
.post-body {
  line-height: 1.75;
  color: var(--text);
  font-size: 15.5px;
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  color: var(--text);
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  line-height: 1.35;
  font-weight: 700;
}
.post-body h1 { font-size: 26px; }
.post-body h2 { font-size: 22px; border-bottom: 1px solid var(--border-soft); padding-bottom: 6px; }
.post-body h3 { font-size: 18px; }
.post-body p { margin: 0 0 1.2em; }
.post-body blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
}
.post-body pre {
  background: #0d1117;
  color: #e6edf3;
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13.5px;
  margin: 1.4em 0;
  border: 1px solid #30363d;
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.post-body pre code {
  background: transparent;
  padding: 0;
  font-size: 1em;
}
.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 1.4em;
}
.post-body li {
  margin-bottom: 0.4em;
}
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-body .blog-embed-img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 1.4em 0;
  border: 1px solid var(--border);
  display: block;
}
.blog-reading-header {
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.blog-reading-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  margin: 8px 0 12px;
}
.blog-reading-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 13px;
}
.blog-reading-cover {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

/* ── Device Hardware Specs & Telemetry ── */
.hw-specs-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 380px;
}
.hw-spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.35;
}
.hw-spec-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  flex-shrink: 0;
}
.hw-spec-tag.cpu { color: #38bdf8; border-color: rgba(56, 189, 248, 0.25); background: rgba(56, 189, 248, 0.08); }
.hw-spec-tag.gpu { color: #4ade80; border-color: rgba(74, 222, 128, 0.25); background: rgba(74, 222, 128, 0.08); }
.hw-spec-tag.ram { color: #a78bfa; border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.08); }
.hw-spec-tag.disk { color: #fb923c; border-color: rgba(251, 146, 60, 0.25); background: rgba(251, 146, 60, 0.08); }
.hw-spec-val {
  color: var(--text);
  font-weight: 500;
  white-space: normal;
  word-break: break-word;
}
.ip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* User Alert & Notification Cards */
.alert-msg-box {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  max-width: 520px;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}
.alert-msg-box b, .alert-msg-box strong {
  color: #fff;
}
.alert-msg-box code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
}
.alert-msg-box i, .alert-msg-box em {
  opacity: 0.85;
}
[data-theme="light"] .alert-msg-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}
[data-theme="light"] .alert-msg-box b, [data-theme="light"] .alert-msg-box strong {
  color: #0f172a;
}
[data-theme="light"] .alert-msg-box code {
  background: #e2e8f0;
  color: #0f172a;
}

/* ── Interactive Mouse Follow & Spotlight Effects ─────────────────────── */
.cursor-ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--mouse-glow-size, 200px);
  height: var(--mouse-glow-size, 200px);
  margin-top: var(--mouse-glow-offset, -100px);
  margin-left: var(--mouse-glow-offset, -100px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: var(--mouse-glow-opacity, 0.1);
  transition: opacity 0.25s ease;
  background: radial-gradient(circle closest-side, rgba(99, 102, 241, 0.22), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
  will-change: transform;
}
:root[data-theme='dark'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(77, 107, 255, 0.26), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 2: Galaxy Cosmic Pink/Purple ── */
[data-mouse-style='galaxy_trail'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(236, 72, 153, 0.18), rgba(139, 92, 246, 0.10), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}
:root[data-theme='dark'][data-mouse-style='galaxy_trail'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(236, 72, 153, 0.25), rgba(168, 85, 247, 0.18), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 3: Matrix Cyber Green ── */
[data-mouse-style='matrix_cyber'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(16, 185, 129, 0.18), rgba(34, 197, 94, 0.10), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}
:root[data-theme='dark'][data-mouse-style='matrix_cyber'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(16, 185, 129, 0.26), rgba(34, 197, 94, 0.16), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 4: Fire & Sunset Gold ── */
[data-mouse-style='fire_sunset'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(245, 158, 11, 0.20), rgba(239, 68, 68, 0.10), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}
:root[data-theme='dark'][data-mouse-style='fire_sunset'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(245, 158, 11, 0.28), rgba(249, 115, 22, 0.18), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 5: Rainbow Aurora Borealis ── */
[data-mouse-style='rainbow_aurora'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(255, 0, 128, 0.16), rgba(121, 40, 202, 0.14), rgba(0, 112, 243, 0.12), rgba(0, 223, 216, 0.08), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}
:root[data-theme='dark'][data-mouse-style='rainbow_aurora'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(255, 0, 128, 0.24), rgba(121, 40, 202, 0.20), rgba(0, 112, 243, 0.18), rgba(0, 223, 216, 0.12), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 6: Electric Lightning Plasma ── */
[data-mouse-style='electric_lightning'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(0, 240, 255, 0.20), rgba(0, 112, 243, 0.12), rgba(121, 40, 202, 0.08), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}
:root[data-theme='dark'][data-mouse-style='electric_lightning'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(0, 240, 255, 0.28), rgba(0, 112, 243, 0.20), rgba(121, 40, 202, 0.12), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 7: Sakura Petals & Rose ── */
[data-mouse-style='cherry_blossom'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(244, 114, 182, 0.18), rgba(251, 113, 133, 0.10), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}
:root[data-theme='dark'][data-mouse-style='cherry_blossom'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(244, 114, 182, 0.26), rgba(251, 113, 133, 0.16), transparent 75%);
  filter: blur(var(--mouse-glow-blur, 10px));
}

/* ── Style 8: Minimal Clean Glass ── */
[data-mouse-style='minimal_clean'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(148, 163, 184, 0.20), transparent 70%);
  filter: blur(var(--mouse-glow-blur, 8px));
}
:root[data-theme='dark'][data-mouse-style='minimal_clean'] .cursor-ambient-glow {
  background: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.16), transparent 70%);
  filter: blur(var(--mouse-glow-blur, 8px));
}

/* ── Disabled Style ── */
[data-mouse-style='disabled'] .cursor-ambient-glow,
[data-mouse-style='disabled'] #cursor-trail-canvas,
[data-mouse-style='disabled'] .card::before,
[data-mouse-style='disabled'] .feature-card::before,
[data-mouse-style='disabled'] .price-card::before,
[data-mouse-style='disabled'] .plugin-card::before,
[data-mouse-style='disabled'] .step-card::before {
  display: none !important;
}

/* Card Mouse Spotlight Hover (Border & Glow) across all pages */
.card, .feature-card, .price-card, .plugin-card, .plugin-item, .step-card, .auth-box, .stat-box, .faq-item, .profile-side {
  position: relative;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}
.card::before, .feature-card::before, .price-card::before, .plugin-card::before, .plugin-item::before, .step-card::before, .auth-box::before, .stat-box::before, .faq-item::before, .profile-side::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(var(--mouse-glow-size, 200px) circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(99, 102, 241, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}
:root[data-theme='dark'] .card::before,
:root[data-theme='dark'] .feature-card::before,
:root[data-theme='dark'] .price-card::before,
:root[data-theme='dark'] .plugin-card::before,
:root[data-theme='dark'] .plugin-item::before,
:root[data-theme='dark'] .step-card::before,
:root[data-theme='dark'] .auth-box::before,
:root[data-theme='dark'] .stat-box::before,
:root[data-theme='dark'] .faq-item::before,
:root[data-theme='dark'] .profile-side::before {
  background: radial-gradient(var(--mouse-glow-size, 200px) circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(110, 168, 254, 0.22), transparent 65%);
}

/* Specific Card Spotlights per Style */
[data-mouse-style='galaxy_trail'] .card::before,
[data-mouse-style='galaxy_trail'] .feature-card::before,
[data-mouse-style='galaxy_trail'] .price-card::before,
[data-mouse-style='galaxy_trail'] .plugin-card::before,
[data-mouse-style='galaxy_trail'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(236, 72, 153, 0.28), rgba(168, 85, 247, 0.16), transparent 65%);
}

[data-mouse-style='matrix_cyber'] .card::before,
[data-mouse-style='matrix_cyber'] .feature-card::before,
[data-mouse-style='matrix_cyber'] .price-card::before,
[data-mouse-style='matrix_cyber'] .plugin-card::before,
[data-mouse-style='matrix_cyber'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(16, 185, 129, 0.30), rgba(34, 197, 94, 0.15), transparent 65%);
}

[data-mouse-style='fire_sunset'] .card::before,
[data-mouse-style='fire_sunset'] .feature-card::before,
[data-mouse-style='fire_sunset'] .price-card::before,
[data-mouse-style='fire_sunset'] .plugin-card::before,
[data-mouse-style='fire_sunset'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(245, 158, 11, 0.32), rgba(239, 68, 68, 0.18), transparent 65%);
}

[data-mouse-style='rainbow_aurora'] .card::before,
[data-mouse-style='rainbow_aurora'] .feature-card::before,
[data-mouse-style='rainbow_aurora'] .price-card::before,
[data-mouse-style='rainbow_aurora'] .plugin-card::before,
[data-mouse-style='rainbow_aurora'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 0, 128, 0.28), rgba(0, 112, 243, 0.20), transparent 65%);
}

[data-mouse-style='electric_lightning'] .card::before,
[data-mouse-style='electric_lightning'] .feature-card::before,
[data-mouse-style='electric_lightning'] .price-card::before,
[data-mouse-style='electric_lightning'] .plugin-card::before,
[data-mouse-style='electric_lightning'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(0, 240, 255, 0.32), rgba(0, 112, 243, 0.18), transparent 65%);
}

[data-mouse-style='cherry_blossom'] .card::before,
[data-mouse-style='cherry_blossom'] .feature-card::before,
[data-mouse-style='cherry_blossom'] .price-card::before,
[data-mouse-style='cherry_blossom'] .plugin-card::before,
[data-mouse-style='cherry_blossom'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(244, 114, 182, 0.30), rgba(251, 113, 133, 0.16), transparent 65%);
}

[data-mouse-style='minimal_clean'] .card::before,
[data-mouse-style='minimal_clean'] .feature-card::before,
[data-mouse-style='minimal_clean'] .price-card::before,
[data-mouse-style='minimal_clean'] .plugin-card::before,
[data-mouse-style='minimal_clean'] .step-card::before {
  background: radial-gradient(380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 255, 255, 0.18), transparent 65%);
}

.card:hover::before, .feature-card:hover::before, .price-card:hover::before, .plugin-card:hover::before, .plugin-item:hover::before, .step-card:hover::before, .auth-box:hover::before, .stat-box:hover::before, .faq-item:hover::before, .profile-side:hover::before {
  opacity: 1;
}

/* 3D Tilt interactive container */
.tilt-interactive {
  transition: transform 0.12s ease-out, box-shadow 0.2s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Click Ripple Burst */
.cursor-click-burst {
  position: fixed;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent);
  pointer-events: none;
  z-index: 99999;
  animation: clickRipple 0.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
.cursor-click-burst.style-galaxy_trail {
  border-color: #ec4899;
  box-shadow: 0 0 18px #ec4899, 0 0 26px #8b5cf6;
}
.cursor-click-burst.style-matrix_cyber {
  border-color: #10b981;
  box-shadow: 0 0 18px #10b981, 0 0 26px #00ff88;
}
.cursor-click-burst.style-fire_sunset {
  border-color: #f59e0b;
  box-shadow: 0 0 18px #f59e0b, 0 0 26px #ef4444;
}
.cursor-click-burst.style-rainbow_aurora {
  border-color: #00dfd8;
  box-shadow: 0 0 18px #ff0080, 0 0 26px #0070f3;
}
.cursor-click-burst.style-electric_lightning {
  border-color: #00f0ff;
  box-shadow: 0 0 20px #00f0ff, 0 0 30px #0070f3;
}
.cursor-click-burst.style-cherry_blossom {
  border-color: #f472b6;
  box-shadow: 0 0 18px #f472b6, 0 0 26px #fb7185;
}
.cursor-click-burst.style-minimal_clean {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes clickRipple {
  0% { transform: scale(0.2); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── Checkout Page Styles ─────────────────────────────────────────── */
.checkout-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 10px;
}

.checkout-preset-card {
  position: relative;
  overflow: visible;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.checkout-preset-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent) !important;
  box-shadow: 0 8px 24px rgba(77, 107, 255, 0.18);
}

.checkout-preset-card.active {
  box-shadow: 0 0 0 1px var(--accent), 0 8px 25px rgba(77, 107, 255, 0.25);
}

.checkout-popular-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 10px rgba(77, 107, 255, 0.35);
  z-index: 2;
}

.checkout-summary-card {
  backdrop-filter: blur(12px);
  background: var(--panel);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 860px) {
  .checkout-layout {
    flex-direction: column;
  }
  .checkout-summary-card {
    position: static !important;
  }
}

/* ── Checkout Duration Slider (No shadow, full edge-to-edge travel) ── */
.checkout-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  margin: 6px 0 2px 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.checkout-slider:focus,
.checkout-slider:active,
.checkout-slider:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* WebKit Track */
.checkout-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--progress, 0%), rgba(255, 255, 255, 0.12) var(--progress, 0%), rgba(255, 255, 255, 0.12) 100%);
  border-radius: 999px;
  border: none;
  box-shadow: none !important;
  outline: none !important;
}

[data-theme="light"] .checkout-slider::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--progress, 0%), #e2e8f0 var(--progress, 0%), #e2e8f0 100%);
}

/* WebKit Thumb - cleanly reaches the edges, absolutely no shadow/halo */
.checkout-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  margin-top: -5px;
  cursor: pointer;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
  transition: transform 0.08s ease;
}

.checkout-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: none !important;
  outline: none !important;
}

.checkout-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
  box-shadow: none !important;
  outline: none !important;
}

/* Firefox Track & Progress */
.checkout-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  border: none;
  box-shadow: none !important;
}

[data-theme="light"] .checkout-slider::-moz-range-track {
  background: #e2e8f0;
}

.checkout-slider::-moz-range-progress {
  height: 6px;
  background: var(--accent);
  border-radius: 999px;
  border: none;
}

/* Firefox Thumb */
.checkout-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
}

.checkout-slider::-moz-range-thumb:hover,
.checkout-slider::-moz-range-thumb:active {
  box-shadow: none !important;
  outline: none !important;
}

/* ── Register Terms & Agreement ─────────────────────────────────────────── */
.terms-field {
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.terms-field:hover {
  border-color: var(--border);
  background: var(--bg-soft);
}
.terms-label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  font-weight: 450 !important;
  color: var(--text-dim) !important;
  margin-bottom: 0 !important;
  user-select: none !important;
}
.terms-label input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  margin: 1px 0 0 0 !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  accent-color: var(--accent-strong) !important;
}
.terms-label a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.terms-label a:hover {
  color: var(--accent-strong);
}

/* ══════════════════════════════════════════════════════════════════════
   Downloads Page (.dl-*)
   ══════════════════════════════════════════════════════════════════════ */
.dl-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}
.dl-hero {
  text-align: center;
  margin-bottom: 44px;
  position: relative;
}
.dl-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(77, 107, 255, 0.1);
  border: 1px solid rgba(77, 107, 255, 0.28);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 18px;
}
.dl-title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin: 0 0 16px;
  color: var(--text);
}
.dl-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto;
}
.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .dl-grid { grid-template-columns: 1fr; }
}
.dl-card {
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, border-color 0.25s;
}
.dl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(77, 107, 255, 0.12);
  border-color: rgba(77, 107, 255, 0.4);
}
.dl-card.featured {
  border: 1.5px solid rgba(77, 107, 255, 0.45);
  background: linear-gradient(180deg, rgba(77, 107, 255, 0.04) 0%, var(--panel) 100%);
}
.dl-badge-top {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4d6bff, #1f9d57);
  color: #fff;
  box-shadow: 0 2px 8px rgba(77, 107, 255, 0.35);
}
.dl-os-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.dl-os-icon-wrap.win {
  background: linear-gradient(135deg, rgba(0, 120, 215, 0.15), rgba(77, 107, 255, 0.25));
  border: 1px solid rgba(0, 120, 215, 0.3);
  color: #0078d7;
}
.dl-os-icon-wrap.mac {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(150, 150, 150, 0.15));
  border: 1px solid var(--border);
  color: var(--text);
}
.dl-os-icon-wrap svg,
.dl-os-icon-wrap .ic {
  width: 32px;
  height: 32px;
}
.dl-os-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dl-os-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dl-os-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 24px;
}
.dl-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 750;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none !important;
}
.dl-cta-btn.primary {
  background: linear-gradient(135deg, var(--accent-strong), #8f6bff);
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(77, 107, 255, 0.4);
  border: none;
}
.dl-cta-btn.primary:hover {
  background: linear-gradient(135deg, #3b7bff, #7a55f5);
  box-shadow: 0 6px 26px rgba(77, 107, 255, 0.55);
  transform: translateY(-2px);
}
.dl-cta-btn.disabled {
  background: var(--panel-2);
  color: var(--text-faint) !important;
  border: 1px solid var(--border);
  cursor: not-allowed;
  opacity: 0.75;
}
.dl-sublinks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  margin-top: 14px;
  color: var(--text-faint);
}
.dl-sublinks a, .dl-sublinks span {
  color: var(--text-faint);
  cursor: pointer;
}
.dl-sublinks a:hover, .dl-sublinks span:hover {
  color: var(--accent);
}
.dl-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
@media (max-width: 860px) {
  .dl-trust-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dl-trust-strip { grid-template-columns: 1fr; }
}
.dl-trust-item {
  padding: 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.dl-trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.dl-trust-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.dl-trust-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
}
.dl-section-card {
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 26px 28px;
  margin-bottom: 36px;
}
.dl-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13.5px;
}
.dl-specs-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--panel-2);
  color: var(--text-dim);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.dl-specs-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.dl-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .dl-faq-grid { grid-template-columns: 1fr; }
}
.dl-faq-item {
  padding: 18px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
}
.dl-faq-q {
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-faq-a {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0;
}

/* -- Next-Gen Seamless Page View Transitions ----------------------------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 140ms cubic-bezier(0.4, 0, 0.2, 1) both kcut-view-fade-out;
}

::view-transition-new(root) {
  animation: 200ms cubic-bezier(0, 0, 0.2, 1) both kcut-view-fade-in;
}

@keyframes kcut-view-fade-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.995); }
}

@keyframes kcut-view-fade-in {
  from { opacity: 0; transform: scale(1.005); }
  to { opacity: 1; transform: scale(1); }
}


/* -- Ultra-Fast Zero-Refresh SPA Progress Bar (Disabled per user request) --- */
#kcut-spa-bar {
  display: none !important;
}

/* -- Ultra-Premium Center Page Logo Loader ------------------------------- */
.kcut-page-loader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg, #090d16);
  z-index: 999999;
  pointer-events: none;
  user-select: none;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme='dark'] .kcut-page-loader {
  background: #090d16 !important;
}

.kcut-page-loader.dismissed {
  opacity: 0 !important;
  transform: scale(0.96) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


.kcut-loader-box {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kcut-loader-orbit {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 4px solid rgba(77, 107, 255, 0.08);
  border-top: 4px solid #4d6bff;
  border-right: 4px solid #a855f7;
  border-bottom: 4px solid transparent;
  border-left: 4px solid transparent;
  animation: kcut-orbit-spin 0.75s linear infinite;
  -webkit-animation: kcut-orbit-spin 0.75s linear infinite;
  will-change: transform;
  filter: drop-shadow(0 0 10px rgba(77, 107, 255, 0.7));
  box-sizing: border-box;
  pointer-events: none;
}

.kcut-loader-orbit-rev {
  position: absolute;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-bottom: 3px solid #ec4899;
  border-left: 3px solid #38bdf8;
  animation: kcut-orbit-rev 1.2s linear infinite;
  -webkit-animation: kcut-orbit-rev 1.2s linear infinite;
  will-change: transform;
  filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5));
  box-sizing: border-box;
  pointer-events: none;
}

.kcut-loader-badge {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  animation: kcut-badge-breathe 1.8s ease-in-out infinite alternate;
  -webkit-animation: kcut-badge-breathe 1.8s ease-in-out infinite alternate;
  will-change: transform;
  filter: drop-shadow(0 8px 24px rgba(77, 107, 255, 0.5));
}

.kcut-loader-svg {
  width: 58px;
  height: 58px;
  display: block;
}

.kcut-loader-status {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kcut-loader-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kcut-loader-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent, #4d6bff), #a855f7);
  opacity: 0.35;
  display: inline-block;
  animation: kcut-dots-bounce 1.2s ease-in-out infinite;
  -webkit-animation: kcut-dots-bounce 1.2s ease-in-out infinite;
}

.kcut-loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
  -webkit-animation-delay: 0.2s;
}

.kcut-loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
  -webkit-animation-delay: 0.4s;
}

@keyframes kcut-loader-deferred {
  0% { opacity: 0; visibility: hidden; transform: scale(0.97); }
  100% { opacity: 1; visibility: visible; transform: scale(1); }
}

@keyframes kcut-orbit-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@-webkit-keyframes kcut-orbit-spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes kcut-orbit-rev {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
@-webkit-keyframes kcut-orbit-rev {
  0% { -webkit-transform: rotate(360deg); }
  100% { -webkit-transform: rotate(0deg); }
}

@keyframes kcut-badge-breathe {
  0% { transform: scale(0.96); filter: drop-shadow(0 4px 14px rgba(77, 107, 255, 0.4)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 12px 28px rgba(168, 85, 247, 0.7)); }
}
@-webkit-keyframes kcut-badge-breathe {
  0% { -webkit-transform: scale(0.96); filter: drop-shadow(0 4px 14px rgba(77, 107, 255, 0.4)); }
  100% { -webkit-transform: scale(1.05); filter: drop-shadow(0 12px 28px rgba(168, 85, 247, 0.7)); }
}

@keyframes kcut-dots-bounce {
  0%, 100% { transform: translateY(0) scale(0.85); opacity: 0.35; }
  50% { transform: translateY(-6px) scale(1.2); opacity: 1; }
}
@-webkit-keyframes kcut-dots-bounce {
  0%, 100% { -webkit-transform: translateY(0) scale(0.85); opacity: 0.35; }
  50% { -webkit-transform: translateY(-6px) scale(1.2); opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE ENGINE (Strictly scoped to max-width: 768px / 640px)
   Preserves computer/desktop layout 100%, optimizes all mobile screens.
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Grid layouts collapse to single column on mobile */
  .grid.cols-2, .grid.cols-3, .grid.cols-4 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Prevent table and pre overflow */
  table {
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  /* ── 1. Containers & Gutter Spacing ── */
  .container {
    padding: 0 16px !important;
  }
  .wrap {
    padding: 18px 16px 44px !important;
  }
  .page {
    padding: 16px 16px 24px !important;
  }
  .section {
    padding: 16px 14px !important;
  }

  /* ── 2. Header & Top Navigation Bar ── */
  .nav-inner {
    padding: 0 16px !important;
    height: 54px !important;
    min-height: 54px !important;
  }
  /* Hide dev docs icon button on mobile header to avoid clutter */
  .nav-right a.theme-toggle[data-icon="code"],
  .nav-right .dev-docs-btn,
  .dev-docs-btn {
    display: none !important;
  }
  /* On mobile, hide caret in avatar dropdown trigger to avoid duplicate chevron clutter */
  .user-trigger .ut-caret {
    display: none !important;
  }
  .user-trigger {
    padding: 2px !important;
    gap: 0 !important;
    border: none !important;
  }
  .user-trigger .avatar {
    width: 32px !important;
    height: 32px !important;
  }
  /* When logged out on small mobile, hide topbar login buttons and let hamburger handle it */
  .nav-right > a.btn.sm {
    display: none !important;
  }
  .nav-right {
    gap: 8px !important;
  }

  /* Mobile Navigation Drawer Dropdown */
  .nav-inner > .nav-links {
    top: 54px !important;
    padding: 16px 16px 24px !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }
  .nav-link {
    height: 44px !important;
    font-size: 15px !important;
    padding: 0 14px !important;
  }

  /* ── 3. Hero Section (Home & Marketing) ── */
  .hero {
    padding: 28px 16px 36px !important;
  }
  .hero .eyebrow {
    font-size: 11.5px !important;
    padding: 5px 12px !important;
    line-height: 1.4 !important;
    margin-bottom: 14px !important;
    max-width: 95% !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .hero h1 {
    font-size: clamp(2rem, 6.8vw, 2.35rem) !important;
    line-height: 1.22 !important;
    margin: 0 0 14px !important;
    letter-spacing: -0.025em !important;
  }
  .hero p {
    font-size: 14.5px !important;
    line-height: 1.65 !important;
    color: var(--text-dim) !important;
    margin: 0 auto 22px !important;
    padding: 0 4px !important;
  }

  /* Hero CTA Buttons: Stack vertically with full width for thumb taps */
  .hero .cta {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto 22px !important;
    gap: 10px !important;
  }
  .hero .cta .btn {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 13px 20px !important;
    font-size: 14.5px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  /* Trust Badges: Wrap gracefully with comfortable spacing */
  .hero .trust-badges,
  .hero div[style*="justify-content: center; align-items: center; gap: 20px"] {
    gap: 10px 14px !important;
    font-size: 12px !important;
    margin-top: 6px !important;
  }

  /* ── 4. App Mockup Showcase Window ── */
  .card.tilt-interactive {
    border-radius: 12px !important;
  }
  .card.tilt-interactive > div:first-child {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .card.tilt-interactive > div:first-child > div:nth-child(2) {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .card.tilt-interactive img {
    max-height: 280px !important;
  }

  /* ── 5. Features & How It Works Cards ── */
  .section-title {
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
  }
  .section-sub {
    font-size: 14px !important;
    margin-bottom: 24px !important;
  }
  .card.feature {
    padding: 20px 16px !important;
  }
  .card.section[style*="linear-gradient"] {
    padding: 24px 16px !important;
    border-radius: 14px !important;
  }

  /* ── 6. Bank Security Banner ── */
  section.container .card[style*="border-left: 4px solid"] {
    padding: 20px 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  section.container .card[style*="border-left: 4px solid"] .badge {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
  }

  /* ── 7. Referral Section & Language Toggle ── */
  .ref-flag-toggle {
    position: static !important;
    margin: 0 auto 18px auto !important;
    display: inline-flex !important;
  }
  section.container .card[style*="radial-gradient"] {
    padding: 28px 16px !important;
    border-radius: 14px !important;
  }
  section.container .card[style*="radial-gradient"] h2 {
    font-size: 1.8rem !important;
  }
  section.container .card[style*="radial-gradient"] div[style*="linear-gradient(135deg, rgba(77, 107, 255, 0.12)"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    text-align: center !important;
    padding: 18px 14px !important;
  }
  section.container .card[style*="radial-gradient"] div[style*="linear-gradient(135deg, rgba(77, 107, 255, 0.12)"] div[style*="display: flex; align-items: center; gap: 16px"] {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
  }
  section.container .card[style*="radial-gradient"] div[style*="linear-gradient(135deg, rgba(77, 107, 255, 0.12)"] .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* ── 8. Pricing Plans ── */
  .plans {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .plan {
    padding: 22px 18px !important;
  }
  .plan .price {
    font-size: 34px !important;
  }
  .plan .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* ── 9. Final Call-to-Action ── */
  section.container .card[style*="radial-gradient(circle at 50% -20%"] {
    padding: 32px 18px !important;
  }
  section.container .card[style*="radial-gradient(circle at 50% -20%"] h2 {
    font-size: 1.7rem !important;
    line-height: 1.25 !important;
  }
  section.container .card[style*="radial-gradient(circle at 50% -20%"] .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* ── 10. Downloads Page ── */
  .dl-hero {
    padding: 28px 16px 20px !important;
  }
  .dl-title {
    font-size: clamp(1.85rem, 6.5vw, 2.4rem) !important;
  }
  .dl-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .dl-card {
    padding: 24px 18px !important;
  }
  .dl-card .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* ── 11. Plugins Store Page ── */
  .filter-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .filter-pill {
    padding: 6px 12px !important;
    font-size: 12.5px !important;
  }

  /* ── 12. Footer Section ── */
  .foot-skyline-banner {
    height: 60px !important;
    width: calc(100% - 24px) !important;
  }
  .foot-skyline-art {
    height: 48px !important;
  }
  .foot-top {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    padding-bottom: 24px !important;
  }
  .foot-middle {
    padding: 16px 0 !important;
  }
  .foot-payment-group {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .foot-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding-top: 16px !important;
  }
  .foot-bottom-links {
    flex-wrap: wrap !important;
    gap: 8px 12px !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.95rem !important;
  }
  .hero .cta {
    max-width: 100% !important;
  }
  .card {
    border-radius: 12px !important;
  }
}

/* ── Admin Sub Tabs & Pill Rails Wrap Guarantee ── */
.sub-tabs-container,
.category-pills-rail,
.tabs-nav-scroll,
.tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  width: fit-content !important;
  max-width: 100% !important;
}

.sub-tab-pill,
.category-pill,
.filter-pill,
.tab,
button.tab,
.chip {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  line-height: 1.25 !important;
}

/* ── Download Free CTA Button ── */
.btn.download-free {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%) !important;
  border: 1px solid rgba(52, 211, 153, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.38) !important;
  font-weight: 750 !important;
  letter-spacing: 0.25px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn.download-free:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%) !important;
  border-color: rgba(52, 211, 153, 0.9) !important;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.58), 0 0 16px rgba(52, 211, 153, 0.45) !important;
  transform: translateY(-2.5px) scale(1.02) !important;
  color: #ffffff !important;
}
.btn.download-free:active {
  transform: translateY(0) scale(0.99) !important;
}

/* ── Home Page Rich Interactive Hover Effects ── */
.card.feature {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.32s ease, background 0.32s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.card.feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent, #4d6bff), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card.feature:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.38), 0 0 26px -4px rgba(77, 107, 255, 0.22);
  border-color: color-mix(in srgb, var(--accent, #4d6bff) 45%, var(--border));
  background: var(--panel-2);
}
.card.feature:hover::before {
  opacity: 1;
}
.card.feature .ficon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, filter 0.35s ease;
}
.card.feature:hover .ficon {
  transform: scale(1.16) translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.3);
  filter: brightness(1.15);
}

.step-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.3);
  border-color: rgba(77, 107, 255, 0.4);
}
.step-card .step-num {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.step-card:hover .step-num {
  transform: scale(1.14) rotate(4deg);
  box-shadow: 0 6px 18px rgba(77, 107, 255, 0.45);
}

.ref-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.ref-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.28);
  border-color: rgba(99, 102, 241, 0.45);
}
.ref-card .ref-icon-wrap {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ref-card:hover .ref-icon-wrap {
  transform: scale(1.15) rotate(-3deg);
}

.trust-badges span {
  transition: transform 0.22s ease, color 0.22s ease;
}
.trust-badges span:hover {
  transform: translateY(-2px);
  color: var(--text);
}

/* ── KCut Ultra-Professional Google Auth Modal ────────────────────────────── */
.kcut-auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: opacity, visibility;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
}

.kcut-auth-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.kcut-auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: opacity;
  transition: opacity 0.22s ease;
}

.kcut-auth-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 468px;
  padding: 0;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(20, 26, 44, 0.98) 0%, rgba(11, 15, 26, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 32px 80px -12px rgba(0, 0, 0, 0.9), 0 0 60px rgba(99, 102, 241, 0.18);
  text-align: center;
  transform: translate3d(0, 8px, 0) scale(0.97);
  will-change: transform, opacity;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  z-index: 2;
  box-sizing: border-box;
  overflow: hidden;
}

.kcut-auth-modal-overlay.is-open .kcut-auth-modal-dialog {
  transform: translate3d(0, 0, 0) scale(1);
}

.kcut-auth-modal-top-glow {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6366f1, #a855f7, #ec4899, transparent);
  filter: blur(0.5px);
}

/* 1. Header Row */
.kcut-auth-modal-header-row {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.kcut-auth-header-left {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
}

.kcut-auth-header-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 45%, #ec4899 100%);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.38), 0 0 12px rgba(249, 115, 22, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kcut-auth-header-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kcut-auth-header-main-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.015em;
}

.kcut-auth-header-sub-title {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.kcut-auth-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
  flex-shrink: 0;
}

.kcut-auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg) scale(1.08);
}

/* 2. Center Content Area */
.kcut-auth-modal-center-body {
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kcut-auth-google-badge {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  flex-shrink: 0;
}

.kcut-auth-modal-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.kcut-auth-modal-desc {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 auto 22px;
  line-height: 1.55;
  max-width: 380px;
}

/* 3. Benefits / Highlights Box & Footer Card */
.kcut-auth-benefits-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: left;
  margin: 0;
  box-sizing: border-box;
}

.kcut-auth-benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.4;
}

.kcut-benefit-icon-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kcut-benefit-icon-badge.is-gold {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.35);
}

.kcut-benefit-icon-badge.is-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.kcut-benefit-icon-badge.is-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.kcut-benefit-text {
  flex: 1;
  font-size: 12.5px;
  font-weight: 450;
  letter-spacing: -0.01em;
}

/* Feature Benefits List */
.kcut-auth-features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 24px;
  text-align: left;
}

.kcut-auth-feat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.kcut-auth-feat-item:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateX(2px);
}

.kcut-feat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.kcut-feat-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kcut-feat-text strong {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.kcut-feat-text span {
  font-size: 11.5px;
  color: #94a3b8;
}

.kcut-auth-modal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  min-height: 44px;
  height: 44px;
  width: 100%;
}

.kcut-google-btn-wrapper {
  width: 350px;
  max-width: 100%;
  min-height: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
  transition: opacity 0.22s ease, filter 0.22s ease;
}

.kcut-google-btn-wrapper.is-disabled {
  opacity: 0.48;
  pointer-events: none;
  filter: grayscale(0.25);
}

.kcut-google-btn-wrapper iframe {
  border-radius: 12px !important;
}

/* Trust Badges */
.kcut-auth-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  margin-top: 12px;
}

.kcut-modal-status {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
  display: none;
  text-align: left;
}

.kcut-modal-status.is-active {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kcut-modal-status.is-info {
  background: rgba(77, 107, 255, 0.12);
  border: 1px solid rgba(77, 107, 255, 0.3);
  color: #93c5fd;
}

.kcut-modal-status.is-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.kcut-modal-spin {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: kcut-auth-spin 0.75s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes kcut-auth-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.kcut-auth-modal-agreement {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 20px;
}

.kcut-auth-modal-footer {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.kcut-auth-terms-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  padding: 6px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 360px;
}

.kcut-auth-terms-checkbox-wrap:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.kcut-auth-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.kcut-auth-checkbox-custom {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.kcut-auth-checkbox-custom svg {
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kcut-auth-checkbox:checked + .kcut-auth-checkbox-custom {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.kcut-auth-checkbox:checked + .kcut-auth-checkbox-custom svg {
  transform: scale(1);
}

.kcut-auth-terms-text {
  text-align: left;
}

.kcut-auth-terms-text a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.kcut-auth-terms-text a:hover {
  color: #a5b4fc;
}

.kcut-google-btn-wrapper.is-disabled {
  opacity: 0.38;
  filter: grayscale(0.85);
  pointer-events: none;
  transition: all 0.25s ease;
}

@keyframes kcut-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.kcut-shake {
  animation: kcut-shake 0.35s ease-in-out;
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
}

.kcut-auth-modal-bottom-bar {
  margin: 22px -36px -32px;
  padding: 13px 26px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.55) 0%, rgba(5, 8, 16, 0.92) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.015em;
  box-sizing: border-box;
}

.kcut-modal-footer-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-weight: 500;
  transition: color 0.2s ease;
}

.kcut-modal-footer-item:hover {
  color: #94a3b8;
}

.kcut-modal-footer-item svg {
  color: #10b981;
  flex-shrink: 0;
}

/* ── Auth Modal Ultra-Smooth Loading & Success Overlay ── */
.kcut-auth-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 26, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
  border-radius: 28px;
  padding: 24px;
}

.kcut-auth-loading-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.kcut-auth-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.kcut-auth-loading-overlay.is-active .kcut-auth-loading-card {
  transform: scale(1) translateY(0);
}

.kcut-auth-loading-spinner-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kcut-auth-loading-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(236, 72, 153, 0.25) 60%, transparent 80%);
  filter: blur(10px);
  animation: kcut-pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes kcut-pulse-glow {
  0% { transform: scale(0.88); opacity: 0.5; }
  100% { transform: scale(1.18); opacity: 1; }
}

.kcut-auth-loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #6366f1;
  border-right-color: #a855f7;
  border-bottom-color: #ec4899;
  animation: kcut-auth-spin 0.85s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.kcut-auth-loading-icon {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.kcut-auth-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5), 0 0 20px rgba(16, 185, 129, 0.3);
  animation: kcut-pop-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes kcut-pop-in {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.kcut-auth-loading-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
}

.kcut-auth-loading-sub {
  font-size: 13.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
  max-width: 300px;
}

/* 4. Terms & Agreement Notice (Subtle, passwordless, no checkbox) */
.kcut-auth-modal-agreement {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 20px;
}

.kcut-auth-terms-notice {
  margin: 0;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
  text-align: center;
  max-width: 360px;
}

.kcut-auth-terms-notice a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2.5px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.kcut-auth-terms-notice a:hover {
  color: #a5b4fc;
}




