/* ============================================================
   AWT HAJJ MANAGEMENT SYSTEM — Design System v2.0
   Professional, Responsive, Modern
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root,
[data-theme="dark"],
html[data-theme="dark"],
body[data-theme="dark"] {
  /* Brand Colors */
  --color-primary:        #0f172a;
  --color-primary-light:  #1e293b;
  --color-accent:         #10b981;
  --color-accent-dark:    #059669;
  --color-accent-glow:    rgba(16, 185, 129, 0.2);

  /* Sidebar */
  --sidebar-bg:           #090d16;
  --sidebar-hover:        #15203b;
  --sidebar-active:       #10b981;
  --sidebar-text:         #94a3b8;
  --sidebar-text-active:  #ffffff;
  --sidebar-width:        240px;
  --sidebar-width-mini:   70px;

  /* Header */
  --header-height:        60px;
  --header-bg:            #090d16;

  /* Content Dark Theme */
  --content-bg:           #0b1329;
  --card-bg:              #15203b;
  --card-shadow:          0 4px 20px rgba(0, 0, 0, 0.4);
  --card-shadow-hover:    0 8px 30px rgba(0, 0, 0, 0.5);
  --card-radius:          12px;

  /* Text */
  --text-primary:         #f8fafc;
  --text-secondary:       #cbd5e1;
  --text-muted:           #94a3b8;
  --text-white:           #ffffff;

  /* Borders */
  --border-color:         #233254;
  --border-radius:        8px;
  --border-radius-sm:     5px;
  --border-radius-lg:     12px;
  --border-radius-pill:   50px;

  /* Inputs */
  --input-bg:             #0b1329;
  --input-border:         #334155;
  --input-text:           #f8fafc;
  --input-placeholder:    #64748b;
  --input-focus:          #10b981;
  --input-shadow-focus:   0 0 0 3px rgba(16, 185, 129, 0.25);

  /* Table styling */
  --table-stripe-bg:      rgba(255, 255, 255, 0.03);
  --table-hover-bg:       rgba(16, 185, 129, 0.1);

  /* Status colors */
  --color-success:        #10b981;
  --color-warning:        #f59e0b;
  --color-danger:         #ef4444;
  --color-info:           #3b82f6;

  /* Transitions */
  --transition-fast:      0.15s ease;
  --transition-base:      0.25s ease;
  --transition-slow:      0.4s ease;

  /* Font */
  --font-family:          'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="light"],
