/* ============================================================
   assets/css/main.css - SORECO II Hotline System
   Dark Blue & White Theme | Responsive | Dark/Light Mode
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap");

/* ============================================================
   CSS VARIABLES - LIGHT & DARK MODES
   ============================================================ */
:root {
  /* Brand Colors */
  --brand-dark: #0a1628;
  --brand-primary: #0d2148;
  --brand-secondary: #1a3a6e;
  --brand-accent: #2563eb;
  --brand-light: #3b82f6;
  --brand-glow: #60a5fa;

  /* Light Mode Defaults */
  --bg-main: #f0f4fb;
  --bg-card: #ffffff;
  --bg-sidebar: #0d2148;
  --bg-header: #0d2148;
  --bg-input: #f8faff;
  --bg-hover: #e8effc;
  --bg-table-head: #0d2148;
  --bg-table-row: #ffffff;
  --bg-table-alt: #f4f7fd;

  --text-primary: #0a1628;
  --text-secondary: #3d5a8a;
  --text-muted: #6b84a8;
  --text-inverse: #ffffff;
  --text-sidebar: #c8d8f0;
  --text-active: #60a5fa;

  --border-color: #c8d8f0;
  --border-light: #e0eaf8;
  --shadow-sm: 0 2px 8px rgba(13, 33, 72, 0.08);
  --shadow-md: 0 4px 20px rgba(13, 33, 72, 0.12);
  --shadow-lg: 0 8px 40px rgba(13, 33, 72, 0.16);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.25s ease;
}

[data-theme="dark"] {
  --bg-main: #06101f;
  --bg-card: #0d1f3c;
  --bg-sidebar: #050e1f;
  --bg-header: #0a1628;
  --bg-input: #0f2040;
  --bg-hover: #152a50;
  --bg-table-head: #0a1f42;
  --bg-table-row: #0d1f3c;
  --bg-table-alt: #0f2345;

  --text-primary: #e8f0fe;
  --text-secondary: #93b4e8;
  --text-muted: #5a7aaa;
  --text-inverse: #ffffff;
  --text-sidebar: #93b4e8;
  --text-active: #60a5fa;

  --border-color: #1e3a6e;
  --border-light: #152a50;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   BASE STYLES
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  transition:
    background 0.3s ease,
    color 0.3s ease;
  min-height: 100vh;
  line-height: 1.6;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1628 0%, #0d2148 40%, #1a3a6e 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.15) 0%,
    transparent 70%
  );
  top: -200px;
  right: -100px;
}

.login-page::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  bottom: -100px;
  left: -100px;
}

