/* 
  SMK Negeri 1 Luragung - Administrasi Guru Stylesheet
  Modern, Premium, Dynamic UI Design System
*/

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

:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #93c5fd;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  --accent-gold: #f59e0b;
  --accent-teal: #10b981;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  /* LIGHT THEME - Fresh & Modern */
  --bg-slate: #f0f4f8;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);

  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --border-light: rgba(0, 0, 0, 0.07);
  --border-active: rgba(59, 130, 246, 0.45);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 8px 30px rgba(37, 99, 235, 0.12);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  background-color: var(--bg-slate);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  line-height: 1.5;
  touch-action: manipulation;
}

/* ==========================================================================
   AUTHENTICATION SCREEN (LOGIN ADMIN)
   ========================================================================== */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 50%, #fce7f3 100%);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(16px);
  animation: slideUp 0.5s ease-out forwards;
}

.auth-brand {
  text-align: center;
  margin-bottom: 30px;
}

.school-logo-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
  transition: transform var(--transition-fast);
}

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

.sidebar-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

.pill-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.auth-brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.auth-brand p {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-notice {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--primary-700);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   APP LAYOUT & SIDEBAR
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  width: 280px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

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

.sidebar-header .logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-header .school-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-header .school-info span {
  font-size: 12px;
  color: var(--primary-500);
  font-weight: 600;
}

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

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  font-weight: 700;
  padding: 12px 12px 6px;
}

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

.nav-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.nav-item:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

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

.user-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-slate);
  border-radius: var(--radius-md);
}

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

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