html[data-theme="light"],
body[data-theme="light"] {
  /* Brand Colors */
  --color-primary:        #0f172a;
  --color-primary-light:  #1e293b;
  --color-accent:         #10b981;
  --color-accent-dark:    #059669;
  --color-accent-glow:    rgba(16, 185, 129, 0.15);

  /* Sidebar */
  --sidebar-bg:           #0f172a;
  --sidebar-hover:        #1e293b;
  --sidebar-active:       #10b981;
  --sidebar-text:         #94a3b8;
  --sidebar-text-active:  #ffffff;

  /* Header */
  --header-bg:            #0f172a;

  /* Content Light Theme */
  --content-bg:           #f1f5f9;
  --card-bg:              #ffffff;
  --card-shadow:          0 4px 20px rgba(0, 0, 0, 0.05);
  --card-shadow-hover:    0 8px 30px rgba(0, 0, 0, 0.09);

  /* Text */
  --text-primary:         #0f172a;
  --text-secondary:       #334155;
  --text-muted:           #64748b;
  --text-white:           #ffffff;

  /* Borders */
  --border-color:         #cbd5e1;

  /* Inputs */
  --input-bg:             #ffffff;
  --input-border:         #cbd5e1;
  --input-text:           #0f172a;
  --input-placeholder:    #94a3b8;
  --input-focus:          #10b981;
  --input-shadow-focus:   0 0 0 3px rgba(16, 185, 129, 0.2);

  /* Table styling */
  --table-stripe-bg:      #f8fafc;
  --table-hover-bg:       rgba(16, 185, 129, 0.08);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--border-radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.theme-toggle-btn i {
  font-size: 1.3rem;
}

[data-theme="light"] .theme-icon-light { display: none !important; }
[data-theme="light"] .theme-icon-dark  { display: inline-block !important; color: #f59e0b !important; }

[data-theme="dark"] .theme-icon-dark  { display: none !important; }
[data-theme="dark"] .theme-icon-light { display: inline-block !important; color: #f59e0b !important; }

:not([data-theme="light"]) .theme-icon-light { display: inline-block !important; color: #f59e0b !important; }
:not([data-theme="light"]) .theme-icon-dark  { display: none !important; }

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1.4rem;
  color: var(--text-primary);
  background-color: var(--content-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-dark); }

input, select, textarea, button {
  font-family: var(--font-family);
  font-size: 1.4rem;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ============================================================
   LAYOUT — MAIN HEADER (TOP BAR)
   ============================================================ */
.cd-main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

/* Logo / Brand */
.cd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-white);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.cd-logo:hover { opacity: 0.9; color: var(--text-white); }

/* Real logo image in header */
.brand-logo-img,
.cd-logo img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}


/* Login card brand emblem — image version */
.login-brand .brand-emblem {
  background: none !important;
  box-shadow: none !important;
  width: auto;
  height: auto;
}
.login-brand .brand-emblem img {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50%;
  border: none !important;
  box-shadow: none !important;
  object-fit: cover;
}
.cd-logo .brand-icon {
  font-size: 2.4rem;
  color: var(--color-accent);
}
.cd-logo .brand-sub {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--sidebar-text);
  display: block;
  line-height: 1;
}

/* Top-right user area */
.cd-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cd-top-nav {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.cd-top-nav > li {
  display: flex;
  align-items: center;
  height: 100%;
}

.cd-top-nav > li > a,
.cd-top-nav > li > span {
  color: var(--sidebar-text);
  font-size: 1.3rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cd-top-nav > li > a:hover {
  color: var(--text-white);
  background: rgba(255,255,255,0.1);
}

/* User badge */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-white);
  font-size: 1.3rem;
  font-weight: 500;
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--border-radius-pill);
  border: 1px solid rgba(255,255,255,0.15);
}

.user-badge .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
}

/* Logout button */
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--border-radius-pill);
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}
.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
}

/* Hamburger trigger */
.cd-nav-trigger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast);
}
.cd-nav-trigger:hover { background: rgba(255,255,255,0.1); }
.cd-nav-trigger span,
.cd-nav-trigger span::before,
.cd-nav-trigger span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.cd-nav-trigger.nav-is-visible span { background: transparent; }
.cd-nav-trigger.nav-is-visible span::before {
  transform: translateY(7px) rotate(45deg);
}
.cd-nav-trigger.nav-is-visible span::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Dropdown in top nav (account menu) */
.has-children { position: relative; }

.cd-top-nav .has-children > a {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--border-radius);
  color: var(--sidebar-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cd-top-nav .has-children > a img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  object-fit: cover;
}
.cd-top-nav .has-children > a::after {
  content: '▾';
  font-size: 1.1rem;
  color: var(--sidebar-text);
}
.cd-top-nav .has-children ul {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow-hover);
  min-width: 160px;
  display: none;
  z-index: 2000;
  overflow: hidden;
}
.cd-top-nav .has-children:hover ul { display: block; }
.cd-top-nav .has-children ul li a {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 1.3rem;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}
.cd-top-nav .has-children ul li:last-child a { border-bottom: none; }
.cd-top-nav .has-children ul li a:hover {
  background: var(--content-bg);
  color: var(--color-accent);
}

/* ============================================================
   LAYOUT — SIDEBAR
   ============================================================ */
.cd-main-content {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-height);
}

.cd-side-nav {
  width: var(--sidebar-width);
  min-height: calc(100vh - var(--header-height));
  background: var(--sidebar-bg);
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  z-index: 900;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-base), width var(--transition-base);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.cd-side-nav::-webkit-scrollbar { width: 4px; }
.cd-side-nav::-webkit-scrollbar-track { background: transparent; }
.cd-side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Sidebar ul reset */
.cd-side-nav > ul {
  list-style: none;
  padding: 16px 0 24px;
}
.cd-side-nav > ul:last-of-type { padding-bottom: 32px; }

