/* ============================================================
   AUDITION ADJUDICATION SITE — SHARED STYLESHEET
   Clean & Modern | Blues & Grays | v1.0
   ============================================================
   TABLE OF CONTENTS
   1.  CSS Variables (Design Tokens)
   2.  Reset & Base
   3.  Typography
   4.  Layout & Containers
   5.  Navigation
   6.  Buttons
   7.  Forms & Inputs
   8.  Tables
   9.  Cards & Panels
   10. Badges & Status Indicators
   11. Alerts & Notifications
   12. Score Entry
   13. Dashboard Widgets
   14. Modals
   15. Pagination
   16. Utility Classes
   17. Print Styles
   ============================================================ */


/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
  /* Brand Colors */
  --blue-900: #0d1f3c;
  --blue-800: #1a3560;
  --blue-700: #1e4080;
  --blue-600: #2354a4;
  --blue-500: #2e6ac6;
  --blue-400: #5389d8;
  --blue-300: #85aee4;
  --blue-200: #c0d4f2;
  --blue-100: #e8f0fc;
  --blue-50:  #f3f7ff;

  /* Grays */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;

  /* Semantic Colors */
  --color-success:       #16a34a;
  --color-success-light: #dcfce7;
  --color-warning:       #d97706;
  --color-warning-light: #fef3c7;
  --color-danger:        #dc2626;
  --color-danger-light:  #fee2e2;
  --color-info:          #2354a4;
  --color-info-light:    #e8f0fc;

  /* Role-based accent colors */
  --teacher-accent:  #2354a4;
  --admin-accent:    #0d4f6c;

  /* Typography */
  --font-sans: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --leading-tight:  1.25;
  --leading-normal: 1.5;
  --leading-loose:  1.75;

  /* Spacing (base 4px) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.07), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.08), 0 8px 10px rgba(0,0,0,0.04);

  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-base: 180ms ease;
  --transition-slow: 300ms ease;

  /* Layout */
  --container-max: 1200px;
  --nav-height:    60px;
  --sidebar-width: 240px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--gray-800);
  background-color: var(--gray-50);
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--blue-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--blue-800); text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: var(--space-6) 0;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
  margin-bottom: var(--space-3);
}
h1 { font-size: var(--text-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

small { font-size: var(--text-sm); color: var(--gray-500); }
strong { font-weight: var(--weight-semibold); }

.page-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}
.page-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-6);
}
.section-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--gray-800);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--blue-100);
}


/* ============================================================
   4. LAYOUT & CONTAINERS
   ============================================================ */
.container    { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-6); }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 var(--space-6); }
.container-md { max-width: 768px;  margin: 0 auto; padding: 0 var(--space-6); }
.container-lg { max-width: 1024px; margin: 0 auto; padding: 0 var(--space-6); }

.layout-with-sidebar {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--gray-200);
  padding: var(--space-6) 0;
  min-height: calc(100vh - var(--nav-height));
}
.main-content {
  flex: 1;
  padding: var(--space-8);
  overflow-x: hidden;
}
.page-content {
  padding: var(--space-8) var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .main-content { padding: var(--space-4); }
  .layout-with-sidebar { flex-direction: column; }
  .sidebar { width: 100%; min-height: auto; }
}


/* ============================================================
   5. NAVIGATION
   ============================================================ */
.topnav {
  height: var(--nav-height);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}
.topnav .container {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
}
.topnav-brand {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--blue-800);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.topnav-brand span { color: var(--blue-500); }

.topnav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  flex: 1;
}
.topnav-links a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.topnav-links a:hover { background: var(--gray-100); color: var(--gray-900); }
.topnav-links a.active { background: var(--blue-50); color: var(--blue-700); }

.topnav-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.topnav-user .user-name { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--gray-700); }
.topnav-user .user-role { font-size: var(--text-xs); color: var(--gray-400); }

.topnav.teacher-nav { border-bottom: 3px solid var(--teacher-accent); }
.topnav.admin-nav   { border-bottom: 3px solid var(--admin-accent); }
.topnav.teacher-nav .topnav-links a.active { color: var(--teacher-accent); }
.topnav.admin-nav   .topnav-links a.active { color: var(--admin-accent); }

.sidenav { list-style: none; padding: 0 var(--space-3); }
.sidenav-section {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  padding: var(--space-5) var(--space-3) var(--space-2);
}
.sidenav li a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.sidenav li a:hover { background: var(--gray-100); color: var(--gray-900); }
.sidenav li a.active {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: var(--weight-semibold);
}


/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
  height: 38px;
}
.btn:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }

.btn-primary { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); color: white; text-decoration: none; }
.btn-primary:active { background: var(--blue-800); }

.btn-secondary { background: white; color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-800); text-decoration: none; }

