/* ============================================================
   GGWall Theme — Custom CSS (No Tabler / No Bootstrap)
   Deep glassmorphism dark-mode design
   ============================================================ */

:root {
  --gw-bg: #0a0a12;
  --gw-bg-card: rgba(20, 20, 35, 0.72);
  --gw-bg-surface: rgba(30, 30, 50, 0.55);
  --gw-bg-hover: rgba(40, 40, 65, 0.6);
  --gw-border: rgba(100, 100, 160, 0.18);
  --gw-border-focus: rgba(108, 92, 231, 0.6);
  --gw-text: #e2e2f0;
  --gw-text-dim: #8888a8;
  --gw-text-bright: #ffffff;
  --gw-accent: #6c5ce7;
  --gw-accent-end: #0984e3;
  --gw-accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #0984e3 100%);
  --gw-success: #00b894;
  --gw-danger: #d63031;
  --gw-warning: #fdcb6e;
  --gw-radius: 12px;
  --gw-radius-sm: 8px;
  --gw-blur: 20px;
  --gw-shadow: 0 8px 32px rgba(0,0,0,0.35);
  --gw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gw-transition: 0.25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--gw-font);
  background: var(--gw-bg);
  color: var(--gw-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gw-accent); text-decoration: none; transition: color var(--gw-transition); }
a:hover { color: var(--gw-accent-end); }

/* ---- Noise overlay on body ---- */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(108,92,231,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(9,132,227,0.06) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}

/* ============ AUTH SHELL (login/register/mfa/password) ============ */
.gw-auth-shell {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem 1rem; position: relative; z-index: 1;
}

.gw-fx-panel {
  width: 100%; max-width: 420px;
  background: var(--gw-bg-card);
  backdrop-filter: blur(var(--gw-blur));
  -webkit-backdrop-filter: blur(var(--gw-blur));
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius);
  box-shadow: var(--gw-shadow);
  padding: 2.5rem 2rem;
  animation: gw-fadeUp 0.5s ease-out;
}

@keyframes gw-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gw-brand-zone { text-align: center; margin-bottom: 2rem; }
.gw-brand-zone .gw-logo { height: 48px; border-radius: 10px; }
.gw-brand-zone h1 { font-size: 1.4rem; font-weight: 700; color: var(--gw-text-bright); margin-top: 0.75rem; }
.gw-brand-zone p { font-size: 0.85rem; color: var(--gw-text-dim); margin-top: 0.25rem; }

/* ---- Form fields ---- */
.gw-field { margin-bottom: 1.25rem; position: relative; }
.gw-field label {
  display: block; font-size: 0.8rem; font-weight: 500;
  color: var(--gw-text-dim); margin-bottom: 0.4rem; letter-spacing: 0.02em;
}
.gw-field label a { font-weight: 400; }

.gw-input {
  width: 100%; padding: 0.7rem 0.9rem;
  background: var(--gw-bg-surface);
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius-sm);
  color: var(--gw-text-bright);
  font-size: 0.95rem; font-family: var(--gw-font);
  transition: border-color var(--gw-transition), box-shadow var(--gw-transition);
  outline: none;
}
.gw-input::placeholder { color: var(--gw-text-dim); opacity: 0.6; }
.gw-input:focus {
  border-color: var(--gw-border-focus);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
}

.gw-input-row { display: flex; gap: 0.5rem; }
.gw-input-row .gw-input { flex: 1; }

/* ---- Checkbox ---- */
.gw-check-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.gw-check-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--gw-accent); cursor: pointer;
}
.gw-check-row label, .gw-check-row span {
  font-size: 0.85rem; color: var(--gw-text-dim); cursor: pointer; margin-bottom: 0;
}

/* ---- Buttons ---- */
.gw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.75rem 1.5rem;
  border: none; border-radius: var(--gw-radius-sm);
  font-size: 0.95rem; font-weight: 600; font-family: var(--gw-font);
  cursor: pointer; transition: all var(--gw-transition);
  text-align: center;
}
.gw-btn-primary {
  background: var(--gw-accent-gradient); color: #fff;
  box-shadow: 0 4px 14px rgba(108,92,231,0.3);
}
.gw-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.45);
}
.gw-btn-primary:active { transform: translateY(0); }

.gw-btn-outline {
  background: transparent; color: var(--gw-accent);
  border: 1px solid var(--gw-border);
}
.gw-btn-outline:hover { background: var(--gw-bg-hover); }

.gw-btn-ghost { background: transparent; color: var(--gw-text-dim); border: none; }
.gw-btn-ghost:hover { color: var(--gw-accent); }

.gw-btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; width: auto; }
.gw-btn-danger { background: var(--gw-danger); color: #fff; }

.gw-btn + .gw-btn { margin-top: 0.6rem; }

/* ---- Auth footer link ---- */
.gw-auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--gw-text-dim); }
.gw-auth-footer a { font-weight: 500; }

/* ---- Captcha area ---- */
.gw-captcha-area { margin-bottom: 1rem; }

/* ============ MODAL DIALOGS (replaces Bootstrap Modal) ============ */
.gw-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 9000; align-items: center; justify-content: center;
}
.gw-modal-overlay.gw-show { display: flex; }

.gw-modal-box {
  background: var(--gw-bg-card); backdrop-filter: blur(var(--gw-blur));
  border: 1px solid var(--gw-border); border-radius: var(--gw-radius);
  padding: 2rem; max-width: 360px; width: 90%; text-align: center;
  animation: gw-fadeUp 0.3s ease-out;
}
.gw-modal-box .gw-modal-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.gw-modal-box .gw-modal-icon.gw-ok { color: var(--gw-success); }
.gw-modal-box .gw-modal-icon.gw-err { color: var(--gw-danger); }
.gw-modal-box p { color: var(--gw-text-dim); margin-bottom: 1.25rem; }
.gw-modal-box .gw-btn { width: 100%; }

/* ============ USER CENTER LAYOUT ============ */
.gw-app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.gw-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--gw-bg-card); backdrop-filter: blur(var(--gw-blur));
  border-right: 1px solid var(--gw-border);
  padding: 1.5rem 0; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  transition: transform 0.3s ease;
}

.gw-sidebar-brand {
  padding: 0 1.25rem 1.25rem; border-bottom: 1px solid var(--gw-border);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem;
}
.gw-sidebar-brand img { height: 32px; border-radius: 8px; }
.gw-sidebar-brand span { font-weight: 700; font-size: 1rem; color: var(--gw-text-bright); }

