/* ==========================================================================
   Metro Admin Panel — Cyber-Fintech & Glassmorphism Design System
   Color Profile: Pure Indigo (رنگ اختصاصی نیلی)
   Cross-Device Responsive: Phone, Tablet, Laptop, Desktop
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Global Scrollbar Hiding (اسکرول کار می‌کند ولی کاملاً نامرئی است)
   -------------------------------------------------------------------------- */

html,
body,
* {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE & Edge */
}

*::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera, Edge */
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* --------------------------------------------------------------------------
   2. Pure Indigo (نیلی) Color Palette & Design Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Pure Indigo Dark Theme (Default) */
  --bg-base: #060713;
  --bg: #090c1c;
  --bg-elevated: #10142f;
  --bg-card: rgba(16, 20, 46, 0.75);
  --bg-card-hover: rgba(24, 30, 68, 0.88);
  --bg-glass: rgba(12, 16, 38, 0.68);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);
  --border-accent: rgba(99, 102, 241, 0.45);
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;

  /* Indigo Primary Brand Accents */
  --accent: #6366f1;
  --accent-rgb: 99, 102, 241;
  --accent-strong: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-glow: rgba(99, 102, 241, 0.4);

  /* Auxiliary Status Colors */
  --green: #10b981;
  --green-rgb: 16, 185, 129;
  --red: #f43f5e;
  --red-rgb: 244, 63, 94;
  --orange: #f59e0b;
  --orange-rgb: 245, 158, 11;
  --blue: #38bdf8;
  --blue-rgb: 56, 189, 248;

  /* Geometry & Shadows */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.35);
  --glass-blur: blur(18px);
}

:root[data-theme="light"] {
  --bg-base: #f5f7ff;
  --bg: #ffffff;
  --bg-elevated: #f8faff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.82);
  --border: rgba(99, 102, 241, 0.14);
  --border-hover: rgba(99, 102, 241, 0.3);
  --border-accent: rgba(99, 102, 241, 0.5);
  --text: #0f172a;
  --text-dim: #475569;
  --text-muted: #94a3b8;
  --accent: #4f46e5;
  --accent-rgb: 79, 70, 229;
  --accent-strong: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);
  --accent-glow: rgba(79, 70, 229, 0.25);
  --shadow: 0 12px 32px rgba(79, 70, 229, 0.08);
}

/* --------------------------------------------------------------------------
   3. Base Setup & Reset
   -------------------------------------------------------------------------- */

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  background-color: var(--bg-base);
  color: var(--text);
  font-family:
    "Vazirmatn",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  position: relative;
  max-width: 100vw;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

/* Canvas Ambient Background */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Radial Ambient Glow Orbs */
.ambient-glow-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.22;
  pointer-events: none;
  transition: all 1s ease;
  will-change: transform, opacity;
}

.ambient-orb-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -220px;
  right: -120px;
  animation: orbFloat 24s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(
    circle,
    rgba(129, 140, 248, 0.9) 0%,
    transparent 70%
  );
  bottom: -180px;
  left: -120px;
  animation: orbFloat 28s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-90px, 70px) scale(1.15);
  }
  100% {
    transform: translate(60px, -50px) scale(0.9);
  }
}

/* --------------------------------------------------------------------------
   4. Motion Graphics & GPU Animations
   -------------------------------------------------------------------------- */

@keyframes ztFadeUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ztScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ztPulseGlow {
  0%,
  100% {
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.25);
  }
  50% {
    box-shadow:
      0 0 35px rgba(var(--accent-rgb), 0.65),
      0 0 60px rgba(var(--accent-rgb), 0.3);
  }
}

@keyframes ztRadar {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(var(--accent-rgb), 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
}

/* --------------------------------------------------------------------------
   5. Site Loader & Top Progress
   -------------------------------------------------------------------------- */

.site-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.site-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader-mark {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ztPulseGlow 2s infinite ease-in-out;
}

.site-loader-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent));
}

