@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --info: #3B82F6;
  --info-bg: #EFF6FF;

  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-sidebar: #0F172A;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.2);

  --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sidebar-width: 270px;
}

[data-theme="dark"] {
  --bg-main: #0B0F19;
  --bg-card: #151C2C;
  --bg-sidebar: #090D16;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border: #242E42;
  --border-light: #1A2333;
  --primary-light: rgba(79, 70, 229, 0.15);
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info-bg: rgba(59, 130, 246, 0.15);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  direction: rtl;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  font-size: 14px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Layout */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}

.sidebar-header {
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #4F46E5, #F97316);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.brand-info h1 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.brand-info span {
  font-size: 11px;
  color: #94A3B8;
  display: block;
}

.sidebar-role-badge {
  margin: 12px 18px 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-role-badge span {
  font-size: 11px;
  color: #94A3B8;
}

.sidebar-role-select {
  background: transparent;
  border: none;
  color: #38BDF8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  direction: rtl;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  color: #64748B;
  font-weight: 700;
  padding: 10px 12px 4px;
  letter-spacing: 0.5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: #94A3B8;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
}

.nav-item.active {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.nav-item .nav-icon {
  font-size: 17px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge {
  margin-right: auto;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hardware-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #10B981;
}

.hardware-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Main Content Area */
.main-wrapper {
  margin-right: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100vw - var(--sidebar-width));
}

/* Top Header Bar */
.top-header {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.branch-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.branch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.branch-select {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.header-time-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--border-light);
  color: var(--primary);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  cursor: default;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-details h4 {
  font-size: 13px;
  font-weight: 600;
}

.user-details span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Page Body */
.page-container {
  padding: 24px;
  flex: 1;
}

.page-view {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.page-view.active {
  display: block;
}

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

/* Common UI Elements */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.btn {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25);
}
.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--border-light);
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
}

.stat-card.primary::after { background: var(--primary); }
.stat-card.accent::after { background: var(--accent); }
.stat-card.success::after { background: var(--success); }
.stat-card.warning::after { background: var(--warning); }
.stat-card.danger::after { background: var(--danger); }

.stat-info span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  margin: 6px 0 4px;
  color: var(--text-main);
}

.stat-sub {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.stat-card.primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.accent .stat-icon { background: rgba(249, 115, 22, 0.12); color: var(--accent); }
.stat-card.success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-card.danger .stat-icon { background: var(--danger-bg); color: var(--danger); }

/* Card Container */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.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-primary { background: var(--primary-light); color: var(--primary); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--border-light); color: var(--text-muted); }

/* Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

th {
  background: var(--bg-main);
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

tr:hover td {
  background: var(--border-light);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-content.lg { max-width: 800px; }
.modal-content.xl { max-width: 950px; }

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

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

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

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

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* ------------------------------------
   SPECIFIC MODULE STYLES
   ------------------------------------ */

/* 1. Reception Quick Access & Gate View */
.reception-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

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

.gate-card-preview {
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border: 2px dashed var(--border);
}

.gate-card-preview.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
  border: 2px solid var(--success);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.gate-card-preview.red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.04));
  border: 2px solid var(--danger);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
}

.gate-card-preview.yellow {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.04));
  border: 2px solid var(--warning);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.gate-status-pill {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.gate-card-preview.green .gate-status-pill { background: var(--success); color: #fff; }
.gate-card-preview.red .gate-status-pill { background: var(--danger); color: #fff; }
.gate-card-preview.yellow .gate-status-pill { background: var(--warning); color: #fff; }

.locker-token-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.locker-token-box .num {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

/* Lockers Grid */
.lockers-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}

.locker-box {
  height: 60px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  font-weight: 700;
}

.locker-box .l-num { font-size: 15px; }
.locker-box .l-sub { font-size: 9px; opacity: 0.8; }

.locker-box.available {
  background: var(--success-bg);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.locker-box.occupied {
  background: var(--primary-light);
  border-color: rgba(79, 70, 229, 0.4);
  color: var(--primary);
}

.locker-box.maintenance {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
  opacity: 0.6;
}

.locker-box.vip::before {
  content: '★ VIP';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 7px;
  color: var(--accent);
  font-weight: 800;
}

/* POS Buffet Grid */
.pos-layout {
  display: grid;
  grid-template-columns: 1.6fr 1.1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
}

.pos-prod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.pos-prod-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pos-prod-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 8px;
}

.pos-prod-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  height: 34px;
  overflow: hidden;
  color: var(--text-main);
}

.pos-prod-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  margin-top: 6px;
}

.pos-prod-stock {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pos-cart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  height: 540px;
}

.pos-cart-items {
  flex: 1;
  overflow-y: auto;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

/* Digital Member Card & Certificate */
.digital-id-card {
  background: linear-gradient(135deg, #1E1B4B, #312E81, #0F172A);
  color: #fff;
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.4);
  max-width: 440px;
  margin: 0 auto;
}

.digital-id-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.25), transparent 70%);
}

