@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/*
   Canal Yar v2.0 — Premium Design System
   Modern Glassmorphism + Depth + Micro-interactions
   RTL-First, Dark/Light Adaptive
*/

/* ═══════════════════════════════════════
   LOCAL FONT FACES
   ═══════════════════════════════════════ */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn-Black.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Shabnam'; src: url('../fonts/Shabnam.ttf') format('truetype'); font-weight: normal; font-display: swap; }
@font-face { font-family: 'Shabnam'; src: url('../fonts/Shabnam-Bold.ttf') format('truetype'); font-weight: bold; font-display: swap; }
@font-face { font-family: 'Lalezar'; src: url('../fonts/Lalezar-Regular.ttf') format('truetype'); font-weight: normal; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

/* ═══════════════════════════════════════
   DESIGN TOKENS — DARK MODE (Default)
   ═══════════════════════════════════════ */
:root {
  /* Fonts */
  --font-fa: 'Vazirmatn', 'Shabnam', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-en: 'Outfit', 'Vazirmatn', system-ui, sans-serif;
  --font-display: 'Lalezar', var(--font-fa);

  /* Spacing Scale */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Colors — Surfaces */
  --bg-base: #050810;
  --bg-raised: #0a0f1c;
  --bg-overlay: #0f1629;
  --bg-surface: rgba(12, 18, 36, 0.65);
  --bg-surface-hover: rgba(18, 28, 55, 0.8);
  --bg-input: rgba(255, 255, 255, 0.025);
  --bg-input-focus: rgba(255, 255, 255, 0.05);

  /* Colors — Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(0, 200, 255, 0.5);

  /* Colors — Brand */
  --primary: #0084ff;
  --primary-hover: #2d9cff;
  --primary-subtle: rgba(0, 132, 255, 0.12);
  --primary-glow: rgba(0, 132, 255, 0.25);

  --cyan: #00e5ff;
  --cyan-subtle: rgba(0, 229, 255, 0.1);
  --cyan-glow: rgba(0, 229, 255, 0.3);

  --accent: #ff007f;
  --accent-hover: #ff3399;
  --accent-subtle: rgba(255, 0, 127, 0.1);
  --accent-glow: rgba(255, 0, 127, 0.25);

  --purple: #7d5fff;
  --purple-subtle: rgba(125, 95, 255, 0.1);

  --success: #10b981;
  --success-subtle: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-subtle: rgba(245, 158, 11, 0.12);
  --error: #ef4444;
  --error-subtle: rgba(239, 68, 68, 0.12);

  /* Colors — Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;
  --text-on-primary: #ffffff;
  --text-main-rgb: 241, 245, 249;

  /* Legacy aliases for JS compatibility */
  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);
  --text-dark: var(--text-inverse);
  --bg-deep: var(--bg-base);
  --bg-space: var(--bg-raised);
  --bg-glass: var(--bg-surface);
  --bg-glass-hover: var(--bg-surface-hover);
  --border-glass: var(--border-default);
  --border-glass-glow: var(--border-focus);
  --border-input: var(--border-default);
  --bg-welcome-gradient: linear-gradient(135deg, rgba(8, 14, 28, 0.85) 0%, rgba(20, 10, 35, 0.75) 100%);
  --bg-card-gradient: linear-gradient(145deg, rgba(12, 18, 36, 0.7) 0%, rgba(5, 8, 16, 0.95) 100%);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.12);
  --shadow-glow-accent: 0 0 25px rgba(255, 0, 127, 0.15);
  --shadow-glow-primary: 0 0 20px rgba(0, 132, 255, 0.15);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.15s var(--ease-smooth);
  --transition-smooth: all 0.35s var(--ease-smooth);
  --transition-slow: 0.5s var(--ease-smooth);

  /* Sidebar */
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 72px;
}

/* ═══════════════════════════════════════
   LIGHT MODE OVERRIDES
   ═══════════════════════════════════════ */