.gw-nav { flex: 1; overflow-y: auto; padding: 0 0.75rem; }
.gw-nav-section { margin-bottom: 1rem; }
.gw-nav-section-title {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gw-text-dim); padding: 0.5rem 0.75rem; font-weight: 600;
}

.gw-nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem; border-radius: var(--gw-radius-sm);
  color: var(--gw-text); font-size: 0.88rem; font-weight: 500;
  transition: all var(--gw-transition); cursor: pointer;
  text-decoration: none;
}
.gw-nav-item:hover { background: var(--gw-bg-hover); color: var(--gw-text-bright); }
.gw-nav-item.active { background: rgba(108,92,231,0.15); color: var(--gw-accent); }

.gw-nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.gw-sidebar-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--gw-border);
  display: flex; align-items: center; gap: 0.6rem;
}
.gw-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--gw-border);
}
.gw-user-info { flex: 1; overflow: hidden; }
.gw-user-info .gw-username { font-size: 0.82rem; font-weight: 600; color: var(--gw-text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-user-info .gw-useremail { font-size: 0.7rem; color: var(--gw-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gw-main { flex: 1; margin-left: 260px; padding: 2rem; min-width: 0; }

.gw-page-title { font-size: 1.6rem; font-weight: 700; color: var(--gw-text-bright); margin-bottom: 0.25rem; }
.gw-page-desc { font-size: 0.85rem; color: var(--gw-text-dim); margin-bottom: 1.5rem; }

/* ---- Cards ---- */
.gw-card {
  background: var(--gw-bg-card); backdrop-filter: blur(var(--gw-blur));
  border: 1px solid var(--gw-border); border-radius: var(--gw-radius);
  padding: 1.5rem; margin-bottom: 1rem;
  transition: border-color var(--gw-transition);
}
.gw-card:hover { border-color: rgba(108,92,231,0.3); }
.gw-card-title { font-size: 1rem; font-weight: 700; color: var(--gw-text-bright); margin-bottom: 1rem; }

/* ---- Grid ---- */
.gw-grid { display: grid; gap: 1rem; }
.gw-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gw-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gw-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Dashboard store guidance ---- */
.gw-dashboard-main { align-items: stretch; }
.gw-dashboard-main > .gw-card,
.gw-dashboard-side > .gw-card { margin-bottom: 0; }
.gw-dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}
.gw-traffic-card { flex: 0 0 auto; }
.gw-store-cta-card {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: rgba(0,184,148,0.28);
  background:
    linear-gradient(145deg, rgba(0,184,148,0.16), rgba(253,203,110,0.08) 52%, rgba(108,92,231,0.12)),
    var(--gw-bg-card);
}
.gw-store-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.07) 42%, transparent 64%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 12px);
  opacity: 0.6;
  pointer-events: none;
}
.gw-store-cta-content,
.gw-store-cta-actions {
  position: relative;
  z-index: 1;
}
.gw-store-cta-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(0,184,148,0.28);
  border-radius: 999px;
  background: rgba(0,184,148,0.1);
  color: #5dd5b6;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gw-store-cta-icon { font-size: 0.95rem; line-height: 1; }
.gw-store-cta-title {
  max-width: 440px;
  margin-top: 1rem;
  color: var(--gw-text-bright);
  font-size: 1.48rem;
  line-height: 1.2;
  font-weight: 800;
}
.gw-store-cta-title span {
  display: block;
}
.gw-store-cta-title span[lang] {
  margin-top: 0.45rem;
  color: #9ff0da;
  font-size: 1.02rem;
  font-weight: 700;
}
.gw-store-cta-copy {
  max-width: 520px;
  margin-top: 0.65rem;
  color: var(--gw-text-dim);
  font-size: 0.88rem;
}
.gw-store-cta-copy span[lang] {
  display: block;
  margin-top: 0.45rem;
  color: #d7e6e2;
}
.gw-store-cta-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.2rem;
}
.gw-store-cta-metric {
  padding: 0.65rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--gw-radius-sm);
  background: rgba(10,10,18,0.38);
}
.gw-store-cta-metric span {
  display: block;
  color: var(--gw-text-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gw-store-cta-metric strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--gw-text-bright);
  font-size: 0.88rem;
}
.gw-store-cta-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.gw-store-cta-actions .gw-btn { width: auto; white-space: nowrap; }
.gw-store-cta-actions span {
  color: var(--gw-text-dim);
  font-size: 0.78rem;
}

