/* ==========================================================================
   WORKHIT SCHOOL ERP BRANDED PORTAL STYLESHEET (SPA BACKEND INTEGRATED)
   Aesthetics: Elite Left-Sidebar SPA, Glassmorphic Grid Cards,
   Satin Frosted Data Registry, and Responsive Admin Panels
   ========================================================================== */

/* 1. DESIGN TOKENS & ROOT PROPERTIES */
:root {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --bg-console: #0B0F19;
  
  --text-primary: #020617;
  --text-secondary: #334155;
  --text-muted: #64748B;
  
  --color-primary: #194CFF;       /* Cobalt Blue */
  --color-primary-dark: #0025B8;
  --color-accent: #FF7A00;        /* Sunset Orange */
  --color-danger: #E11D48;        /* Alert Red */
  --color-success: #10B981;       /* Cleared Green */
  
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  --gradient-accent: linear-gradient(135deg, #FF9F43 0%, var(--color-accent) 100%);
  --gradient-mixed: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(25, 76, 255, 0.05);
  --glass-border-hover: rgba(25, 76, 255, 0.2);
  --glass-shadow: 0 4px 6px -1px rgba(25, 76, 255, 0.02), 0 10px 30px -3px rgba(25, 76, 255, 0.04);
  
  --font-title: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --sidebar-width: 270px;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. BASE RESET & SCROLLBAR */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: -0.015em;
  overflow-y: auto;
  position: relative;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

.hidden {
  display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border: 2px solid var(--bg-primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Floating watercolor blobs */
.mesh-blob {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.1;
  z-index: -2;
  pointer-events: none;
}

.blob-1 {
  background: var(--color-primary);
  top: 10%;
  left: -200px;
}

.blob-2 {
  background: var(--color-accent);
  bottom: 10%;
  right: -200px;
}

/* ==========================================================================
   3. APP LAYOUT & SIDEBAR STRUCTURE
   ========================================================================== */

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* Left Sidebar Styles */
.app-sidebar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(25, 76, 255, 0.05);
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(25, 76, 255, 0.2);
}

.logo-text {
  font-size: 18px;
  font-weight: 850;
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.logo-text span {
  color: var(--color-accent);
}

.logo-sub {
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 50px;
  margin-left: 2px;
  vertical-align: middle;
}

/* Navigation Links */
.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-item i {
  font-size: 16px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-item:hover {
  background: rgba(25, 76, 255, 0.04);
  color: var(--color-primary);
}

.nav-item:hover i {
  color: var(--color-primary);
}

.nav-item.active {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 8px 16px -4px rgba(25, 76, 255, 0.25);
}

.nav-item.active i {
  color: #FFFFFF;
}

/* Sidebar Profile Widget */
.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(25, 76, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(25, 76, 255, 0.01);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-info strong {
  font-size: 13.5px;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-info span {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.logout-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.logout-btn:hover {
  background: rgba(225, 29, 72, 0.08);
}

/* ==========================================================================
   4. RIGHT WORKSPACE AREA
   ========================================================================== */

.app-workspace {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.workspace-header {
  padding: 16px 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
  color: var(--color-primary);
  background: rgba(25, 76, 255, 0.06);
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(25, 76, 255, 0.15);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.workspace-content {
  flex: 1;
  padding: 40px;
}

.view-section {
  animation: fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: 32px;
}

.view-header h2 {
  font-size: 26px;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-header h2 i {
  color: var(--color-primary);
}

.view-header p {
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   5. VIEW SPECIFIC LAYOUT GRIDS
   ========================================================================== */

/* Glass Cards containers */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(25px);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  padding: 28px;
  transition: border-color var(--transition-fast);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
}

/* Master-Detail / Form-List Grids */
.crud-layout-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.panel-crud-form {
  position: sticky;
  top: 100px;
}

.panel-crud-form h3 {
  font-size: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  color: var(--text-primary);
}

.panel-crud-list {
  min-height: 500px;
}

.list-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(25, 76, 255, 0.05);
  padding-bottom: 14px;
}

.list-filters-header h3 {
  font-size: 16px;
}

.filter-input-search {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid rgba(25, 76, 255, 0.1);
  outline: none;
  font-family: var(--font-body);
  font-weight: 600;
  width: 200px;
}

.filter-select {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid rgba(25, 76, 255, 0.1);
  outline: none;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
}

.bulk-actions-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.bulk-actions-toolbar .btn {
  padding: 6px 12px;
  font-size: 11px;
  margin: 0;
  border-radius: 6px;
}

/* ==========================================================================
   6. DASHBOARD ANALYTICS COMPONENTS
   ========================================================================== */

/* Summary Cards Grid */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #FFFFFF;
}

.icon-students { background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%); }
.icon-collections { background: linear-gradient(135deg, #10B981 0%, #047857 100%); }
.icon-dues { background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%); }
.icon-attendance { background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%); }

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 22px;
  font-family: var(--font-title);
  color: var(--text-primary);
  margin-top: 2px;
}

/* Dashboard Bottom Grid */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
}

.chart-box h3 {
  font-size: 15px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* CSS Bar Chart Layout */
.bar-chart-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 240px;
  padding: 10px 0;
  border-bottom: 2px solid rgba(25, 76, 255, 0.08);
}

.bar-chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50px;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 24px;
  background: var(--gradient-primary);
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.bar-fill:hover {
  background: var(--gradient-mixed);
}

.bar-fill span {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  color: var(--color-primary);
}

.bar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Bulletin notice dashboard widget */
.dashboard-notice-widget {
  padding: 10px 0;
}

.notice-widget-item {
  border-left: 3px solid var(--color-primary);
  padding-left: 14px;
  margin-bottom: 16px;
}

.notice-widget-item h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.notice-widget-item p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice-widget-item span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

/* ==========================================================================
   7. GENERAL FORM ELEMENTS
   ========================================================================== */

.form-group-row {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid rgba(25, 76, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(25, 76, 255, 0.08);
}

.form-actions-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-title);
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(25, 76, 255, 0.2);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.btn-glow:hover::after {
  opacity: 1;
}

.btn-secondary {
  background: rgba(25, 76, 255, 0.02);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: rgba(25, 76, 255, 0.06);
  transform: translateY(-1px);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.2);
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   8. DATA TABLES STANDARDS
   ========================================================================== */

.table-scroll-container {
  overflow-x: auto;
  border: 1px solid rgba(25, 76, 255, 0.06);
  border-radius: 12px;
  background: #FFFFFF;
}

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

.data-table th {
  background: #F1F5F9;
  color: var(--text-secondary);
  font-weight: 800;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(25, 76, 255, 0.08);
  user-select: none;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  font-weight: 600;
  color: var(--text-secondary);
}

.data-table tbody tr:hover {
  background: rgba(25, 76, 255, 0.01);
}

/* Status Badges */
.badge-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-block;
  text-align: center;
  text-transform: uppercase;
}

.badge-pending { background: #F1F5F9; color: #64748B; border: 1px solid rgba(100, 116, 139, 0.12); }
.badge-success { background: #ECFDF5; color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.12); }
.badge-failed { background: #FEE2E2; color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.12); }
.badge-sending {
  background: #EFF6FF;
  color: var(--color-primary);
  border: 1px solid rgba(25, 76, 255, 0.15);
  animation: pulse-sending 1.5s infinite ease-in-out;
}

@keyframes pulse-sending {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ==========================================================================
   9. AUTHENTICATION & PORTAL LOGIN CARD
   ========================================================================== */

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 160px);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h2 {
  font-size: 22px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-header h2 i {
  color: var(--color-primary);
}

.login-header p {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.login-credentials-helper {
  background: rgba(25, 76, 255, 0.03);
  border: 1px solid rgba(25, 76, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-top: 24px;
}

.login-credentials-helper h4 {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.login-credentials-helper ul {
  list-style: none;
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.login-credentials-helper li strong {
  color: var(--text-primary);
}

/* ==========================================================================
   10. DAILY ATTENDANCE ROLLCALL COMPONENT
   ========================================================================== */

.attendance-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(25, 76, 255, 0.05);
  padding-bottom: 20px;
}

.attendance-radio-group {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.attendance-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.attendance-radio-label input {
  cursor: pointer;
  accent-color: var(--color-primary);
  width: 14px;
  height: 14px;
}

.radio-present { color: var(--color-success); }
.radio-absent { color: var(--color-danger); }
.radio-late { color: #F59E0B; }

/* ==========================================================================
   11. ACTIVE BULLETIN BOARD
   ========================================================================== */

.notices-dashboard-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.notice-card {
  padding: 24px;
  border-left: 4px solid var(--color-primary);
}

.notice-card.urgent { border-left-color: var(--color-danger); }
.notice-card.important { border-left-color: var(--color-accent); }

.notice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.notice-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.notice-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 4px;
}

.notice-card-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.notice-card-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(25, 76, 255, 0.05);
  padding-top: 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.notice-delete-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.notice-delete-btn:hover {
  background: rgba(225, 29, 72, 0.08);
}

/* ==========================================================================
   12. ORIGINAL DUAL PANEL SETTINGS PRESERVATION
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.panel-inputs {
  padding: 30px;
}

.mode-toggle-tabs {
  display: flex;
  background: #EFF6FF;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(25, 76, 255, 0.04);
}

.toggle-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.toggle-tab:hover { color: var(--color-primary); }
.toggle-tab.active {
  background: #FFFFFF;
  color: var(--color-primary);
  box-shadow: 0 4px 8px -2px rgba(25, 76, 255, 0.1);
}

.notif-type-btn.active {
  background: var(--gradient-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--color-primary-dark) !important;
  box-shadow: 0 4px 12px -2px rgba(25, 76, 255, 0.35);
}

.bulk-upload-zone {
  border: 2px dashed rgba(25, 76, 255, 0.18);
  background: #FFFFFF;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.bulk-upload-zone:hover {
  border-color: var(--color-primary);
  background: rgba(25, 76, 255, 0.01);
}

.panel-preview {
  position: sticky;
  top: 90px;
}

.email-client-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.email-client-header {
  background: var(--bg-tertiary);
  padding: 14px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.client-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.client-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.client-dots span:nth-child(1) { background: #FF5F56; }
.client-dots span:nth-child(2) { background: #FFBD2E; }
.client-dots span:nth-child(3) { background: #27C93F; }

.client-meta-info {
  font-size: 12px;
  color: var(--text-secondary);
}

.email-sandbox-body {
  padding: 20px;
  background: #F1F5F9;
  max-height: 600px;
  overflow-y: auto;
}

/* ==========================================================================
   13. MODALS & LOGGER CONSOLE
   ========================================================================== */

.delivery-log-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.delivery-log-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-console);
  border: 1px solid rgba(25, 76, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  overflow: hidden;
}

.log-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #FFFFFF;
}

.log-header h3 {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-header h3 i { color: var(--color-primary); }

.log-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.log-close-btn:hover { color: #FFFFFF; }

.log-viewport {
  padding: 20px;
  height: 300px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', Courier, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-viewport::-webkit-scrollbar { width: 6px; }
.log-viewport::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
}

.log-line { word-wrap: break-word; }
.log-info { color: #38BDF8; }
.log-success { color: #34D399; }
.log-warning { color: #FBBF24; }
.log-danger { color: #F87171; }
.log-system { color: #C084FC; }

.log-actions {
  padding: 12px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   14. RESPONSIVE MEDIA BREAKPOINTS
   ========================================================================== */

@media (max-width: 1200px) {
  .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  
  .app-sidebar {
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  
  .sidebar-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .crud-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .panel-crud-form {
    position: static;
  }
  
  .dashboard-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .attendance-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .form-group-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .workspace-content {
    padding: 20px;
  }
}
