/* ============================================
   WiFi AI - Main Stylesheet
   Modern Admin Dashboard
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Colors */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-bg: #eff6ff;
  --secondary: #7c3aed;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --info: #06b6d4;
  --info-bg: #ecfeff;

  /* Surfaces */
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: #1e293b;
  --bg-sidebar-active: rgba(37, 99, 235, 0.15);
  --bg-input: #f8fafc;
  --bg-topbar: #ffffff;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;
  --text-on-primary: #ffffff;

  /* Borders */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);

  /* Layout */
  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --topbar-height: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dark theme */
[data-theme="dark"] {
  --bg-body: transparent;
  --bg-card: rgba(30,41,59,0.55);
  --bg-sidebar: #020617;
  --bg-sidebar-hover: #0f172a;
  --bg-input: rgba(15,23,42,0.6);
  --bg-topbar: rgba(30,41,59,0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(51,65,85,0.6);
  --border-light: rgba(30,41,59,0.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: transparent;
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* --- App Layout (Win11 desktop style) --- */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* --- Win11 Wallpaper --- */
.wallpaper-layer {
  position: fixed;
  inset: 0;
  background: url("../win11-wallpaper.jpg") center center / cover no-repeat;
  z-index: 0;
}

/* --- Glassmorphism base --- */
.glass {
  border: 1px solid rgba(240,247,255,0.22);
  background: linear-gradient(155deg, rgba(255,255,255,0.2), rgba(255,255,255,0.02));
  box-shadow: 0 24px 44px rgba(4,8,20,0.48), inset 0 1px 0 rgba(255,255,255,0.26);
  backdrop-filter: blur(28px) saturate(1.24);
  -webkit-backdrop-filter: blur(28px) saturate(1.24);
}

/* --- Win11 Taskbar --- */
.taskbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(980px, calc(100vw - 24px));
  border-radius: 18px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 200;
  background: linear-gradient(165deg, rgba(33,44,66,0.56), rgba(15,23,37,0.6));
}

.taskbar-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.taskbar-app-dock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-icon {
  min-width: 38px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  color: rgba(234,245,255,0.96);
  background: rgba(9,16,29,0.52);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  font-size: 16px;
  position: relative;
}

.task-icon:hover {
  transform: translateY(-1px);
  border-color: rgba(171,218,255,0.86);
  background: rgba(16,30,48,0.74);
}

.task-icon.active {
  border-color: rgba(76,183,255,0.6);
  background: rgba(76,183,255,0.18);
}

.task-icon::after {
  content: attr(title);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(12,21,38,0.94);
  border: 1px solid rgba(188,221,255,0.28);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 11px;
  color: rgba(234,245,255,0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

.task-icon:hover::after {
  opacity: 1;
}

/* Remix Icon sizing in icon containers */
.task-icon i[class^="ri-"],
.start-tile-icon i[class^="ri-"],
.stat-icon i[class^="ri-"],
.taskbar-bell i[class^="ri-"],
.topbar-btn i[class^="ri-"],
.search-icon i[class^="ri-"],
.flow-step-icon i[class^="ri-"] {
  line-height: 1;
  vertical-align: middle;
}
.task-icon i[class^="ri-"] { font-size: 18px; }
.start-tile-icon i[class^="ri-"] { font-size: 28px; }
.stat-icon i[class^="ri-"] { font-size: 24px; }
.taskbar-bell i[class^="ri-"] { font-size: 16px; }
.topbar-btn i[class^="ri-"] { font-size: 18px; }
.search-icon i[class^="ri-"] { font-size: 16px; }
.flow-step-icon i[class^="ri-"] { font-size: 22px; }

/* Win11 Windows logo (4 squares) */
.win-logo {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background:
    linear-gradient(#40a9ff 0 0) 0 0 / calc(50% - 1px) calc(50% - 1px) no-repeat,
    linear-gradient(#40a9ff 0 0) 100% 0 / calc(50% - 1px) calc(50% - 1px) no-repeat,
    linear-gradient(#40a9ff 0 0) 0 100% / calc(50% - 1px) calc(50% - 1px) no-repeat,
    linear-gradient(#40a9ff 0 0) 100% 100% / calc(50% - 1px) calc(50% - 1px) no-repeat;
  border-radius: 3px;
}

.taskbar-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(244,248,255,0.76);
}

.taskbar-status strong {
  color: rgba(244,248,255,1);
  font-size: 13px;
}

.taskbar-bell {
  border: 0;
  background: transparent;
  color: rgba(234,245,255,0.9);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  position: relative;
}

.taskbar-bell:hover {
  color: #fff;
}

.taskbar-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 2px;
}

.taskbar-lang-btn {
  border: 0;
  background: transparent;
  color: rgba(244,248,255,0.5);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.taskbar-lang-btn:hover {
  color: rgba(244,248,255,0.96);
  background: rgba(15,23,42,0.56);
}

.taskbar-lang-btn.active {
  color: #fff;
  background: rgba(13,110,182,0.92);
}

/* --- Win11 Start Panel (glassmorphism popup) --- */
.start-panel {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translate(-50%, 18px);
  width: min(680px, 86vw);
  height: min(72vh, 580px);
  max-height: 72vh;
  border-radius: 16px;
  padding: 0;
  background: linear-gradient(160deg, rgba(34,52,90,0.52), rgba(18,28,50,0.58));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 300;
  box-shadow: 0 24px 52px rgba(3,8,22,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.start-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border-top: 1px solid rgba(255,255,255,0.18);
  pointer-events: none;
}

.start-panel.open {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.start-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 28px 0;
}

.start-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.start-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(244,248,255,1);
}

.start-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

/* Left column: categories */
.start-categories {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding-right: 12px;
  overflow: hidden;
}

.start-cat-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(240,248,255,0.8);
}

.start-cat-head p {
  margin: 4px 0 10px;
  font-size: 12px;
  color: rgba(244,248,255,0.5);
  line-height: 1.4;
}

.start-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}

.start-cat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  color: rgba(244,248,255,1);
  background: rgba(8,17,31,0.2);
  padding: 10px 10px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  font-family: inherit;
  font-size: 13px;
}

.start-cat-item span {
  font-weight: 500;
}

.start-cat-item small {
  color: rgba(244,248,255,0.5);
  font-size: 12px;
}

.start-cat-item:hover,
.start-cat-item.is-active {
  transform: translateX(2px);
  background: rgba(128,186,255,0.16);
}

/* Right column: module icons */
.start-modules {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
  flex: 1;
}

.start-modules::-webkit-scrollbar { width: 5px; }
.start-modules::-webkit-scrollbar-track { background: transparent; }
.start-modules::-webkit-scrollbar-thumb { background: rgba(219,236,255,0.34); border-radius: 999px; }

.start-module-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(240,248,255,0.8);
}

.start-module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 0 0 4px;
}

.start-tile {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(244,248,255,1);
  padding: 10px 4px 8px;
  font: inherit;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.start-tile:hover {
  background: rgba(255,255,255,0.08);
}

.start-tile-icon {
  font-size: 26px;
  color: var(--icon-accent, rgba(225,240,255,0.98));
  filter: drop-shadow(0 0 8px var(--icon-glow, rgba(124,196,255,0.3)));
}

.start-tile-label {
  font-size: 11px;
  line-height: 1.3;
  color: rgba(245,249,255,0.88);
  text-align: center;
  overflow-wrap: anywhere;
}

/* Start Panel footer */
.start-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.start-footer-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-footer-user strong {
  color: rgba(244,248,255,1);
  font-size: 13px;
  font-weight: 600;
}

.start-footer-user span {
  color: rgba(244,248,255,0.5);
  font-size: 11px;
  margin-left: 8px;
}

.start-footer-btn {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(15,23,42,0.46);
  color: rgba(244,248,255,0.96);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.start-footer-btn:hover {
  background: rgba(15,23,42,0.62);
  color: rgba(244,248,255,0.98);
}

/* Dock backdrop */
.dock-backdrop {
  position: fixed; inset: 0;
  z-index: 250;
  display: none;
}

.dock-backdrop.open {
  display: block;
}

/* Hide old sidebar elements */
.sidebar-header, .sidebar-nav, .sidebar-footer,
.sidebar-toggle, .sidebar-user, .sidebar-logout,
.mobile-menu-btn { display: none !important; }

/* Adjust main wrapper for dock layout */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  padding-bottom: 70px; /* space for taskbar */
  position: relative;
  z-index: 1;
}

/* --- Shared avatar class --- */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* --- Top Bar --- */
.topbar {
  height: var(--topbar-height);
  background: linear-gradient(165deg, rgba(33,44,66,0.42), rgba(15,23,37,0.48));
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(240,247,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(4,8,20,0.2);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  font-size: 20px;
  color: var(--text-secondary);
}

.breadcrumb {
  font-size: 15px;
  font-weight: 600;
  color: rgba(244,248,255,0.95);
}

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

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 6px 12px;
  gap: 8px;
  transition: border-color var(--transition);
  backdrop-filter: blur(10px);
}

.search-box:focus-within {
  border-color: rgba(76,183,255,0.55);
  box-shadow: 0 0 0 3px rgba(76,183,255,0.12);
}

.search-icon { font-size: 14px; color: rgba(244,248,255,0.5); }

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  color: rgba(244,248,255,0.95);
  width: 180px;
  font-size: 13px;
}

.search-box input::placeholder {
  color: rgba(244,248,255,0.4);
}

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(244,248,255,0.7);
  transition: all var(--transition);
  position: relative;
}

.topbar-btn:hover {
  background: rgba(15,23,42,0.56);
  color: rgba(244,248,255,1);
}

.locale-toggle {
  font-size: 12px;
  font-weight: 700;
  width: auto;
  padding: 0 10px;
  border: 1px solid var(--border-color);
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-topbar);
}