.certificate-paper {
  background: #FFFDF9;
  border: 12px double #D97706;
  padding: 40px;
  text-align: center;
  color: #1F2937;
  border-radius: 8px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

/* Heatmap for peak hours */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
  margin-top: 10px;
}

.heat-cell {
  height: 38px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s;
}

.heat-cell:hover {
  transform: scale(1.1);
  z-index: 2;
}

.heat-low { background: #93C5FD; color: #1E3A8A; }
.heat-mid { background: #3B82F6; }
.heat-high { background: #F97316; }
.heat-peak { background: #EF4444; }

/* Notification Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  color: var(--text-main);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideInLeft 0.25s ease;
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Feature Flag Pill */
.feature-flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}

/* ========================================================
   LOGIN PAGE STYLES (Clean SaaS Auth)
   ======================================================== */
.login-screen-wrapper {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

.login-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 1050px;
  min-height: 620px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
}

@media (max-width: 860px) {
  .login-card-box {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .login-showcase-side {
    display: none !important;
  }
}

/* Showcase Side */
.login-showcase-side {
  background: linear-gradient(145deg, #1E1B4B 0%, #312E81 40%, #0F172A 100%);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-showcase-side::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.35), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-showcase-side::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.45), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}

.login-brand-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #4F46E5, #F97316);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.login-brand-title h2 {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}

.login-brand-title span {
  font-size: 11px;
  color: #94A3B8;
  display: block;
}

.login-hero-content {
  margin: 36px 0;
  z-index: 2;
}

.login-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: #38BDF8;
  margin-bottom: 18px;
}

.login-hero-content h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #FFFFFF 60%, #E2E8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-hero-content p {
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1.7;
}

.login-feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.login-bullet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #E2E8F0;
}

.login-bullet-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #10B981;
}

.login-showcase-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  z-index: 2;
}

/* Form Side */
.login-form-side {
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-form-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.login-form-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.login-auth-tabs {
  display: flex;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 20px 0 24px;
  gap: 4px;
}

.login-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.login-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.quick-accounts-section {
  margin-top: 22px;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
}

.quick-accounts-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.quick-accounts-title span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.quick-accounts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quick-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  text-align: right;
}

.quick-user-pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.quick-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.quick-user-meta {
  flex: 1;
  overflow: hidden;
}

.quick-user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-user-role {
  font-size: 10px;
  color: var(--text-muted);
}

.members-dropdown-box {
  margin-top: 10px;
}

.members-dropdown-box select {
  width: 100%;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-main);
  outline: none;
}

/* ========================================================
   MASTER CLUBS & HQ PORTAL STYLES
   ======================================================== */
.clubs-master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
  margin-top: 14px;
}

.club-master-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.club-master-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.club-card-strip {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
}

.club-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--bg-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  text-align: center;
}

.club-metric-item span {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.club-metric-item strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

/* ======================================================== */
/* INITIAL CLUB SETUP WIZARD (مراحل گام‌به‌گام راه‌اندازی باشگاه) */
/* ======================================================== */
.setup-wizard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.setup-wizard-header {
  text-align: center;
  margin-bottom: 18px;
}

.setup-wizard-header .wizard-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #D97706;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.setup-wizard-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px 0;
}

.setup-wizard-header p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Stepper Progress Bar */
.setup-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 16px 0 20px;
  padding: 0 4px;
}

.setup-stepper::before {
  content: '';
  position: absolute;
  top: 17px;
  right: 24px;
  left: 24px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.setup-stepper-progress {
  position: absolute;
  top: 17px;
  right: 24px;
  height: 2px;
  background: #D97706;
  z-index: 2;
  transition: width 0.3s ease;
}

.setup-step-item {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: var(--bg-card);
  padding: 0 6px;
}

.setup-step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.setup-step-item.active .setup-step-circle {
  background: #D97706;
  border-color: #D97706;
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.2);
}

.setup-step-item.completed .setup-step-circle {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}

.setup-step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.setup-step-item.active .setup-step-label {
  color: #D97706;
  font-weight: 800;
}

.setup-step-item.completed .setup-step-label {
  color: #10B981;
}

/* Plan Selection Cards inside Wizard */
.setup-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}

.setup-plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.setup-plan-card:hover {
  border-color: #D97706;
  transform: translateY(-2px);
}

.setup-plan-card.selected {
  border-color: #D97706;
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.setup-plan-card.selected::after {
  content: '✓ انتخابی';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #D97706;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
}

.setup-plan-card .plan-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.setup-plan-card .plan-price {
  font-size: 13px;
  font-weight: 900;
  color: #D97706;
  margin-bottom: 6px;
}

.setup-plan-card .plan-features {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Summary Review Box */
.setup-summary-box {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.setup-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 12px;
}

.setup-summary-row:last-child {
  border-bottom: none;
}

.setup-summary-label {
  color: var(--text-muted);
}

.setup-summary-value {
  font-weight: 700;
  color: var(--text-main);
}