/* Sidebar section label */
.cd-side-nav .cd-label {
  display: block;
  padding: 20px 20px 8px;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4a6a85;
}

/* Sidebar links */
.cd-side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--sidebar-text);
  font-size: 1.35rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}
.cd-side-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-white);
  border-left-color: rgba(26, 188, 156, 0.4);
}

/* Active / current page */
.cd-side-nav .active > a,
.cd-side-nav > ul > li.active > a {
  background: linear-gradient(90deg, rgba(26,188,156,0.18) 0%, rgba(26,188,156,0.05) 100%);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active);
  font-weight: 600;
}

/* Sidebar icons (Unicode/emoji placeholders) */
.cd-side-nav a .nav-icon {
  font-size: 1.5rem;
  min-width: 20px;
  text-align: center;
  opacity: 0.8;
}
.cd-side-nav a:hover .nav-icon,
.cd-side-nav .active > a .nav-icon {
  opacity: 1;
}

/* Submenu (has-children) */
.cd-side-nav .has-children > a {
  cursor: pointer;
}
.cd-side-nav .has-children > a::after {
  content: '›';
  position: absolute;
  right: 18px;
  font-size: 1.6rem;
  font-weight: 300;
  transition: transform var(--transition-base);
  color: var(--sidebar-text);
  line-height: 1;
}
.cd-side-nav .has-children.selected > a::after {
  transform: rotate(90deg);
}
.cd-side-nav .has-children ul {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
  background: rgba(0,0,0,0.15);
}
.cd-side-nav .has-children.selected > ul {
  max-height: 400px;
  display: block;
}
.cd-side-nav .has-children ul li a {
  padding: 9px 20px 9px 48px;
  font-size: 1.3rem;
  font-weight: 400;
  border-left: none;
  color: #7fa3bb;
}
.cd-side-nav .has-children ul li a:hover {
  color: var(--text-white);
  background: rgba(255,255,255,0.05);
  border-left: none;
}
.cd-side-nav .has-children ul li a::before {
  content: '–';
  margin-right: 6px;
  opacity: 0.5;
  font-size: 1.1rem;
}

/* ============================================================
   LAYOUT — CONTENT WRAPPER
   ============================================================ */
.content-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: calc(100vh - var(--header-height));
  padding: 28px 28px 40px;
  transition: margin-left var(--transition-base);
}

/* When no sidebar (MasterPage3) */
.no-sidebar .content-wrapper {
  margin-left: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.card:hover { box-shadow: var(--card-shadow-hover); }

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--content-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2, .card-header h3 {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header h2::before, .card-header h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--color-accent);
  border-radius: 4px;
}

.card-body {
  padding: 24px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-header h1 span.page-icon {
  font-size: 2.4rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.25rem;
  color: var(--text-muted);
  list-style: none;
  margin-top: 4px;
}
.breadcrumb li + li::before {
  content: '/';
  margin-right: 6px;
}
.breadcrumb a { color: var(--color-accent); }

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
  border-left: 4px solid var(--color-accent);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: var(--color-accent-glow);
  border-radius: 50%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.stat-card .stat-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-card .stat-icon {
  font-size: 2.8rem;
  position: absolute;
  top: 20px;
  right: 20px;
  opacity: 0.2;
}

/* ============================================================
   FORMS — Professional Input Styles
   ============================================================ */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label,
.form-group .control-label,
.form-group > span[id*="Label"] {
  display: block;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea,
.form-control-mdp {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--input-border);
  border-radius: var(--border-radius);
  background-color: var(--input-bg) !important;
  color: var(--input-text) !important;
  font-size: 1.4rem;
  font-family: var(--font-family);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus,
.form-control-mdp:focus {
  border-color: var(--input-focus) !important;
  box-shadow: var(--input-shadow-focus) !important;
}
.form-control:disabled {
  background-color: var(--content-bg) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

::placeholder,
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder) !important;
  opacity: 0.7;
}

/* Browser Autofill Overrides */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--input-text) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