.btn-ghost { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); text-decoration: none; }

.btn-danger { background: var(--color-danger); color: white; border-color: var(--color-danger); }
.btn-danger:hover { background: #b91c1c; color: white; text-decoration: none; }

.btn-success { background: var(--color-success); color: white; border-color: var(--color-success); }
.btn-success:hover { background: #15803d; color: white; text-decoration: none; }

.btn-sm { height: 30px; padding: var(--space-1) var(--space-3); font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn-lg { height: 46px; padding: var(--space-3) var(--space-8); font-size: var(--text-base); }

.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-group { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }


/* ============================================================
   7. FORMS & INPUTS
   ============================================================ */
.form-group { margin-bottom: var(--space-5); }

label, .label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--blue-500);
  margin-bottom: var(--space-2);
}
.label-required::after { content: ' *'; color: var(--color-danger); }

.form-control {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--gray-900);
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  height: 38px;
  line-height: 1.5;
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:hover  { border-color: var(--gray-400); }
.form-control:focus  { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,106,198,0.15); }
.form-control:disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; }

textarea.form-control { height: auto; min-height: 100px; resize: vertical; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-control.is-valid   { border-color: var(--color-success); }
.form-control.is-invalid { border-color: var(--color-danger); }
.form-control.is-valid:focus   { box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }

.form-text  { font-size: var(--text-xs); color: var(--gray-500); margin-top: var(--space-1); }
.form-error { font-size: var(--text-xs); color: var(--color-danger); margin-top: var(--space-1); }

.form-check { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); cursor: pointer; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] { width: 16px; height: 16px; accent-color: var(--blue-600); cursor: pointer; }
.form-check label { margin-bottom: 0; cursor: pointer; font-weight: var(--weight-normal); }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }

.form-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.form-card-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-100);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--gray-100);
  margin-top: var(--space-6);
}


/* ============================================================
   8. TABLES
   ============================================================ */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  background: white;
}

table, .table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table thead tr { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.table thead th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  white-space: nowrap;
}
.table thead th.sort-asc::after  { content: ' \2191'; }
.table thead th.sort-desc::after { content: ' \2193'; }
.table thead th a { color: var(--gray-500); text-decoration: none; }
.table thead th a:hover { color: var(--blue-600); }

.table tbody tr { border-bottom: 1px solid var(--gray-100); transition: background var(--transition-fast); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--blue-50); }

.table td { padding: var(--space-3) var(--space-4); color: var(--gray-700); vertical-align: middle; }
.table td strong { color: var(--gray-900); }

.table-striped tbody tr:nth-child(even) { background: var(--gray-50); }
.table-striped tbody tr:nth-child(even):hover { background: var(--blue-50); }

.table-compact thead th,
.table-compact td { padding: var(--space-2) var(--space-3); }

/* Score-specific table */
.table-scores thead { background: var(--blue-800); }
.table-scores thead th { color: white; }
.table-scores td.score-cell {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  text-align: center;
  color: var(--blue-700);
}
.table-scores td.total-cell {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--gray-900);
  text-align: center;
  background: var(--blue-50);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.table-toolbar-title { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--gray-800); }
.table-search { display: flex; align-items: center; gap: var(--space-2); }
.table-search .form-control { width: 220px; }


/* ============================================================
   9. CARDS & PANELS
   ============================================================ */
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.card-header h3,
.card-header h4 { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--gray-800); }
.card-body  { padding: var(--space-6); }
.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stat-card-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}
.stat-card-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--gray-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card-sub  { font-size: var(--text-sm); color: var(--gray-500); }
.stat-card.accent  { border-left: 4px solid var(--blue-500); }
.stat-card.success { border-left: 4px solid var(--color-success); }
.stat-card.warning { border-left: 4px solid var(--color-warning); }


/* ============================================================
   10. BADGES & STATUS INDICATORS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.6;
  white-space: nowrap;
}
.badge-blue   { background: var(--blue-100);            color: var(--blue-700); }
.badge-gray   { background: var(--gray-100);            color: var(--gray-600); }
.badge-green  { background: var(--color-success-light); color: var(--color-success); }
.badge-yellow { background: var(--color-warning-light); color: var(--color-warning); }
.badge-red    { background: var(--color-danger-light);  color: var(--color-danger); }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); }
.status-dot.active   { background: var(--color-success); }
.status-dot.pending  { background: var(--color-warning); }
.status-dot.inactive { background: var(--gray-300); }


/* ============================================================
   11. ALERTS & NOTIFICATIONS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.alert-icon  { flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: var(--weight-semibold); margin-bottom: var(--space-1); }
.alert-info    { background: var(--color-info-light);    border-color: var(--blue-200);  color: var(--blue-800); }
.alert-success { background: var(--color-success-light); border-color: #86efac;          color: #166534; }
.alert-warning { background: var(--color-warning-light); border-color: #fcd34d;          color: #92400e; }
.alert-danger  { background: var(--color-danger-light);  border-color: #fca5a5;          color: #991b1b; }


/* ============================================================
   12. SCORE ENTRY
   ============================================================ */