.site-loader-spinner {
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(var(--accent-rgb), 0.3);
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.top-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #818cf8, var(--accent));
  box-shadow: 0 0 14px var(--accent);
  z-index: 10000;
  pointer-events: none;
  transition:
    width 0.3s ease,
    opacity 0.2s ease;
}

/* --------------------------------------------------------------------------
   6. Layout & Responsive Sidebar Drawer
   -------------------------------------------------------------------------- */

.layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Sidebar Backdrop on Mobile */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  min-height: 100vh;
  align-self: stretch;
  transition:
    width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.3s ease,
    background 0.3s ease;
  box-shadow: -5px 0 35px rgba(0, 0, 0, 0.35);
  z-index: 100;
  will-change: transform;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.brand-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.25),
    rgba(var(--accent-rgb), 0.05)
  );
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.brand:hover .brand-icon-box {
  transform: rotate(6deg) scale(1.08);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.5);
}

.brand-name {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.3px;
  display: flex;
  flex-direction: column;
}

.brand-name-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

.collapse-btn,
.sidebar-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.collapse-btn:hover,
.sidebar-close-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.2);
}

.sidebar-close-btn {
  display: none;
}

.sidebar.collapsed .collapse-btn svg,
.sidebar.collapsed .collapse-btn span {
  transform: rotate(180deg);
}

/* Collapsed Sidebar on Desktop */
.sidebar.collapsed {
  width: 82px;
  padding-left: 12px;
  padding-right: 12px;
}

.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .badge,
.sidebar.collapsed .current-admin-label .nav-label {
  display: none;
}

.sidebar.collapsed .nav-link,
.sidebar.collapsed .logout-link,
.sidebar.collapsed .current-admin-label {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .nav-link-main {
  gap: 0;
}

/* Nav Links */
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-weight: 500;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.nav-link-main {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13.5px;
}

.nav-link:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
  transform: translateX(-3px);
}

.nav-link:hover .nav-icon {
  color: var(--accent);
  transform: scale(1.12);
}

.nav-link.active {
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.24),
    rgba(var(--accent-rgb), 0.08)
  );
  border-color: var(--border-accent);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.22);
}

.nav-link.active .nav-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent));
}

.badge {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(var(--red-rgb), 0.5);
}

.current-admin-label {
  margin-top: auto;
  padding: 13px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.logout-link {
  margin-top: 6px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.logout-link:hover {
  background: rgba(var(--red-rgb), 0.12);
  border: 1px solid rgba(var(--red-rgb), 0.25);
  color: var(--red);
}

/* --------------------------------------------------------------------------
   7. Content Area & Topbar
   -------------------------------------------------------------------------- */

.content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 30px 40px 60px;
  animation: ztFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-x: clip;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 30px;
  padding: 12px 18px;
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 16px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13.5px;
  transition: all 0.2s ease;
  min-width: 220px;
}

.search-trigger:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.16);
}

.kbd-hint {
  margin-right: auto;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  transition: all 0.2s ease;
  position: relative;
}

.icon-btn-round {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.hamburger-btn {
  display: none;
}

.notif-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  animation: ztRadar 2s infinite ease-out;
}

.notif-wrap {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 290px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
  animation: ztScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-dropdown.open {
  display: flex;
}

.notif-dropdown-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background 0.15s ease;
}

.notif-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.notif-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   8. Typography, Titles & Breadcrumbs
   -------------------------------------------------------------------------- */

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(4px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-dim);
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: #ffffff;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   9. Cards, Stats & 3D Spotlight Tilt
   -------------------------------------------------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
  margin-bottom: 28px;
  width: 100%;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.stat-card::before,
.action-card::before,
.deposit-card::before,
.summary-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(var(--accent-rgb), 0.16),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.stat-card:hover::before,
.action-card:hover::before,
.deposit-card:hover::before,
.summary-box:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(var(--accent-rgb), 0.2);
}

.stat-card-alert {
  border-color: rgba(var(--orange-rgb), 0.4);
  background: linear-gradient(
    135deg,
    rgba(var(--orange-rgb), 0.12),
    var(--bg-card)
  );
}