body.light-mode,
.light-mode {
  --bg-base: #f4f6fa;
  --bg-raised: #ffffff;
  --bg-overlay: #edf0f7;
  --bg-surface: rgba(255, 255, 255, 0.82);
  --bg-surface-hover: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(0, 0, 0, 0.02);
  --bg-input-focus: rgba(0, 0, 0, 0.04);

  --border-subtle: rgba(15, 23, 42, 0.05);
  --border-default: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --border-focus: rgba(0, 132, 255, 0.4);

  --primary: #0066cc;
  --primary-hover: #0077ed;
  --primary-subtle: rgba(0, 102, 204, 0.08);
  --primary-glow: rgba(0, 102, 204, 0.12);
  --cyan: #0891b2;
  --cyan-subtle: rgba(8, 145, 178, 0.08);
  --cyan-glow: rgba(8, 145, 178, 0.12);
  --accent: #dc2626;
  --accent-hover: #ef4444;
  --accent-subtle: rgba(220, 38, 38, 0.08);
  --accent-glow: rgba(220, 38, 38, 0.1);
  --purple: #6c5ce7;
  --purple-subtle: rgba(108, 92, 231, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #f8fafc;
  --text-main-rgb: 15, 23, 42;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.1);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.12);
  --shadow-glow: 0 4px 16px rgba(0, 132, 255, 0.08);
  --shadow-glow-accent: 0 4px 16px rgba(220, 38, 38, 0.06);
  --shadow-glow-primary: 0 4px 16px rgba(0, 102, 204, 0.08);

  --bg-welcome-gradient: linear-gradient(135deg, rgba(230, 238, 250, 0.95) 0%, rgba(240, 236, 255, 0.9) 100%);
  --bg-card-gradient: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 248, 252, 0.98) 100%);
}

/* ═══════════════════════════════════════
   GLOBAL RESET & BASE
   ═══════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-fa);
}

body {
  font-family: var(--font-fa);
  font-feature-settings: "ss01", "ss02", "kern", "calt";
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  min-height: 100vh;
}

input, button, select, textarea, label, table, form, modal {
  font-family: var(--font-fa);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--text-main-rgb), 0.12); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--text-main-rgb), 0.25); }

/* Selection */
::selection { background: var(--primary-subtle); color: var(--text-primary); }

/* Focus Outline */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
h1 { font-family: var(--font-display); font-weight: 400; }

.text-display { font-size: 40px; font-weight: 900; line-height: 1.2; letter-spacing: -0.02em; }
.text-heading { font-size: 24px; font-weight: 700; line-height: 1.3; }
.text-subheading { font-size: 18px; font-weight: 600; line-height: 1.4; }
.text-body { font-size: 14.5px; font-weight: 400; line-height: 1.7; }
.text-caption { font-size: 12.5px; font-weight: 400; color: var(--text-secondary); }
.text-english { font-family: var(--font-en); }

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--cyan) 60%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.accent-gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--accent) 70%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.view-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.view-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-padding {
  padding: 100px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* ═══════════════════════════════════════
   GLASS PANELS & CARDS
   ═══════════════════════════════════════ */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-strong);
}

.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--primary));
  opacity: 0;
  transition: opacity 0.3s var(--ease-smooth);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.glass-card:hover::before {
  opacity: 1;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-fa);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.25s;
}

.btn:hover::after {
  background: rgba(255, 255, 255, 0.06);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: var(--text-on-primary);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: var(--text-on-primary);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-secondary {
  background: rgba(var(--text-main-rgb), 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: rgba(var(--text-main-rgb), 0.08);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(var(--text-main-rgb), 0.05);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════
   HEADER / NAVBAR
   ═══════════════════════════════════════ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 6%;
  background: rgba(5, 8, 16, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

body.light-mode header {
  background: rgba(255, 255, 255, 0.82);
}

.logo {
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
  transition: transform 0.3s var(--ease-smooth);
}

.logo:hover .logo-img {
  transform: scale(1.08);
}

.logo-dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(0, 229, 255, 0); }
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s;
  position: relative;
  padding: 4px 0;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  right: 0;
  background: linear-gradient(90deg, var(--cyan), var(--primary));
  transition: width 0.3s var(--ease-smooth);
  border-radius: var(--radius-full);
}

nav a:hover { color: var(--text-primary); }
nav a:hover::after { width: 100%; }

/* Mobile hamburger */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* ═══════════════════════════════════════
   SIDEBAR (Panel Pages)
   ═══════════════════════════════════════ */
.dashboard-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-subtle);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 100;
  transition: width 0.35s var(--ease-smooth), padding 0.35s var(--ease-smooth);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 0; }