/* --- Page Content --- */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: transparent;
}

.page-content::-webkit-scrollbar { width: 6px; }
.page-content::-webkit-scrollbar-thumb { background: rgba(219,236,255,0.34); border-radius: 6px; }

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* --- Cards --- */
.card {
  background: linear-gradient(155deg, rgba(34,52,90,0.45), rgba(18,28,50,0.5));
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-radius: var(--radius);
  border: 1px solid rgba(240,247,255,0.14);
  box-shadow: 0 8px 28px rgba(4,8,20,0.3);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: 0 12px 36px rgba(4,8,20,0.4);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Stat Cards (Dashboard) --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-bg); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon.cyan { background: var(--info-bg); color: var(--info); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stat-trend {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 4px;
}

.stat-trend.up { color: var(--success); background: var(--success-bg); }
.stat-trend.down { color: var(--danger); background: var(--danger-bg); }

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { background: #059669; }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background: var(--bg-input);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-input); color: var(--primary); }

/* --- Form Elements --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  transition: all var(--transition);
  outline: none;
}

/* Fix select options visibility in both light and dark themes */
.form-select option {
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #0f172a);
}

[data-theme="dark"] .form-select option {
  background: #1e293b;
  color: #f1f5f9;
}

[data-theme="dark"] .form-select {
  color-scheme: dark;
}

[data-theme="light"] .form-select {
  color-scheme: light;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Table --- */
.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  background: var(--bg-input);
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: var(--bg-input);
}

.data-table .actions {
  display: flex;
  gap: 4px;
}

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--primary-bg); color: var(--primary); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 0;
  margin-bottom: 20px;
}

