.login-box {
  width: min(420px, calc(100vw - 2rem));
}

.cfsd-login-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 50%, rgba(212, 175, 55, .08) 0, transparent 34%),
    radial-gradient(circle at 86% 46%, rgba(212, 175, 55, .07) 0, transparent 32%),
    linear-gradient(135deg, #1a1a2e 0%, #16213e 48%, #0f3460 100%);
}

.cfsd-login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, .025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, .018) 25%, transparent 25%);
  background-size: 34px 34px;
  opacity: .35;
}

.cfsd-login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cfsd-login-card {
  width: min(100%, 450px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .32);
}

.cfsd-login-header {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.75rem;
  text-align: center;
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2940 100%);
}

.cfsd-login-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(212, 175, 55, .16), transparent 64%);
}

.cfsd-login-brand,
.cfsd-login-header h1,
.cfsd-login-header p {
  position: relative;
  z-index: 1;
}

.cfsd-login-brand {
  width: 5.75rem;
  height: 5.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 3px solid #d4af37;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #f0f0f0);
  box-shadow: 0 .55rem 1.5rem rgba(212, 175, 55, .28);
}

.cfsd-login-brand img {
  max-width: 4.55rem;
  max-height: 4.55rem;
  object-fit: contain;
}

.cfsd-login-header h1 {
  margin: 0 0 .25rem;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.cfsd-login-header p {
  margin: 0;
  color: #d4af37;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cfsd-login-body {
  padding: 2rem 1.85rem 1.65rem;
}

.cfsd-login-intro {
  margin-bottom: 1.25rem;
}

.cfsd-login-kicker {
  display: inline-flex;
  margin-bottom: .35rem;
  color: #d4af37;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.cfsd-login-intro h2 {
  margin: 0;
  color: #1a3a5c;
  font-size: 1.25rem;
  font-weight: 800;
}

.cfsd-login-intro p {
  margin: .25rem 0 0;
  color: #667085;
  font-size: .9rem;
}

.cfsd-login-field {
  margin-bottom: 1.25rem;
}

.cfsd-login-field .form-label {
  margin-bottom: .45rem;
  color: #1a3a5c;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.cfsd-login-input {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: .8rem;
  box-shadow: 0 .15rem .7rem rgba(0, 0, 0, .06);
  transition: box-shadow .2s ease, transform .2s ease;
}

.cfsd-login-input:focus-within {
  box-shadow: 0 0 0 .22rem rgba(26, 58, 92, .12), 0 .35rem 1rem rgba(26, 58, 92, .12);
  transform: translateY(-1px);
}

.cfsd-login-input-icon,
.cfsd-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.15rem;
  border: 2px solid #e0e0e0;
  background: #f8f9fa;
  color: #6c757d;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.cfsd-login-input-icon {
  border-right: 0;
}

.cfsd-password-toggle {
  border-left: 0;
  cursor: pointer;
}

.cfsd-password-toggle:hover {
  background: #eef1f4;
}

.cfsd-login-input .form-control {
  min-height: 3.15rem;
  border: 2px solid #e0e0e0;
  border-left: 0;
  border-radius: 0;
  background: #f8f9fa;
  color: #1f2937;
  font-size: .98rem;
  transition: border-color .2s ease, background .2s ease;
}

.cfsd-login-input .form-control:focus {
  border-color: #1a3a5c;
  background: #fff;
  box-shadow: none;
}

.cfsd-login-input:focus-within .cfsd-login-input-icon,
.cfsd-login-input:focus-within .cfsd-password-toggle {
  border-color: #1a3a5c;
  color: #1a3a5c;
  background: #fff;
}

.cfsd-login-button {
  position: relative;
  overflow: hidden;
  min-height: 3.2rem;
  margin-top: .25rem;
  border: 0;
  border-radius: .8rem;
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2940 100%);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease;
}

.cfsd-login-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .24), transparent);
  transition: left .5s ease;
}

.cfsd-login-button:hover,
.cfsd-login-button:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 .65rem 1.45rem rgba(26, 58, 92, .3);
}

.cfsd-login-button:hover::before,
.cfsd-login-button:focus::before {
  left: 100%;
}

.cfsd-login-footer {
  padding: 0 1.75rem 1.7rem;
  text-align: center;
  color: #6c757d;
  font-size: .84rem;
}

.cfsd-login-footer i {
  color: #d4af37;
}

.cfsd-login-footer small {
  display: block;
  margin-top: .25rem;
  color: #9aa3af;
}

@media (max-width: 575.98px) {
  .cfsd-login-shell {
    align-items: flex-start;
    padding: .75rem;
  }

  .cfsd-login-card {
    border-radius: 1rem;
  }

  .cfsd-login-header {
    padding: 1.45rem 1.15rem;
  }

  .cfsd-login-brand {
    width: 4.65rem;
    height: 4.65rem;
    margin-bottom: .8rem;
  }

  .cfsd-login-brand img {
    max-width: 3.7rem;
    max-height: 3.7rem;
  }

  .cfsd-login-header h1 {
    font-size: 1.22rem;
  }

  .cfsd-login-header p {
    font-size: .74rem;
  }

  .cfsd-login-body {
    padding: 1.35rem 1rem 1.2rem;
  }

  .cfsd-login-intro h2 {
    font-size: 1.1rem;
  }

  .cfsd-login-input .form-control,
  .cfsd-login-input-icon,
  .cfsd-password-toggle {
    min-height: 2.9rem;
  }

  .cfsd-login-footer {
    padding: 0 1rem 1.25rem;
  }
}