.sidebar-menu {
  list-style: none;
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  position: relative;
}

.menu-item:hover {
  color: var(--text-primary);
  background: rgba(var(--text-main-rgb), 0.05);
}

.menu-item.active {
  color: var(--primary) !important;
  background: var(--primary-subtle);
  font-weight: 600;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.menu-item svg, .menu-item .sidebar-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(var(--text-main-rgb), 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--cyan), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #000;
  flex-shrink: 0;
}

.content-area {
  flex-grow: 1;
  height: 100%;
  overflow-y: auto;
  padding: var(--space-xl) 4%;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* Sidebar toggle button */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 200;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════ */
.form-group {
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-fa);
  font-size: 14px;
  outline: none;
  transition: all 0.25s var(--ease-smooth);
  width: 100%;
}

.form-control:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.08);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.table-container {
  overflow-x: auto;
  margin-top: var(--space-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
}

th {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tr {
  transition: background 0.15s;
}

tr:hover td {
  background: rgba(var(--text-main-rgb), 0.02);
}

/* ═══════════════════════════════════════
   BADGES
   ═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-subtle); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-error { background: var(--error-subtle); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-warning { background: var(--warning-subtle); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-info { background: var(--cyan-subtle); color: var(--cyan); border: 1px solid rgba(0, 229, 255, 0.2); }
.badge-secondary { background: rgba(var(--text-main-rgb), 0.05); color: var(--text-secondary); border: 1px solid var(--border-subtle); }

/* ═══════════════════════════════════════
   MODALS
   ═══════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 92%;
  max-width: 500px;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s var(--ease-smooth);
  padding: var(--space-lg);
}

.modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--error);
  background: var(--error-subtle);
}

/* ═══════════════════════════════════════
   STAT CARDS (Dashboard)
   ═══════════════════════════════════════ */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-glow-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-glow-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.15;
  pointer-events: none;
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ═══════════════════════════════════════
   WALLET CARD
   ═══════════════════════════════════════ */
.wallet-card {
  background: linear-gradient(135deg, rgba(0, 132, 255, 0.08) 0%, rgba(125, 95, 255, 0.06) 100%);
  border: 1px solid rgba(0, 132, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ═══════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════ */
.sub-bar-progress {
  width: 100%;
  height: 6px;
  background: rgba(var(--text-main-rgb), 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sub-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--primary));
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-smooth);
}

/* ═══════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, rgba(var(--text-main-rgb), 0.04) 25%, rgba(var(--text-main-rgb), 0.08) 50%, rgba(var(--text-main-rgb), 0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text { height: 14px; width: 70%; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 45%; margin-bottom: 12px; }
.skeleton-card { height: 120px; width: 100%; }
.skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════ */
.empty-placeholder {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-secondary);
}

.empty-placeholder .empty-icon {
  font-size: 56px;
  display: block;
  margin-bottom: var(--space-md);
  opacity: 0.6;
}

.empty-placeholder h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.empty-placeholder p {
  font-size: 13.5px;
  color: var(--text-tertiary);
  max-width: 380px;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════ */
.alert-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-raised);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 22px;
  color: var(--text-primary);
  font-family: var(--font-fa);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-smooth), opacity 0.4s;
  direction: rtl;
  max-width: 420px;
}

.alert-toast.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.alert-toast.toast-success { border-color: rgba(16, 185, 129, 0.3); }
.alert-toast.toast-error { border-color: rgba(239, 68, 68, 0.3); }
.alert-toast.toast-info { border-color: rgba(0, 132, 255, 0.3); }