.stat-card-alert:hover {
  border-color: var(--orange);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(var(--orange-rgb), 0.35);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.22);
  transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(4deg);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.stat-label {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.stat-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

/* Notice Box */
.notice-box {
  background: linear-gradient(
    135deg,
    rgba(var(--orange-rgb), 0.16),
    rgba(var(--orange-rgb), 0.06)
  );
  border: 1px solid rgba(var(--orange-rgb), 0.4);
  color: #ffffff;
  padding: 16px 22px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(var(--orange-rgb), 0.15);
}

.notice-box a {
  color: #ffffff;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   10. Charts Container
   -------------------------------------------------------------------------- */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 30px;
  width: 100%;
}

.chart-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 220px;
  overflow: hidden;
}

.chart-canvas-wrap canvas,
.chart-box canvas {
  max-width: 100% !important;
  width: 100% !important;
}

.chart-box:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.chart-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   11. Tables, Lists & Badges
   -------------------------------------------------------------------------- */

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 13.5px;
}

thead {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

td {
  padding: 14px 18px;
  vertical-align: middle;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-active {
  background: rgba(var(--green-rgb), 0.12);
  border: 1px solid rgba(var(--green-rgb), 0.3);
  color: var(--green);
}

.status-expired {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.status-banned {
  background: rgba(var(--red-rgb), 0.12);
  border: 1px solid rgba(var(--red-rgb), 0.3);
  color: var(--red);
}

.empty-row {
  text-align: center;
  padding: 40px 18px;
  color: var(--text-dim);
}

/* Summary Grid */
.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px;
  margin-bottom: 28px;
  width: 100%;
}

.summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
  width: 100%;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.summary-box:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.summary-label {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
}

.summary-value {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   12. Buttons & Inputs
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.55);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), #e11d48);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(var(--red-rgb), 0.35);
}

.btn-danger:hover {
  box-shadow: 0 6px 24px rgba(var(--red-rgb), 0.55);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 13.5px;
  transition: all 0.2s ease;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.25);
  background: rgba(0, 0, 0, 0.4);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.search-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  margin-bottom: 28px;
  width: 100%;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  min-width: 0;
  max-width: 100%;
}

.form-row-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
  width: 100%;
}

@media (max-width: 600px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

.action-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-card input,
.action-card select {
  margin-bottom: 12px;
}

.action-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 8px 0 16px;
  line-height: 1.5;
}

.duration-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

/* --------------------------------------------------------------------------
   13. Pending Receipts Gallery & Lightbox
   -------------------------------------------------------------------------- */

.deposits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 22px;
  margin-bottom: 30px;
  width: 100%;
}

.deposit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  min-width: 0;
  width: 100%;
}

.deposit-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow);
}

.deposit-image-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: #000;
}

.deposit-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

.deposit-image:hover {
  transform: scale(1.05);
}

.deposit-badge-new {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--orange-rgb), 0.5);
  color: var(--orange);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.deposit-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  flex: 1;
}

.deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deposit-row span {
  color: var(--text-dim);
}

.deposit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.deposit-actions button {
  width: 100%;
  padding: 9px;
  font-size: 12.5px;
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 24px;
}

.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  object-fit: contain;
  transition: transform 0.2s ease;
}

.lightbox-toolbar {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 999px;
}

.lightbox-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   14. Command Palette (Raycast / Linear Style)
   -------------------------------------------------------------------------- */

.command-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.command-overlay.open {
  opacity: 1;
  visibility: visible;
}

.command-palette {
  width: 100%;
  max-width: 580px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-lg),
    0 0 50px rgba(var(--accent-rgb), 0.25);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.command-overlay.open .command-palette {
  transform: scale(1);
}

.command-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.command-input-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.command-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 16px;
  color: var(--text);
  padding: 0;
}

.command-esc {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.command-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-dim);
  transition: all 0.15s ease;
}

