/* ===== FOOTWORX DANCE CENTRE — MAIN STYLESHEET ===== */
:root {
  --primary:       #000000;
  --accent:        #00BCD4;
  --accent-dark:   #0097A7;
  --accent-light:  #E0F7FA;
  --accent-mid:    #4DD0E1;
  --white:         #ffffff;
  --bg:            #F5F5F5;
  --surface:       #ffffff;
  --border:        #e0e0e0;
  --text:          #212121;
  --text-muted:    #757575;
  --text-light:    #9E9E9E;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --info:          #00BCD4;
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-md:     0 4px 20px rgba(0,0,0,.14);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  transition: transform .25s ease;
}
.sidebar-close {
  display: none;
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 10;
}
.sidebar-close:hover { background: rgba(255,255,255,.15); }

.sidebar-header { padding: 20px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.15); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 28px; }
.logo-title { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 18px; line-height: 1; color: #fff; }
.logo-sub { font-size: 11px; opacity: .7; letter-spacing: .5px; color: rgba(255,255,255,.7); }

.sidebar-user { padding: 14px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.user-name { font-weight: 600; font-size: 13px; color: #fff; }
.user-role { font-size: 11px; opacity: .65; color: rgba(255,255,255,.65); }

.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; opacity: .5; padding: 12px 8px 4px; color: rgba(255,255,255,.5); }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.8); text-decoration: none;
  font-size: 13.5px; transition: all .15s; cursor: pointer;
  min-height: 44px;
}
.nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; }
.nav-item.logout { color: rgba(255,180,180,.8); margin-top: 4px; }
.nav-item.logout:hover { background: rgba(239,68,68,.25); color: #fff; }
.sidebar-footer { padding: 10px; border-top: 1px solid rgba(255,255,255,.1); }

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}
.sidebar-overlay.open { display: block; }

/* ===== MAIN CONTENT ===== */
.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 2px solid var(--primary);
  display: flex; align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.sidebar-toggle {
  background: none; border: none; font-size: 22px;
  cursor: pointer; color: var(--text-muted);
  display: none; padding: 4px 8px; border-radius: 6px;
  min-height: 44px; min-width: 44px;
}
.sidebar-toggle:hover { background: var(--accent-light); color: var(--accent); }
.topbar-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17px; color: var(--primary); flex: 0 0 auto; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.content-area { padding: 24px; flex: 1; max-width: 1400px; width: 100%; }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; color: var(--primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ===== STATS GRID ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-left: 4px solid var(--accent); border: 1px solid var(--border); border-left: 4px solid var(--accent); }
.stat-card.gold { border-left-color: var(--warning); }
.stat-card.green { border-left-color: var(--success); }
.stat-card.red { border-left-color: var(--danger); }
.stat-card.blue { border-left-color: var(--accent); }
.stat-value { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 28px; color: var(--primary); line-height: 1; }
.stat-card.gold .stat-value { color: var(--warning); }
.stat-card.green .stat-value { color: var(--success); }
.stat-card.red .stat-value { color: var(--danger); }
.stat-card.blue .stat-value { color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ===== SCHEDULE GRID ===== */
.week-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.week-nav a, .week-nav span { display: flex; align-items: center; }
.week-label { font-weight: 600; font-size: 15px; color: var(--primary); }

.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day-column { min-height: 200px; }
.day-header { text-align: center; padding: 8px 4px; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--border); margin-bottom: 8px; }
.day-header.today { color: var(--accent); border-bottom-color: var(--accent); }
.day-date { font-size: 18px; font-weight: 800; color: var(--text); display: block; }
.day-date.today-date { color: var(--accent); }