.app-compact {
  font-size: .875rem;
}

.layout-navbar-fixed .app-header {
  position: sticky;
  top: 0;
  z-index: 1035;
}

.app-compact .app-content .container-fluid {
  padding-top: .75rem !important;
  padding-bottom: .75rem !important;
}

.app-compact #theme-toggle {
  display: inline-flex;
  align-items: center;
}

.app-compact .sidebar-menu .nav-link {
  margin-bottom: .05rem;
}

.app-compact .sidebar-menu .sidebar-submenu {
  padding-left: 1rem;
}

.app-compact .sidebar-menu .sidebar-submenu .nav-link {
  padding-left: .75rem;
}

.app-compact .nav-header {
  font-size: .7rem;
  padding-top: .55rem;
  padding-bottom: .25rem;
}

.brand-link {
  text-decoration: none;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
[data-bs-theme="dark"] .select2-container--default .select2-selection {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--default .select2-selection__rendered {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .select2-dropdown {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .select2-search__field {
  color: var(--bs-body-color) !important;
  background-color: var(--bs-tertiary-bg) !important;
  border-color: var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .select2-results__option {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted,
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
[data-bs-theme="dark"] .select2-results__option--selected {
  color: #fff;
  background-color: var(--bs-primary);
}

.app-compact h1.h3 {
  font-size: 1.28rem;
}

.app-compact .row.g-3 {
  --bs-gutter-y: .75rem;
}

.app-compact .card {
  --bs-card-spacer-y: .65rem;
  --bs-card-spacer-x: .75rem;
  margin-bottom: .75rem;
}

.app-compact .card-header {
  padding: .55rem .75rem;
}

.app-compact .card-body {
  padding: .75rem;
}

.app-compact .small-box {
  min-height: 5.2rem;
}

.app-compact .small-box .inner {
  padding: .65rem .75rem;
}

.app-compact .small-box h3 {
  font-size: 1.45rem;
  margin-bottom: .15rem;
}

.app-compact .small-box p {
  font-size: .78rem;
  margin-bottom: 0;
}

.app-compact .small-box .small-box-icon {
  font-size: 2.7rem;
}

.table td,
.table th {
  white-space: nowrap;
}

.app-compact .table> :not(caption)>*>* {
  padding: .38rem .5rem;
}

.app-compact .btn-sm {
  --bs-btn-padding-y: .18rem;
  --bs-btn-padding-x: .45rem;
  --bs-btn-font-size: .78rem;
}

.app-compact .form-control,
.app-compact .form-select {
  font-size: .84rem;
}

.app-compact .form-control-sm,
.app-compact .form-select-sm {
  min-height: calc(1.45em + .45rem + 2px);
  padding-top: .18rem;
  padding-bottom: .18rem;
  font-size: .8rem;
}

.context-course-select {
  min-width: 9rem;
}

.context-platoon-select {
  min-width: 14rem;
}

.app-compact .form-label {
  margin-bottom: .2rem;
  font-size: .8rem;
}

.app-compact .modal-header,
.app-compact .modal-footer {
  padding: .55rem .75rem;
}

.app-compact .modal-body {
  padding: .75rem;
}

.app-compact .modal-title {
  font-size: 1rem;
}

.modal-dialog-scrollable .modal-content > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

.modal-dialog-scrollable .modal-content > form > .modal-body {
  overflow-y: auto;
  min-height: 0;
}

.modal-fullscreen .modal-content > form {
  height: 100%;
}

.app-compact .badge {
  font-size: .7rem;
  font-weight: 500;
}

.app-compact .dt-container {
  font-size: .82rem;
}

.app-compact .dt-container .dt-length,
.app-compact .dt-container .dt-search,
.app-compact .dt-container .dt-info,
.app-compact .dt-container .dt-paging {
  padding: .35rem .5rem;
}

.app-compact .dt-container .dt-input {
  min-height: calc(1.45em + .45rem + 2px);
  padding: .18rem .45rem;
  font-size: .8rem;
}

.app-compact .dt-container .pagination {
  --bs-pagination-padding-x: .45rem;
  --bs-pagination-padding-y: .18rem;
  --bs-pagination-font-size: .78rem;
  margin-bottom: 0;
}

.card-title {
  font-size: 1rem;
}

.attendance-presence,
.attendance-presence + label,
.form-check:has(.attendance-presence) {
  cursor: pointer;
}

.attendance-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.2rem;
  border-radius: .35rem;
  background: rgba(13, 110, 253, .14);
  color: var(--bs-body-color);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.audit-json-node {
  display: grid;
  gap: .35rem;
}

.audit-json-row {
  display: grid;
  grid-template-columns: minmax(9rem, 18rem) 1fr;
  gap: .5rem;
  padding: .35rem .5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .35rem;
  background: var(--bs-body-bg);
}

.audit-json-key {
  font-weight: 700;
  color: var(--bs-secondary-color);
  word-break: break-word;
}

.audit-json-value {
  min-width: 0;
  word-break: break-word;
}

.audit-json-value .audit-json-node {
  margin-top: .25rem;
}

.audit-value {
  white-space: pre-wrap;
}

.audit-json-raw {
  max-height: 32rem;
  overflow: auto;
  padding: .75rem;
  border-radius: .35rem;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}

@media (max-width: 767.98px) {
  .audit-json-row {
    grid-template-columns: 1fr;
  }
}