.command-item:hover,
.command-item.selected {
  background: var(--bg-card-hover);
  color: #fff;
  transform: translateX(-3px);
}

.command-item-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.command-item-highlight {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-weight: 600;
}

.command-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* --------------------------------------------------------------------------
   15. Toast Notifications & Interactive Modal
   -------------------------------------------------------------------------- */

.zt-toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10005;
  pointer-events: none;
}

.zt-toast {
  pointer-events: auto;
  min-width: 290px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: ztFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

.zt-toast.toast-success {
  border-color: rgba(var(--green-rgb), 0.4);
  box-shadow: 0 8px 30px rgba(var(--green-rgb), 0.25);
}

.zt-toast.toast-error {
  border-color: rgba(var(--red-rgb), 0.4);
  box-shadow: 0 8px 30px rgba(var(--red-rgb), 0.25);
}

.zt-toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zt-toast-content {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.4;
}

.zt-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
}

/* Glassmorphic Modal */
.zt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.zt-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.zt-modal-box {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 30px;
  text-align: center;
  box-shadow:
    var(--shadow-lg),
    0 0 50px rgba(var(--accent-rgb), 0.25);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.zt-modal-overlay.open .zt-modal-box {
  transform: scale(1);
}

.zt-modal-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.zt-modal-icon-wrap.modal-type-danger {
  background: rgba(var(--red-rgb), 0.15);
  border: 1px solid rgba(var(--red-rgb), 0.35);
  color: var(--red);
  box-shadow: 0 0 25px rgba(var(--red-rgb), 0.3);
}

.zt-modal-icon-wrap.modal-type-primary {
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
  box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.3);
}

.zt-modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.zt-modal-text {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.5;
}

.zt-modal-actions {
  display: flex;
  gap: 12px;
}

.zt-modal-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   16. Login Page (Cyber-Shield Screen)
   -------------------------------------------------------------------------- */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow:
    var(--shadow-lg),
    0 0 60px rgba(var(--accent-rgb), 0.25);
  position: relative;
  animation: ztScaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-shield {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.25),
    rgba(var(--accent-rgb), 0.05)
  );
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.35);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: ztPulseGlow 3s infinite ease-in-out;
}

.login-brand {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-sub {
  color: var(--text-dim);
  font-size: 13.5px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.login-input-wrap {
  position: relative;
  margin-bottom: 20px;
}

.login-input-wrap input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  font-size: 15px;
  border-radius: 12px;
  text-align: center;
  letter-spacing: 2px;
}

.login-toggle-pw {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.login-card button[type="submit"] {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.55);
}

.login-footer-badge {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   17. Sub-Admin & Permissions
   -------------------------------------------------------------------------- */

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}

.permission-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  user-select: none;
}

.permission-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.permission-chip input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

.new-password-box {
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.15),
    rgba(var(--accent-rgb), 0.05)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.15);
}

.new-password-box .title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.new-password-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.new-password-value {
  font-family: monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
}

.permission-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
}

.admin-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-edit-perms {
  display: none;
  background: rgba(0, 0, 0, 0.25);
}