.class-block {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  display: block;
  border-left: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
}
.class-block:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.class-block.cancelled { opacity: .5; text-decoration: line-through; }
.class-block-name { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.class-block-time { font-size: 11px; opacity: .85; }
.class-block-meta { font-size: 10px; opacity: .7; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all .15s; border: none;
  min-height: 44px; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: #333; color: #fff; }
.btn-gold { background: var(--warning); color: #fff; }
.btn-gold:hover { background: #d97706; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline-accent { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-outline-accent:hover { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 36px; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 18px; padding: 6px; border-radius: 6px; position: relative; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { background: var(--accent-light); color: var(--accent); }
.w-full { width: 100%; justify-content: center; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
  font-family: 'Inter', sans-serif; transition: border-color .15s, box-shadow .15s;
  background: var(--white); color: var(--text); min-height: 44px;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,188,212,.15); }
.form-control:disabled { background: #f5f5f5; color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th { background: var(--primary); color: #fff; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 12px 16px; text-align: left; white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f8f8; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.badge-purple { background: var(--accent-light); color: var(--accent-dark); }
.badge-gold { background: #fef3c7; color: #92400e; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-grey { background: #f3f4f6; color: #374151; }
.badge-blue { background: var(--accent-light); color: var(--accent-dark); }
.badge-black { background: var(--primary); color: #fff; }

/* Notification count badge */
.notif-count {
  display: inline-block; min-width: 18px; height: 18px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  text-align: center; line-height: 18px; position: absolute; top: -4px; right: -4px;
}

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; font-weight: 500; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: var(--accent-light); color: var(--accent-dark); border: 1px solid var(--accent-mid); }

/* ===== NOTIFICATIONS ===== */
.notif-bell { position: relative; }
.notif-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 340px; background: var(--white); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,.15); border: 1px solid var(--border); z-index: 200; max-height: 400px; overflow-y: auto; }
.notif-dropdown.open { display: block; }
.notif-header { padding: 12px 16px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--primary); }
.notif-item { padding: 10px 16px; font-size: 12.5px; border-bottom: 1px solid #f3f4f6; }
.notif-item.unread { background: var(--accent-light); }
.notif-item a { color: var(--accent-dark); text-decoration: none; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; text-decoration: underline; }

/* ===== PAGE HEADERS ===== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header-left h1 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 22px; color: var(--primary); }
.page-header-left p { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== DETAIL PANELS ===== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-item { margin-bottom: 12px; }
.detail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.detail-value { font-size: 14px; color: var(--text); margin-top: 2px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; text-decoration: none; transition: all .15s; min-height: 44px; display: flex; align-items: center; }
.tab:hover { color: var(--accent); }
.tab.active { color: var(--primary); border-bottom-color: var(--accent); }

/* ===== WHATSAPP CARD ===== */
.wa-card { background: #dcfce7; border: 1px solid #86efac; border-radius: var(--radius); padding: 16px 20px; }
.wa-preview { background: #128C7E; color: #fff; border-radius: var(--radius); padding: 16px; font-family: monospace; font-size: 13px; white-space: pre-wrap; line-height: 1.6; }
.wa-btn { background: #25D366; color: #fff; }
.wa-btn:hover { background: #128C7E; color: #fff; }

/* ===== SEARCH BAR ===== */
.search-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 180px; }

/* ===== MODAL ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); padding: 28px; max-width: 520px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.2); max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 18px; color: var(--primary); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); min-height: 44px; min-width: 44px; }

/* ===== INVOICE ===== */
.invoice-header { background: var(--primary); color: #fff; border-radius: var(--radius) var(--radius) 0 0; padding: 24px 28px; }
.invoice-total { background: var(--accent-light); border-radius: 0 0 var(--radius) var(--radius); padding: 16px 28px; display: flex; justify-content: flex-end; gap: 24px; }
.total-item { text-align: right; }
.total-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.total-value { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 20px; color: var(--primary); }

/* ===== STATUS PILLS ===== */
.status-paid { background: #d1fae5; color: #065f46; }
.status-unpaid { background: #fee2e2; color: #991b1b; }
.status-partial { background: #fef3c7; color: #92400e; }
.status-active { background: #d1fae5; color: #065f46; }
.status-inactive { background: #f3f4f6; color: #6b7280; }

/* ===== CALENDAR / PLANNER ===== */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { min-height: 100px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; }
.cal-day-number { font-weight: 700; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.cal-post { background: var(--accent-light); color: var(--accent-dark); border-radius: 4px; padding: 3px 6px; font-size: 11px; margin-bottom: 3px; cursor: pointer; }

/* ===== MEDIA GRID ===== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.media-card { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.media-icon { font-size: 40px; margin-bottom: 8px; }
.media-name { font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.login-card {
  background: #fff; border-radius: 16px; padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon { font-size: 56px; }
.login-logo h1 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 26px; color: var(--primary); }
.login-logo p { color: var(--text-muted); font-size: 13px; }

/* ===== GLOBAL SEARCH ===== */
.global-search { position: relative; flex: 1; max-width: 380px; }
.search-input { width: 100%; padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 13px; outline: none; transition: border-color .2s, box-shadow .2s; background: var(--bg); min-height: 40px; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,188,212,.15); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: var(--radius-sm); box-shadow: 0 8px 30px rgba(0,0,0,.15); border: 1px solid var(--border); z-index: 999; max-height: 360px; overflow-y: auto; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid #f3f4f6; transition: background .1s; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--accent-light); }
.search-item.no-results { color: var(--text-muted); font-size: 13px; justify-content: center; }
.search-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.search-label { font-weight: 600; font-size: 13px; }
.search-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.search-type { background: var(--accent-light); color: var(--accent-dark); padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }

/* ===== STUDENT AVATAR ===== */
.student-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); }
.student-avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }

/* ===== ATTENDANCE RATE BAR ===== */
.attendance-bar { background: #e5e7eb; border-radius: 20px; height: 8px; overflow: hidden; }
.attendance-bar-fill { height: 100%; border-radius: 20px; transition: width 0.5s ease; }
.attendance-green { background: #059669; }
.attendance-yellow { background: #d97706; }
.attendance-red { background: #ef4444; }

/* ===== CLASS NOTES ===== */
.class-note { background: var(--accent-light); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 6px 6px 0; }
.class-note-header { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 12px; color: var(--text-muted); }

/* ===== BIRTHDAY CARD ===== */
.birthday-card { background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-sm); padding: 12px 16px; }

/* ===== SETTINGS GRID ===== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* ===== MISC ===== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.hidden { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-mid); border-radius: 3px; }

/* Links */
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* ===== RESPONSIVE — TABLET ===== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    height: 100vh;
    position: fixed;
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .sidebar-close { display: block; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .schedule-grid { grid-template-columns: repeat(4, 1fr); }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE — MOBILE ===== */
@media (max-width: 768px) {
  .content-area { padding: 14px; }
  .schedule-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 15px; }
  .global-search { max-width: 200px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 18px; }
  .btn-group { width: 100%; }
  .modal { padding: 20px; }
  .card { padding: 16px; }
  /* Make buttons full-width on mobile for key actions */
  .page-header .btn-group .btn { font-size: 12px; padding: 8px 12px; }
}

@media (max-width: 480px) {
  .schedule-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .global-search { display: none; }
  .login-card { padding: 24px 20px; }
  .search-bar { flex-direction: column; }
  .search-bar .form-control, .search-bar .btn { width: 100%; }
  table { min-width: 400px; }
}
