:root {
  --app-bg-1: #eef6f4;
  --app-bg-2: #f6fafc;
  --app-bg-3: #f1f5f9;
  --app-text: #142033;
  --app-muted: #4a5e78;
  --app-primary: #0f766e;
  --app-primary-strong: #0b5a54;
  --app-primary-soft: #daf3ef;
  --app-accent: #164e7a;
  --app-border: #d8e5ee;
  --app-shadow: 0 12px 34px rgba(16, 43, 72, 0.08);
  --app-radius: 16px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(15, 118, 110, 0.11) 0%, rgba(15, 118, 110, 0) 38%),
    radial-gradient(circle at 88% 2%, rgba(22, 78, 122, 0.12) 0%, rgba(22, 78, 122, 0) 36%),
    linear-gradient(140deg, var(--app-bg-1) 0%, var(--app-bg-2) 45%, var(--app-bg-3) 100%);
  color: var(--app-text);
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
  letter-spacing: 0.1px;
}

.app-navbar {
  background: linear-gradient(96deg, #0f2f4a 0%, #135c7f 45%, #0f766e 100%) !important;
  box-shadow: 0 10px 28px rgba(7, 24, 41, 0.3);
  padding: 8px 0;
}

.app-navbar-wrap {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(8, 24, 38, 0.18);
  backdrop-filter: blur(5px);
  padding: 8px 10px;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.app-user-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.app-page-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.app-logout-btn {
  border-radius: 10px;
  border: 0;
  background: #ffffff;
  color: #11324f;
  font-weight: 600;
}

.app-logout-btn:hover,
.app-logout-btn:focus {
  background: #dff3ef;
  color: #0c4a45;
}

.app-alert {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(18, 40, 67, 0.08);
}

main.container-fluid {
  max-width: 1320px;
}

.card {
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  backdrop-filter: blur(1px);
  overflow: hidden;
}

.card .card-body h5 {
  font-weight: 700;
  font-size: 1.06rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d7e6eb;
  color: #18324d;
}

.card-stat {
  border: 0;
  background: linear-gradient(165deg, #ffffff 0%, #f7fbfb 100%);
  position: relative;
  overflow: hidden;
}

.card-stat::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.16) 0%, rgba(15, 118, 110, 0) 65%);
  top: -48px;
  right: -48px;
}

.card-stat h6 {
  color: var(--app-muted);
  font-weight: 600;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.card-stat h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 1;
}

.sidebar-links .list-group-item {
  border: 1px solid var(--app-border);
  color: #1f3556;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 7px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-links .list-group-item:hover {
  background: var(--app-primary-soft);
  border-color: #b9e7df;
  transform: translateX(2px);
}

.sidebar-links .list-group-item.active {
  background: linear-gradient(90deg, var(--app-accent), var(--app-primary));
  border-color: var(--app-primary);
  color: #fff;
}

.app-sidebar-shell {
  position: relative;
}

.app-sidebar-card {
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 10px 28px rgba(18, 48, 77, 0.08);
  padding: 10px;
  position: sticky;
  top: 92px;
}

.app-sidebar-title {
  font-size: 0.85rem;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #4a6078;
  margin: 2px 4px 10px;
  font-weight: 700;
}

.app-mobile-fab-menu {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1060;
}

.app-mobile-fab-menu > summary {
  list-style: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--app-accent), var(--app-primary));
  color: #fff;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(10, 36, 63, 0.26);
  cursor: pointer;
}

.app-mobile-fab-menu > summary::-webkit-details-marker {
  display: none;
}

.app-mobile-fab-panel {
  position: absolute;
  right: 0;
  bottom: 52px;
  width: min(82vw, 290px);
  max-height: 68vh;
  overflow-y: auto;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(14, 38, 61, 0.22);
  padding: 8px;
}

.app-mobile-fab-panel a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 10px;
  text-decoration: none;
  color: #1f3556;
  font-size: 0.88rem;
  font-weight: 600;
}

.app-mobile-fab-panel a:hover {
  background: var(--app-primary-soft);
}

