:root {
  --big-navy: #17234c;
  --big-navy-deep: #101936;
  --big-burgundy: #921012;
  --big-blue: #0e82b2;
  --big-blue-dark: #09698f;
  --big-ink: #1c2434;
  --big-muted: #687387;
  --big-border: #dce2ea;
  --big-surface: #ffffff;
  --big-canvas: #f4f6fa;
  --big-success: #16794b;
  --big-warning: #a65a00;
  --big-danger: #a8232a;
  --big-radius: 12px;
  --big-shadow: 0 8px 24px rgba(23, 35, 76, 0.08);
}

html {
  background: var(--big-canvas);
}

body {
  color: var(--big-ink);
  background: var(--big-canvas);
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 0.925rem;
}

a {
  color: var(--big-blue-dark);
}

a:hover,
a:focus {
  color: var(--big-navy);
}

.content-wrapper {
  background: var(--big-canvas);
}

.main-header {
  min-height: 64px;
  border-bottom: 1px solid var(--big-border);
  box-shadow: 0 3px 12px rgba(23, 35, 76, 0.04);
}

.main-header .nav-link {
  display: flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--big-navy) !important;
}

.main-header .nav-link:hover,
.main-header .nav-link:focus {
  background: #edf4f8;
}

.portal-context {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 0.5rem;
}

.portal-context strong {
  color: var(--big-navy);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-context span {
  color: var(--big-muted);
  font-size: 0.72rem;
}

.user-chip {
  gap: 0.65rem;
  width: auto !important;
  padding: 0.3rem 0.65rem !important;
}

.user-chip__avatar {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--big-navy);
}

.user-chip__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.user-chip__copy small {
  color: var(--big-muted);
}

.dropdown-menu {
  overflow: hidden;
  border: 1px solid var(--big-border);
  border-radius: 12px;
  box-shadow: var(--big-shadow);
}

.dropdown-item {
  padding: 0.7rem 1rem;
  color: var(--big-ink);
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--big-navy);
  background: #edf4f8;
}

