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;
  font-family: "Public Sans", "Microsoft JhengHei", sans-serif;
}

:root {
  --app-navbar-height: 4.75rem;
  --app-sidebar-width: 19.8rem;
}

.app-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 44, 90, 0.08), transparent 30%),
    linear-gradient(180deg, #fbf9f8 0%, #f4f1ef 100%);
}

.app-navbar {
  background: linear-gradient(90deg, #002c5a 0%, #08427f 100%);
}

.letter-spacing-brand {
  letter-spacing: 0.08em;
}

.app-search {
  max-width: 34rem;
}

.app-search .form-control {
  min-width: 0;
}

.app-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.app-icon-button {
  border: 0;
}

.app-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

.app-avatar-lg {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0.95rem;
}

.app-settings-modal .modal-content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.app-settings-modal-header {
  background: linear-gradient(135deg, #002c5a 0%, #0c5a9c 100%);
}

.app-settings-modal .form-control {
  border-radius: 0.85rem;
}

.app-settings-modal .form-control:focus {
  box-shadow: 0 0 0 0.15rem rgba(8, 66, 127, 0.12);
}

.app-user-summary {
  min-width: 0;
  max-width: 14rem;
}

.app-user-panel {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 44, 90, 0.06);
}

.app-page {
  padding-top: var(--app-navbar-height);
}

.app-sidebar {
  display: none;
  width: var(--app-sidebar-width);
  min-width: var(--app-sidebar-width);
  max-width: var(--app-sidebar-width);
  height: calc(100vh - var(--app-navbar-height));
  flex: 0 0 var(--app-sidebar-width);
  position: sticky;
  top: var(--app-navbar-height);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(195, 198, 210, 0.55);
}

.app-sidebar-toggle {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
}

@media (min-width: 992px) {
  .app-sidebar-expanded .app-sidebar {
    display: flex;
  }
}

.app-sidebar-mobile {
  width: 18rem;
}

.app-sidebar-mobile .app-user-panel {
  background: rgba(244, 241, 239, 0.6);
}

.auth-page {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 32%),
    radial-gradient(circle at bottom right, rgba(8, 66, 127, 0.08), transparent 34%),
    linear-gradient(135deg, #eef5fb 0%, #f7f9fc 52%, #edf3f8 100%);
}

.auth-card {
  width: min(100%, 56rem);
}

.login-validation-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  z-index: 1080;
  width: min(32rem, calc(100% - 2rem));
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 0.75rem 2rem rgba(91, 33, 37, 0.18);
}

.login-validation-toast ul {
  margin-bottom: 0;
}

.forgot-password-result {
  line-height: 1.65;
}

.forgot-password-result-item {
  padding: 0.65rem 0;
  border-top: 1px solid rgba(15, 81, 50, 0.18);
}

.forgot-password-result-item dt {
  margin-bottom: 0.15rem;
  color: #146c43;
  font-size: 0.8rem;
  font-weight: 600;
}

.forgot-password-result-item dd {
  margin-bottom: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.auth-panel-brand {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #002c5a 0%, #002c5a 100%);
}

.auth-panel {
  min-height: 100%;
}

.app-sidebar-nav .nav-link {
  color: #424750;
  border-radius: 0.75rem;
  padding: 0.8rem 0.95rem;
}

.app-sidebar-nav .nav-link:hover {
  background-color: rgba(0, 44, 90, 0.08);
  color: #002c5a;
}

.app-sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, #002c5a 0%, #08427f 100%);
  color: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 44, 90, 0.2);
}

.app-menu-group + .app-menu-group {
  margin-top: 1rem;
}

