﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0 !important;
}

/* Remove container-fluid padding for landing page */
main.container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

/* ===== PUBLIC NAVBAR ===== */

.pub-navbar {
  background: #0b1628;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 20px rgba(11, 22, 40, .35);
}

.pub-navbar-inner {
  display: flex;
  align-items: center;
  min-height: 64px;
  gap: 8px;
}

.pub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.2px;
  flex-shrink: 0;
  transition: opacity .15s;
}

.pub-brand:hover {
  color: white;
  opacity: .85;
}

.pub-brand img {
  height: 40px;
  width: auto;
}

/* Desktop nav */
.pub-nav-desktop {
  margin-left: auto;
}

[dir="rtl"] .pub-nav-desktop {
  margin-left: 0;
  margin-right: auto;
}

.pub-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.pub-nav-link:hover,
.pub-nav-link.active {
  color: #f0a500;
  background: rgba(240, 165, 0, .1);
}

/* Language switcher inside pub-navbar */
.pub-navbar .pub-lang-wrap .btn-link.nav-link,
.pub-navbar .pub-lang-wrap .btn.btn-link {
  color: rgba(255, 255, 255, .75);
  font-size: .875rem;
  font-weight: 500;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.pub-navbar .pub-lang-wrap .btn-link.nav-link:hover,
.pub-navbar .pub-lang-wrap .btn-link.nav-link.show {
  color: #f0a500;
  background: rgba(240, 165, 0, .1);
  box-shadow: none;
}

.pub-navbar .pub-lang-wrap .dropdown-menu {
  background: #152340;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 22, 40, .4);
  margin-top: 6px;
}

.pub-navbar .pub-lang-wrap .dropdown-item {
  color: rgba(255, 255, 255, .8);
  font-size: .875rem;
  padding: 9px 16px;
  transition: background .12s, color .12s;
}

.pub-navbar .pub-lang-wrap .dropdown-item:hover,
.pub-navbar .pub-lang-wrap .dropdown-item.active {
  background: rgba(240, 165, 0, .15);
  color: #f0a500;
  transform: none;
}

/* User dropdown toggle */
.pub-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .85);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, .2);
  transition: background .15s, border-color .15s;
}

.pub-user-toggle:hover,
.pub-user-toggle.show {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .35);
  color: white;
}

.pub-user-dropdown {
  background: #152340;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(11, 22, 40, .4) !important;
  margin-top: 6px;
}

.pub-user-dropdown .dropdown-item {
  color: rgba(255, 255, 255, .8);
  font-size: .875rem;
  padding: 9px 16px;
  transition: background .12s, color .12s;
}

.pub-user-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, .08);
  color: white;
  transform: none;
}

.pub-user-dropdown .dropdown-item.text-danger {
  color: #f87171 !important;
}

.pub-user-dropdown .dropdown-item.text-danger:hover {
  background: rgba(248, 113, 113, .1);
  color: #f87171 !important;
}

.pub-user-dropdown .dropdown-divider {
  border-color: rgba(255, 255, 255, .1);
}

/* Login/Register buttons */
.pub-btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1.5px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  color: rgba(255, 255, 255, .9);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}

.pub-btn-login:hover {
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .08);
  color: white;
}

.pub-btn-register {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #f0a500;
  border: 1.5px solid #f0a500;
  border-radius: 8px;
  color: #0b1628;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s;
}

.pub-btn-register:hover {
  background: #e09600;
  border-color: #e09600;
  color: #0b1628;
  box-shadow: 0 4px 12px rgba(240, 165, 0, .35);
}

/* Hamburger toggle */
.pub-hamburger {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: 1.5px solid rgba(255, 255, 255, .18);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}

[dir="rtl"] .pub-hamburger {
  margin-left: 0;
  margin-right: auto;
}

.pub-hamburger:hover {
  background: rgba(255, 255, 255, .14);
}

/* Mobile offcanvas */
.pub-offcanvas {
  background: #0b1628 !important;
  width: 280px !important;
  border-left: 1px solid rgba(255, 255, 255, .08) !important;
}

[dir="rtl"] .pub-offcanvas {
  border-left: none !important;
  border-right: 1px solid rgba(255, 255, 255, .08) !important;
}