.app-mobile-fab-panel a.active {
  background: linear-gradient(90deg, var(--app-accent), var(--app-primary));
  color: #fff;
}

.table {
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.66rem 0.62rem;
}

.table thead th {
  white-space: nowrap;
  font-size: 0.83rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #435a74;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: #f8fbfd;
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

.btn-primary {
  border-color: var(--app-primary);
  background: linear-gradient(90deg, var(--app-primary) 0%, #13867c 100%);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--app-primary-strong);
  background: linear-gradient(90deg, var(--app-primary-strong) 0%, var(--app-primary) 100%);
}

.btn-outline-primary {
  color: var(--app-primary);
  border-color: var(--app-primary);
}

.btn-outline-primary:hover {
  background: var(--app-primary);
  border-color: var(--app-primary);
}

.form-control,
.form-select {
  border: 1px solid var(--app-border);
  border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
  border-color: #85c9bf;
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.16);
}

.badge {
  text-transform: capitalize;
  font-weight: 600;
  border-radius: 8px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 12px !important;
}

.table-responsive {
  border-radius: 12px;
  border: 1px solid #e4edf4;
  background: #fff;
}

.alert-info {
  background: linear-gradient(90deg, #e2f7f2 0%, #e8f1fb 100%);
  color: #12486d;
  border-color: #bfe3dd;
}

.list-group {
  border-radius: 14px;
}

.form-label {
  font-weight: 600;
  color: #40556f;
  margin-bottom: 5px;
}

textarea.form-control {
  min-height: 72px;
}

@media (max-width: 991.98px) {
  main.container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-navbar-wrap {
    border-radius: 12px;
    padding: 7px 8px;
  }

  .card-stat h3 {
    font-size: 1.15rem;
  }

  .card .card-body h5 {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 0.95rem;
  }

  .table,
  .form-control,
  .form-select,
  .btn {
    font-size: 0.9rem;
  }

  .card-body {
    padding: 14px;
  }

  .card {
    border-radius: 13px;
  }

  .app-page-pill,
  .app-user-chip {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .app-mobile-fab-menu {
    display: none !important;
  }
}

body.auth-page {
  background:
    radial-gradient(circle at 10% 6%, rgba(24, 78, 144, 0.33) 0%, rgba(24, 78, 144, 0) 34%),
    radial-gradient(circle at 90% 12%, rgba(3, 125, 112, 0.27) 0%, rgba(3, 125, 112, 0) 36%),
    linear-gradient(148deg, #08162b 0%, #0d2f4b 42%, #0f766e 100%);
  color: #f5f8fb;
  position: relative;
}

body.auth-page::before,
body.auth-page::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(0.4px);
  z-index: 0;
  pointer-events: none;
}

body.auth-page::before {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(126, 198, 255, 0.35) 0%, rgba(126, 198, 255, 0.04) 72%);
  left: -80px;
  top: 70px;
}

body.auth-page::after {
  width: 290px;
  height: 290px;
  background: radial-gradient(circle, rgba(152, 245, 211, 0.28) 0%, rgba(152, 245, 211, 0.03) 76%);
  right: -95px;
  bottom: 60px;
}

body.auth-page main.container-fluid {
  max-width: 980px;
  position: relative;
  z-index: 1;
}

body.auth-page .app-alert {
  max-width: 560px;
  margin: 8px auto 16px;
  background: rgba(248, 252, 255, 0.9);
}

body.auth-page.auth-light {
  background:
    radial-gradient(circle at 10% 6%, rgba(130, 177, 240, 0.36) 0%, rgba(130, 177, 240, 0) 34%),
    radial-gradient(circle at 90% 12%, rgba(137, 217, 200, 0.3) 0%, rgba(137, 217, 200, 0) 36%),
    linear-gradient(148deg, #eaf4ff 0%, #e6f7f3 44%, #e9f7ff 100%);
  color: #102540;
}

body.auth-page.auth-light .auth-subtitle,
body.auth-page.auth-light .auth-hint,
body.auth-page.auth-light .auth-role-links a,
body.auth-page.auth-light .auth-help-link {
  color: #415c79;
}

body.auth-page.auth-light .auth-role-links a.active {
  color: #0f5f94;
}

body.auth-page.auth-light .auth-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(147, 175, 210, 0.5);
  box-shadow: 0 22px 48px rgba(20, 56, 92, 0.14);
}

body.auth-page.auth-light .auth-title,
body.auth-page.auth-light .auth-label {
  color: #163454;
}

body.auth-page.auth-light .auth-input-wrap {
  background: #f6fbff;
  border-color: #d8e7f7;
}

body.auth-page.auth-light .auth-input-wrap i {
  color: #43668a;
}

body.auth-page.auth-light .auth-input-wrap .form-control {
  color: #142d4a;
}

body.auth-page.auth-light .auth-input-wrap .form-control::placeholder {
  color: #8aa0bb;
}

body.auth-page.auth-light .auth-theme-toggle {
  color: #173657;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(158, 186, 214, 0.66);
}

.auth-shell {
  width: 100%;
  max-width: 470px;
  margin: 28px auto 12px;
}

.auth-theme-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.auth-theme-toggle {
  border: 1px solid rgba(209, 231, 250, 0.46);
  background: rgba(21, 45, 73, 0.55);
  color: #e8f4ff;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-theme-toggle:hover,
.auth-theme-toggle:focus {
  border-color: rgba(184, 240, 228, 0.9);
  background: rgba(18, 67, 98, 0.68);
}

.auth-card {
  border: 1px solid rgba(173, 211, 255, 0.26);
  background: rgba(8, 24, 42, 0.52);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 28px 58px rgba(8, 26, 45, 0.4);
  padding: 24px;
}

.auth-logo {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(160deg, #2f94ff, #22c8b5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(18, 93, 153, 0.32);
  margin-bottom: 12px;
}

.auth-logo i {
  font-size: 1.4rem;
  color: #fff;
}

.auth-title {
  font-size: 1.65rem;
  margin: 0;
  font-weight: 700;
  color: #eef6ff;
}

.auth-subtitle {
  margin: 7px 0 16px;
  color: #c8d9ed;
  font-size: 0.92rem;
}

.auth-role-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.auth-role-links a {
  color: #b8cee6;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px dashed transparent;
}

.auth-role-links a:hover,
.auth-role-links a.active {
  color: #d8f6ef;
  border-bottom-color: currentColor;
}

.auth-form .mb-3 {
  margin-bottom: 12px !important;
}

.auth-label {
  font-size: 0.82rem;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: #d4e4f5;
  font-weight: 600;
}

.auth-input-wrap {
  border: 1px solid rgba(178, 212, 242, 0.38);
  border-radius: 12px;
  background: rgba(14, 40, 68, 0.7);
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.auth-input-wrap:focus-within {
  border-color: rgba(122, 225, 203, 0.98);
  box-shadow: 0 0 0 0.24rem rgba(111, 211, 192, 0.2);
}

.auth-input-wrap i {
  color: #9fc1df;
  font-size: 1rem;
}

.auth-input-wrap .form-control {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 11px 0;
  color: #f2f7ff;
  box-shadow: none;
}

.auth-input-wrap .form-control::placeholder {
  color: #7fa0bf;
}

.auth-submit {
  margin-top: 6px;
  width: 100%;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-help-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.81rem;
}

.auth-help-link {
  color: #c9dff3;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}

.auth-help-link:hover {
  border-bottom-color: currentColor;
  color: #ffffff;
}

.auth-hint {
  margin-top: 15px;
  font-size: 0.8rem;
  color: #bdd3e9;
}

@media (max-width: 575.98px) {
  .auth-shell {
    margin-top: 8px;
  }

  .auth-card {
    border-radius: 16px;
    padding: 16px 14px;
  }

  .auth-title {
    font-size: 1.35rem;
  }

  .auth-subtitle {
    margin-bottom: 13px;
    font-size: 0.86rem;
  }

  .auth-logo {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    margin-bottom: 10px;
  }

  .auth-role-links {
    gap: 6px 9px;
    margin-bottom: 11px;
  }

  .auth-help-row {
    margin-top: 11px;
    font-size: 0.79rem;
  }
}
