/* ═══════════════════════════════════════════════════════════════
   THEME 4 — "Premium App" design system (light + dark)
   Loaded after bootstrap/style/dashboard css so overrides win.
   Visual layer only — no structural/JS hooks are modified.
   ═══════════════════════════════════════════════════════════════ */
:root, html[data-theme="light"] {
  --t4-pp: #9a40eb;
  --t4-pp2: #7c3aed;
  --t4-pp3: #c26bff;
  --t4-grad: linear-gradient(135deg, #9a40eb, #6d28d9);
  --t4-deep: #170b28;
  --t4-body: #faf9fd;
  --t4-card: #ffffff;
  --t4-ink: #1e1630;
  --t4-dim: #6f6885;
  --t4-line: #ece6f6;
  --t4-soft: #f3eefb;
  --t4-glow: 0 12px 32px rgba(154, 64, 235, .35);
  --t4-card-sh: 0 4px 24px rgba(30, 22, 48, .07);
  --t4-green: #10b981;
  --t4-green-grad: linear-gradient(135deg, #34d399, #0ea371);
  --t4-red: #e5484d;
  --t4-hdr-bg: rgba(255, 255, 255, .85);
}
html[data-theme="dark"] {
  --t4-body: #0e0918;
  --t4-card: #171026;
  --t4-ink: #efeaf8;
  --t4-dim: #a89dc0;
  --t4-line: #2b2044;
  --t4-soft: #211737;
  --t4-card-sh: 0 4px 24px rgba(0, 0, 0, .35);
  --t4-hdr-bg: rgba(14, 9, 24, .85);
  color-scheme: dark;
}

/* ── base ── */
body {
  font-family: 'Plus Jakarta Sans', 'Manrope', sans-serif !important;
  background-color: var(--t4-body) !important;
  color: var(--t4-ink) !important;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--t4-ink); font-weight: 700; }
.text-dark { color: var(--t4-ink) !important; }
.text-muted, .text-secondary { color: var(--t4-dim) !important; }
a { color: var(--t4-pp2); }
a:hover { color: var(--t4-pp); }
hr { border-color: var(--t4-line); opacity: 1; }
img:not([width]):not([style*="width"]) { max-width: 100%; height: auto; }
::selection { background: rgba(154, 64, 235, .25); }

/* ── buttons ── */
.btn { border-radius: 999px; font-weight: 700; }
.btn-primary, .reg-btn, .submit-btn, .slide-button {
  background: var(--t4-grad) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(154, 64, 235, .3);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-primary:hover, .reg-btn:hover, .submit-btn:hover, .slide-button:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(154, 64, 235, .42);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary, .btn-outline-light, .login-btn {
  background: var(--t4-card) !important;
  border: 1.5px solid var(--t4-line) !important;
  color: var(--t4-ink) !important;
  transition: border-color .15s, color .15s, transform .15s;
}
.btn-secondary:hover, .btn-outline-light:hover, .login-btn:hover {
  border-color: var(--t4-pp) !important;
  color: var(--t4-pp2) !important;
}
.btn-success {
  background: var(--t4-grad) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(154, 64, 235, .3);
}
.btn-success:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(154, 64, 235, .42);
  filter: brightness(1.05);
}
.btn-success:active { transform: translateY(0); }
.btn-outline-danger { border-radius: 999px; }
.btn-outline-primary {
  border: 1.5px solid var(--t4-pp) !important;
  color: var(--t4-pp2) !important;
  background: transparent !important;
}
.btn-outline-primary:hover { background: rgba(154, 64, 235, .1) !important; color: var(--t4-pp2) !important; }
.notfound { text-align: center; max-width: 560px; margin: 3rem auto; }
.notfound svg { fill: var(--t4-pp); opacity: .85; }
.notfound svg path { fill: var(--t4-pp); }
.notfound .t4-filetile { margin-bottom: 1.25rem; }
.notfound .block { text-align: left; }

/* ── simple content pages (news, links, referrals, checkfiles…) ── */
.t4-page-head { text-align: center; margin-bottom: 2rem; }
.t4-page-head .tile {
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--t4-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(154, 64, 235, .3);
  margin-bottom: .85rem;
}
.t4-page-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.t4-page-head .sub { font-size: .875rem; color: var(--t4-dim); font-weight: 500; margin-top: .35rem; }

.t4-article {
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 18px;
  box-shadow: var(--t4-card-sh);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  transition: transform .15s, box-shadow .15s;
}
.t4-article:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(30, 22, 48, .1); }
.t4-article h3 a { color: var(--t4-ink); text-decoration: none; font-weight: 800; }
.t4-article h3 a:hover { color: var(--t4-pp2); }
.t4-article .meta { font-size: .78rem; color: var(--t4-dim); font-weight: 600; }
.t4-article .meta i { color: var(--t4-pp); }

.t4-link-row {
  display: flex; align-items: center; gap: .85rem;
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 14px;
  padding: .85rem 1.1rem;
  margin-bottom: .6rem;
  text-decoration: none;
  color: var(--t4-ink);
  font-weight: 700;
  transition: border-color .15s, transform .15s;
}
.t4-link-row:hover { border-color: var(--t4-pp); color: var(--t4-pp2); transform: translateX(3px); }
.t4-link-row i { color: var(--t4-pp); font-size: 1.05rem; }

.t4-lock-card {
  max-width: 520px; margin: 2.5rem auto; text-align: center;
  background: var(--t4-card); border: 1px solid var(--t4-line);
  border-radius: 24px; box-shadow: var(--t4-card-sh);
  padding: 2.5rem 1.75rem;
}
.t4-lock-card .tile {
  width: 76px; height: 76px; border-radius: 22px;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 1.25rem;
  box-shadow: 0 14px 30px rgba(217, 119, 6, .3);
}

.t4-check-status { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ── file manager bottom toolbar (files_controls.html) ── */
.control-buttons {
  /* dashboard.css hardcodes background-color:#fff, invisible/blinding in dark mode */
  background-color: var(--t4-card) !important;
  border-top: 1px solid var(--t4-line);
  /* on phones with a home-indicator / gesture bar, a plain bottom:0 fixed
     bar can render partly or fully behind that system UI; this keeps
     content clear of it (no-op on devices/browsers without safe areas) */
  padding-bottom: max(.75rem, env(safe-area-inset-bottom)) !important;
}
.control-buttons .row { flex-wrap: nowrap; align-items: center; }
.control-buttons .col-auto { flex-shrink: 0; }
/* scroll only the action buttons, not the whole row — the "more" dropdown
   must stay outside any overflow:auto ancestor or its popped-open menu
   gets clipped by that ancestor's box */
.t4-ctrl-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-width: 0;
  padding: 2px 2px 4px;
}
.t4-ctrl-scroll::-webkit-scrollbar { display: none; }
.t4-ctrl-scroll > * { flex-shrink: 0; }
/* dashboard.css collapses these buttons to icon-only 32x32 squares below
   1199px via font-size:0 — fine for the old inline SVGs (fixed pixel size)
   but it also zeroed out our bootstrap-icons glyphs, which scale with
   font-size. Restore the icon's own size/centering at that breakpoint. */