.pub-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 20px;
}

.pub-offcanvas .offcanvas-body {
  padding: 16px 20px 24px;
}

.pub-offcanvas-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pub-offcanvas-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s, color .15s;
  cursor: pointer;
}

.pub-offcanvas-link:hover,
.pub-offcanvas-link.active {
  background: rgba(240, 165, 0, .12);
  color: #f0a500;
}

.pub-offcanvas-logout {
  color: rgba(255, 100, 100, .85);
}

.pub-offcanvas-logout:hover {
  background: rgba(248, 113, 113, .1) !important;
  color: #f87171 !important;
}

.pub-offcanvas-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

/* Language switcher inside offcanvas */
.pub-offcanvas-lang .btn-link.nav-link,
.pub-offcanvas-lang .btn.btn-link {
  color: rgba(255, 255, 255, .75);
  font-size: .875rem;
  font-weight: 500;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: 8px;
  width: 100%;
  text-align: start;
  transition: color .15s, background .15s;
}

.pub-offcanvas-lang .btn-link.nav-link:hover {
  color: #f0a500;
  background: rgba(240, 165, 0, .1);
  box-shadow: none;
}

.pub-offcanvas-lang .dropdown-menu {
  background: #152340;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 22, 40, .5);
  position: static !important;
  transform: none !important;
  width: 100%;
  margin-top: 4px;
}

.pub-offcanvas-lang .dropdown-item {
  color: rgba(255, 255, 255, .8);
  font-size: .875rem;
  padding: 9px 16px;
}

.pub-offcanvas-lang .dropdown-item:hover,
.pub-offcanvas-lang .dropdown-item.active {
  background: rgba(240, 165, 0, .15);
  color: #f0a500;
}

/* Footer Improvements */
.footer {
  background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
  line-height: 1.5;
}

.footer h5, .footer h6 {
  color: var(--bs-dark);
}

.footer .bi {
  color: var(--bs-primary);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}


/* RTL Support */
[dir="rtl"] .me-1,
[dir="rtl"] .me-2,
[dir="rtl"] .me-3 {
    margin-right: 0 !important;
}

[dir="rtl"] .me-1 {
    margin-left: 0.25rem !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
}

[dir="rtl"] .ms-1,
[dir="rtl"] .ms-2,
[dir="rtl"] .ms-3 {
    margin-left: 0 !important;
}

[dir="rtl"] .ms-1 {
    margin-right: 0.25rem !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
}

[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
}


[dir="rtl"] .dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}

/* Ensure icons stay in correct position in RTL */
[dir="rtl"] .bi {
    display: inline-block;
}

/* Fix table alignment in RTL */
[dir="rtl"] table {
    text-align: right;
}

[dir="rtl"] .table thead th {
    text-align: right;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table {
    width: 100%;
}

@media (max-width: 991.98px) {
    .table-responsive > table {
        min-width: max(100%, 680px);
    }
}

/*Auth Pages - Legacy styles removed, now inline in Login.cshtml */
/* Minimal responsive adjustments only */
@media (max-width: 767.98px) {
    .auth-shell {
        min-height: 100vh !important;
    }
}

/* ===== STUDENT AREA THEME ===== */

:root {
  --student-navy: #0b1628;
  --student-navy-mid: #152340;
  --student-navy-light: #1e3258;
  --student-accent: #f0a500;
  --student-accent-soft: rgba(240, 165, 0, 0.12);
  --student-blue-bright: #3b82f6;
  --student-green: #22c55e;
  --student-surface-2: #f7f9fc;
  --student-border: #e8edf5;
  --student-border-hover: #d0daf0;
  --student-text-primary: #0b1628;
  --student-text-muted: #7c8fa6;
  --student-text-light: #b0bec5;
  --student-sidebar-w: 268px;
  --student-radius: 14px;
}

/* Student Area: Shared Layout Styles */

.student-shell {
  display: flex;
  min-height: 100vh;
}

.student-main {
  margin-left: var(--student-sidebar-w);
  flex: 1;
  padding: 36px 40px;
  min-height: 100vh;
  min-width: 0;
}

[dir="rtl"] .student-main {
  margin-left: 0;
  margin-right: var(--student-sidebar-w);
}

.student-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.student-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1.5px solid var(--student-border);
  background: white;
  color: var(--student-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: border-color .15s, color .15s;
}

.student-back-btn:hover {
  border-color: var(--student-navy);
  color: var(--student-navy);
}

.student-page-title h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--student-navy);
  letter-spacing: -.4px;
}