.user-text .name {
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.user-text .role {
  font-size: 11px;
  color: var(--accent-teal);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* MAIN CONTENT WRAPPER */
.main-wrapper {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* TOP NAVBAR */
.topbar {
  height: 70px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

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

.btn-toggle-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 22px;
  cursor: pointer;
}

.topbar-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

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

.school-badge-pill {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  color: var(--primary-700);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CONTENT VIEW BODY */
.content-body {
  padding: 28px;
  flex: 1;
}

/* ==========================================================================
   CARDS, METRICS & STATS
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #047857); }
.stat-icon.amber { background: linear-gradient(135deg, #f59e0b, #b45309); }

.stat-info .num {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-info .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* BANNER CARD */
.welcome-banner {
  background: linear-gradient(135deg, #1e3a8a, #2563eb, #7c3aed);
  border-radius: var(--radius-xl);
  padding: 32px;
  color: white;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-banner h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.banner-logo {
  position: relative;
  z-index: 1;
}

.banner-logo img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
  opacity: 0.95;
}

.welcome-banner p {
  opacity: 0.9;
  font-size: 14px;
  max-width: 600px;
}

/* ==========================================================================
   PANELS & DATA TABLES
   ========================================================================== */

.content-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 28px;
}

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

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-title h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* TABLES */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.custom-table th {
  background: var(--bg-slate);
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 20px;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}

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

.custom-table tbody tr {
  transition: background var(--transition-fast);
}

.custom-table tbody tr:hover {
  background: var(--primary-50);
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  transform: translateY(-1px);
}

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

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

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* FORMS & INPUTS */
.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

select.form-control {
  cursor: pointer;
}

select.form-control option {
  background: var(--bg-card);
  color: var(--text-main);
}

/* BADGES & PILLS */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-danger { background: #fff1f2; color: #e11d48; }
.badge-info { background: #eff6ff; color: #2563eb; }

/* ==========================================================================
   ATTENDANCE MATRIX / PRESENSI
   ========================================================================== */

.attendance-toggle-group {
  display: inline-flex;
  background: var(--bg-slate);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  border: 1px solid var(--border-light);
}

.btn-att-status {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition-fast);
}

.btn-att-status[data-val="Hadir"].active { background: #10b981; color: white; }
.btn-att-status[data-val="Izin"].active { background: #3b82f6; color: white; }
.btn-att-status[data-val="Sakit"].active { background: #f59e0b; color: white; }
.btn-att-status[data-val="Alpa"].active { background: #f43f5e; color: white; }

/* ==========================================================================
   GRADE MATRIX / INPUT NILAI
   ========================================================================== */

.input-grade {
  width: 70px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 700;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

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

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

.modal-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-slate);
}

/* FILE DROP AREA */
.file-dropzone {
  border: 2px dashed rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
  text-align: center;
  background: rgba(59, 130, 246, 0.05);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: var(--primary-500);
  background: rgba(59, 130, 246, 0.15);
}

.file-dropzone i {
  font-size: 40px;
  color: var(--primary-500);
  margin-bottom: 12px;
}

/* TOAST NOTIFICATION */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease-out;
}

.toast-success { background: #059669; }
.toast-error { background: #e11d48; }
.toast-info { background: #2563eb; }

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

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

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 18px 4px rgba(16, 185, 129, 0.15); }
}

/* ==========================================================================
   DASHBOARD ENHANCED STYLES
   ========================================================================== */

/* Date & Clock pills in Banner */
.dash-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  backdrop-filter: blur(4px);
}

/* Stat card clickable indicator */
.stat-trend {
  margin-left: auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-slate);
  color: var(--text-dim);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.stat-card:hover .stat-trend {
  background: var(--primary-500);
  color: white;
  transform: translateX(2px);
}

/* Mini stat cards for attendance today */
.stat-card.mini-stat {
  padding: 16px 18px;
  gap: 14px;
}

.mini-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-card.mini-stat .num {
  font-size: 22px;
}

.stat-card.mini-stat .label {
  font-size: 12px;
}

.stat-card.hadir-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Dashboard 2-column grid */
.dash-grid-2col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

/* Chart panels */
.dash-chart-panel {
  animation: fadeInUp 0.4s ease-out both;
}

.chart-container {
  padding: 20px 24px 24px;
  position: relative;
  height: 300px;
}

.chart-container-sm {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Quick Actions Grid */
.quick-actions-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-slate);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

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

.qa-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}

.quick-action-card strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.quick-action-card span {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
}

/* Activity Feed */
.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

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

.activity-item:hover {
  background: var(--primary-50);
}

.activity-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

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

.activity-info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-info span {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

.activity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.activity-date {
  font-size: 11px;
  color: var(--text-dim);
}

/* ==========================================================================
   RESPONSIVE LAYOUT & MOBILE OPTIMIZATIONS
   ========================================================================== */

.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1200px) {
  .dash-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-glow);
    max-width: 85vw;
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .btn-toggle-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
    transition: all var(--transition-fast);
  }
  .btn-toggle-sidebar:active {
    transform: scale(0.94);
  }
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .banner-logo {
    display: none;
  }

  /* Prevent iOS Safari input auto-zoom */
  .form-control, input, select, textarea {
    font-size: 16px !important;
  }

  .topbar {
    padding: 0 16px;
    height: 60px;
  }

  .topbar-title h3 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }

  .school-badge-pill {
    padding: 4px 8px;
    font-size: 11px;
  }

  .school-badge-pill span {
    display: none;
  }

  .content-body {
    padding: 16px 12px;
  }

  /* Panel Header Responsiveness */
  .panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }

  .panel-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .panel-actions .btn,
  .panel-actions .form-control,
  .panel-actions select {
    width: 100% !important;
    justify-content: center;
  }

  /* Table Responsiveness */
  .table-responsive {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    -webkit-overflow-scrolling: touch;
  }

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

  /* Attendance Matrix for Mobile */
  .attendance-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    width: 100%;
    max-width: 220px;
  }

  .btn-att-status {
    flex: 1;
    padding: 6px 4px;
    font-size: 11px;
    min-width: 42px;
    text-align: center;
  }

  /* Modal Responsiveness */
  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-container {
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 16px 20px;
    max-height: 65vh;
  }

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

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* Toast Notification positioning on Mobile */
  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 16px;
  }

  .toast {
    font-size: 13px;
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 26px 18px;
    border-radius: var(--radius-lg);
  }

  .auth-brand h1 {
    font-size: 18px;
  }

  .school-logo-img {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
  }

  .welcome-banner {
    padding: 18px 14px;
    border-radius: var(--radius-lg);
  }

  .welcome-banner h2 {
    font-size: 17px;
  }

  .welcome-banner p {
    font-size: 13px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-card {
    padding: 10px 12px;
    gap: 8px;
    border-radius: var(--radius-md);
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
    border-radius: 8px;
  }

  .stat-info .num {
    font-size: 18px;
  }

  .stat-info .label {
    font-size: 10px;
  }

  .stat-trend {
    display: none;
  }

  .chart-container {
    height: 220px;
    padding: 10px;
  }
}