.score-input {
  width: 72px;
  height: 42px;
  text-align: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--blue-800);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.score-input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,106,198,0.15); background: var(--blue-50); }
.score-input.score-high { border-color: var(--color-success); color: var(--color-success); }
.score-input.score-med  { border-color: var(--color-warning); color: var(--color-warning); }
.score-input.score-low  { border-color: var(--color-danger);  color: var(--color-danger);  }

.score-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 42px;
  background: var(--blue-800);
  color: white;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  padding: 0 var(--space-3);
}

.rubric-category {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.rubric-category-header {
  background: var(--blue-800);
  color: white;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
}
.rubric-category-body { padding: var(--space-4) var(--space-5); }
.rubric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-100);
  gap: var(--space-4);
}
.rubric-row:last-child { border-bottom: none; }
.rubric-label { flex: 1; font-size: var(--text-sm); color: var(--gray-700); }
.rubric-max   { font-size: var(--text-xs); color: var(--gray-400); min-width: 60px; text-align: center; }
.rubric-comments textarea { font-size: var(--text-sm); min-height: 70px; }


/* ============================================================
   13. DASHBOARD WIDGETS
   ============================================================ */
.dashboard-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-6) 0;
  margin-bottom: var(--space-8);
}
.dashboard-header h1 { font-size: var(--text-2xl); font-weight: var(--weight-bold); color: var(--gray-900); margin-bottom: var(--space-1); }
.dashboard-header p  { color: var(--gray-500); font-size: var(--text-sm); margin-bottom: 0; }

.widget {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.widget-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.widget-title { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--gray-800); }
.widget-body  { padding: var(--space-5); }

.event-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--blue-700);
}


/* ============================================================
   14. MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
  backdrop-filter: blur(2px);
}
.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-lg { max-width: 760px; }
.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { margin: 0; font-size: var(--text-lg); }
.modal-close {
  background: none; border: none;
  font-size: var(--text-xl); color: var(--gray-400);
  cursor: pointer; line-height: 1;
  padding: var(--space-1); border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.modal-body   { padding: var(--space-6); }
.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}


/* ============================================================
   15. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.pagination a:hover        { background: var(--gray-100); border-color: var(--gray-300); }
.pagination .active a,
.pagination .current       { background: var(--blue-600); color: white; border-color: var(--blue-600); }
.pagination .disabled      { opacity: 0.4; pointer-events: none; }


/* ============================================================
   16. UTILITY CLASSES
   ============================================================ */
.mt-0 { margin-top: 0; }           .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-2); }  .mb-2 { margin-bottom: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }  .mb-4 { margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }  .mb-6 { margin-bottom: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }  .mb-8 { margin-bottom: var(--space-8); }

.text-xs { font-size: var(--text-xs); }  .text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }  .text-xl { font-size: var(--text-xl); }
.text-left { text-align: left; }  .text-center { text-align: center; }  .text-right { text-align: right; }

.text-muted   { color: var(--gray-400); }
.text-light   { color: var(--gray-500); }
.text-default { color: var(--gray-700); }
.text-strong  { color: var(--gray-900); font-weight: var(--weight-semibold); }
.text-blue    { color: var(--blue-600); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger  { color: var(--color-danger); }

.font-medium   { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold     { font-weight: var(--weight-bold); }

.d-flex       { display: flex; }
.d-grid       { display: grid; }
.d-block      { display: block; }
.d-none       { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.flex-wrap { flex-wrap: wrap; }

.border        { border: 1px solid var(--gray-200); }
.border-top    { border-top: 1px solid var(--gray-200); }
.border-bottom { border-bottom: 1px solid var(--gray-200); }
.rounded       { border-radius: var(--radius-md); }
.rounded-lg    { border-radius: var(--radius-lg); }

.bg-white { background: white; }
.bg-light { background: var(--gray-50); }
.bg-blue  { background: var(--blue-50); }

.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.w-full   { width: 100%; }
.sr-only  {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ============================================================
   17. PRINT STYLES
   ============================================================ */
@media print {
  .topnav, .sidebar, .btn, .form-actions, .no-print { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  .main-content, .page-content { padding: 0; }
  .table-wrapper { box-shadow: none; border: 1px solid #ccc; }
  .table tbody tr:hover { background: none; }
  .card, .widget { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; }
  table { page-break-inside: avoid; }
  .print-only { display: block !important; }
}