.admin-edit-perms.open {
  display: table-row;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   18. Full Responsiveness: Phone, Tablet, Laptop, Desktop
   -------------------------------------------------------------------------- */

/* ---- Body scroll-lock when mobile sidebar is open ---- */
body.sidebar-open {
  overflow: hidden !important;
  touch-action: none;
}

/* ===== Tablet & Small Laptop (<= 1024px) ===== */
@media (max-width: 1024px) {
  .content {
    padding: 24px 20px 60px;
  }

  .charts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* -- Sidebar becomes a fixed drawer from the right (RTL) -- */
  .sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    left: auto;
    height: 100vh;
    height: 100dvh;
    z-index: 1001;
    width: 300px !important;
    max-width: 85vw;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
    border-left: none;
    background: var(--bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow-y: auto;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .sidebar-close-btn {
    display: inline-flex;
  }

  .collapse-btn {
    display: none !important;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .action-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .deposits-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .permission-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .notif-dropdown {
    left: auto;
    right: 0;
    width: 280px;
  }
}

/* ===== Small Tablet & Large Phone (<= 768px) ===== */
@media (max-width: 768px) {
  .content {
    padding: 16px 12px 50px;
  }

  .topbar {
    padding: 10px 12px;
    margin-bottom: 18px;
    border-radius: var(--radius);
  }

  .search-trigger {
    min-width: 0;
    flex: 1;
    padding: 8px 12px;
    font-size: 12.5px;
  }

  .search-trigger span {
    display: none;
  }

  .kbd-hint {
    display: none;
  }

  .page-title {
    font-size: 20px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .page-sub {
    font-size: 12.5px;
    margin-bottom: 18px;
  }

  .section-title {
    font-size: 16px;
    margin: 24px 0 14px;
  }

  .summary-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .summary-box {
    padding: 14px;
  }

  .summary-value {
    font-size: 16px;
  }

  .summary-label {
    font-size: 11.5px;
  }

  .action-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .action-card {
    padding: 18px;
  }

  .action-title {
    font-size: 14.5px;
  }

  .deposits-grid {
    grid-template-columns: 1fr;
  }

  .charts-grid {
    gap: 16px;
  }

  .chart-box {
    padding: 18px;
  }

  .chart-title {
    font-size: 14px;
    margin-bottom: 14px;
  }

  /* Tables: horizontal scroll with better touch */
  .table-wrap {
    border-radius: var(--radius);
    margin-bottom: 20px;
  }

  th {
    padding: 10px 12px;
    font-size: 12px;
  }

  td {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  .btn {
    padding: 9px 14px;
    font-size: 12.5px;
  }

  .btn-small {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  /* Toast notifications */
  .zt-toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .zt-toast {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 12px 14px;
  }

  /* Modal */
  .zt-modal-box {
    max-width: 92vw;
    padding: 24px 20px;
  }

  .zt-modal-title {
    font-size: 16px;
  }

  .zt-modal-text {
    font-size: 13px;
  }

  .zt-modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .zt-modal-actions button {
    padding: 11px;
  }

  /* Command Palette */
  .command-palette {
    max-width: 96vw;
    margin: 0 8px;
  }

  .command-input-row {
    padding: 12px 14px;
  }

  .command-input {
    font-size: 14px;
  }

  /* Lightbox */
  .lightbox-content {
    max-width: 96vw;
  }

  #lightbox-image {
    max-width: 96vw;
    max-height: 75vh;
  }

  .lightbox-close {
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  /* Notification dropdown goes full width on small screens */
  .notif-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 50vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 10003;
    overflow-y: auto;
  }

  /* Login page */
  .login-card {
    padding: 36px 24px;
    max-width: 100%;
  }

  .login-brand {
    font-size: 22px;
  }

  .login-shield {
    width: 58px;
    height: 58px;
  }

  .login-input-wrap input {
    padding: 12px 38px 12px 14px;
    font-size: 14px;
  }

  /* Notice box */
  .notice-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 10px;
  }

  .notice-box .btn {
    width: 100%;
  }

  /* Search bar */
  .search-bar {
    padding: 12px;
    gap: 8px;
    flex-direction: column;
  }

  .search-filter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .search-bar input {
    width: 100%;
  }

  .search-bar .btn {
    width: 100%;
  }

  /* Permission grid */
  .permission-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .permission-chip {
    padding: 8px 10px;
    font-size: 12px;
  }

  .new-password-box {
    padding: 16px;
  }

  .new-password-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* Sidebar drawer: wider on tablets */
  .sidebar {
    width: 280px !important;
  }

  /* Duration row in forms */
  .duration-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Deposit card actions */
  .deposit-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: 12px;
    gap: 6px;
  }

  /* Back link */
  .back-link {
    font-size: 12.5px;
  }

  /* Pagination */
  .pagination {
    gap: 8px;
    margin-top: 20px;
  }

  /* Ambient orbs: smaller on mobile */
  .ambient-orb-1 {
    width: 350px;
    height: 350px;
  }

  .ambient-orb-2 {
    width: 300px;
    height: 300px;
  }

  /* Admin actions */
  .admin-actions-row {
    gap: 6px;
  }
}

/* ===== Mobile Phone (<= 480px) ===== */
@media (max-width: 480px) {
  /* Sidebar goes full-width on phones */
  .sidebar {
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0;
  }

  .content {
    padding: 14px 10px 40px;
  }

  .topbar {
    padding: 8px 10px;
    margin-bottom: 14px;
    gap: 8px;
  }

  .icon-btn-round {
    width: 36px;
    height: 36px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .chart-canvas-wrap {
    height: 190px;
  }

  .stat-card {
    padding: 12px;
    border-radius: var(--radius);
  }

  .stat-header {
    margin-bottom: 10px;
  }

  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .summary-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .page-title {
    font-size: 18px;
  }

  .page-sub {
    font-size: 11.5px;
    margin-bottom: 14px;
  }

  .section-title {
    font-size: 15px;
    margin: 20px 0 12px;
  }

  .chart-box {
    padding: 14px;
    border-radius: var(--radius);
  }

  .action-card {
    padding: 16px;
    border-radius: var(--radius);
  }

  .action-title {
    font-size: 14px;
    margin-bottom: 10px;
    gap: 8px;
  }

  .action-desc {
    font-size: 12px;
    margin: 6px 0 12px;
  }

  /* Login page */
  .login-card {
    padding: 28px 16px;
    border-radius: var(--radius-lg);
  }

  .login-brand {
    font-size: 20px;
  }

  .login-sub {
    font-size: 12.5px;
    margin-bottom: 22px;
  }

  .login-shield {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .login-page {
    padding: 16px;
  }

  /* Custom file upload */
  .custom-file-upload {
    padding: 18px 14px;
  }

  .custom-file-icon {
    width: 40px;
    height: 40px;
  }

  .custom-file-title {
    font-size: 13px;
  }

  .custom-file-subtitle {
    font-size: 11px;
  }

  .custom-file-selected {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Deposit cards */
  .deposit-image-wrap {
    height: 160px;
  }

  .deposit-info {
    padding: 12px;
    font-size: 12px;
  }

  .deposit-actions {
    padding: 8px 10px;
    gap: 6px;
  }

  .deposit-actions button {
    padding: 7px;
    font-size: 11.5px;
  }

  /* Tables */
  th {
    padding: 8px 10px;
    font-size: 11.5px;
  }

  td {
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Modal */
  .zt-modal-box {
    padding: 22px 16px;
    border-radius: var(--radius-lg);
  }

  .zt-modal-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  /* Command Palette */
  .command-overlay {
    padding-top: 8vh;
  }

  /* Notification dropdown */
  .notif-dropdown {
    max-height: 60vh;
  }

  /* Permission chips */
  .permission-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .permission-chip {
    padding: 7px 8px;
    font-size: 11px;
  }

  /* Search bar */
  .search-bar {
    padding: 10px;
  }

  .search-filter-grid {
    grid-template-columns: 1fr;
  }

  /* New password display */
  .new-password-value {
    font-size: 15px;
    padding: 6px 14px;
  }

  /* Admin permissions */
  .permission-badges {
    gap: 4px;
  }

  .permission-badge {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  /* Sidebar nav links in mobile drawer */
  .sidebar .nav-link {
    padding: 12px 16px;
  }

  .sidebar .nav-label {
    font-size: 14px;
  }

  .sidebar .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .sidebar-top {
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  /* Topbar search placeholder visible as icon only */
  .search-trigger {
    padding: 8px 10px;
    min-width: 36px;
  }

  /* Footer badge on login */
  .login-footer-badge {
    font-size: 10px;
  }

  /* Ambient effects reduced */
  .ambient-orb-1 {
    width: 280px;
    height: 280px;
  }

  .ambient-orb-2 {
    width: 230px;
    height: 230px;
  }
}

/* ===== Extra Small Phone (<= 360px, e.g. Galaxy S8, SE) ===== */
@media (max-width: 360px) {
  html {
    font-size: 13.5px;
  }

  .content {
    padding: 12px 8px 36px;
  }

  .topbar {
    padding: 7px 8px;
    gap: 6px;
    border-radius: var(--radius-sm);
  }

  .icon-btn-round {
    width: 34px;
    height: 34px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .stat-value {
    font-size: 18px;
    word-break: break-word;
  }

  .stat-label {
    font-size: 10.5px;
  }

  .stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .stat-icon svg {
    width: 14px;
    height: 14px;
  }

  .stat-badge {
    font-size: 9.5px;
    padding: 2px 5px;
  }

  .page-title {
    font-size: 17px;
  }

  .page-sub {
    font-size: 11px;
  }

  .section-title {
    font-size: 14px;
  }

  .action-card {
    padding: 14px;
  }

  .action-title {
    font-size: 13.5px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .btn-small {
    padding: 5px 8px;
    font-size: 11px;
  }

  /* Sidebar padding */
  .sidebar {
    padding: 18px 12px;
  }

  .sidebar .nav-link {
    padding: 10px 12px;
  }

  .sidebar .nav-label {
    font-size: 13.5px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  /* Login */
  .login-card {
    padding: 24px 14px;
  }

  .login-brand {
    font-size: 18px;
  }

  .login-shield {
    width: 46px;
    height: 46px;
  }

  .login-input-wrap input {
    padding: 11px 34px 11px 12px;
    font-size: 13px;
  }

  /* Input fields */
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  select,
  textarea {
    padding: 9px 12px;
    font-size: 13px;
  }

  /* Tables tighter */
  th {
    padding: 7px 8px;
    font-size: 11px;
  }

  td {
    padding: 7px 8px;
    font-size: 11.5px;
  }

  /* Chart box */
  .chart-box {
    padding: 12px;
  }

  .chart-canvas-wrap {
    height: 175px;
  }

  .chart-title {
    font-size: 13px;
    margin-bottom: 12px;
  }

  /* Summary */
  .summary-box {
    padding: 12px;
  }

  .summary-value {
    font-size: 15px;
  }

  .summary-label {
    font-size: 11px;
  }

  /* Deposit cards */
  .deposit-image-wrap {
    height: 140px;
  }

  .deposit-info {
    padding: 10px;
    font-size: 11.5px;
  }

  /* Custom file upload */
  .custom-file-upload {
    padding: 14px 10px;
  }

  .custom-file-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .custom-file-title {
    font-size: 12px;
  }

  /* Toast */
  .zt-toast {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  /* Modal */
  .zt-modal-box {
    padding: 18px 14px;
  }

  .zt-modal-title {
    font-size: 15px;
  }

  .zt-modal-text {
    font-size: 12px;
    margin-bottom: 18px;
  }

  /* Ambient effects: minimal on tiny screens */
  .ambient-orb-1 {
    width: 200px;
    height: 200px;
    opacity: 0.15;
  }

  .ambient-orb-2 {
    width: 180px;
    height: 180px;
    opacity: 0.12;
  }
}

/* --------------------------------------------------------------------------
   19. Custom Cyber File Uploader & Dropzone
   -------------------------------------------------------------------------- */

.custom-file-upload {
  position: relative;
  border: 2px dashed rgba(var(--accent-rgb), 0.35);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.custom-file-upload:hover,
.custom-file-upload.dragover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.2);
  transform: translateY(-2px);
}

.custom-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.2);
  margin-bottom: 4px;
  transition: transform 0.2s ease;
}

.custom-file-upload:hover .custom-file-icon {
  transform: scale(1.1);
}

.custom-file-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.custom-file-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.custom-file-selected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.2);
  border: 1px solid var(--accent);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  font-family: monospace;
  animation: ztScaleIn 0.2s ease;
}

input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 12.5px;
  margin-left: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.3);
}

input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.5);
}