.tab-item {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.tab-item:hover { color: var(--primary); }
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* --- File Upload Zone --- */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-input);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.upload-zone .upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.upload-zone .upload-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Banner Preview --- */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 0 2px;
}

.banner-card {
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  background: var(--bg-card);
}

.banner-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.banner-preview {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #667eea44, #764ba244);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.banner-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-info {
  padding: 10px 12px;
}

.banner-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Phone Preview (Captive Portal) --- */
.phone-frame {
  width: 280px;
  height: 560px;
  border-radius: 32px;
  border: 8px solid #1e293b;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-xl);
  position: relative;
  flex-shrink: 0;
}

.phone-frame .phone-notch {
  width: 120px;
  height: 24px;
  background: #1e293b;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-frame iframe,
.phone-frame .phone-content {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Activity Feed --- */
.activity-list { list-style: none; }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.blue { background: var(--primary); }
.activity-dot.green { background: var(--success); }
.activity-dot.orange { background: var(--warning); }

.activity-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

.activity-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Chart Placeholder --- */
.chart-container {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 20px 0;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  transition: height 0.6s ease;
  min-height: 4px;
}

.chart-bar.secondary { background: var(--primary-light); opacity: 0.5; }

.chart-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}

/* --- Steps Wizard --- */
.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.wizard-step .step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-input);
  color: var(--text-muted);
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