select.form-control,
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select option {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

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

/* Readonly display */
input[readonly].form-control,
input[readonly] {
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

/* Validation message */
span[id*="Validator"],
.field-validation-error {
  font-size: 1.2rem;
  color: var(--color-danger);
  margin-top: 4px;
  display: block;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn,
input[type="submit"],
input[type="button"],
button:not(.cd-nav-trigger) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 22px;
  border-radius: var(--border-radius);
  font-size: 1.4rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

/* Primary */
.btn-primary,
input[type="submit"].btn-primary,
.btnform-contrast,
input[type="submit"].btnform-contrast {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(26, 188, 156, 0.35);
}
.btn-primary:hover,
input[type="submit"].btn-primary:hover,
.btnform-contrast:hover,
input[type="submit"].btnform-contrast:hover {
  background: linear-gradient(135deg, #1ed3b3 0%, var(--color-accent) 100%);
  box-shadow: 0 4px 16px rgba(26, 188, 156, 0.45);
  transform: translateY(-1px);
  color: var(--text-white);
}

/* Default submit buttons get primary style */
input[type="submit"] {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--text-white);
  box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
  border: none;
}
input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 188, 156, 0.45);
}

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

.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 6px 14px; font-size: 1.25rem; }
.btn-lg { padding: 12px 28px; font-size: 1.6rem; }
.btn-block { width: 100%; }

/* ASP.NET Button reset */
input[type="submit"], input[type="button"] {
  -webkit-appearance: none;
  appearance: none;
}

/* Button container */
.form-actions,
.btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ============================================================
   TABLES & DATATABLES THEME OVERRIDES
   ============================================================ */
.table-container, .grid-card {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

.table, table, table.dataTable {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
  font-size: 1.35rem;
}

table.dataTable thead th,
table.dataTable thead td,
.table th, table th {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-color) !important;
}

table.dataTable tbody tr,
.table tbody tr {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

table.dataTable tbody td,
.table td, table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-color) !important;
  background-color: transparent !important;
  color: var(--text-primary) !important;
  vertical-align: middle;
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd,
.table-striped tbody tr:nth-child(even) td,
.table-striped tbody tr:nth-child(even) {
  background-color: var(--table-stripe-bg) !important;
  color: var(--text-primary) !important;
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover,
.table tbody tr:hover,
.table tbody tr:hover td {
  background-color: var(--table-hover-bg) !important;
  color: var(--text-primary) !important;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border-color) !important;
}

/* DataTables pagination, info, length, search controls */
.dataTables_wrapper {
  color: var(--text-primary) !important;
  font-size: 1.35rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
  color: var(--text-primary) !important;
}

.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--input-border) !important;
  border-radius: var(--border-radius) !important;
  padding: 6px 12px !important;
  margin-left: 6px !important;
  background-color: var(--input-bg) !important;
  color: var(--input-text) !important;
}

.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--input-border) !important;
  border-radius: var(--border-radius) !important;
  padding: 4px 8px !important;
  background-color: var(--input-bg) !important;
  color: var(--input-text) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--border-radius-sm) !important;
  padding: 4px 10px !important;
  font-size: 1.25rem !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  background: var(--card-bg) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--table-hover-bg) !important;
  color: var(--text-primary) !important;
  border-color: var(--color-accent) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: #ffffff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: var(--text-muted) !important;
  opacity: 0.5;
  background: transparent !important;
  border-color: transparent !important;
}

/* ============================================================
   ALERTS & BADGES
   ============================================================ */