.app-menu-group-title {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.app-menu-children {
  margin-left: 1.05rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(0, 44, 90, 0.12);
}

.app-menu-group {
  padding: 0.35rem;
  border: 1px solid rgba(0, 44, 90, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0.35rem 1rem rgba(0, 44, 90, 0.04);
}

.app-menu-group.is-active {
  background: linear-gradient(180deg, rgba(242, 247, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(8, 66, 127, 0.18);
  box-shadow: 0 0.7rem 1.6rem rgba(0, 44, 90, 0.08);
}

.app-menu-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 0;
  border-radius: 0.85rem;
  background: transparent;
  color: #48505a;
  text-align: left;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.app-menu-group-toggle:hover {
  background: rgba(0, 44, 90, 0.06);
  color: #002c5a;
}

.app-menu-group-toggle.is-active {
  background: linear-gradient(90deg, rgba(0, 44, 90, 0.1) 0%, rgba(8, 66, 127, 0.05) 100%);
  color: #002c5a;
}

.app-menu-group-leading,
.app-menu-group-meta {
  min-width: 0;
}

.app-menu-parent-code,
.app-menu-child-code {
  color: #506070;
  background: #f5f7fa !important;
  border: 1px solid rgba(120, 136, 153, 0.18);
}

.app-menu-chevron {
  font-size: 1.1rem;
  transition: transform 160ms ease;
}

.app-menu-group-toggle[aria-expanded="true"] .app-menu-chevron {
  transform: rotate(180deg);
}

.app-sidebar-nav .nav-pills .nav-link {
  border-radius: 0.75rem;
}

.app-menu-child-link {
  min-height: 2.65rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  color: #46515d;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
}

.app-menu-child-link:hover {
  background: rgba(0, 44, 90, 0.06);
  border-color: rgba(0, 44, 90, 0.08);
}

.app-menu-child-label {
  flex: 1 1 auto;
  min-width: 0;
}

.app-sidebar-nav .nav-pills .nav-link .badge {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 3.8rem;
  text-align: center;
}

.app-menu-child-link.active {
  background: linear-gradient(90deg, #002c5a 0%, #08427f 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0.55rem 1.35rem rgba(0, 44, 90, 0.16);
}

.app-menu-child-link.active .app-menu-child-code {
  color: #fff;
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.18);
}

.app-sidebar-nav .nav-link.disabled {
  opacity: 0.72;
}

.app-content {
  flex: 1 1 auto;
  min-width: 0;
}

.bill-service-notice {
  padding: 0.9rem 1rem;
  color: #111827;
  background: #fffdf5;
  border: 1px solid #e2c979;
  border-left: 0.35rem solid #b78900;
  border-radius: 0.6rem;
  line-height: 1.65;
}

.profile-data-list {
  margin-left: 0;
  margin-right: 0;
  border-top: 1px solid #aeb6c2;
  border-left: 1px solid #aeb6c2;
}

.profile-data-list > dt,
.profile-data-list > dd {
  margin-bottom: 0;
  padding: 0.75rem 0.9rem;
  border-right: 1px solid #aeb6c2;
  border-bottom: 1px solid #aeb6c2;
}

.profile-data-list > dt {
  color: #243447;
  background: #eef2f6;
  font-weight: 700;
}

.profile-data-list > dd {
  color: #111827;
  background: #fff;
}

.vendor-detail-row > td {
  padding: 0.75rem;
  background: #f6f8fb;
  border-top: 2px solid #6783a0;
}

.vendor-detail-container .card {
  margin: 0;
  border-color: #aeb6c2 !important;
  background: #fff;
  box-shadow: 0 0.35rem 1rem rgba(0, 44, 90, 0.08);
}

.hero-panel {
  border-color: rgba(195, 198, 210, 0.65) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.quick-nav-card {
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  border-color: rgba(195, 198, 210, 0.55) !important;
}

.quick-nav-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: rgba(var(--bs-primary-rgb), 0.4) !important;
  background-color: #f8f9ff !important;
}

.quick-nav-group-card {
  border-color: rgba(195, 198, 210, 0.55) !important;
  transition: box-shadow 0.15s ease;
}

.quick-nav-group-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.quick-nav-item {
  transition: background-color 0.12s ease, color 0.12s ease;
}

.quick-nav-item:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.06);
}

.bg-light-subtle {
  background-color: rgba(244, 241, 239, 0.72) !important;
}

@media (max-width: 991.98px) {
  .app-page {
    padding-top: calc(var(--app-navbar-height) - 0.25rem);
  }

  .app-content {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .app-search {
    max-width: none;
  }

  .display-6 {
    font-size: 2rem;
  }

  .auth-card .display-6 {
    font-size: 1.75rem;
  }
}