.student-page-title p {
  font-size: .88rem;
  color: var(--student-text-muted);
  margin-top: 3px;
}

.student-form-card {
  background: white;
  border: 1px solid var(--student-border);
  border-radius: var(--student-radius);
  padding: 36px 40px;
  flex: 1;
  min-width: 0;
}

.student-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--student-navy);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

.student-card-sub {
  font-size: .875rem;
  color: var(--student-text-muted);
  margin-bottom: 28px;
}

.student-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--student-border);
}

.student-btn-ghost {
  padding: 11px 22px;
  border-radius: 10px;
  border: 1.5px solid var(--student-border);
  background: white;
  color: var(--student-text-muted);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.student-btn-ghost:hover {
  border-color: var(--student-navy);
  color: var(--student-navy);
}

.student-btn-primary {
  padding: 11px 26px;
  border-radius: 10px;
  border: none;
  background: var(--student-navy);
  color: white;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, box-shadow .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(11, 22, 40, .2);
}

.student-btn-primary:hover {
  background: var(--student-navy-light);
  box-shadow: 0 6px 20px rgba(11, 22, 40, .25);
  transform: translateY(-1px);
}

.student-btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile sidebar toggle button (student area) */

.student-mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 1050;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--student-navy);
  color: white;
  border: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(11, 22, 40, .25);
  font-size: 1.15rem;
  transition: background .15s;
}

.student-mobile-toggle:hover {
  background: var(--student-navy-light);
}

[dir="rtl"] .student-mobile-toggle {
  left: auto;
  right: 16px;
}

@media (max-width: 991.98px) {
  .student-mobile-toggle {
    display: flex;
  }
}

/* Stepper Component */

.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}

 .step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: calc(100% - 40px - 10px);
        height: 2px;
        background: var(--student-border);
        z-index: 0;
 }

/* LTR default */
[dir="ltr"] .step:not(:last-child)::after {
    left: calc(20px + 10px);
}

/* RTL override */
[dir="rtl"] .step:not(:last-child)::after {
    right: calc(20px + 10px);
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 2px solid var(--student-border);
  background: white;
  color: var(--student-text-muted);
}

.step.active .step-circle {
  background: var(--student-navy);
  border-color: var(--student-navy);
  color: white;
  box-shadow: 0 0 0 4px rgba(11, 22, 40, .12);
}

.step.done .step-circle {
  background: var(--student-green);
  border-color: var(--student-green);
  color: white;
}

.step-info {
  display: flex;
  flex-direction: column;
}

.step-num {
  font-size: .7rem;
  font-weight: 600;
  color: var(--student-text-light);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.step-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--student-text-muted);
}

.step.active .step-name {
  color: var(--student-navy);
}

.step.active .step-num {
  color: var(--student-accent);
}

.step.done:not(:last-child)::after {
  background: var(--student-green);
}


/* RTL fixes for all student pages on mobile & small laptops */
@media (max-width: 991.98px) {
    [dir="rtl"] .student-main {
        margin-left: 0;
        margin-right: 0;
        padding: 60px 16px 24px;
    }

    /* Stepper connector flip for RTL */
    [dir="rtl"] .step:not(:last-child)::after {
        left: auto;
        right: calc(20px + 10px);
    }

    /* Ensure form footer buttons are properly aligned */
    [dir="rtl"] .form-footer {
        flex-direction: row-reverse;
        justify-content: space-between;
    }

        /* When buttons wrap on very small screens, keep them full width but without reverse order confusion */
        [dir="rtl"] .form-footer > * {
            flex: 1 1 auto;
            justify-content: center;
        }

    /* Fix any left/right positioning on cards or icons */
    [dir="rtl"] .student-back-btn i,
    [dir="rtl"] .btn-ghost i,
    [dir="rtl"] .btn-primary i {
        transform: scaleX(-1); /* flip arrow icons in RTL for consistency */
    }
}