.wizard-step.active .step-number {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.wizard-step.done .step-number {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.wizard-step .step-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.wizard-step.active .step-label { color: var(--primary); font-weight: 600; }
.wizard-step.done .step-label { color: var(--success); }

.wizard-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 8px;
}

.wizard-line.done { background: var(--success); }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state .empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state .empty-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.empty-state .empty-text { font-size: 13px; color: var(--text-secondary); margin: 8px 0 20px; }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  border: none;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
}

.modal-overlay[open] {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-overlay::backdrop {
  background: transparent;
}

.modal-container {
  background: linear-gradient(155deg, rgba(34,52,90,0.8), rgba(18,28,50,0.85));
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(240,247,255,0.16);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(3,8,22,0.55);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-input); color: var(--danger); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Toast --- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  border-left: 4px solid var(--primary);
  animation: slideRight 0.3s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-message { font-size: 13px; flex: 1; }
.toast-close { color: var(--text-muted); font-size: 16px; }
.toast-close:hover { color: var(--text-primary); }

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .taskbar {
    width: calc(100vw - 16px);
    bottom: 8px;
    padding: 6px 10px;
  }
  .start-panel {
    width: calc(100vw - 16px);
    bottom: 64px;
  }
  .start-grid {
    grid-template-columns: 1fr;
  }
  .start-categories {
    display: none;
  }
  .start-module-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .banner-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 8px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* --- Partner Connection Cards --- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
}

.partner-card:hover { box-shadow: var(--shadow-md); }

.partner-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.partner-name { font-weight: 600; font-size: 14px; }
.partner-type { font-size: 11px; color: var(--text-muted); }

.partner-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.partner-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.quick-setup-shell,
.quick-guide-shell {
  border: 1px solid var(--border-color);
}

.quick-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-copy-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-copy-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
}

.quick-copy-row span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.quick-copy-row code {
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

.quick-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quick-guide-box {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg-input);
}

.quick-guide-box h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.quick-demo-frame {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #fff;
}

.quick-demo-frame iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

.quick-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-option {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg-input);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-option.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
}

.quick-test-result {
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  padding: 12px;
  min-height: 52px;
  font-size: 12px;
  line-height: 1.5;
  background: var(--bg-input);
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.progress-fill.blue { background: var(--primary); }
.progress-fill.green { background: var(--success); }
.progress-fill.orange { background: var(--warning); }

/* --- Flow Diagram --- */
.flow-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 0;
  overflow-x: auto;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
  gap: 8px;
}

.flow-step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--primary-bg);
  border: 2px solid var(--primary);
}

.flow-step-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 100px;
}

.flow-arrow {
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin: 0 4px;
  margin-bottom: 24px;
}

/* --- Quick Management Workflow --- */
.quick-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-flow-item {
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  border-radius: 12px;
  padding: 12px;
}

.quick-flow-index {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  margin-bottom: 8px;
}

.quick-flow-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.quick-flow-desc {
  font-size: 12px;
  color: var(--text-secondary);
  min-height: 36px;
  line-height: 1.45;
}