/* ---- Stat cards ---- */
.gw-stat { display: flex; align-items: center; gap: 1rem; }
.gw-stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.gw-stat-icon.gw-purple { background: rgba(108,92,231,0.18); color: #6c5ce7; }
.gw-stat-icon.gw-blue   { background: rgba(9,132,227,0.18); color: #0984e3; }
.gw-stat-icon.gw-green  { background: rgba(0,184,148,0.18); color: #00b894; }
.gw-stat-icon.gw-orange { background: rgba(253,203,110,0.18); color: #fdcb6e; }
.gw-stat-label { font-size: 0.75rem; color: var(--gw-text-dim); }
.gw-stat-value { font-size: 1rem; font-weight: 700; color: var(--gw-text-bright); }

/* ---- Progress ---- */
.gw-progress { height: 6px; background: var(--gw-bg-surface); border-radius: 3px; overflow: hidden; margin: 0.5rem 0; }
.gw-progress-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.gw-progress-bar.gw-purple { background: var(--gw-accent-gradient); }
.gw-progress-bar.gw-green { background: var(--gw-success); }

/* ---- Table ---- */
.gw-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.gw-table th { text-align: left; color: var(--gw-text-dim); font-weight: 600; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--gw-border); }
.gw-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid rgba(100,100,160,0.08); color: var(--gw-text); }
.gw-table tr:hover td { background: var(--gw-bg-hover); }

/* ---- Badges ---- */
.gw-badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.gw-badge-purple { background: rgba(108,92,231,0.18); color: #6c5ce7; }
.gw-badge-green { background: rgba(0,184,148,0.18); color: #00b894; }

/* ---- Tabs ---- */
.gw-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gw-border); margin-bottom: 1.25rem; }
.gw-tab {
  padding: 0.6rem 1.2rem; font-size: 0.85rem; font-weight: 500;
  color: var(--gw-text-dim); cursor: pointer; border-bottom: 2px solid transparent;
  transition: all var(--gw-transition);
}
.gw-tab:hover { color: var(--gw-text-bright); }
.gw-tab.active { color: var(--gw-accent); border-bottom-color: var(--gw-accent); }
.gw-tab-content { display: none; }
.gw-tab-content.active { display: block; }

/* ---- Product cards ---- */
.gw-product {
  background: var(--gw-bg-card); border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius); padding: 1.5rem; text-align: center;
  transition: all var(--gw-transition);
}
.gw-product:hover { border-color: var(--gw-accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,92,231,0.15); }
.gw-product-name { font-size: 0.85rem; text-transform: uppercase; color: var(--gw-text-dim); letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.gw-product-price { font-size: 2rem; font-weight: 800; color: var(--gw-text-bright); margin-bottom: 1rem; }
.gw-product-price span { font-size: 0.9rem; font-weight: 500; color: var(--gw-text-dim); }
.gw-product-features { list-style: none; margin-bottom: 1.5rem; }
.gw-product-features li { padding: 0.4rem 0; font-size: 0.85rem; color: var(--gw-text-dim); border-bottom: 1px solid rgba(100,100,160,0.08); }

/* ---- Toast ---- */
.gw-toast {
  position: fixed; top: 1.5rem; left: 50%; transform: translateX(-50%);
  padding: 0.6rem 1.5rem; border-radius: var(--gw-radius-sm);
  font-size: 0.85rem; font-weight: 500; z-index: 9999;
  animation: gw-fadeUp 0.3s ease-out;
  color: #fff;
}
.gw-toast-ok { background: var(--gw-success); }
.gw-toast-err { background: var(--gw-danger); }

/* ---- Spoiler (blur sensitive info) ---- */
.gw-spoiler { filter: blur(5px); transition: filter 0.3s; cursor: pointer; }
.gw-spoiler:hover { filter: none; }

/* ---- Hidden decoy (anti-crawler noise) ---- */
.gw-decoy-text {
  opacity: 0; position: absolute; pointer-events: none;
  height: 0; overflow: hidden; z-index: -1;
}

/* ---- Hamburger for mobile ---- */
.gw-hamburger {
  display: none; position: fixed; top: 1rem; left: 1rem;
  z-index: 200; background: var(--gw-bg-card); border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius-sm); padding: 0.5rem 0.7rem;
  color: var(--gw-text-bright); font-size: 1.2rem; cursor: pointer;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .gw-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .gw-sidebar { transform: translateX(-100%); }
  .gw-sidebar.gw-open { transform: translateX(0); }
  .gw-main { margin-left: 0; padding: 1rem; padding-top: 3.5rem; }
  .gw-hamburger { display: block; }
  .gw-grid-2, .gw-grid-3, .gw-grid-4 { grid-template-columns: 1fr; }
  .gw-dashboard-side { min-height: auto; }
  .gw-store-cta-card { min-height: 0; }
  .gw-store-cta-metrics { grid-template-columns: 1fr; }
  .gw-store-cta-actions { align-items: stretch; flex-direction: column; }
  .gw-store-cta-actions .gw-btn { width: 100%; }
  .gw-fx-panel { padding: 1.5rem 1.25rem; }
}

/* ============ LANDING PAGE (camouflage) ============ */
.gw-landing { position: relative; z-index: 1; }

.gw-landing-hero {
  padding: 5rem 2rem 4rem; text-align: center;
  background: linear-gradient(135deg, rgba(108,92,231,0.08) 0%, rgba(9,132,227,0.06) 100%);
}
.gw-landing-hero h1 { font-size: 2.8rem; font-weight: 800; color: var(--gw-text-bright); line-height: 1.2; margin-bottom: 1rem; }
.gw-landing-hero p { font-size: 1.1rem; color: var(--gw-text-dim); max-width: 600px; margin: 0 auto 2rem; }
.gw-landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; border-bottom: 1px solid var(--gw-border);
}
.gw-landing-nav-brand { font-weight: 700; font-size: 1.2rem; color: var(--gw-text-bright); }
.gw-landing-nav-links { display: flex; gap: 2rem; margin-left: auto; }
.gw-landing-nav-links a { color: var(--gw-text-dim); font-size: 0.9rem; font-weight: 500; }
.gw-landing-nav-links a:hover { color: var(--gw-text-bright); }
.gw-landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 1.5rem;
}
.gw-nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.48rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--gw-radius-sm);
  background: rgba(255,255,255,0.04);
  color: var(--gw-text-bright);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.gw-nav-auth-btn:hover {
  color: #fff;
  border-color: rgba(0,184,148,0.38);
  background: rgba(0,184,148,0.1);
}
.gw-nav-auth-primary {
  border-color: rgba(0,184,148,0.42);
  background: linear-gradient(135deg, rgba(0,184,148,0.9), rgba(9,132,227,0.82));
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,184,148,0.22);
}
.gw-nav-auth-primary:hover {
  background: linear-gradient(135deg, rgba(0,205,163,0.95), rgba(31,151,236,0.9));
}

.gw-landing-section { padding: 4rem 2rem; max-width: 900px; margin: 0 auto; }
.gw-landing-section h2 { font-size: 1.6rem; font-weight: 700; color: var(--gw-text-bright); margin-bottom: 1rem; }
.gw-landing-section p { color: var(--gw-text-dim); line-height: 1.8; margin-bottom: 1.5rem; }

.gw-landing-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; padding: 0 2rem 4rem; max-width: 1100px; margin: 0 auto; }
.gw-landing-post {
  background: var(--gw-bg-card); border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius); padding: 1.5rem;
  transition: border-color var(--gw-transition);
}
.gw-landing-post:hover { border-color: rgba(108,92,231,0.3); }
.gw-landing-post h3 { font-size: 1rem; font-weight: 700; color: var(--gw-text-bright); margin-bottom: 0.5rem; }
.gw-landing-post p { font-size: 0.85rem; color: var(--gw-text-dim); }
.gw-landing-post .gw-post-date { font-size: 0.75rem; color: var(--gw-text-dim); margin-bottom: 0.5rem; }

.gw-landing-footer {
  padding: 2rem; text-align: center; border-top: 1px solid var(--gw-border);
  font-size: 0.8rem; color: var(--gw-text-dim);
}