/* Extra small devices */
@media (max-width: 575.98px) {
    [dir="rtl"] .student-main {
        padding: 60px 12px 16px;
    }

    [dir="rtl"] .form-footer {
        flex-direction: column-reverse;
    }

        [dir="rtl"] .form-footer .btn-primary,
        [dir="rtl"] .form-footer .btn-ghost {
            width: 100%;
            justify-content: center;
        }
}
/* Animations */

@keyframes studentFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.student-animate {
  animation: studentFadeUp .35s ease both;
}

.student-delay-1 {
  animation-delay: .05s;
}

.student-delay-2 {
  animation-delay: .10s;
}

.student-delay-3 {
  animation-delay: .15s;
}

.student-delay-4 {
  animation-delay: .20s;
}

@media (max-width: 1199.98px) {
  .student-main {
    padding: 28px 24px;
  }

  .student-form-card {
    padding: 28px 24px;
  }
}

@media (max-width: 991.98px) {
  .student-shell {
    display: block;
  }

  .student-main {
    margin-left: 0;
    margin-right: 0;
    min-height: 0;
    padding: 60px 16px 24px;
  }

  .student-page-header {
    margin-bottom: 24px;
    align-items: flex-start;
  }

  .student-form-card {
    padding: 24px 20px;
  }

  .stepper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
  }

  .step {
    min-width: 190px;
    flex: 0 0 auto;
  }

  .student-form-footer {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 10px;
  }

  .student-form-footer .student-btn-ghost,
  .student-form-footer .student-btn-primary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .student-main {
    padding: 60px 12px 16px;
  }

  .student-page-title h1 {
    font-size: 1.3rem;
  }

  .student-page-title p {
    font-size: 0.82rem;
  }

  .student-form-card {
    padding: 16px;
  }

  .student-card-sub {
    margin-bottom: 20px;
  }

  .step {
    min-width: 170px;
  }

  .step-name {
    font-size: 0.78rem;
  }
}

/* ===== ADMIN AREA THEME ===== */

:root {
  --admin-navy: #0b1628;
  --admin-navy-mid: #152340;
  --admin-navy-light: #1e3258;
  --admin-accent: #e74c3c;
  --admin-accent-soft: rgba(231, 76, 60, 0.12);
  --admin-blue-bright: #3498db;
  --admin-blue-dark: #2980b9;
  --admin-green: #27ae60;
  --admin-orange: #f39c12;
  --admin-red: #e74c3c;
  --admin-surface-2: #f8f9fa;
  --admin-border: #ecf0f1;
  --admin-border-hover: #d5dbdb;
  --admin-text-primary: #0b1628;
  --admin-text-muted: #7f8c8d;
  --admin-text-light: #95a5a6;
  --admin-sidebar-w: 268px;
  --admin-radius: 12px;
  --admin-spacing: 16px;
  --admin-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Admin Area: Layout Components */

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-main-content {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  background-color: #fafbfc;
}

.admin-page-header {
  margin-bottom: 32px;
}

.admin-page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--admin-text-primary);
  letter-spacing: -0.5px;
  margin: 0;
}

.admin-page-header p {
  font-size: 0.95rem;
  color: var(--admin-text-muted);
  margin-top: 6px;
  margin-bottom: 0;
}

.admin-page-header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-page-header-with-action h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--admin-text-primary);
  letter-spacing: -0.5px;
  margin: 0;
}

.admin-page-header-with-action p {
  font-size: 0.95rem;
  color: var(--admin-text-muted);
  margin-top: 6px;
  margin-bottom: 0;
}

.admin-breadcrumb {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--admin-text-muted);
}

.admin-breadcrumb li a {
  color: var(--admin-blue-bright);
  text-decoration: none;
  transition: color 0.15s;
}

.admin-breadcrumb li a:hover {
  color: var(--admin-navy);
}

.admin-breadcrumb li + li::before {
  content: '/';
  margin: 0 8px;
  color: var(--admin-border-hover);
}