.main-sidebar {
  background: linear-gradient(180deg, var(--big-navy-deep) 0%, var(--big-navy) 70%, #202e5d 100%);
  box-shadow: 6px 0 24px rgba(16, 25, 54, 0.14) !important;
}

.brand-link.portal-brand {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  white-space: normal;
}

.portal-brand .brand-image {
  float: none;
  width: 48px;
  max-height: 48px;
  margin: 0;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.portal-brand__text {
  display: flex;
  flex-direction: column;
  color: #fff;
  line-height: 1.15;
}

.portal-brand__text strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.portal-brand__text small {
  margin-top: 0.3rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar {
  padding: 1rem 0.75rem;
}

.form-control-sidebar,
.btn-sidebar {
  border-color: rgba(255, 255, 255, 0.13) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.form-control-sidebar::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.nav-sidebar > .nav-item {
  margin-bottom: 0.3rem;
}

.nav-sidebar .nav-link {
  min-height: 44px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.78);
}

.nav-sidebar .nav-link:hover,
.nav-sidebar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-sidebar .nav-link.active {
  color: #fff;
  background: var(--big-blue) !important;
  box-shadow: 0 6px 16px rgba(14, 130, 178, 0.28) !important;
}

.nav-treeview {
  padding: 0.35rem 0 0.25rem 0.45rem;
}

.nav-treeview > .nav-item > .nav-link {
  min-height: 38px;
  font-size: 0.84rem;
}

.page-heading {
  padding: 2rem 0 1.25rem;
}

.page-heading__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--big-burgundy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  color: var(--big-navy);
  font-size: clamp(1.65rem, 2.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.page-heading__description {
  max-width: 680px;
  margin: 0.55rem 0 0;
  color: var(--big-muted);
}

.breadcrumb {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: 0.8rem;
}

.breadcrumb-item.active {
  color: var(--big-muted);
}

.content {
  padding-bottom: 2rem;
}

.content .container-fluid > .row > .col-12 > form:first-child,
.surface-card,
.table-responsive {
  border: 1px solid var(--big-border);
  border-radius: var(--big-radius);
  background: var(--big-surface);
  box-shadow: var(--big-shadow);
}

.content .container-fluid > .row > .col-12 > form:first-child {
  padding: 1.25rem;
}

.content .container-fluid > .row > .col-12 > form#bulk_print {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.table-responsive {
  padding: 0.75rem;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  margin-bottom: 0.45rem;
  color: #39445a;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.form-control,
input[type="file"] {
  min-height: 42px;
  border: 1px solid #cbd3df;
  border-radius: 8px;
  color: var(--big-ink);
  background-color: #fff;
}

input[type="file"] {
  width: 100%;
  height: auto;
  padding: 0.45rem;
}

.form-control:hover {
  border-color: #aab7c8;
}

.form-control:focus,
input[type="file"]:focus,
.btn:focus,
a:focus-visible {
  border-color: var(--big-blue);
  box-shadow: 0 0 0 0.2rem rgba(14, 130, 178, 0.18);
  outline: 0;
}

.btn {
  min-height: 42px;
  padding: 0.58rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.btn-primary {
  border-color: var(--big-navy);
  background: var(--big-navy);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
  border-color: var(--big-blue-dark);
  background: var(--big-blue-dark);
}

.btn-secondary {
  border-color: #d6dce5;
  color: var(--big-navy);
  background: #eef1f5;
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: #c4ccd8;
  color: var(--big-navy);
  background: #e2e7ed;
}

.card,
.small-box {
  overflow: hidden;
  border: 1px solid var(--big-border);
  border-radius: var(--big-radius);
  box-shadow: var(--big-shadow);
}

.card-body {
  padding: 1.35rem;
}

.table {
  width: 100% !important;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead tr,
.table thead tr.bg-gradient-primary {
  color: #fff;
  background: var(--big-navy) !important;
}

.table thead th {
  padding: 0.8rem 0.75rem;
  border: 0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  white-space: nowrap;
  text-transform: uppercase;
}

.table tbody td {
  padding: 0.78rem 0.75rem;
  border-top: 1px solid #e7ebf0;
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: #f8fafc;
}

.table-hover tbody tr:hover {
  background: #edf5f8;
}

.dataTables_wrapper .dataTables_filter input {
  min-height: 38px;
  margin-left: 0.5rem;
  border: 1px solid #cbd3df;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 0 !important;
  border-radius: 7px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #fff !important;
  background: var(--big-navy) !important;
}

.dt-buttons .dt-button {
  border: 1px solid #d6dce5 !important;
  border-radius: 7px !important;
  color: var(--big-navy) !important;
  background: #eef1f5 !important;
  font-weight: 700;
}

.alert {
  border: 0;
  border-left: 4px solid currentColor;
  border-radius: 9px;
  box-shadow: 0 5px 16px rgba(23, 35, 76, 0.08);
}

.alert-success {
  color: var(--big-success);
  background: #eaf7f0;
}

.alert-danger {
  color: var(--big-danger);
  background: #fcecee;
}

.alert-warning {
  color: var(--big-warning);
  background: #fff5e6;
}

.alert-info {
  color: var(--big-blue-dark);
  background: #e9f5fa;
}

.badge-reference {
  padding: 0.42rem 0.6rem;
  border-radius: 999px;
  color: var(--big-navy);
  background: #e8eff7;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.record-meta {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: var(--big-muted);
  background: #f1f4f8;
  font-size: 0.8rem;
}

.text-danger,
.errorlist {
  color: var(--big-danger) !important;
}

.errorlist {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
}

input[type="checkbox"] {
  accent-color: var(--big-blue);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(120deg, var(--big-navy) 0%, #26386e 55%, var(--big-burgundy) 145%);
  box-shadow: 0 12px 30px rgba(23, 35, 76, 0.18);
}

.dashboard-hero::after {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border: 42px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.dashboard-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
}

.dashboard-hero p {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0.65rem 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.quick-link {
  display: flex;
  height: 100%;
  min-height: 150px;
  flex-direction: column;
  padding: 1.35rem;
  border: 1px solid var(--big-border);
  border-radius: var(--big-radius);
  color: var(--big-ink);
  background: #fff;
  box-shadow: var(--big-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quick-link:hover,
.quick-link:focus {
  color: var(--big-ink);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(23, 35, 76, 0.12);
}

.quick-link__icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 10px;
  color: #fff;
  background: var(--big-blue);
}

.quick-link h3 {
  margin: 0 0 0.4rem;
  color: var(--big-navy);
  font-size: 1rem;
  font-weight: 700;
}

.quick-link p {
  margin: 0;
  color: var(--big-muted);
  font-size: 0.82rem;
}

.main-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--big-border);
  color: var(--big-muted);
  background: #fff;
  font-size: 0.78rem;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(14, 130, 178, 0.2), transparent 32%),
    radial-gradient(circle at 88% 82%, rgba(146, 16, 18, 0.15), transparent 30%),
    linear-gradient(135deg, var(--big-navy-deep), var(--big-navy));
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
}

.auth-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 7vw, 6rem);
  color: #fff;
}

.auth-brand-panel img {
  width: 150px;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.auth-brand-panel h1 {
  max-width: 540px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.auth-brand-panel p {
  max-width: 500px;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Bitter", Georgia, serif;
  font-size: 1.05rem;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.96);
}

.auth-card {
  width: 100%;
  max-width: 430px;
}

.auth-card__logo {
  display: none;
  width: 96px;
  margin-bottom: 1.5rem;
}

.auth-card h2 {
  margin: 0;
  color: var(--big-navy);
  font-size: 1.8rem;
  font-weight: 700;
}

.auth-card__intro {
  margin: 0.6rem 0 1.6rem;
  color: var(--big-muted);
}

.auth-card .form-control-lg {
  min-height: 50px;
  font-size: 0.95rem;
}

.auth-card .btn-lg {
  min-height: 50px;
  font-size: 0.9rem;
}

.auth-link {
  color: var(--big-blue-dark) !important;
  font-weight: 700;
}

.auth-errors {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--big-danger);
  border-radius: 8px;
  color: var(--big-danger);
  background: #fcecee;
}

@media (max-width: 991.98px) {
  .page-heading {
    padding-top: 1.5rem;
  }

  .auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    width: 100%;
    max-width: 520px;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  }

  .auth-card__logo {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .portal-context,
  .user-chip__copy {
    display: none;
  }

  .page-heading .breadcrumb {
    margin-top: 0.75rem;
  }

  .content .container-fluid > .row > .col-12 > form:first-child {
    padding: 1rem;
  }

  .table-responsive {
    border-radius: 10px;
  }

  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_paginate {
    float: none;
    margin-top: 0.75rem;
    text-align: left;
  }

  .auth-layout {
    padding: 0;
  }

  .auth-form-panel {
    min-height: 100vh;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