.quick-flow-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* --- Toggle Switch --- */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 22px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* Skeleton Loading */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.skeleton-loading { padding: 24px; }
.skeleton-row {
  background: var(--border-color, #e2e8f0);
  border-radius: var(--radius-sm, 8px);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Sidebar Logout */
.sidebar-logout {
  margin-left: auto;
  opacity: 0.5;
  transition: opacity 0.2s;
  font-size: 16px;
}
.sidebar-logout:hover { opacity: 1; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }

/* Topbar User Dropdown */
.topbar-user {
  position: relative;
  cursor: pointer;
}
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}
.topbar-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius, 12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 999;
  overflow: hidden;
}
.topbar-user:hover .topbar-user-dropdown,
.topbar-user-dropdown.show { display: block; }
.dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}
.dropdown-header .user-name { font-weight: 600; font-size: 13px; }
.dropdown-header .user-email { font-size: 11px; color: var(--text-muted, #94a3b8); }
.dropdown-divider {
  height: 1px;
  background: var(--border-color, #e2e8f0);
}
.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--bg-hover, #f1f5f9); }

/* --- Tenant Selector --- */
.tenant-selector { display: flex; align-items: center; margin-right: 0.5rem; }
.tenant-selector select {
  padding: 0.35rem 0.6rem; border: 1px solid var(--border, #e2e8f0); border-radius: 0.5rem;
  background: var(--bg-card, #fff); color: var(--text, #1e293b); font-size: 0.8rem;
  cursor: pointer; max-width: 200px;
}
.tenant-selector select:focus { outline: none; border-color: var(--primary, #2563eb); }

/* --- Notification Dropdown --- */
.notification-wrapper { position: relative; }
.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}
.notification-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  max-height: 480px;
  background: linear-gradient(155deg, rgba(34,52,90,0.85), rgba(18,28,50,0.9));
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(240,247,255,0.18);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(3,8,22,0.5);
  z-index: 1000;
  overflow: hidden;
}
.notification-dropdown.show { display: flex; flex-direction: column; }
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}
.notif-list {
  overflow-y: auto;
  max-height: 350px;
  flex: 1;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg-input); }
.notif-item.unread { background: var(--primary-bg); }
.notif-item.unread:hover { background: #dbeafe; }
[data-theme="dark"] .notif-item.unread { background: rgba(37,99,235,0.1); }
[data-theme="dark"] .notif-item.unread:hover { background: rgba(37,99,235,0.15); }
.notif-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; font-weight: 500; line-height: 1.3; }
.notif-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px; }
.notif-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.notif-footer a { font-size: 12px; color: var(--primary); text-decoration: none; }
.notif-footer a:hover { text-decoration: underline; }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  .taskbar { width: calc(100vw - 16px); bottom: 8px; }
  .main-wrapper { margin-left: 0; }
  .topbar { padding: 0 12px; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .page-header { flex-direction: column; gap: 12px; }
  .quick-copy-row { grid-template-columns: 1fr; }
  .quick-guide-grid { grid-template-columns: 1fr; }
  .quick-setup-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  .notification-dropdown { width: calc(100vw - 24px); right: -60px; }
  .flow-steps { overflow-x: auto; flex-wrap: nowrap; }
  .flow-step { min-width: 80px; }
  .quick-flow-grid { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: 1fr; }
  .banner-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .phone-frame { transform: scale(0.8); transform-origin: top center; }
  .modal-container { width: 95vw; max-height: 90vh; }
  .topbar-user-dropdown { right: -20px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .banner-grid { grid-template-columns: 1fr; }
  .topbar-right .topbar-btn:not(.notification-btn) { display: none; }
  .topbar-right .locale-toggle { display: inline-flex; }
  .page-title { font-size: 18px; }
}

/* ============ A-Z Program Wizard Enhanced ============ */
.module-card { position: relative; overflow: hidden; }
.module-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  transform: translate(20px, -20px);
}
.module-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Wizard modal larger for program wizard */
.modal-overlay .modal-container {
  max-width: 720px;
}