/* Card & Container Components */

.admin-card {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.15s, border-color 0.15s;
  min-width: 0;
}

.admin-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--admin-border-hover);
}

.admin-stat-card {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.admin-stat-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--admin-border-hover);
}

.admin-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background-color: var(--admin-accent-soft);
  color: var(--admin-accent);
  flex-shrink: 0;
}

.admin-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--admin-text-primary);
  line-height: 1.2;
  margin: 0;
}

.admin-stat-label {
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  margin-top: 4px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .admin-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Filter & Search Components */

.admin-filter-card {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 24px;
  margin-bottom: 24px;
  min-width: 0;
}

.admin-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.admin-search-form > * {
  flex: 1;
  min-width: min(200px, 100%);
}

.admin-search-form .admin-btn {
  flex: 0;
  min-width: 140px;
}

.admin-results-summary {
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  margin-bottom: 16px;
}

/* Table Components */

.admin-datatable {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  overflow: hidden;
}

.admin-datatable thead {
  background-color: var(--admin-surface-2);
  border-bottom: 2px solid var(--admin-border);
}

.admin-datatable thead th {
  padding: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--admin-text-primary);
  text-align: left;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

[dir="rtl"] .admin-datatable thead th {
  text-align: right;
}

.admin-datatable tbody td {
  padding: 16px;
  font-size: 0.95rem;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-border);
  overflow-wrap: anywhere;
}

.admin-datatable tbody tr:hover {
  background-color: var(--admin-surface-2);
}

.admin-datatable tbody tr:last-child td {
  border-bottom: none;
}

.dataTables_wrapper {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 0;
  overflow: hidden;
}