.alert {
  padding: 12px 18px;
  border-radius: var(--border-radius);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 4px solid currentColor;
}
.alert-success { background: #ecfdf5; color: #065f46; }
.alert-warning { background: #fffbeb; color: #92400e; }
.alert-danger  { background: #fef2f2; color: #991b1b; }
.alert-info    { background: #eff6ff; color: #1e40af; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--border-radius-pill);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-primary { background: var(--color-accent-glow); color: var(--color-accent-dark); }

/* ============================================================
   SECTION SEPARATOR
   ============================================================ */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 0 0 10px 14px;
  margin: 24px 0 16px;
  border-left: 4px solid var(--color-accent);
  position: relative;
}

hr.divider {
  border: none;
  border-top: 1.5px solid var(--border-color);
  margin: 24px 0;
}

/* ============================================================
   LOGIN PAGE STYLES
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a2540 0%, #0e3460 40%, #0d3d30 100%);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Decorative background blobs */
.login-wrapper::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26,188,156,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.login-wrapper::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(26,188,156,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.login-card {
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s ease;
}

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

.login-brand {
  text-align: center;
  margin-bottom: 36px;
}

.login-brand .brand-emblem {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(26,188,156,0.35);
}

.login-brand h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.login-brand p {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 400;
}

.login-form-group {
  margin-bottom: 20px;
}

.login-form-group label {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.login-form-group .form-control,
.login-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1.45rem;
  transition: all var(--transition-fast);
  background: #f8fafc;
}
.login-form-group .form-control:focus,
.login-form-group input:focus {
  border-color: var(--color-accent);
  background: white;
  box-shadow: var(--input-shadow-focus);
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.55rem;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(26,188,156,0.4);
  margin-top: 8px;
  letter-spacing: 0.02em;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,188,156,0.5);
}
.login-btn:active { transform: translateY(0); }

.login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1.5px solid var(--border-color);
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Validation in login card */
.login-card .field-validation-error,
.login-card span[id*="Validator"] {
  color: var(--color-danger);
  font-size: 1.2rem;
  margin-top: 3px;
  display: inline;
}

/* ============================================================
   RESPONSIVE — MOBILE & TABLET
   ============================================================ */
@media only screen and (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
}

@media only screen and (max-width: 768px) {
  .cd-nav-trigger { display: flex; }

  .cd-side-nav {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .cd-side-nav.nav-is-visible {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    opacity: 1;
    visibility: visible;
  }

  .content-wrapper {
    margin-left: 0;
    padding: 20px 16px 32px;
  }

  .cd-nav {
    gap: 8px;
  }

  .user-badge .badge-text { display: none; }

  .card-body { padding: 16px; }

  .page-header h1 { font-size: 1.8rem; }

  .login-card {
    padding: 36px 24px;
  }
}

@media only screen and (max-width: 480px) {
  .content-wrapper { padding: 16px 12px 28px; }
  .login-card { padding: 28px 20px; }
  .login-brand h1 { font-size: 1.75rem; }
}

/* ============================================================
   OVERLAY & LOADING
   ============================================================ */
.overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(10, 37, 64, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  z-index: 10000;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border: 4px solid rgba(26,188,156,0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .noprint,
  .cd-main-header,
  .cd-side-nav,
  .cd-nav-trigger,
  .btn-logout {
    display: none !important;
    visibility: hidden !important;
  }
  .content-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .cd-main-content {
    padding-top: 0 !important;
  }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .table th { background: #f0f0f0 !important; color: black !important; -webkit-print-color-adjust: exact; }
}

/* ============================================================
   BOOTSTRAP GRID COMPATIBILITY OVERRIDES
   ============================================================ */
.container-fluid { padding-left: 0; padding-right: 0; }
.row { margin-left: -8px; margin-right: -8px; }
[class*="col-"] { padding-left: 8px; padding-right: 8px; }

/* ============================================================
   MISCELLANEOUS UTILITIES
   ============================================================ */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.fw-bold      { font-weight: 700; }
.fw-medium    { font-weight: 500; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0; }
.p-16  { padding: 16px; }
.p-24  { padding: 24px; }
.w-100 { width: 100%; }
.rounded { border-radius: var(--border-radius); }

/* ============================================================
   MODALS (POP-UPS)
   ============================================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2100;
  display: none;
  overflow: hidden;
  outline: 0;
  background: rgba(10, 25, 40, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.in {
  display: flex !important;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  pointer-events: auto;
  animation: modalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: 0 16px 48px rgba(10, 37, 64, 0.25);
  outline: 0;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1.5px solid var(--border-color);
  background: var(--content-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header .modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}
.modal-body label {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 14px;
  margin-bottom: 6px;
}
.modal-body label:first-of-type {
  margin-top: 0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1.5px solid var(--border-color);
  background: var(--content-bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

