/* ==========================================================================
   ZIN-NUR ACADEMY - ADMIN PANEL DESIGN SYSTEM (admin.css)
   ========================================================================== */

:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #ECFDF5;
  --primary-border: #A7F3D0;
  
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --success: #10B981;
  --success-bg: #D1FAE5;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --danger: #EF4444;
  --danger-bg: #FEE2E2;
  --info: #3B82F6;
  --info-bg: #DBEAFE;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 40px -6px rgba(0, 0, 0, 0.12);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Bricolage Grotesque', 'Inter', sans-serif;
}

[data-theme="dark"] {
  --bg-main: #0F172A;
  --bg-surface: #1E293B;
  --bg-card: #1E293B;
  --border-color: #334155;
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ==========================================
   AUTH SCREEN
   ========================================== */
.admin-auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(120% 90% at 50% 0%, #ECFDF5 0%, #F8FAFC 70%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.4s ease-out;
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo img {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Form controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.password-field-wrapper {
  position: relative;
}

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

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 24px 24px 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sidebar-title h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.sidebar-title span {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 20px 16px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  font-weight: 700;
  padding: 0 12px 10px 12px;
  margin-top: 16px;
}

.nav-section-title:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--bg-main);
  color: var(--text-main);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active svg {
  color: var(--primary);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-main);
  border-radius: var(--radius-md);
}

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

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-info .name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Area */
.admin-main {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--text-main);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--primary-border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse 2s infinite;
}

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.lang-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

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

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-danger {
  background: var(--danger);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: #DC2626;
}

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

/* Content Container */
.admin-content {
  padding: 32px;
  flex: 1;
}

.page-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-title h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

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

/* ==========================================
   STATISTICS CARDS
   ========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  cursor: pointer;
}

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

.stat-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrapper.emerald {
  background: #ECFDF5;
  color: #059669;
}

.stat-icon-wrapper.blue {
  background: #EFF6FF;
  color: #2563EB;
}

.stat-icon-wrapper.amber {
  background: #FFFBEB;
  color: #D97706;
}

.stat-icon-wrapper.purple {
  background: #F3E8FF;
  color: #9333EA;
}

.stat-info {
  flex: 1;
}

.stat-info .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-info .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin: 4px 0;
  font-family: var(--font-heading);
}

.stat-info .link {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================
   QUICK ACTIONS GRID
   ========================================== */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.action-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.action-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.action-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================
   TABLES & FILTERS
   ========================================== */
.table-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.table-toolbar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-surface);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 18px;
  height: 18px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-main);
  background: var(--bg-surface);
  outline: none;
  cursor: pointer;
}

.custom-table-container {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  background: var(--bg-main);
  padding: 14px 20px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.6);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  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-info    { background: var(--info-bg); color: var(--info); }

/* ==========================================
   MODAL WINDOWS
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: flex !important;
}

.modal-container {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 100000;
  margin: auto;
}

.modal-container form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.modal-close-btn:hover,
.modal-close-btn:active {
  background: var(--bg-main);
  color: var(--text-main);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

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

/* Day Schedule Rows in Teacher Modal */
.day-schedule-row {
  display: grid;
  grid-template-columns: 120px 125px 1fr 1fr;
  gap: 10px;
  align-items: center;
  background: var(--bg-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  transition: var(--transition);
}

.day-schedule-row:hover {
  border-color: var(--primary-border);
}

.day-schedule-row .day-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.day-schedule-row .day-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  margin: 0;
}

.day-schedule-row .day-time-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Day Selector Chips */
.days-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.day-chip-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  background: var(--bg-surface);
  color: var(--text-muted);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.day-chip-label input {
  display: none;
}

.day-chip-label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* Sidebar Backdrop on Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* ==========================================
   CODE GENERATOR & MONACO-STYLE VIEWER
   ========================================== */
.code-viewer-card {
  background: #0F172A;
  border-radius: var(--radius-lg);
  border: 1px solid #1E293B;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 20px;
}

.code-viewer-header {
  background: #1E293B;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  flex-wrap: wrap;
  gap: 10px;
}

.code-tabs {
  display: flex;
  gap: 8px;
}

.code-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}

.code-tab.active {
  background: #0F172A;
  color: #38BDF8;
}

.code-pre {
  padding: 20px;
  max-height: 480px;
  overflow: auto;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.84rem;
  color: #E2E8F0;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 32px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideUp 0.3s ease-out;
  min-width: 260px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }

/* ==========================================
   GLOBAL TOUCH & MOBILE RESPONSIVENESS
   ========================================== */
.btn, .btn-icon, .nav-item, .lang-btn, .action-card, .stat-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-icon {
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tablet & Mobile Screens */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    box-shadow: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .admin-sidebar.open,
  .admin-sidebar.active {
    transform: translateX(0) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
  }
  
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  .mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
  }
}

@media (max-width: 768px) {
  .admin-header {
    height: auto !important;
    min-height: 60px;
    padding: 10px 16px !important;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .header-left {
    gap: 10px;
  }
  
  .status-badge {
    padding: 5px 10px;
  }
  
  .status-badge span:not(.status-dot) {
    display: none;
  }
  
  .header-right {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .header-right .btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  
  .admin-content {
    padding: 14px !important;
  }
  
  .page-header {
    margin-bottom: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .page-header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .page-header-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    padding: 16px;
    gap: 12px;
  }
  
  .stat-icon-wrapper {
    width: 44px;
    height: 44px;
  }
  
  .stat-info .value {
    font-size: 1.5rem;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .table-toolbar {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .search-box {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  .filter-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .filter-select {
    width: 100%;
  }

  .custom-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .custom-table th,
  .custom-table td {
    padding: 12px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .custom-table td .btn-icon {
    min-width: 38px;
    min-height: 38px;
  }

  .day-schedule-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  
  .day-schedule-row .day-name {
    grid-column: 1 / 2;
  }
  
  .day-schedule-row .day-status {
    grid-column: 2 / 3;
    justify-self: end;
  }
  
  .day-schedule-row .day-time-start {
    grid-column: 1 / 2;
  }
  
  .day-schedule-row .day-time-end {
    grid-column: 2 / 3;
  }

  .modal-overlay {
    padding: 8px;
    align-items: flex-end;
  }

  .modal-container {
    max-height: 92vh;
    border-radius: 20px 20px 10px 10px;
    margin: 0;
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-body {
    padding: 16px 18px;
  }

  .modal-footer {
    padding: 12px 18px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 44px;
  }

  #toastContainer {
    bottom: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    width: 100%;
    padding: 12px 16px;
  }
}

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

  .auth-card {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .auth-header h1 {
    font-size: 1.4rem;
  }

  .auth-header p {
    font-size: 0.82rem;
  }

  .form-control {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
}