.dataTables_wrapper .dataTables_length {
  padding: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.dataTables_wrapper .dataTables_filter {
  padding: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.dataTables_wrapper .dataTables_filter input {
  margin-left: 8px;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 0.9rem;
}

[dir="rtl"] .dataTables_wrapper .dataTables_filter input {
  margin-left: 0;
  margin-right: 8px;
}

.dataTables_wrapper .dataTables_info {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  border-top: 1px solid var(--admin-border);
}

.dataTables_wrapper .dataTables_paginate {
  padding: 16px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: center;
  gap: 4px;
}

[dir="rtl"] .dataTables_wrapper .dataTables_paginate {
  flex-direction: row-reverse;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: white;
  color: var(--admin-text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
  background-color: var(--admin-surface-2);
  border-color: var(--admin-border-hover);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: var(--admin-navy);
  color: white;
  border-color: var(--admin-navy);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form Components */

.admin-form-card {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 0;
  overflow: hidden;
}

.admin-form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 100%;
}

@media (max-width: 1024px) {
  .admin-form-layout {
    grid-template-columns: 1fr;
  }
}

.admin-form-main {
  padding: 32px;
  min-width: 0;
}

.admin-form-sidebar {
  background-color: var(--admin-surface-2);
  border-left: 1px solid var(--admin-border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

[dir="rtl"] .admin-form-sidebar {
  border-left: none;
  border-right: 1px solid var(--admin-border);
}

@media (max-width: 1024px) {
  .admin-form-sidebar {
    border-left: none;
    border-top: 1px solid var(--admin-border);
    padding: 24px 32px;
  }

  [dir="rtl"] .admin-form-sidebar {
    border-right: none;
    border-top: 1px solid var(--admin-border);
  }
}

.admin-form-group {
  margin-bottom: 32px;
}

.admin-form-group:last-child {
  margin-bottom: 0;
}

.admin-form-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--admin-text-primary);
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--admin-text-primary);
  margin-bottom: 8px;
}

.admin-form-label .required {
  color: var(--admin-red);
  margin-left: 2px;
}

[dir="rtl"] .admin-form-label .required {
  margin-left: 0;
  margin-right: 2px;
}

.admin-form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--admin-text-primary);
  background-color: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-form-control:focus {
  outline: none;
  border-color: var(--admin-navy);
  box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.admin-form-control::placeholder {
  color: var(--admin-text-light);
}

.admin-form-control:disabled {
  background-color: var(--admin-surface-2);
  cursor: not-allowed;
}

textarea.admin-form-control {
  min-height: 120px;
  resize: vertical;
}

.admin-form-divider {
  height: 1px;
  background-color: var(--admin-border);
  margin: 24px 0;
}

.admin-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 24px 32px;
  border-top: 1px solid var(--admin-border);
  background-color: var(--admin-surface-2);
}

[dir="rtl"] .admin-form-footer {
  flex-direction: row-reverse;
}

/* Button Components */

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.admin-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.admin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-btn-primary {
  background-color: var(--admin-navy);
  color: white;
  box-shadow: 0 2px 8px rgba(11, 22, 40, 0.15);
}

.admin-btn-primary:hover:not(:disabled) {
  background-color: var(--admin-navy-light);
  box-shadow: 0 4px 12px rgba(11, 22, 40, 0.2);
  transform: translateY(-1px);
}

.admin-btn-secondary {
  background-color: white;
  color: var(--admin-text-primary);
  border: 1px solid var(--admin-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-btn-secondary:hover:not(:disabled) {
  background-color: var(--admin-surface-2);
  border-color: var(--admin-border-hover);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.admin-btn-danger {
  background-color: var(--admin-red);
  color: white;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.15);
}

.admin-btn-danger:hover:not(:disabled) {
  background-color: #c0392b;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
  transform: translateY(-1px);
}

.admin-btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Badge Components */

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.admin-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.admin-badge-success {
  background-color: rgba(39, 174, 96, 0.12);
  color: var(--admin-green);
}

.admin-badge-success::before {
  background-color: var(--admin-green);
}

.admin-badge-warning {
  background-color: rgba(243, 156, 18, 0.12);
  color: var(--admin-orange);
}

.admin-badge-warning::before {
  background-color: var(--admin-orange);
}

.admin-badge-danger {
  background-color: var(--admin-accent-soft);
  color: var(--admin-red);
}

.admin-badge-danger::before {
  background-color: var(--admin-red);
}

.admin-badge-info {
  background-color: rgba(52, 152, 219, 0.12);
  color: var(--admin-blue-bright);
}

.admin-badge-info::before {
  background-color: var(--admin-blue-bright);
}

.admin-badge-muted {
  background-color: rgba(127, 140, 141, 0.12);
  color: var(--admin-text-muted);
}

.admin-badge-muted::before {
  background-color: var(--admin-text-muted);
}

/* Utilities */

.admin-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

[dir="rtl"] .admin-action-buttons {
  flex-direction: row-reverse;
}

@media (max-width: 991.98px) {
  .admin-page-header,
  .admin-page-header-with-action {
    margin-bottom: 24px;
  }

  .admin-page-header h1,
  .admin-page-header-with-action h1 {
    font-size: 1.5rem;
  }

  .admin-card,
  .admin-stat-card,
  .admin-filter-card {
    padding: 20px;
  }

  .admin-form-main,
  .admin-form-sidebar {
    padding: 24px;
  }

  .admin-form-footer {
    padding: 20px 24px;
  }
}

@media (max-width: 767.98px) {
  .admin-page-header h1,
  .admin-page-header-with-action h1 {
    font-size: 1.35rem;
  }

  .admin-page-header p,
  .admin-page-header-with-action p {
    font-size: 0.9rem;
  }

  .admin-page-header-with-action {
    align-items: stretch;
    gap: 12px;
  }

  .admin-page-header-with-action .admin-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-breadcrumb {
    margin-bottom: 16px;
  }

  .admin-card,
  .admin-stat-card,
  .admin-filter-card {
    padding: 16px;
  }

  .admin-form-main,
  .admin-form-sidebar {
    padding: 16px;
  }

  .admin-form-footer {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 10px;
    padding: 16px;
  }

  .admin-form-footer .admin-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Animations */

@keyframes adminFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-animate {
  animation: adminFadeUp 0.35s ease both;
}

.admin-delay-1 {
  animation-delay: 0.05s;
}

.admin-delay-2 {
  animation-delay: 0.10s;
}

.admin-delay-3 {
  animation-delay: 0.15s;
}

.admin-delay-4 {
  animation-delay: 0.20s;
}