@media (max-width: 1199px) {
  .control-buttons .btn i { font-size: 1rem !important; margin: 0 !important; }
}
.control-buttons .form-select { border-radius: 999px; min-width: 170px; }
.control-buttons .btn { display: inline-flex; align-items: center; white-space: nowrap; }
.control-buttons .btn-more { padding: 0; width: 38px; height: 38px; justify-content: center; border-radius: 999px; }
.control-buttons .dropdown-item.flag { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.control-buttons .dropdown-item.flag i { color: var(--t4-pp); }

/* ── admin top nav (admin_menu.html) — horizontally scrollable pill bar,
   sits above header.html when an admin views a hide_menu page ── */
.admin-menu-wrap {
  background: var(--t4-deep);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.admin-menu {
  display: flex;
  align-items: center;
  gap: .4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: .6rem 1rem;
  max-width: 1600px;
  margin: 0 auto;
}
.admin-menu::-webkit-scrollbar { display: none; }
.admin-menu-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
  white-space: nowrap;
  color: #a89dc0;
  text-decoration: none;
  font-weight: 600;
  font-size: .84rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.admin-menu-item i { font-size: .95rem; color: #8d7fa8; transition: color .15s; }
.admin-menu-item:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.admin-menu-item:hover i { color: var(--t4-pp3); }
.admin-menu-item.active { color: #fff; background: var(--t4-grad); box-shadow: 0 6px 14px rgba(154, 64, 235, .35); }
.admin-menu-item.active i { color: #fff; }
.admin-menu-item.urgent { color: #fca5a5; }
.admin-menu-item.urgent i { color: #f87171; }
.admin-menu-item.urgent:hover { background: rgba(248, 113, 113, .12); }
.admin-menu-item .cnt {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  border-radius: 999px;
  padding: .05rem .45rem;
  min-width: 1.2rem;
  text-align: center;
}
.admin-menu-item.urgent .cnt { background: #f87171; }
.admin-menu-item.active .cnt { background: rgba(255, 255, 255, .25); }

/* ── dashboard header stats bar (header_cp.html) ── */
.t4-stats-wrap {
  border-top: 1px solid var(--t4-line);
  background: var(--t4-hdr-bg);
}
.t4-stats-bar {
  display: flex;
  align-items: center;
  gap: .55rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: .6rem 0;
}
.t4-stats-bar::-webkit-scrollbar { display: none; }
.t4-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--t4-soft);
  border: 1px solid var(--t4-line);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--t4-dim);
}
.t4-stat-chip i { color: var(--t4-pp); font-size: .9rem; }
.t4-stat-chip b { color: var(--t4-ink); font-weight: 800; margin-left: .2rem; }
.t4-stat-chip.welcome {
  background: var(--t4-grad);
  border-color: transparent;
  color: #fff;
}
.t4-stat-chip.welcome b { color: #fff; }
.t4-stat-chip.premium {
  background: linear-gradient(135deg, rgba(245, 158, 11, .16), rgba(217, 119, 6, .08));
  border-color: rgba(245, 158, 11, .35);
  color: #b45309;
}
.t4-stat-chip.premium i { color: #d97706; }
.t4-stat-chip.free {
  background: rgba(16, 185, 129, .1);
  border-color: rgba(16, 185, 129, .3);
  color: #0c7a55;
}
html[data-theme="dark"] .t4-stat-chip.premium { color: #fbbf24; }
html[data-theme="dark"] .t4-stat-chip.premium i { color: #fbbf24; }
html[data-theme="dark"] .t4-stat-chip.free { color: #4ade80; }
@media (max-width: 575px) {
  .t4-stat-chip { font-size: .76rem; padding: .35rem .75rem; }
}
/* dashboard.css reserves a fixed 94px top offset for <main>, sized for the
   header's original single row. Adding the stats bar grew the header to
   ~130px, so without this the bar overlapped the banner underneath.
   Class-based instead of :has() so it still works on older mobile browsers
   (older Android WebView / pre-15.4 Safari don't support :has()). */
.header-app + main { padding-top: 142px !important; }

/* ── accordion (FAQ / API pages) ── */
/* bootstrap's accordion vars derive from --bs-body-bg/--bs-body-color, which
   our theme never touches (we style body's actual background directly) —
   so accordions stayed white-on-black text in dark mode without this. */
.accordion-item {
  background: var(--t4-card);
  border-color: var(--t4-line) !important;
  border-radius: 14px !important;
  margin-bottom: .6rem;
  overflow: hidden;
}
.accordion-button {
  background: var(--t4-card) !important;
  color: var(--t4-ink) !important;
  font-weight: 700;
  box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
  background: var(--t4-soft) !important;
  color: var(--t4-pp2) !important;
}
.accordion-button::after { filter: none; }
html[data-theme="dark"] .accordion-button::after { filter: invert(1) brightness(1.8); }
.accordion-body { color: var(--t4-ink); background: var(--t4-card); }

/* ── legal / static content pages (FAQ, TOS, DMCA, API, privacy…) ── */
.text-content, .text-content p, .text-content li, .text-content strong { color: var(--t4-ink); }
.text-content a { color: var(--t4-pp2); }
.t4-article h3, .t4-article h4 { color: var(--t4-ink); }
.t4-legal-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--t4-grad); color: #fff; font-weight: 800; font-size: .85rem;
  flex-shrink: 0;
}
.t4-code {
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  background-color: #14101d;
  font-size: .85em;
  border-radius: 10px;
  color: #cbb6e8;
  border: 1px solid var(--t4-line);
}
.t4-code strong.badge { margin: 0 3px; }
.t4-os-card {
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 18px;
  box-shadow: var(--t4-card-sh);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}
.t4-os-card h3 { font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.t4-os-card h3 i { color: var(--t4-pp); }
.t4-os-card code, .t4-os-card b { color: var(--t4-pp2); }

/* g2fa modal */
#g2fa-qr-wrap, #g2fa-qr-code { border-radius: 14px; }
#g2fa-qr-code { background: #fff; padding: .5rem; border: 1px solid var(--t4-line); }
#g2fa-code { text-align: center; margin: 0 auto; }
.btn-link { color: var(--t4-pp2); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: var(--t4-pp); }
.big-btn { padding: .7rem 1.7rem; }
.icon-btn { border-radius: 12px; color: var(--t4-ink); }
.icon-btn:hover { background: var(--t4-soft); }
.icon-btn svg path, .navpanel-icon { color: currentColor; }
.text-dark svg path { fill: var(--t4-pp); }

/* bulb day/night toggle */
.theme-toggle {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--t4-line);
  background: var(--t4-card);
  color: #b45309;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, color .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: rotate(-12deg) scale(1.06); }
.theme-toggle .bulb-off { display: none; }
html[data-theme="dark"] .theme-toggle { color: #fbbf24; box-shadow: 0 0 14px rgba(251, 191, 36, .35); }
html[data-theme="dark"] .theme-toggle .bulb-on { display: none; }
html[data-theme="dark"] .theme-toggle .bulb-off { display: inline; }

/* ── header (public + dashboard) ── */
.header {
  background: var(--t4-hdr-bg) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--t4-line);
  box-shadow: none;
  /* backdrop-filter creates a stacking context: without a z-index the hero
     (positioned, later in DOM) paints over the header dropdown menus.
     1000 = above page content, below navpanel (1001). */
  z-index: 1000;
}
/* public layout header is static — make it positioned so z-index applies
   (dashboard header is position:absolute from dashboard.css, untouched).
   Class-based instead of :has() so it still works on older mobile browsers
   (older Android WebView / pre-15.4 Safari don't support :has()). */
.header-public { position: relative; }
.header .nav .nav-link {
  font-size: .875rem;
  font-weight: 600;
  /* !important: beats bootstrap's .link-body-emphasis utility, which stays
     near-black in dark mode and made these links invisible */
  color: var(--t4-dim) !important;
  padding: .45rem .95rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  transition: background-color .2s ease, color .2s ease;
}
.header .nav .nav-link i {
  color: var(--t4-pp);
  font-size: 1rem;
  transition: transform .2s ease;
}
.header .nav .nav-link:hover,
.header .nav .nav-link.active {
  background-color: rgba(154, 64, 235, .1);
  color: var(--t4-pp2) !important;
}
.header .nav .nav-link:hover i { transform: translateY(-1px) scale(1.1); }
.navpanel-icon { color: #fff; }
.download-btn { color: #fff; }

/* logo — gradient squircle mark + wordmark */
.logo {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  display: inline-flex !important;
  align-items: center;
  gap: .55rem;
  font-weight: 800 !important;
  font-size: 1.15rem;
  letter-spacing: -.02em !important;
  color: var(--t4-ink) !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
}
.logo::before {
  content: "\f296"; /* bi-cloud-arrow-up-fill */
  font-family: "bootstrap-icons";
  width: 34px; height: 34px;
  border-radius: 11px;
  background: var(--t4-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 6px 14px rgba(154, 64, 235, .35);
  flex-shrink: 0;
}

/* ── cards / blocks / modals ── */
.block, .card {
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 20px;
  box-shadow: var(--t4-card-sh);
  color: var(--t4-ink);
}
.card-body { color: var(--t4-ink); }
.modal-content {
  background: var(--t4-card);
  color: var(--t4-ink);
  border: 1px solid var(--t4-line);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(10, 4, 20, .35);
}
.modal-header, .modal-footer { border-color: var(--t4-line); }
/* bootstrap sets --bs-modal-footer-bg independently of modal-content's
   background, so the footer stayed white in dark mode — force transparent
   so it inherits modal-content's themed background */
.modal-footer { background-color: transparent !important; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* tabs strip (upload form, download codes) */
.block-tabs { border-bottom: 1px solid var(--t4-line); gap: .25rem; padding: .5rem .5rem 0; }
.block-tabs .nav-link {
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  font-size: .875rem;
  color: var(--t4-dim);
  border: 0;
}
.block-tabs .nav-link:hover { color: var(--t4-pp2); background: var(--t4-soft); }
.block-tabs .nav-link.active {
  color: var(--t4-pp2);
  background: var(--t4-soft);
  box-shadow: inset 0 -3px 0 var(--t4-pp);
}

/* ── forms ── */
.form-control, .form-select, .form-floating > .form-control {
  background-color: var(--t4-card);
  border: 1.5px solid var(--t4-line);
  border-radius: 14px;
  color: var(--t4-ink);
  font-weight: 500;
}
.form-control:focus, .form-select:focus {
  background-color: var(--t4-card);
  border-color: var(--t4-pp);
  color: var(--t4-ink);
  box-shadow: 0 0 0 .25rem rgba(154, 64, 235, .15);
}
.form-control::placeholder { color: var(--t4-dim); opacity: .8; }
.form-control[readonly], .form-control:disabled,
.form-select[readonly], .form-select:disabled { background-color: var(--t4-soft); color: var(--t4-ink); opacity: 1; }
.form-label, .form-check-label, label { color: var(--t4-ink); }
.form-floating > label { color: var(--t4-dim); }
.form-check-input { border-color: var(--t4-dim); background-color: var(--t4-card); }
.form-check-input:checked { background-color: var(--t4-pp); border-color: var(--t4-pp); }
.form-check-input:focus { box-shadow: 0 0 0 .25rem rgba(154, 64, 235, .15); }
/* .form-switcher (Moderator/Affiliate/2FA/VIP toggles across admin forms) had
   no local CSS at all, so it fell back to the old theme's stylesheet — an
   iOS-style switch with a green "on" state. Rebuild it purple to match. */
.form-switcher { display: inline-flex; align-items: center; gap: .5rem; }
.form-switcher input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px;
  margin: 0;
  border-radius: 999px;
  border: 1.5px solid var(--t4-line);
  background: var(--t4-soft);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.form-switcher input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .15s;
}
.form-switcher input[type="checkbox"]:checked {
  background: var(--t4-grad);
  border-color: transparent;
}
.form-switcher input[type="checkbox"]:checked::after { transform: translateX(18px); }
.form-switcher input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 .2rem rgba(154, 64, 235, .25); }
.form-switcher label { color: var(--t4-ink); cursor: pointer; margin: 0; }
/* safety net: any bare checkbox/radio not covered by .form-check-input,
   .check-radio, or .form-switcher above should still tint purple rather
   than fall back to the browser/OS default accent (often green on Linux/GTK). */
input[type="checkbox"], input[type="radio"] { accent-color: var(--t4-pp); }
/* .check-radio wraps plain <input type=checkbox|radio> across file/folder rows
   (admin + user file listings) — the base theme never styled these, so the
   native control's border was invisible against the new dark cards. Draw a
   custom box so visibility doesn't depend on OS-native checkbox rendering. */
.check-radio { display: inline-flex; align-items: center; justify-content: center; }
.check-radio input[type="checkbox"], .check-radio input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  margin: 0;
  border: 1.5px solid var(--t4-dim);
  border-radius: 5px;
  background: var(--t4-card);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.check-radio input[type="radio"] { border-radius: 50%; }
.check-radio input[type="checkbox"]:checked, .check-radio input[type="radio"]:checked {
  background: var(--t4-pp);
  border-color: var(--t4-pp);
}
.check-radio input[type="checkbox"]:checked::after {
  content: "";
  position: absolute; left: 5px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-radio input[type="radio"]:checked::after {
  content: "";
  position: absolute; left: 4.5px; top: 4.5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
}
.check-radio input:focus-visible { box-shadow: 0 0 0 .2rem rgba(154, 64, 235, .25); }
.input-group-text { background: var(--t4-soft); border: 1.5px solid var(--t4-line); color: var(--t4-dim); border-radius: 14px; }
textarea.form-control { border-radius: 14px; }
.codes-textarea textarea.form-control {
  background: var(--t4-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82rem;
  color: var(--t4-pp2);
  border-radius: 14px;
}

/* ── tables ── */
.table { color: var(--t4-ink); border-color: var(--t4-line); background: transparent; }
.table > :not(caption) > * > * { background: var(--t4-card); color: var(--t4-ink); border-bottom-color: var(--t4-line); }
.table thead th, .table-light th {
  background: var(--t4-soft) !important;
  color: var(--t4-dim) !important;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  border-bottom: 1px solid var(--t4-line) !important;
}
/* bootstrap paints hover as a light inset box-shadow overlay (#E6F0FC) with
   near-black text — invisible in dark mode. Neutralize it and use theme colors. */
.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: transparent;
  --bs-table-bg-state: transparent;
  --bs-table-bg-type: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-hover-color: var(--t4-ink);
  box-shadow: none !important;
  background: var(--t4-soft) !important;
  color: var(--t4-ink) !important;
}
.table-hover > tbody > tr:hover a { color: var(--t4-pp2); }
.table-hover > tbody > tr:hover .fname,
.table-hover > tbody > tr:hover .text-dark { color: var(--t4-ink) !important; }
.table-hover > tbody > tr:hover .text-muted { color: var(--t4-dim) !important; }
.table.bg-white { background: var(--t4-card) !important; }
.table-responsive { border-radius: 16px; }
.table a.text-dark, .table .text-dark { color: var(--t4-ink) !important; }

/* ── alerts ── */
.alert { border-radius: 16px; border: 1px solid var(--t4-line); font-weight: 500; }
.alert-success { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); color: #0c7a55; }
.alert-danger { background: rgba(229, 72, 77, .09); border-color: rgba(229, 72, 77, .3); color: #c73b40; }
.alert-warning { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); color: #a16207; }
.alert-info { background: rgba(154, 64, 235, .08); border-color: rgba(154, 64, 235, .25); color: var(--t4-pp2); }
.alert-secondary { background: var(--t4-soft); color: var(--t4-dim); }
html[data-theme="dark"] .alert-success { color: #4ade80; }
html[data-theme="dark"] .alert-danger { color: #f87171; }
html[data-theme="dark"] .alert-warning { color: #fbbf24; }

/* ── dropdown menus ── */
.dropdown-menu {
  padding: .5rem;
  border: 1px solid var(--t4-line);
  border-radius: 16px;
  background-color: var(--t4-card);
  box-shadow: 0 8px 32px rgba(60, 7, 120, .12), 0 1px 4px rgba(24, 33, 55, .06);
  min-width: 200px;
  animation: t4DropdownIn .15s ease;
}
/* opacity only — animating transform here fights Popper's inline
   translate3d positioning and makes the menu jump on open */
@keyframes t4DropdownIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  padding: .55rem .85rem;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--t4-ink);
  transition: background-color .15s ease, color .15s ease;
  gap: .25rem;
}
.dropdown-menu .dropdown-item svg { color: var(--t4-dim); transition: color .15s ease; flex-shrink: 0; }
.dropdown-menu .dropdown-item:hover { background-color: rgba(154, 64, 235, .1); color: var(--t4-pp2); }
.dropdown-menu .dropdown-item:hover svg { color: var(--t4-pp2); }
.dropdown-menu .dropdown-item[href*="logout"]:hover { background-color: rgba(229, 72, 77, .08); color: var(--t4-red); }
.dropdown-menu .dropdown-item[href*="logout"]:hover svg { color: var(--t4-red); }
.dropdown-menu .dropdown-item[href*="logout"] { margin-top: .25rem; border-top: 1px solid var(--t4-line); padding-top: .65rem; }

/* ── progress ── */
.progress { background-color: var(--t4-soft); border-radius: 999px; overflow: hidden; }
.progress-bar { background: var(--t4-grad); font-weight: 700; }

/* ── pagination / paging ── */
.pagination .page-link {
  color: var(--t4-pp2);
  background: var(--t4-card);
  border-color: var(--t4-line);
  font-weight: 700;
  border-radius: 10px;
  margin: 0 2px;
}
.pagination .page-item.active .page-link { background: var(--t4-grad); border-color: transparent; color: #fff; }
.paging a, .paging span {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: .35rem .6rem;
  margin: 2px;
  border-radius: 10px;
  border: 1px solid var(--t4-line);
  background: var(--t4-card);
  color: var(--t4-pp2);
  font-weight: 700;
  text-decoration: none;
}
.paging a:hover { border-color: var(--t4-pp); }
/* backend marks the active page as a bare <span> (no href, no class) —
   style all paging spans as the active/current page */
.paging span, .paging .current, .paging span.current { background: var(--t4-grad); color: #fff; border-color: transparent; }
.paging small { color: var(--t4-dim); }

/* ── upload form ── */
.dropbox {
  position: relative;
  border: 2px dashed rgba(154, 64, 235, .4) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, var(--t4-soft), var(--t4-card)) !important;
  color: var(--t4-ink) !important;
  padding: 2.5rem 1rem;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropbox:hover { border-color: var(--t4-pp) !important; }
.dropbox svg { fill: var(--t4-pp); }
.dropbox svg path { fill: var(--t4-pp); }
.dropbox .link-primary { color: var(--t4-pp2) !important; font-weight: 700; }
.dropbox input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.uploadItem { border-radius: 18px; }
.uploadItem-icon { fill: var(--t4-pp); }
.uploadItem svg path { fill: var(--t4-pp); }
#dropzone {
  background: rgba(23, 11, 40, .82);
  color: #fff;
  position: fixed;
  inset: 0;
  z-index: 100000;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  padding-top: 40vh;
  border: 3px dashed var(--t4-pp3);
  border-radius: 24px;
}

/* ── download pages ── */
.download-btn.btn-primary, .downloadbtn.btn-primary {
  border-radius: 18px !important;
  box-shadow: var(--t4-glow);
}
.download-btn, .download-btn * { color: #fff !important; }
.download-btn [data-status="disabled"] { opacity: .95; }
.download-btn .spinner-border { color: #fff; }
.download-title { color: var(--t4-ink); font-weight: 800; }
.download-meta { color: var(--t4-dim); }
.download-meta a { color: var(--t4-dim); }
.download .block svg path { fill: var(--t4-pp); }
.infoname { color: var(--t4-dim); display: inline-block; min-width: 110px; }
.relatedFile-link { color: var(--t4-ink); font-weight: 600; text-decoration: none; display: block; }
.relatedFile-link:hover { color: var(--t4-pp2); }
.spinner-border { color: var(--t4-pp3); }
.list-group-item {
  background: var(--t4-card);
  color: var(--t4-ink);
  border-color: var(--t4-line);
  font-weight: 600;
}
.list-group-item-action:hover { background: var(--t4-soft); color: var(--t4-pp2); }

/* ── theme-4 download flow components ── */
.t4-dl-card {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 24px;
  box-shadow: var(--t4-card-sh);
  padding: 2rem 1.25rem;
  text-align: center;
}
.t4-steps { display: flex; align-items: flex-start; justify-content: center; margin-bottom: 1.5rem; }
.t4-steps .sf { text-align: center; min-width: 84px; }
.t4-steps .sf .c {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  background: var(--t4-grad); color: #fff;
  box-shadow: 0 8px 18px rgba(154, 64, 235, .3);
}
.t4-steps .sf.todo .c { background: var(--t4-soft); color: var(--t4-dim); box-shadow: none; }
.t4-steps .sf .t { font-size: .72rem; font-weight: 700; margin-top: .4rem; color: var(--t4-dim); }
.t4-steps .sf.now .t { color: var(--t4-pp2); }
.t4-steps .con { flex: 1; max-width: 70px; height: 3px; border-radius: 3px; background: var(--t4-line); margin-top: 19px; }
.t4-steps .con.on { background: var(--t4-grad); }
.t4-filetile {
  width: 84px; height: 84px; border-radius: 24px;
  background: var(--t4-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 16px 36px rgba(154, 64, 235, .35);
  position: relative;
  margin-bottom: 1rem;
}
.t4-filetile svg { width: 34px; height: auto; }
.t4-filetile svg path { fill: #fff; }
.t4-filetile .scan {
  position: absolute; bottom: -8px; right: -8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #22c55e; color: #fff; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid var(--t4-card);
}
.t4-dl-name { font-weight: 800; font-size: 1.25rem; word-break: break-all; color: var(--t4-ink); margin-bottom: .35rem; }
.t4-meta { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin: .75rem 0 1.25rem; }
.t4-meta > span, .t4-meta .chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600;
  color: var(--t4-dim);
  background: var(--t4-soft);
  border: 1px solid var(--t4-line);
  border-radius: 999px;
  padding: .32rem .85rem;
}
.t4-meta > span a, .t4-meta .chip a { color: var(--t4-dim); text-decoration: none; }
.t4-meta > span a:hover, .t4-meta .chip a:hover { color: var(--t4-pp2); }
.t4-meta > span i, .t4-meta .chip i { color: var(--t4-pp); }
.t4-meta > span svg { flex-shrink: 0; }
.t4-dl-card .download-btn { width: 100%; max-width: 460px; margin: 0 auto; justify-content: center; }
.t4-dl-card .preview { text-align: left; }
.t4-ring {
  position: relative;
  width: 118px; height: 118px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin: .5rem auto 1rem;
}
.t4-ring::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #9a40eb, #c26bff, #6d28d9, #9a40eb);
  animation: t4spin 2.2s linear infinite;
}
.t4-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--t4-card); }
.t4-ring .in { position: relative; z-index: 1; font-weight: 800; font-size: 1.5rem; color: var(--t4-pp2); line-height: 1.15; }
.t4-ring .in small { display: block; font-size: .62rem; font-weight: 700; color: var(--t4-dim); text-transform: uppercase; letter-spacing: .08em; }
@keyframes t4spin { to { transform: rotate(360deg); } }
.t4-burst {
  width: 84px; height: 84px; border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--t4-green-grad);
  color: #fff; font-size: 2.3rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 40px rgba(16, 185, 129, .4);
  animation: t4pop .5s cubic-bezier(.68, -0.55, .27, 1.55);
}
@keyframes t4pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.t4-skip { display: inline-block; margin-top: 1rem; font-weight: 700; color: var(--t4-pp2); text-decoration: none; font-size: .9rem; }
.t4-skip:hover { color: var(--t4-pp); }
.t4-opt-note { font-size: .78rem; color: var(--t4-dim); font-weight: 600; margin-top: .5rem; }
.t4-controls { display: flex; justify-content: center; gap: .35rem; margin-top: .75rem; flex-wrap: wrap; }
.t4-controls .btn { padding: .35rem .7rem; font-size: .85rem; }

/* ── premium plans (payment_buy_with.html) ── */
.tab-buttons { gap: .5rem; }
.tab-buttons .nav-link {
  border-radius: 999px;
  border: 1.5px solid var(--t4-line);
  color: var(--t4-dim);
  font-weight: 700;
  background: var(--t4-card);
}
.tab-buttons .nav-link:hover { border-color: var(--t4-pp); color: var(--t4-pp2); }
.tab-buttons .nav-link.active { background: var(--t4-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(154, 64, 235, .3); }
.premiumPlan {
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 20px;
  padding: 1.75rem 1rem;
  text-align: center;
  box-shadow: var(--t4-card-sh);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  height: 100%;
}
.premiumPlan:hover {
  transform: translateY(-4px);
  border-color: var(--t4-pp);
  box-shadow: 0 16px 36px rgba(154, 64, 235, .18);
}
.premiumPlan .text-primary-emphasis {
  display: inline-block;
  background: var(--t4-soft);
  color: var(--t4-pp2) !important;
  border-radius: 999px;
  padding: .25rem .9rem;
  font-size: .8rem;
}
.paysys {
  background: var(--t4-card);
  border-color: var(--t4-line) !important;
  border-radius: 14px !important;
  transition: border-color .15s, transform .15s;
}
.paysys:hover { border-color: var(--t4-pp) !important; transform: translateY(-1px); }

/* ── catalogue file cards ── */
.fileItem {
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--t4-card-sh);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  height: calc(100% - 1rem);
}
.fileItem:hover { transform: translateY(-3px); border-color: var(--t4-pp); box-shadow: 0 12px 28px rgba(154, 64, 235, .15); }
.fileItem-cover { background: var(--t4-soft); min-height: 130px; display: flex; align-items: center; justify-content: center; position: relative; }
.fileItem-cover img.thumb { width: 100%; height: 140px; object-fit: cover; }
.fileItem-cover img.icon { max-width: 64px; max-height: 64px; opacity: .85; }
.fileItem-title { font-weight: 700; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileItem-date { font-size: .72rem; color: var(--t4-dim); }
.fileItem-info { font-size: .74rem; color: var(--t4-dim); font-weight: 600; }
.fileItem-addto { position: absolute; top: 8px; right: 8px; border-radius: 10px; }

/* ── ticket chat bubbles ── */
.t4-msg { max-width: 88%; margin-bottom: 1rem; }
.t4-msg .bubble {
  border-radius: 18px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--t4-line);
  background: var(--t4-card);
  box-shadow: var(--t4-card-sh);
}
.t4-msg.mine { margin-left: auto; }
.t4-msg.mine .bubble {
  background: linear-gradient(135deg, rgba(154, 64, 235, .12), rgba(109, 40, 217, .08));
  border-color: rgba(154, 64, 235, .3);
  border-radius: 18px 18px 4px 18px;
}
.t4-msg.staff .bubble { border-radius: 18px 18px 18px 4px; }
.t4-msg .who { font-size: .75rem; font-weight: 700; margin-bottom: .35rem; }
.t4-msg.mine .who { color: var(--t4-pp2); text-align: right; }
.t4-msg.staff .who { color: var(--t4-green); }
.t4-msg .when { font-size: .7rem; color: var(--t4-dim); font-weight: 500; }
.t4-avatar {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
  background: var(--t4-grad);
}
.t4-avatar.staff { background: var(--t4-green-grad); }

/* ── misc badge/thumbnail fixes ── */
.badge.bg-secondary { background: var(--t4-soft) !important; color: var(--t4-pp2) !important; }
.card .bg-light, .position-relative.bg-light { background: var(--t4-soft) !important; }

/* ── premium comparison table (comparison.html) ── */
.premiumTable {
  background: var(--t4-card) !important;
  border: 1px solid var(--t4-line);
  border-radius: 20px;
  box-shadow: var(--t4-card-sh);
  color: var(--t4-ink) !important;
  overflow: hidden;
}
.premiumTable .border-bottom { border-color: var(--t4-line) !important; }
.premiumTable .col { background: transparent !important; color: var(--t4-ink); }
.premiumTable .row { background: transparent !important; }
.premiumTable .col.premium, .premiumTable .premium { background: rgba(154, 64, 235, .1) !important; }
.premiumTable .premiumTable-heading .text-dark,
.premiumTable .xlarge { color: var(--t4-ink) !important; }
.premiumTable .text-muted { color: var(--t4-dim) !important; }

/* ── dashboard app components (Sample-4) ── */
.t4-banner {
  background: var(--t4-grad);
  border-radius: 22px;
  color: #fff;
  padding: 1.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
  margin-bottom: -2.25rem;
  box-shadow: 0 16px 36px rgba(154, 64, 235, .25);
}
.t4-banner::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
.t4-banner::before {
  content: "";
  position: absolute;
  left: 30%; bottom: -80px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.t4-banner > * { position: relative; z-index: 1; }
.t4-banner .hello { font-size: .85rem; font-weight: 600; opacity: .85; }
.t4-banner h1, .t4-banner h4, .t4-banner .h4 { color: #fff; font-weight: 800; margin: 0; }
.t4-banner .b-meta { font-size: .82rem; font-weight: 600; opacity: .92; }
.t4-banner .b-meta a { color: #fff; }
.t4-toolbar {
  position: relative;
  z-index: 2;
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 18px;
  box-shadow: var(--t4-card-sh);
  padding: .75rem;
  margin: 0 .75rem 1.5rem;
}
.t4-banner + .row, .t4-banner + form > .row { position: relative; z-index: 2; padding: 0 .5rem; }

/* file list rendered as card-rows (still a real <table> for JS compatibility) */
.t4-ftable { border-collapse: separate !important; border-spacing: 0 8px !important; background: transparent !important; box-shadow: none !important; }
.t4-ftable thead th {
  background: transparent !important;
  border: 0 !important;
  color: var(--t4-dim) !important;
}
.t4-ftable tbody td {
  background: var(--t4-card) !important;
  border: 0 !important;
  border-top: 1px solid var(--t4-line) !important;
  border-bottom: 1px solid var(--t4-line) !important;
  padding-top: .8rem;
  padding-bottom: .8rem;
}
.t4-ftable tbody td:first-child { border-left: 1px solid var(--t4-line) !important; border-radius: 16px 0 0 16px; padding-left: 1rem; }
.t4-ftable tbody td:last-child { border-right: 1px solid var(--t4-line) !important; border-radius: 0 16px 16px 0; }
.t4-ftable.table-hover tbody tr:hover td { background: var(--t4-soft) !important; }
.t4-fico {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  background: var(--t4-grad);
  box-shadow: 0 6px 14px rgba(154, 64, 235, .25);
  flex-shrink: 0;
}
/* folders read as secondary/navigational (soft, outlined) vs files as
   primary content (bold gradient) — common pattern in modern file managers */
.t4-fico.folder {
  background: var(--t4-soft);
  color: var(--t4-pp2);
  border: 1.5px solid var(--t4-line);
  box-shadow: none;
}
.t4-ftable tr:hover .t4-fico.folder { background: rgba(154, 64, 235, .14); border-color: rgba(154, 64, 235, .35); }
.t4-fact {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--t4-soft);
  color: var(--t4-pp2);
  text-decoration: none;
  font-size: .95rem;
  transition: background .15s, color .15s;
}
.t4-fact:hover { background: var(--t4-grad); color: #fff; }
.t4-fact.danger { color: #e5484d; }
.t4-fact.danger:hover { background: #e5484d; color: #fff; }
.t4-thumb {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  background: var(--t4-grad);
  box-shadow: 0 6px 14px rgba(154, 64, 235, .25);
  flex-shrink: 0;
}

/* ── my files / top bar ── */
.top-bar { margin-bottom: 1rem; }
.search .search-field, .search-field { border-radius: 999px; padding-left: 2.5rem; }
.files-total-badge { background: var(--t4-soft); color: var(--t4-pp2); }

/* ── auth card (.login used by login/registration/forgot) ── */
.login {
  /* style.css sets a fixed width:540px — width:100% keeps it inside the
     container on phones, max-width caps it on desktop */
  width: 100% !important;
  max-width: 480px;
  margin: 2.5rem auto;
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 24px;
  box-shadow: var(--t4-card-sh);
  padding: 2.25rem 1.75rem;
}
.login .form-floating > .form-control { border-radius: 14px; }
.login .t4-auth-head { text-align: center; margin-bottom: 1.75rem; }
.login .t4-auth-head .tile {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--t4-grad);
  color: #fff;
  font-size: 1.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(154, 64, 235, .35);
  margin-bottom: 1rem;
}
.login .t4-auth-head h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.login .t4-auth-head .sub { font-size: .875rem; color: var(--t4-dim); font-weight: 500; }
.login .submit-btn { width: 100%; padding: .8rem 1.5rem; font-size: 1rem; }
.login .t4-auth-alt {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--t4-line);
  font-size: .875rem;
  color: var(--t4-dim);
  font-weight: 500;
}
.login .t4-auth-alt a { font-weight: 700; text-decoration: none; }
.t4-auth-rules {
  max-width: 480px;
  margin: 0 auto 2.5rem;
  background: var(--t4-soft);
  border: 1px solid var(--t4-line);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  font-size: .8rem;
  color: var(--t4-dim);
}
.t4-auth-rules summary {
  font-weight: 700;
  color: var(--t4-ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.t4-auth-rules summary::after { content: "\f282"; font-family: "bootstrap-icons"; margin-left: auto; transition: transform .2s; }
.t4-auth-rules[open] summary::after { transform: rotate(180deg); }
.t4-auth-rules ul { margin: .75rem 0 0; padding-left: 1.1rem; }
.t4-auth-rules li { margin-bottom: .25rem; }
.divider-text { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; border-top: 1px solid var(--t4-line); }

/* ── dashboard sidebar (navpanel) — style C: icon tiles + tree ── */
.navpanel {
  background: var(--t4-deep) !important;
  color: #a89dc0;
  display: flex;
  flex-direction: column;
  /* position comes from dashboard.css (fixed) — overriding it pushes <main> down */
}
.navpanel .logo { color: #fff !important; }
.navpanel .navpanel-close { filter: invert(1) brightness(2); opacity: .8; }

/* segmented admin/user tab switcher */
.navpanel-tabs {
  background: rgba(255, 255, 255, .06);
  border-radius: 999px;
  padding: .25rem;
  gap: .25rem;
}
.navpanel-tabs .nav-link {
  border-radius: 999px;
  color: #a89dc0;
  font-weight: 700;
  font-size: .8rem;
  padding: .4rem .5rem;
  text-align: center;
  transition: background .15s, color .15s;
}
.navpanel-tabs .nav-link:hover { color: #fff; }
.navpanel-tabs .nav-link.active { background: var(--t4-grad); color: #fff; box-shadow: 0 6px 16px rgba(154, 64, 235, .35); }

/* menu items — flat rows, no pills; only the icon tile lights up.
   dashboard.css fights this with: -1.5rem side margins (edge bleed),
   gray bg + inset -4px right bar on .active, and its own :after chevron
   image — all neutralized below. */
.navpanel-menu { margin-left: 0 !important; margin-right: 0 !important; }
.navpanel-menu.nav { gap: 3px; }
.navpanel-menu .nav-link {
  color: #a89dc0;
  border-radius: 12px;
  font-weight: 600;
  font-size: .9rem;
  padding: .45rem .55rem !important;
  display: flex;
  align-items: center;
  position: relative;
  transition: color .15s;
}
.navpanel-menu .nav-link:hover {
  color: #fff;
  background: transparent !important;
}
.navpanel-menu .nav-link.active {
  color: #fff;
  background: transparent !important;
  box-shadow: none !important;
}
/* replace dashboard.css's image chevron with a themed glyph:
   right-pointing when closed, rotates down when open (.active) */
.navpanel-menu .nav-link.has-submenu:after {
  content: "\F285" !important; /* bi-chevron-right */
  font-family: "bootstrap-icons";
  background: none !important;
  width: auto !important;
  height: auto !important;
  position: static !important;
  margin: 0 0 0 auto !important;
  font-size: .7rem;
  opacity: .5;
  padding-left: .5rem;
  transition: transform .25s;
}
.navpanel-menu .nav-link.has-submenu.active:after {
  transform: rotate(90deg) !important;
}
.navpanel-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .06);
  color: #a89dc0;
  margin-right: .7rem;
  flex-shrink: 0;
  transition: background .15s, color .15s, box-shadow .15s;
}
.navpanel-menu .nav-link:hover .navpanel-icon {
  background: rgba(154, 64, 235, .2);
  color: var(--t4-pp3);
}
.navpanel-menu .nav-link.active .navpanel-icon {
  background: var(--t4-grad);
  color: #fff;
  box-shadow: 0 6px 14px rgba(154, 64, 235, .4);
}
.navpanel-menu .nav-link.active .navpanel-icon svg path { fill: #fff !important; }
.navpanel-icon svg { width: 15px; height: 15px; }

/* submenu — hangs off a thin tree line under the icon tile.
   dashboard.css paints it as a gray inset box with a right purple bar;
   flatten all of that. */
.navpanel-submenu {
  margin: 2px 0 .5rem 1.5rem !important;
  padding: 0 0 0 1rem !important;
  border-left: 1.5px solid rgba(255, 255, 255, .08);
  background: transparent !important;
  box-shadow: none !important;
}
.navpanel-submenu .nav-link {
  color: #8d7fa8;
  font-weight: 500;
  font-size: .84rem;
  padding: .35rem .55rem !important;
  border-radius: 8px;
}
/* dashboard.css draws an absolute bullet dot at left:33px for the old wide
   padding — with the new compact padding it lands mid-text ("Manage • Account").
   The tree line above replaces it, so kill the dot. */
.navpanel-submenu .nav-link::before { content: none !important; display: none !important; }
.navpanel-submenu .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .05) !important; box-shadow: none !important; }
.navpanel-submenu .nav-link.text-white,
.navpanel-submenu .nav-link.active {
  color: var(--t4-pp3) !important;
  background: rgba(154, 64, 235, .12) !important;
  box-shadow: none !important;
}

/* footer credit card */
.navpanel .credit-card {
  margin-top: auto;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: .75rem .9rem;
}

/* ── premium comparison table (comparison.html) enhancements ── */
.t4-cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.premiumTable { min-width: 640px; padding: 1.5rem 1.5rem 0.5rem; }
.premiumTable-heading { position: sticky; top: 0; background: var(--t4-card); z-index: 2; padding-top: .5rem; }
.premiumTable-heading .col {
  border-radius: 14px 14px 0 0;
  padding-bottom: .5rem;
}
.premiumTable-heading .col.premium { background: rgba(154, 64, 235, .1); position: relative; }
.premiumTable-heading .col.premium:last-child::before {
  content: "★ BEST VALUE";
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  background: var(--t4-grad);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: .15rem .55rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(154, 64, 235, .35);
}
.premiumTable .col.premium { background: rgba(154, 64, 235, .06); }
.premiumTable .row.g-0:hover .col:not(.text-end) { background: var(--t4-soft); }
.premiumTable .row.g-0 { border-radius: 10px; transition: background .1s; }
.premiumTable .col { padding-top: .85rem; padding-bottom: .85rem; }
.premiumTable .col.text-end { color: var(--t4-dim); font-weight: 600; font-size: .88rem; padding-right: 1rem; }
.premiumTable svg[name="icon_yes"] { width: 20px; height: 19px; }
.premiumTable svg[name="icon_yes"] path { fill: var(--t4-green) !important; }
.premiumTable svg[name="icon_no"] { width: 20px; height: 19px; opacity: .5; }
.premiumTable svg[name="icon_no"] path { fill: var(--t4-dim) !important; }

/* ── make_money tier + rules ── */
.t4-tier-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 800; font-size: .95rem;
  padding: .3rem .8rem;
  border-radius: 999px;
}
.t4-tier-badge.t1 { background: rgba(154, 64, 235, .12); color: var(--t4-pp2); }
.t4-tier-badge.t2 { background: rgba(16, 185, 129, .12); color: #0c7a55; }
.t4-tier-badge.t3 { background: rgba(229, 72, 77, .1); color: #c73b40; }
.t4-tier-badge.t4 { background: rgba(245, 158, 11, .12); color: #a16207; }
.t4-rule-card {
  display: flex; align-items: flex-start; gap: .75rem;
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  height: 100%;
  box-shadow: var(--t4-card-sh);
}
.t4-rule-card .ic {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--t4-soft);
  color: var(--t4-pp2);
  font-size: 1.05rem;
}
.t4-rule-card .k { font-size: .74rem; font-weight: 700; color: var(--t4-dim); text-transform: uppercase; letter-spacing: .05em; }
.t4-rule-card .v { font-weight: 700; color: var(--t4-ink); }

/* ── footer ── */
.footer {
  background: var(--t4-deep) !important;
  color: #b9a8d6;
  position: relative;
  overflow: hidden;
  border-top: 0;
  margin-top: 3rem;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 130%, rgba(154, 64, 235, .25), transparent 60%);
  pointer-events: none;
}
.footer > * { position: relative; }
.footer .logo { color: #fff !important; }
.footer .nav-link, .footer a.nav-link { color: #b9a8d6 !important; font-size: .88rem; font-weight: 500; padding: .25rem 0; }
.footer .nav-link:hover { color: #fff !important; background: transparent; }
.footer .footer-title {
  color: #fff;
  font-weight: 800;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 1rem;
}
.footer-main { padding: 3rem 0 2rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.25rem 0; color: #8d7fa8; }
.footer-bottom a { color: #b9a8d6; }

/* ── splash (theme-4 hero) ── */
.t4-hero {
  background:
    radial-gradient(ellipse 90% 70% at 20% -20%, rgba(154, 64, 235, .5), transparent 60%),
    radial-gradient(ellipse 70% 60% at 90% 10%, rgba(109, 40, 217, .45), transparent 60%),
    var(--t4-deep) !important;
  color: #fff;
  padding: 4.5rem 1rem 5.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
}
.t4-hero h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -.03em;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.08;
}
.t4-hero .lead4 { color: #b9a8d6; font-size: clamp(.95rem, 2vw, 1.1rem); font-weight: 500; }
.t4-grad-text {
  background: linear-gradient(90deg, #c26bff, #9a40eb);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.t4-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #e8ddf8;
  font-size: .78rem;
  font-weight: 600;
  border-radius: 14px;
  padding: .5rem .85rem;
  animation: t4Floaty 5s ease-in-out infinite;
}
.t4-chip i { color: var(--t4-pp3); }
@keyframes t4Floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.t4-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .1);
  color: #e8ddf8;
  border-radius: 999px;
  padding: .4rem .95rem;
}
.counters { padding: 3rem 0 1rem; text-align: center; }
.counters .number {
  font-weight: 800;
  font-size: 2rem;
  background: linear-gradient(90deg, var(--t4-pp3), var(--t4-pp2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.advantages { padding: 2rem 0; }
/* old server css paints these sections white — keep them on theme body color */
.section, .advantages, .counters, .page { background: transparent !important; }
section.slide:not(.t4-hero) { background: transparent !important; }
.section h2, .advantages h2, .counters .number + div, .xlarge { color: var(--t4-ink); }
.advantages-item {
  background: var(--t4-card);
  border: 1px solid var(--t4-line);
  border-radius: 20px;
  box-shadow: var(--t4-card-sh);
  padding: 1.75rem 1.5rem;
  height: 100%;
  transition: transform .15s, box-shadow .15s;
}
.advantages-item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30, 22, 48, .12); }
.advantages-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--t4-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(154, 64, 235, .3);
}
.advantages-icon svg { width: 26px; height: auto; }
.advantages-icon svg path { fill: #fff; }
.advantages-item p { color: var(--t4-dim); margin-bottom: 0; }
.section { padding: 3rem 0; }

/* ── misc ── */
.badge { border-radius: 999px; font-weight: 700; }
.badge.bg-light { background: var(--t4-soft) !important; color: var(--t4-pp2) !important; border-color: var(--t4-line) !important; }
.page-buffer { height: 2.5rem; }
.gdpr, #gdpr_cookie_notice { background: var(--t4-card); color: var(--t4-ink); border: 1px solid var(--t4-line); border-radius: 18px; box-shadow: var(--t4-card-sh); }
.files-total { background: var(--t4-soft) !important; color: var(--t4-pp2) !important; }
.ui-autocomplete { background: var(--t4-card); border: 1px solid var(--t4-line); border-radius: 14px; color: var(--t4-ink); }
.ui-menu-item a { color: var(--t4-ink); }
iframe { color-scheme: light; }

@media (max-width: 575px) {
  .t4-hero { padding: 3rem .75rem 4rem; }
  .t4-chip { display: none; }
  .login { margin: 1.25rem auto; padding: 1.5rem 1.15rem; }
}