#toast-icon { font-size: 18px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-effect { animation: float 4s ease-in-out infinite; }

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

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(var(--text-main-rgb), 0.1);
  border-radius: 50%;
  border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fade-in-up 0.4s var(--ease-smooth); }

@keyframes count-up-glow {
  0% { text-shadow: none; }
  50% { text-shadow: 0 0 8px var(--cyan-glow); }
  100% { text-shadow: none; }
}

/* Floating ambient orbs */
body::before, body::after {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
  animation: float-orb 25s infinite alternate;
}
body::before { top: -10%; left: -5%; background: var(--cyan); }
body::after { bottom: -10%; right: -5%; background: var(--accent); animation-delay: -12s; }

body.light-mode::before,
body.light-mode::after {
  opacity: 0.04;
}

@keyframes float-orb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.15); }
  100% { transform: translate(-20px, -40px) scale(0.9); }
}

/* ═══════════════════════════════════════
   EDITOR COMPONENTS
   ═══════════════════════════════════════ */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: rgba(var(--text-main-rgb), 0.02);
  border: 1px solid var(--border-default);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 8px 10px;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s;
}

.toolbar-btn:hover {
  background: rgba(var(--text-main-rgb), 0.06);
  color: var(--text-primary);
}

.form-control.with-toolbar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Editor layout */
.editor-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

/* ═══════════════════════════════════════
   PHONE MOCKUP
   ═══════════════════════════════════════ */
.phone-mockup {
  width: 100%;
  max-width: 300px;
  height: 520px;
  border: 10px solid rgba(var(--text-main-rgb), 0.08);
  border-radius: 36px;
  background: var(--bg-raised);
  overflow: hidden;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-mockup::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 16px;
  background: rgba(var(--text-main-rgb), 0.08);
  border-radius: 0 0 10px 10px;
  z-index: 10;
}

.phone-header {
  height: 38px;
  background: rgba(var(--text-main-rgb), 0.02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-en);
}

.phone-screen {
  flex-grow: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.phone-bubble {
  background: rgba(0, 132, 255, 0.1);
  border: 1px solid rgba(0, 132, 255, 0.18);
  padding: 10px 12px;
  border-radius: var(--radius-md) var(--radius-md) 0 var(--radius-md);
  margin-bottom: 10px;
  max-width: 88%;
  align-self: flex-start;
  word-break: break-word;
  font-size: 12px;
  box-shadow: var(--shadow-xs);
  line-height: 1.7;
}

.phone-bubble-media {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  display: block;
  max-height: 160px;
  object-fit: cover;
}

.phone-bubble-doc {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--text-main-rgb), 0.04);
  border: 1px solid var(--border-subtle);
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
  font-size: 11px;
}

.phone-tabs .tab-btn { opacity: 0.6; transition: all 0.2s; }
.phone-tabs .tab-btn.active { opacity: 1; font-weight: bold; }

/* ═══════════════════════════════════════
   CHANNEL MANAGEMENT
   ═══════════════════════════════════════ */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.channel-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
}

.channels-grid .channel-card {
  position: relative;
  background: var(--bg-card-gradient) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-smooth);
}

.channels-grid .channel-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus) !important;
  box-shadow: var(--shadow-md), var(--shadow-glow) !important;
}

.channels-grid .channel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--primary));
}

/* Channel selection pills (editor) */
.channel-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.channel-pill {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: rgba(var(--text-main-rgb), 0.01);
  transition: all 0.2s var(--ease-smooth);
  user-select: none;
}

.channel-pill:hover {
  border-color: var(--border-strong);
  background: rgba(var(--text-main-rgb), 0.03);
}

.channel-pill.selected {
  border-color: var(--cyan);
  background: var(--cyan-subtle);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.08);
}