.login-card {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo img,
.login-logo .logo-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.login-title {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.login-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

/* ============================================================
   LAYOUT - SIDEBAR
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    width 0.3s ease;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.sidebar-header {
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-text {
  flex: 1;
  min-width: 0;
}

.brand-name {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.3);
  padding: 0.75rem 1.25rem 0.4rem;
}

.nav-item {
  padding: 0.1rem 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.875rem;
  border-radius: var(--radius-md);
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: rgba(37, 99, 235, 0.25);
  color: var(--text-active);
  box-shadow: inset 3px 0 0 #2563eb;
}

.nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-link span {
  flex: 1;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: capitalize;
}

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

.topbar {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--bg-hover);
}

.page-title {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dark Mode Toggle */
.theme-toggle {
  width: 48px;
  height: 26px;
  background: var(--border-color);
  border-radius: 13px;
  cursor: pointer;
  position: relative;
  border: none;
  transition: background 0.3s ease;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle {
  background: #2563eb;
}
[data-theme="dark"] .theme-toggle::after {
  transform: translateX(22px);
}

.theme-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.page-content {
  padding: 1.5rem;
  flex: 1;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-title {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.stat-icon.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}
.stat-icon.green {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.stat-icon.amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}
.stat-icon.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.stat-info .stat-value {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-info .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: "Inter", sans-serif;
  transition: var(--transition);
  outline: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: var(--bg-card);
}

.form-control::placeholder {
  color: var(--text-muted);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/* Autocomplete Dropdown */
.autocomplete-wrapper {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--brand-accent);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 500;
  box-shadow: var(--shadow-md);
}

.autocomplete-item {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: var(--bg-hover);
}
.autocomplete-item mark {
  background: rgba(37, 99, 235, 0.2);
  color: var(--brand-accent);
  border-radius: 2px;
}

/* Lineman Checklist */
.lineman-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.lineman-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  user-select: none;
}

.lineman-item:hover {
  background: var(--bg-hover);
  border-color: var(--brand-accent);
}

.lineman-item:has(input:checked) {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--brand-accent);
}

.lineman-item input[type="radio"],
.lineman-item input[type="checkbox"] {
  accent-color: var(--brand-accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.lineman-item label {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* District Toggle */
.district-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--brand-accent);
}

.district-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  color: var(--brand-accent);
  transition: var(--transition);
  text-align: center;
}

.district-btn.active,
.district-btn:hover {
  background: var(--brand-accent);
  color: white;
}

/* Type Selector Cards */
.type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.type-card {
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  background: var(--bg-card);
}

.type-card:hover {
  border-color: var(--brand-accent);
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.type-card.selected {
  border-color: var(--brand-accent);
  background: rgba(37, 99, 235, 0.1);
}

.type-card .type-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.type-card .type-name {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.type-card .type-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.8rem 1.75rem;
  font-size: 1rem;
}
.btn-full {
  width: 100%;
  justify-content: center;
}

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

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.data-table thead th {
  background: var(--bg-table-head);
  color: var(--text-inverse);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-table-alt);
}
.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.data-table tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  vertical-align: middle;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-east {
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}
.badge-west {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}
.badge-complaint {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.badge-reconnect {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.badge-active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}
.badge-inactive {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}
.badge-other {
  background: rgba(20, 184, 166, 0.15);
  color: #0d9488;
}

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-box input {
  padding-left: 2.2rem;
}

.filter-select {
  min-width: 130px;
}

/* ============================================================
   ALERTS / FLASH MESSAGES
   ============================================================ */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border-left: 4px solid #10b981;
}
.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #7f1d1d;
  border-left: 4px solid #ef4444;
}
.alert-info {
  background: rgba(37, 99, 235, 0.1);
  color: #1e3a8a;
  border-left: 4px solid #2563eb;
}
.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #78350f;
  border-left: 4px solid #f59e0b;
}

[data-theme="dark"] .alert-success {
  color: #6ee7b7;
}
[data-theme="dark"] .alert-danger {
  color: #fca5a5;
}
[data-theme="dark"] .alert-info {
  color: #93c5fd;
}
[data-theme="dark"] .alert-warning {
  color: #fcd34d;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

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

.modal-title {
  font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ============================================================
   OVERLAY / SIDEBAR BACKDROP (mobile)
   ============================================================ */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-backdrop.open {
  display: block;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1rem 0;
}

.page-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: var(--transition);
  text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: white;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .sidebar,
  .topbar,
  .no-print,
  .btn,
  .filter-bar,
  .sidebar-backdrop,
  .menu-toggle {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
  }
  .page-content {
    padding: 0 !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .data-table thead th {
    background: #0d2148 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }

  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #0d2148;
  }

  .print-title {
    font-family: "Rajdhani", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0d2148;
  }

  .print-subtitle {
    font-size: 0.85rem;
    color: #666;
  }
  .print-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.25rem;
  }
}

.print-header {
  display: none;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .form-row-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .type-cards {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .search-box {
    min-width: unset;
  }

  .topbar-right .theme-label span {
    display: none;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-content {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .type-cards {
    grid-template-columns: 1fr;
  }
  .modal {
    max-height: 95vh;
  }
  .data-table {
    min-width: 600px;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-muted {
  color: var(--text-muted);
}
.text-primary-color {
  color: var(--brand-primary);
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 1rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.d-flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 1rem;
}
.flex-wrap {
  flex-wrap: wrap;
}
.fw-bold {
  font-weight: 700;
}
.small {
  font-size: 0.8rem;
}
.w-100 {
  width: 100%;
}
.hidden {
  display: none;
}
