/* Htibinak skin for Sub2API (sub2.htibinak.com) — injected by nginx sub_filter. v1
   Glassmorphism matched to the CPAMP / Komari skins: soft gradient + blobs, frosted surfaces. */

/* ---------- page background ---------- */
html body, html .min-h-screen.bg-gray-50 {
  background: linear-gradient(135deg, #dfe9fb 0%, #eef2f8 45%, #e3f1f4 100%) fixed !important;
}
html.dark body, html.dark .min-h-screen.bg-gray-50 {
  background: linear-gradient(135deg, #0b1530 0%, #0c1a33 40%, #0a1f2c 100%) fixed !important;
}
body::before, body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(90px); opacity: .45;
}
body::before { width: 520px; height: 520px; top: -140px; left: -120px; background: radial-gradient(circle, #8b9cff, #c3ccff00 70%); }
body::after  { width: 560px; height: 560px; bottom: -180px; right: -140px; background: radial-gradient(circle, #5fd3e0, #a6f0e600 70%); }
html.dark body::before { opacity: .28; }
html.dark body::after  { opacity: .22; }
#app { position: relative; z-index: 1; }

/* ---------- frosted surfaces ---------- */
.card, .stat-card, .table-container, .table-wrapper {
  background: rgba(255,255,255,.62) !important;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,.75) !important;
  box-shadow: 0 8px 32px rgba(30,58,138,.08) !important;
}
html.dark .card, html.dark .stat-card, html.dark .table-container, html.dark .table-wrapper {
  background: rgba(17,27,48,.55) !important;
  border-color: rgba(148,163,184,.14) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.35) !important;
}
.table-container .card, .card .table-container, .card .card { background: transparent !important; box-shadow: none !important; backdrop-filter: none; }

.sidebar {
  background: rgba(255,255,255,.55) !important;
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid rgba(255,255,255,.7) !important;
  box-shadow: 2px 0 24px rgba(30,58,138,.08);
}
html.dark .sidebar { background: rgba(11,18,34,.6) !important; border-right-color: rgba(148,163,184,.12) !important; }
.sidebar-header { border-bottom-color: rgba(15,23,42,.06) !important; }
html.dark .sidebar-header { border-bottom-color: rgba(148,163,184,.1) !important; }

header.glass {
  background: rgba(255,255,255,.5) !important;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}
html.dark header.glass { background: rgba(11,18,34,.5) !important; }

.modal-content {
  background: rgba(255,255,255,.88) !important;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,.8);
}
html.dark .modal-content { background: rgba(15,24,44,.9) !important; border-color: rgba(148,163,184,.14); }

/* table header and rows a little lighter */
.table thead, .table th { background: rgba(255,255,255,.35) !important; }
html.dark .table thead, html.dark .table th { background: rgba(30,41,59,.35) !important; }

/* ---------- accents ---------- */
.sidebar-link { border-radius: 12px; }
.sidebar-link-active {
  background: linear-gradient(90deg, rgba(20,184,166,.16), rgba(99,102,241,.10)) !important;
  box-shadow: inset 3px 0 0 #14b8a6;
}
.btn-primary {
  background-image: linear-gradient(135deg, #14b8a6, #6366f1) !important;
  border: none !important;
  box-shadow: 0 6px 18px rgba(20,184,166,.28);
}
.btn-primary:hover { filter: brightness(1.06); }
.input { background: rgba(255,255,255,.7) !important; }
html.dark .input { background: rgba(15,23,42,.55) !important; }
.card, .stat-card, .modal-content { border-radius: 18px !important; }

/* auth pages (login) */
.glass-card, .card-glass { background: rgba(255,255,255,.66) !important; border-color: rgba(255,255,255,.8) !important; }
html.dark .glass-card, html.dark .card-glass { background: rgba(17,27,48,.6) !important; border-color: rgba(148,163,184,.14) !important; }

/* ---------- v2: landing page cards (home_content) ---------- */
.hk-card { background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 8px 32px rgba(30,58,138,.08); color: #1e293b; }
.hk-btn2 { background: rgba(255,255,255,.6); border: 1px solid rgba(148,163,184,.35); color: #1e293b !important; }
html.dark .hk-card { background: rgba(17,27,48,.6); border-color: rgba(148,163,184,.16); box-shadow: 0 8px 32px rgba(0,0,0,.35); color: #e2e8f0; }
html.dark .hk-btn2 { background: rgba(17,27,48,.6); border-color: rgba(148,163,184,.25); color: #e2e8f0 !important; }

/* ---------- v2: sticky table cells must stay opaque ---------- */
html .sticky-header-cell, html .table th.sticky-header-cell { background: #f1f5fa !important; }
html.dark .sticky-header-cell, html.dark .table th.sticky-header-cell { background: #16223a !important; }
html tbody .sticky-col { background: #ffffff !important; }
html.dark tbody .sticky-col { background: #111b2f !important; }
html tbody tr:hover .sticky-col { background: #f5f8fc !important; }
html.dark tbody tr:hover .sticky-col { background: #1a2742 !important; }

/* ---------- v2: dark chart readability (canvas text is JS-drawn; lift container contrast) ---------- */
html.dark canvas { filter: brightness(1.15) contrast(1.05); }