/* Platform dots */
.platform-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.platform-dot.telegram { background: #0088cc; }
.platform-dot.bale { background: #3fba60; }
.platform-dot.eitaa { background: #ff9100; }
.platform-dot.rubika { background: #9c27b0; }
.platform-dot.soroush { background: #00bcd4; }

/* ═══════════════════════════════════════
   TICKETS / TIMELINE
   ═══════════════════════════════════════ */
.ticket-list-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s;
}

.ticket-list-item:hover { background: rgba(var(--text-main-rgb), 0.02); }

.ticket-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 420px;
  overflow-y: auto;
  padding: var(--space-md);
  background: rgba(var(--text-main-rgb), 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.timeline-msg {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  box-shadow: var(--shadow-xs);
  line-height: 1.7;
}

.timeline-msg.user {
  align-self: flex-start;
  background: var(--cyan-subtle);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: var(--radius-md) var(--radius-md) 0 var(--radius-md);
}

.timeline-msg.support {
  align-self: flex-end;
  background: var(--accent-subtle);
  border: 1px solid rgba(255, 0, 127, 0.12);
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0;
}

/* ═══════════════════════════════════════
   MEDIA UPLOADER
   ═══════════════════════════════════════ */
.media-uploader-mock {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  background: rgba(var(--text-main-rgb), 0.01);
  transition: all 0.25s var(--ease-smooth);
  margin-top: var(--space-md);
}

.media-uploader-mock:hover {
  border-color: var(--cyan);
  background: var(--cyan-subtle);
}

.media-preview-container {
  position: relative;
  margin-top: var(--space-md);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  background: rgba(var(--text-main-rgb), 0.02);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.media-preview-thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.media-preview-info { flex-grow: 1; font-size: 13px; }

.media-preview-remove {
  background: var(--error-subtle);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: var(--error);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.media-preview-remove:hover { background: var(--error); color: #fff; }

/* ═══════════════════════════════════════
   INFO ITEMS / GUIDE STEPS
   ═══════════════════════════════════════ */
.info-item {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: var(--space-xs);
}
.info-item:last-child { border-bottom: none; }

.guide-step {
  padding: var(--space-sm) var(--space-md);
  border-right: 3px solid var(--cyan);
  margin-bottom: var(--space-md);
  background: rgba(var(--text-main-rgb), 0.01);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ═══════════════════════════════════════
   BLOG STYLES
   ═══════════════════════════════════════ */
.post-detail-content h2, .post-detail-content h3 { color: var(--text-primary); font-weight: 800; margin-top: 2rem; margin-bottom: 0.8rem; }
.post-detail-content h2 { font-size: 1.4rem; }
.post-detail-content h3 { font-size: 1.2rem; }
.post-detail-content p { color: var(--text-primary); opacity: 0.92; margin-bottom: 1.2rem; font-size: 14.5px; line-height: 1.9; text-align: justify; }
.post-detail-content blockquote { border-right: 4px solid var(--cyan); background: var(--cyan-subtle); padding: 14px 18px; margin: 1.5rem 0; border-radius: 0 var(--radius-xs) var(--radius-xs) 0; font-style: italic; color: var(--text-secondary); }
.post-detail-content ul, .post-detail-content ol { margin: 1rem 0; padding-right: 1.5rem; }
.post-detail-content li { margin-bottom: 0.4rem; font-size: 14.5px; }
.post-detail-content img.blog-inline-img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 1.5rem auto; display: block; box-shadow: var(--shadow-md); border: 1px solid var(--border-subtle); }
.post-detail-content a { color: var(--cyan); text-decoration: none; border-bottom: 1px dashed var(--cyan); transition: color 0.2s; }
.post-detail-content a:hover { color: var(--primary); border-bottom-color: var(--primary); }

body.light-mode .post-detail-content blockquote { background: var(--primary-subtle); border-right-color: var(--primary); }
body.light-mode .post-detail-content a { color: var(--primary); border-bottom-color: var(--primary); }

/* ═══════════════════════════════════════
   CHAT BUBBLES (Landing Preview)
   ═══════════════════════════════════════ */
.chat-bubble {
  background: rgba(0, 132, 255, 0.12);
  border: 1px solid rgba(0, 132, 255, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-md) var(--radius-md) 0 var(--radius-md);
  margin-bottom: 10px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 13.5px;
  animation: fade-in-up 0.3s var(--ease-smooth);
}

.chat-bubble.other {
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0;
  background: rgba(var(--text-main-rgb), 0.04);
  border-color: var(--border-default);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 14px;
  font-family: var(--font-fa);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.tab-btn:hover {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }

/* ═══════════════════════════════════════
   TRUST SIGNALS STRIP
   ═══════════════════════════════════════ */
.trust-strip {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}
.trust-counter {
  font-size: 36px;
  font-weight: 900;
  font-family: var(--font-en);
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--cyan) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.trust-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.trust-divider {
  width: 1px;
  height: 48px;
  background: var(--border-default);
}

/* ═══════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════ */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  text-align: center;
}
.error-code {
  font-size: 120px;
  font-weight: 900;
  font-family: var(--font-en);
  background: linear-gradient(135deg, var(--cyan) 0%, var(--primary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-md);
}
.error-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}
.error-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto var(--space-xl);
  line-height: 1.8;
}

/* ═══════════════════════════════════════
   UTILITY CLASSES — LAYOUT
   ═══════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.section-header h2 {
  font-size: 30px;
  margin-bottom: var(--space-sm);
}
.section-header p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}
.pricing-card {
  padding: var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
  background: var(--bg-card-gradient);
  position: relative;
  overflow: visible;
  height: 100%;
}

/* ═══════════════════════════════════════
   RESPONSIVE — TABLET (< 1024px)
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .dashboard-container {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    flex-direction: column;
  }

  .content-area {
    height: auto;
    overflow-y: visible;
    padding: var(--space-lg) var(--space-md);
    padding-top: 70px;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    z-index: 200;
    box-shadow: var(--shadow-xl);
  }

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

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (< 768px)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .form-control {
    font-size: 16px; /* Prevents auto-zooming on focus in iOS browsers */
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  header {
    padding: 12px 4%;
  }

  nav {
    display: none;
  }

  nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border-default);
    padding: var(--space-md);
    gap: 0;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  nav.mobile-open a {
    padding: 12px var(--space-md);
    border-radius: var(--radius-sm);
  }

  .hamburger-btn {
    display: flex;
  }

  .hero-section { padding: 80px 0 60px; }
  .section-padding { padding: 60px 0; }

  .text-display { font-size: 28px; }
  .view-title { font-size: 18px; }

  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .stat-glow-card {
    padding: var(--space-md);
  }

  .channel-select-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .trust-items { gap: var(--space-xl); }
  .trust-counter { font-size: 28px; }
  .trust-divider { display: none; }
  .error-code { font-size: 80px; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (< 480px)
   ═══════════════════════════════════════ */
@media (max-width: 480px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }

  .text-display { font-size: 24px; }

  .btn { padding: 10px 20px; font-size: 13px; }
}

/* ═══════════════════════════════════════
   PRINT
   ═══════════════════════════════════════ */
@media print {
  body::before, body::after { display: none; }
  .sidebar, header, .alert-toast { display: none; }
  .content-area { padding: 0; }
}

/* ═══════════════════════════════════════
   EMERGENCY ANNOUNCEMENT BANNER
   ═══════════════════════════════════════ */
.announcement-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.6;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  animation: fade-in-up 0.35s var(--ease-smooth);
}

.announcement-banner.info {
  background: rgba(0, 132, 255, 0.08);
  border-color: rgba(0, 132, 255, 0.25);
  color: #38bdf8;
}

.announcement-banner.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.announcement-banner.error {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.announcement-banner.success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.announcement-banner-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
}

.announcement-banner-close:hover {
  background: rgba(var(--text-main-rgb), 0.05);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════
   REPORTS SUB-TABS & SECTIONS
   ═══════════════════════════════════════ */
.sub-tabs-container {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 2px;
}

.sub-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 20px;
  font-family: var(--font-fa);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.25s var(--ease-smooth);
}

.sub-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(var(--text-main-rgb), 0.03);
}

.sub-tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.report-section {
  display: none;
}

.report-section.active {
  display: block;
  animation: fade-in-up 0.35s var(--ease-smooth);
}

@keyframes pulse-badge {
  0% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
  }
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
  }
}