/* ============ AI4SCI LANDING VARIANT ============ */
.gw-ai-landing .gw-landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10,10,18,0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.gw-ai-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 6rem 2rem 5rem;
  text-align: left;
  background: #07080d;
}
.gw-ai-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, var(--gw-bg));
  pointer-events: none;
}
.gw-ai-hero-scene {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,184,148,0.1), transparent 32%, rgba(253,203,110,0.08) 66%, rgba(9,132,227,0.12)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.028) 0 1px, transparent 1px 74px);
}
.gw-ai-hero-scene::before {
  content: '';
  position: absolute;
  inset: 10% 4% 8% 34%;
  border: 1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(135deg, rgba(0,184,148,0.14), rgba(108,92,231,0.1)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 18px);
  transform: skewX(-9deg);
}
.gw-ai-hero-scene::after {
  content: '';
  position: absolute;
  right: 7%;
  top: 18%;
  width: min(42vw, 560px);
  aspect-ratio: 1.35;
  border: 1px solid rgba(0,184,148,0.24);
  background:
    linear-gradient(160deg, rgba(0,184,148,0.12), rgba(253,203,110,0.07)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 26px);
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}
.gw-ai-hero-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  margin-left: max(0rem, calc((100vw - 1120px) / 2));
}
.gw-ai-kicker,
.gw-ai-section-label {
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(0,184,148,0.28);
  border-radius: 999px;
  background: rgba(0,184,148,0.1);
  color: #5dd5b6;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gw-ai-hero h1 {
  margin-top: 1rem;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.98;
  max-width: 760px;
}
.gw-ai-hero p {
  margin: 1.25rem 0 0;
  max-width: 650px;
  color: #c7d5dc;
}
.gw-ai-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}
.gw-ai-hero-actions .gw-btn { width: auto; }
.gw-ai-scene-panel {
  position: absolute;
  z-index: 1;
  min-width: 180px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--gw-radius-sm);
  background: rgba(10,10,18,0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.gw-ai-scene-panel span {
  display: block;
  color: var(--gw-text-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.gw-ai-scene-panel strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--gw-text-bright);
  font-size: 1.15rem;
}
.gw-ai-scene-panel-a { right: 11%; top: 25%; }
.gw-ai-scene-panel-b { right: 27%; bottom: 22%; }
.gw-ai-scene-panel-c { right: 6%; bottom: 39%; }
.gw-ai-section {
  max-width: 980px;
}
.gw-ai-section h2 {
  margin-top: 0.85rem;
  font-size: 2rem;
  line-height: 1.2;
}
.gw-ai-capability-grid,
.gw-ai-solution-grid {
  max-width: 1160px;
}
.gw-ai-card,
.gw-ai-solution {
  min-height: 220px;
}
.gw-ai-card-index {
  color: var(--gw-warning);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}
.gw-ai-solution {
  border-color: rgba(0,184,148,0.18);
}
.gw-ai-solution h3 {
  font-size: 1.08rem;
}
@media (max-width: 768px) {
  .gw-ai-landing .gw-landing-nav {
    align-items: flex-start;
    gap: 0.85rem;
    flex-direction: column;
  }
  .gw-ai-landing .gw-landing-nav-links {
    width: 100%;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
  .gw-landing-nav-actions {
    width: 100%;
    margin-left: 0;
  }
  .gw-nav-auth-btn {
    flex: 1;
  }
  .gw-ai-hero {
    min-height: 720px;
    padding: 5rem 1rem 4rem;
  }
  .gw-ai-hero-scene::before,
  .gw-ai-hero-scene::after,
  .gw-ai-scene-panel {
    opacity: 0.55;
  }
  .gw-ai-scene-panel {
    min-width: 150px;
    padding: 0.65rem;
  }
  .gw-ai-scene-panel-a { right: 5%; top: 15%; }
  .gw-ai-scene-panel-b { right: 8%; bottom: 17%; }
  .gw-ai-scene-panel-c { display: none; }
  .gw-ai-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .gw-ai-hero-actions .gw-btn {
    width: 100%;
  }
}

/* ==================================================================
   TABLER / BOOTSTRAP COMPATIBILITY LAYER
   Pages that still ship Tabler/Bootstrap markup (user/edit.tpl,
   most admin/* templates, etc.) need styling without re-introducing
   the Tabler CDN. The rules below replicate the subset of classes
   those templates use, themed to match ggwall's dark glass design.
   Plus a tiny JS-driven tab + modal shim is in user/footer.tpl and
   admin/footer.tpl so data-bs-toggle="tab"/"modal" still work.
   ================================================================== */

/* ---- Page scaffolding ---- */
.page, .page-wrapper { display: block; min-height: auto; }
.page-body { padding: 0.5rem 0 1.5rem; }
.page-header { padding: 0.5rem 0 1.25rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--gw-border); }
.page-title { font-size: 1.6rem; font-weight: 700; color: var(--gw-text-bright); margin: 0 0 0.25rem; }
.page-pretitle { font-size: 0.8rem; color: var(--gw-text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.page-subtitle { font-size: 0.85rem; color: var(--gw-text-dim); }
.home-title { font-size: 1.8rem; font-weight: 700; color: var(--gw-text-bright); }
.home-subtitle { font-size: 0.9rem; color: var(--gw-text-dim); }

/* ---- Container ---- */
.container, .container-xl, .container-fluid, .container-tight, .container-narrow {
  width: 100%; padding-left: 0.75rem; padding-right: 0.75rem;
  margin-left: auto; margin-right: auto;
}
.container-xl { max-width: 1320px; }
.container-tight { max-width: 540px; }
.container-narrow { max-width: 720px; }

/* ---- Bootstrap grid ---- */
.row { display: flex; flex-wrap: wrap; margin-left: -0.75rem; margin-right: -0.75rem; }
.row > * { padding-left: 0.75rem; padding-right: 0.75rem; box-sizing: border-box; }
.row-deck > .col, .row-deck [class*="col-"] { display: flex; flex-direction: column; }
.row-deck > .col > .card, .row-deck [class*="col-"] > .card { flex: 1 1 auto; }
.row-cards { gap: 1rem 0; }
.g-1 { gap: 0.25rem; } .g-2 { gap: 0.5rem; } .g-3 { gap: 1rem; } .g-4 { gap: 1.5rem; }

.col { flex: 1 0 0%; min-width: 0; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }

@media (min-width: 576px) {
  .col-sm { flex: 1 0 0%; min-width: 0; }
  .col-sm-auto { flex: 0 0 auto; width: auto; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 768px) {
  .col-md { flex: 1 0 0%; min-width: 0; }
  .col-md-auto { flex: 0 0 auto; width: auto; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 992px) {
  .col-lg { flex: 1 0 0%; min-width: 0; }
  .col-lg-auto { flex: 0 0 auto; width: auto; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
}
@media (min-width: 1200px) {
  .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
  .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xl-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
}

/* row-cols */
.row-cols-1 > * { flex: 0 0 100%; max-width: 100%; }
.row-cols-2 > * { flex: 0 0 50%; max-width: 50%; }
.row-cols-3 > * { flex: 0 0 33.3333%; max-width: 33.3333%; }
.row-cols-4 > * { flex: 0 0 25%; max-width: 25%; }
@media (min-width: 768px) {
  .row-cols-md-2 > * { flex: 0 0 50%; max-width: 50%; }
  .row-cols-md-3 > * { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .row-cols-md-4 > * { flex: 0 0 25%; max-width: 25%; }
}

/* ---- Cards ---- */
.card {
  position: relative;
  background: var(--gw-bg-card);
  backdrop-filter: blur(var(--gw-blur));
  -webkit-backdrop-filter: blur(var(--gw-blur));
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  margin-bottom: 1rem;
  display: flex; flex-direction: column;
  transition: border-color var(--gw-transition);
  color: var(--gw-text);
}
.card:hover { border-color: rgba(108,92,231,0.28); }
.card-md { border-radius: var(--gw-radius); }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gw-border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 1.25rem; flex: 1 1 auto; }
.card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--gw-border);
  background: rgba(0,0,0,0.12);
  border-bottom-left-radius: var(--gw-radius);
  border-bottom-right-radius: var(--gw-radius);
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--gw-text-bright); margin-bottom: 0.5rem; }
.card-subtitle { font-size: 0.85rem; color: var(--gw-text-dim); margin-bottom: 1rem; }
.card-text { font-size: 0.85rem; color: var(--gw-text); margin-bottom: 0.5rem; }
.card-stamp {
  position: absolute; top: 0; right: 0; width: 100px; height: 100px; overflow: hidden;
  pointer-events: none; opacity: 0.75;
}
.card-stamp-icon {
  position: absolute; top: -10px; right: -10px;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
}

/* ---- Forms ---- */
.form-control, .form-select, textarea.form-control, input.form-control {
  display: block; width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--gw-bg-surface);
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius-sm);
  color: var(--gw-text-bright);
  font-size: 0.9rem; font-family: var(--gw-font);
  line-height: 1.5;
  transition: border-color var(--gw-transition), box-shadow var(--gw-transition);
  outline: none;
}
.form-control::placeholder { color: var(--gw-text-dim); opacity: 0.7; }
.form-control:focus, .form-select:focus {
  border-color: var(--gw-border-focus);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.15);
  background: var(--gw-bg-surface);
  color: var(--gw-text-bright);
}
.form-control:disabled, .form-control[readonly], .form-select:disabled {
  background: rgba(20,20,35,0.4); cursor: not-allowed; opacity: 0.7;
}
.form-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238888a8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 14px 12px;
  padding-right: 2.25rem;
}
.form-select option { background: #1a1a2a; color: var(--gw-text); }
.form-label { display: block; font-size: 0.8rem; color: var(--gw-text-dim); margin-bottom: 0.4rem; font-weight: 500; }
.form-hint { font-size: 0.75rem; color: var(--gw-text-dim); margin-top: 0.25rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.form-check-input {
  width: 16px; height: 16px; accent-color: var(--gw-accent); cursor: pointer; margin: 0;
}
.form-check-label { font-size: 0.85rem; color: var(--gw-text); cursor: pointer; }
.form-switch .form-check-input { width: 32px; height: 18px; border-radius: 18px; }
.input-group { display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.input-group > .form-control, .input-group > .form-select { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group-text {
  display: flex; align-items: center; padding: 0.5rem 0.75rem;
  background: var(--gw-bg-surface); border: 1px solid var(--gw-border);
  color: var(--gw-text-dim); font-size: 0.85rem;
}
.input-group > :not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--gw-radius-sm);
  font-size: 0.875rem; font-weight: 500; font-family: var(--gw-font);
  background: var(--gw-bg-surface); color: var(--gw-text);
  cursor: pointer;
  transition: all var(--gw-transition);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover { background: var(--gw-bg-hover); color: var(--gw-text-bright); }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary, .btn-blue, .btn-azure {
  background: var(--gw-accent-gradient); color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(108,92,231,0.25);
}
.btn-primary:hover, .btn-blue:hover, .btn-azure:hover {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108,92,231,0.4);
}
.btn-success, .btn-green { background: var(--gw-success); color: #fff; border-color: transparent; }
.btn-success:hover, .btn-green:hover { background: #00a383; color: #fff; }
.btn-danger, .btn-red { background: var(--gw-danger); color: #fff; border-color: transparent; }
.btn-danger:hover, .btn-red:hover { background: #b82626; color: #fff; }
.btn-warning, .btn-yellow, .btn-orange { background: var(--gw-warning); color: #1a1a2a; border-color: transparent; }
.btn-warning:hover { background: #f0b943; color: #1a1a2a; }
.btn-secondary, .btn-gray { background: var(--gw-bg-surface); color: var(--gw-text); }
.btn-secondary:hover { background: var(--gw-bg-hover); }
.btn-indigo { background: #6366f1; color: #fff; }
.btn-indigo:hover { background: #4f52d4; color: #fff; }
.btn-purple { background: #8b5cf6; color: #fff; }
.btn-pink { background: #ec4899; color: #fff; }
.btn-cyan { background: #06b6d4; color: #fff; }
.btn-teal { background: #14b8a6; color: #fff; }
.btn-link {
  background: transparent; color: var(--gw-accent); border: none; padding: 0.5rem 0.75rem;
}
.btn-link:hover { background: transparent; color: var(--gw-accent-end); text-decoration: underline; }
.btn-ghost { background: transparent; color: var(--gw-text-dim); border-color: transparent; }
.btn-outline-primary { background: transparent; border-color: var(--gw-accent); color: var(--gw-accent); }
.btn-outline-primary:hover { background: var(--gw-accent); color: #fff; }
.btn-outline-secondary { background: transparent; border-color: var(--gw-border); color: var(--gw-text); }
.btn-outline-danger { background: transparent; border-color: var(--gw-danger); color: var(--gw-danger); }
.btn-outline-danger:hover { background: var(--gw-danger); color: #fff; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
.btn-lg { padding: 0.65rem 1.4rem; font-size: 1rem; }
.btn-icon { padding: 0.4rem; width: 2rem; height: 2rem; }
.btn-list { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.btn-close {
  background: transparent; border: none; color: var(--gw-text-dim); font-size: 1.5rem;
  width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; line-height: 1;
}
.btn-close::before { content: '\00D7'; }
.btn-close:hover { color: var(--gw-text-bright); }

/* ---- Nav tabs ---- */
.nav { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.nav-tabs {
  border-bottom: 1px solid var(--gw-border);
  margin-bottom: 0;
}
.nav-tabs .nav-item { display: flex; }
.nav-tabs .nav-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  color: var(--gw-text-dim);
  font-size: 0.88rem; font-weight: 500;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color var(--gw-transition), border-color var(--gw-transition);
  text-decoration: none;
}
.nav-tabs .nav-link:hover { color: var(--gw-text-bright); }
.nav-tabs .nav-link.active {
  color: var(--gw-accent);
  border-bottom-color: var(--gw-accent);
  background: transparent;
}
.nav-fill .nav-item { flex: 1 1 auto; }
.nav-fill .nav-link { justify-content: center; width: 100%; }
.nav-pills .nav-link {
  border-radius: var(--gw-radius-sm); padding: 0.4rem 0.9rem;
  color: var(--gw-text); border: none;
}
.nav-pills .nav-link.active {
  background: var(--gw-accent-gradient); color: #fff;
}
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active, .tab-content > .tab-pane.show.active { display: block; }

/* ---- Modals ---- */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 9000; overflow-y: auto;
}
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal.fade .modal-dialog { transition: transform 0.2s ease, opacity 0.2s ease; opacity: 0; transform: translateY(-12px); }
.modal.show .modal-dialog { opacity: 1; transform: translateY(0); }
.modal-dialog {
  margin: 1.5rem auto; max-width: 500px; width: calc(100% - 2rem);
  position: relative;
}
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100vh - 3rem); }
.modal-sm { max-width: 360px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }
.modal-content {
  background: var(--gw-bg-card); backdrop-filter: blur(var(--gw-blur));
  border: 1px solid var(--gw-border); border-radius: var(--gw-radius);
  box-shadow: 0 12px 48px rgba(0,0,0,0.45);
  display: flex; flex-direction: column;
  position: relative; width: 100%;
  color: var(--gw-text);
}
.modal-status {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-top-left-radius: var(--gw-radius); border-top-right-radius: var(--gw-radius);
}
.modal-status.bg-success, .modal-status.bg-green { background: var(--gw-success); }
.modal-status.bg-danger, .modal-status.bg-red { background: var(--gw-danger); }
.modal-status.bg-warning { background: var(--gw-warning); }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gw-border);
}
.modal-title { font-size: 1.05rem; font-weight: 600; color: var(--gw-text-bright); margin: 0; }
.modal-body { padding: 1.25rem; }
.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--gw-border);
  display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap;
}
.modal .btn-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1; }
.modal-blur .modal-content { backdrop-filter: blur(var(--gw-blur)); }
body.modal-open { overflow: hidden; }

/* ---- Dropdowns ---- */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle::after {
  content: ''; display: inline-block; margin-left: 0.4em;
  vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 1000;
  min-width: 10rem; padding: 0.4rem 0; margin: 0.25rem 0 0;
  background: var(--gw-bg-card); backdrop-filter: blur(var(--gw-blur));
  border: 1px solid var(--gw-border); border-radius: var(--gw-radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  list-style: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item {
  display: block; padding: 0.45rem 1rem;
  color: var(--gw-text); font-size: 0.85rem; text-decoration: none;
  white-space: nowrap;
}
.dropdown-item:hover { background: var(--gw-bg-hover); color: var(--gw-text-bright); }
.dropdown-divider { height: 1px; background: var(--gw-border); margin: 0.4rem 0; }
.dropdown-menu-columns { display: flex; gap: 0.5rem; }
.dropdown-menu-column { min-width: 8rem; }

/* ---- Tables ---- */
.table {
  width: 100%; margin-bottom: 1rem; color: var(--gw-text);
  border-collapse: collapse; font-size: 0.875rem;
  vertical-align: top;
}
.table th, .table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--gw-border);
  text-align: left;
  vertical-align: middle;
}
.table th {
  font-weight: 600; color: var(--gw-text-dim);
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem;
  background: rgba(0,0,0,0.15);
}
.table tbody tr:hover td { background: var(--gw-bg-hover); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-vcenter td, .table-vcenter th { vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--gw-bg-hover); }
.table-bordered, .table-bordered th, .table-bordered td { border: 1px solid var(--gw-border); }

/* ---- DataTables footer controls ---- */
.dt-container {
  color: var(--gw-text);
}
.dt-container .dt-layout-row,
.dt-container .row.card-footer {
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--gw-border);
  background: rgba(10,10,18,0.34);
}
.dt-container .dt-info {
  color: var(--gw-text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}
.dt-container .dt-paging {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
}
.dt-container .dt-paging .dt-paging-button {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gw-text-dim) !important;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.dt-container .dt-paging .dt-paging-button:hover {
  background: var(--gw-bg-hover);
  color: var(--gw-text-bright) !important;
}
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover {
  background: var(--gw-accent-gradient);
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(108,92,231,0.24);
}
.dt-container .dt-paging .dt-paging-button.disabled {
  display: none;
}

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 0.2em 0.55em;
  font-size: 0.72rem; font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  color: #fff;
  vertical-align: middle;
}
.badge.bg-blue, .badge.bg-primary { background: #0984e3; color: #fff; }
.badge.bg-green, .badge.bg-success { background: var(--gw-success); color: #fff; }
.badge.bg-red, .badge.bg-danger { background: var(--gw-danger); color: #fff; }
.badge.bg-yellow, .badge.bg-warning { background: var(--gw-warning); color: #1a1a2a; }
.badge.bg-purple { background: #8b5cf6; color: #fff; }
.badge.bg-azure { background: #0ea5e9; color: #fff; }
.badge.bg-secondary, .badge.bg-gray { background: var(--gw-bg-hover); color: var(--gw-text); }
.badge.text-green-fg { color: #fff; }
.badge.text-red-fg { color: #fff; }

/* ---- Alerts ---- */
.alert {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gw-border);
  border-radius: var(--gw-radius-sm);
  margin-bottom: 1rem;
  background: var(--gw-bg-surface);
  color: var(--gw-text);
}
.alert-success, .alert-green { border-color: rgba(0,184,148,0.4); background: rgba(0,184,148,0.12); color: #5dd5b6; }
.alert-danger, .alert-red { border-color: rgba(214,48,49,0.4); background: rgba(214,48,49,0.12); color: #ff6b6c; }
.alert-warning, .alert-yellow { border-color: rgba(253,203,110,0.4); background: rgba(253,203,110,0.12); color: var(--gw-warning); }
.alert-info, .alert-blue { border-color: rgba(9,132,227,0.4); background: rgba(9,132,227,0.12); color: #5db4f0; }
.alert-important { font-weight: 500; }

/* ---- Progress ---- */
.progress {
  display: flex; height: 0.5rem; overflow: hidden;
  background: var(--gw-bg-surface); border-radius: 999px;
  margin: 0.5rem 0;
}
.progress-sm { height: 4px; }
.progress-lg { height: 12px; }
.progress-bar {
  display: flex; flex-direction: column; justify-content: center;
  background: var(--gw-accent-gradient); color: #fff;
  text-align: center; transition: width 0.4s ease;
}
.progress-bar.bg-success, .progress-bar.bg-green { background: var(--gw-success); }
.progress-bar.bg-danger, .progress-bar.bg-red { background: var(--gw-danger); }
.progress-bar.bg-warning, .progress-bar.bg-yellow { background: var(--gw-warning); }

/* ---- List groups ---- */
.list-group { display: flex; flex-direction: column; padding: 0; margin: 0; list-style: none; }
.list-group-item {
  padding: 0.65rem 1rem;
  background: var(--gw-bg-card);
  border: 1px solid var(--gw-border);
  border-bottom-width: 0;
  color: var(--gw-text);
}
.list-group-item:first-child { border-top-left-radius: var(--gw-radius-sm); border-top-right-radius: var(--gw-radius-sm); }
.list-group-item:last-child { border-bottom-width: 1px; border-bottom-left-radius: var(--gw-radius-sm); border-bottom-right-radius: var(--gw-radius-sm); }
.list-inline { display: flex; gap: 0.5rem; padding: 0; margin: 0; list-style: none; flex-wrap: wrap; }
.list-inline-item { display: inline-block; }
.list-inline-dots > li:not(:first-child)::before { content: '· '; color: var(--gw-text-dim); margin: 0 0.25rem; }

/* ---- Avatars ---- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--gw-bg-hover); color: var(--gw-text-bright);
  font-weight: 600;
}
.avatar-xs { width: 1.25rem; height: 1.25rem; font-size: 0.7rem; }
.avatar-sm { width: 1.85rem; height: 1.85rem; font-size: 0.78rem; }
.avatar-md { width: 2.4rem; height: 2.4rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1rem; }

/* ---- Navbar (Tabler-style top nav, used in admin/header.tpl etc.) ---- */
.navbar {
  display: flex; align-items: center; padding: 0.5rem 0;
  background: var(--gw-bg-card); backdrop-filter: blur(var(--gw-blur));
  border-bottom: 1px solid var(--gw-border);
}
.navbar-overlap { position: relative; z-index: 5; }
.navbar-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--gw-text-bright); text-decoration: none; }
.navbar-brand-image { height: 32px; }
.navbar-nav { display: flex; flex-direction: row; padding: 0; margin: 0; list-style: none; }
.navbar-nav .nav-link { color: var(--gw-text); padding: 0.5rem 0.85rem; text-decoration: none; }
.navbar-nav .nav-link:hover { color: var(--gw-text-bright); }
.navbar-toggler {
  background: transparent; border: 1px solid var(--gw-border); color: var(--gw-text);
  padding: 0.3rem 0.55rem; border-radius: var(--gw-radius-sm); cursor: pointer;
}
.navbar-toggler-icon {
  display: inline-block; width: 1.2em; height: 1.2em;
  background: linear-gradient(to bottom, transparent 30%, currentColor 30%, currentColor 40%, transparent 40%, transparent 60%, currentColor 60%, currentColor 70%, transparent 70%);
}
.navbar-expand-md { flex-wrap: wrap; }
.collapse:not(.show) { display: none; }
@media (min-width: 768px) {
  .navbar-expand-md .collapse { display: flex !important; flex-basis: auto; }
  .navbar-expand-md .navbar-toggler { display: none; }
  .navbar-expand-md .navbar-nav { flex-direction: row; }
}
.navbar-side { display: flex; }
.navbar.navbar-vertical { flex-direction: column; align-items: stretch; }

/* ---- Icons (tabler-icons replacement using Unicode glyphs) ---- */
.icon, [class^="ti ti-"], [class*=" ti ti-"] {
  display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.15em;
  font-style: normal; line-height: 1;
}
.icon-lg { font-size: 1.5em; }
.icon-sm { font-size: 0.85em; }
[class^="ti ti-"]::before, [class*=" ti ti-"]::before {
  content: '\25A0';
  font-size: 0.9em;
}
.ti-circle-check::before, .ti-check::before { content: '\2713'; }
.ti-circle-x::before, .ti-x::before { content: '\2717'; }
.ti-alert-circle::before, .ti-alert-triangle::before { content: '\26A0'; }
.ti-trash::before { content: '\1F5D1'; }
.ti-edit::before, .ti-pencil::before { content: '\270E'; }
.ti-user::before { content: '\1F464'; }
.ti-settings::before { content: '\2699'; }
.ti-home::before { content: '\1F3E0'; }
.ti-info-square::before, .ti-info-circle::before { content: '\2139'; }
.ti-friends::before, .ti-users::before { content: '\1F465'; }
.ti-server::before { content: '\1F5A5'; }
.ti-chart-bar::before, .ti-chart-candle::before { content: '\1F4CA'; }
.ti-shield-check::before, .ti-shield-lock::before { content: '\1F512'; }
.ti-brand-telegram::before, .ti-send::before { content: '\1F4E8'; }
.ti-speakerphone::before { content: '\1F4E2'; }
.ti-ticket::before { content: '\1F39F'; }
.ti-notes::before, .ti-note::before { content: '\1F4DD'; }
.ti-barrier-block::before { content: '\1F6A7'; }
.ti-building-store::before { content: '\1F3EA'; }
.ti-list::before { content: '\2630'; }
.ti-file-invoice::before, .ti-file-dollar::before, .ti-file-text::before { content: '\1F4C4'; }
.ti-home-dollar::before { content: '\1F4B0'; }
.ti-dots-circle-horizontal::before, .ti-dots::before { content: '\2026'; }

/* ---- Utility: spacing ---- */
.m-0 { margin: 0 !important; } .m-1 { margin: 0.25rem !important; } .m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; } .m-4 { margin: 1.5rem !important; } .m-5 { margin: 3rem !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 0.25rem !important; } .mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; } .mt-4 { margin-top: 1.5rem !important; } .mt-5 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 0.25rem !important; } .mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; } .mb-4 { margin-bottom: 1.5rem !important; } .mb-5 { margin-bottom: 3rem !important; }
.ms-1 { margin-left: 0.25rem !important; } .ms-2 { margin-left: 0.5rem !important; } .ms-3 { margin-left: 1rem !important; }
.ms-auto { margin-left: auto !important; }
.me-1 { margin-right: 0.25rem !important; } .me-2 { margin-right: 0.5rem !important; } .me-3 { margin-right: 1rem !important; }
.me-auto { margin-right: auto !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.p-0 { padding: 0 !important; } .p-1 { padding: 0.25rem !important; } .p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; } .p-4 { padding: 1.5rem !important; } .p-5 { padding: 3rem !important; }
.pt-1 { padding-top: 0.25rem !important; } .pt-2 { padding-top: 0.5rem !important; } .pt-3 { padding-top: 1rem !important; } .pt-4 { padding-top: 1.5rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; } .pb-2 { padding-bottom: 0.5rem !important; } .pb-3 { padding-bottom: 1rem !important; } .pb-4 { padding-bottom: 1.5rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 1rem; } .gap-4 { gap: 1.5rem; }

/* ---- Utility: flexbox ---- */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }
@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-block { display: inline-block !important; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-inline-block { display: inline-block !important; }
}
.d-print-none { /* present everywhere */ }
@media print { .d-print-none { display: none !important; } }
.flex-row { flex-direction: row !important; }
.flex-row-reverse { flex-direction: row-reverse !important; }
.flex-column { flex-direction: column !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-fill { flex: 1 1 auto !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }
.align-self-end { align-self: flex-end !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.text-center { text-align: center !important; }
.text-nowrap { white-space: nowrap !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-wrap { white-space: normal !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-normal { font-weight: 400 !important; }
.fs-1 { font-size: 2rem !important; } .fs-2 { font-size: 1.6rem !important; }
.fs-3 { font-size: 1.3rem !important; } .fs-4 { font-size: 1.1rem !important; }
.fs-5 { font-size: 1rem !important; } .fs-6 { font-size: 0.85rem !important; }
.small { font-size: 0.78rem !important; }
.lh-1 { line-height: 1 !important; }
@media (min-width: 768px) { .text-md-start { text-align: left !important; } .text-md-end { text-align: right !important; } }
@media (min-width: 992px) { .text-lg-start { text-align: left !important; } .text-lg-end { text-align: right !important; } }

/* ---- Utility: width / height ---- */
.w-100 { width: 100% !important; }
.w-75 { width: 75% !important; }
.w-50 { width: 50% !important; }
.w-25 { width: 25% !important; }
.w-auto { width: auto !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }
.mw-100 { max-width: 100% !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-static { position: static !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.rounded { border-radius: var(--gw-radius-sm) !important; }
.rounded-circle { border-radius: 50% !important; }
.border { border: 1px solid var(--gw-border) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--gw-border) !important; }
.border-bottom { border-bottom: 1px solid var(--gw-border) !important; }

/* ---- Utility: text colors ---- */
.text-primary { color: var(--gw-accent) !important; }
.text-success, .text-green { color: var(--gw-success) !important; }
.text-danger, .text-red { color: var(--gw-danger) !important; }
.text-warning, .text-yellow { color: var(--gw-warning) !important; }
.text-info, .text-blue { color: #0984e3 !important; }
.text-secondary, .text-muted { color: var(--gw-text-dim) !important; }
.text-white { color: var(--gw-text-bright) !important; }
.text-reset { color: inherit !important; }
.link-secondary { color: var(--gw-text-dim); }
.link-secondary:hover { color: var(--gw-text-bright); }

/* ---- Utility: backgrounds ---- */
.bg-primary { background: var(--gw-accent) !important; color: #fff !important; }
.bg-success, .bg-green { background: var(--gw-success) !important; color: #fff !important; }
.bg-danger, .bg-red { background: var(--gw-danger) !important; color: #fff !important; }
.bg-warning, .bg-yellow { background: var(--gw-warning) !important; }
.bg-info, .bg-blue { background: #0984e3 !important; color: #fff !important; }
.bg-secondary, .bg-gray { background: var(--gw-bg-surface) !important; }
.bg-transparent { background: transparent !important; }

/* ---- Misc ---- */
code, kbd, pre, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  background: var(--gw-bg-surface);
  color: var(--gw-text-bright);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
pre { padding: 0.75rem 1rem; overflow-x: auto; line-height: 1.5; }
hr { border: 0; border-top: 1px solid var(--gw-border); margin: 1rem 0; }
.divider { height: 1px; background: var(--gw-border); margin: 0.5rem 0; }
.spoiler { filter: blur(5px); transition: filter 0.3s; cursor: pointer; }
.spoiler:hover { filter: none; }

/* ---- Footer (used by admin/footer.tpl, user old footer style) ---- */
.footer-transparent { background: transparent; }
.footer { padding: 1.5rem 0; border-top: 1px solid var(--gw-border); color: var(--gw-text-dim); font-size: 0.8rem; }

/* ---- Responsive: collapse Bootstrap grid below md ---- */
@media (max-width: 575.98px) {
  .row { margin-left: -0.5rem; margin-right: -0.5rem; }
  .row > * { padding-left: 0.5rem; padding-right: 0.5rem; }
  [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
}
