:root {
  --font-family: 'Inter', system-ui, sans-serif;
  --font-family-display: 'Playfair Display', Georgia, serif;
  --primary-red: #cc171d;
  --dark-navy: #162336;
  --medium-teal: #325765;
  --light-teal: #4d818c;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --border-gray: #e9ecef;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
}

/* Global thin scrollbar styling */
html {
  background-color: var(--light-gray);
}

html,
body {
  scrollbar-width: thin;
  scrollbar-color: var(--medium-teal) transparent;
}

::-webkit-scrollbar {
  width: 3px;
  height: 6px;
  background: transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  background: transparent;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-track-piece,
::-webkit-scrollbar-button {
  background: transparent;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--medium-teal);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--light-teal);
}

body {
  font-family: var(--font-family);
  overflow-x: hidden;
  overflow-x: clip;
}

::selection {
  background-color: var(--light-teal);
  color: var(--white);
}

::-moz-selection {
  background-color: var(--light-teal);
  color: var(--white);
}

.login-display {
  font-family: var(--font-family-display);
}

/* Utility classes referencing palette */
.bg-dark-navy { background-color: var(--dark-navy); }
.bg-medium-teal { background-color: var(--medium-teal); }
.bg-light-teal { background-color: var(--light-teal); }
.bg-light-gray { background-color: var(--light-gray); }
.text-dark-navy { color: var(--dark-navy); }
.text-primary-red { color: var(--primary-red); }
.text-text-light { color: var(--text-light); }
.text-success { color: var(--success); }
.border-medium-teal { border-color: var(--medium-teal); }

/* Login page */
.login-bg {
  background:
    radial-gradient(circle at top left, rgba(77, 129, 140, 0.12), transparent 32%),
    radial-gradient(circle at bottom right, rgba(204, 23, 29, 0.08), transparent 24%),
    var(--light-gray);
}

.login-shell {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

.login-showcase {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(77, 129, 140, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 80%,
      rgba(204, 23, 29, 0.08),
      transparent 25%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f8f9fa 100%
    );
}

.login-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(50, 87, 101, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
  background-size: 18px 18px, 100% 100%;
  opacity: 0.8;
  pointer-events: none;
}

.login-showcase > * {
  position: relative;
  z-index: 1;
}

.login-animate-in {
  animation-duration: 0.72s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.login-animate-welcome-title {
  animation-name: login-slide-up;
}

.login-animate-welcome-text {
  animation-delay: 0.12s;
  animation-name: login-slide-up;
}

.login-animate-form {
  animation-delay: 0.22s;
  animation-name: login-slide-left;
}

.login-form-side {
  background: var(--white);
}

.login-quote {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.login-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.login-logo {
  background: rgba(77, 129, 140, 0.06);
  border: 1px solid rgba(77, 129, 140, 0.14);
  padding: 0.35rem;
}

.login-input {
  border: 1px solid rgba(77, 129, 140, 0.22);
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus {
  border-color: var(--light-teal);
  box-shadow: 0 0 0 4px rgba(77, 129, 140, 0.14);
}

.login-password-field {
  position: relative;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  transform: translateY(-50%);
  color: #7d939a;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.login-password-toggle:hover {
  color: var(--medium-teal);
}

.login-password-toggle:focus-visible {
  outline: 2px solid rgba(77, 129, 140, 0.28);
  outline-offset: 2px;
  border-radius: 9999px;
}

.login-password-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.login-submit {
  background: var(--light-teal);
  border-color: var(--light-teal);
  color: var(--white);
  box-shadow: 0 14px 32px rgba(77, 129, 140, 0.22);
}

.login-submit:hover {
  background: var(--medium-teal);
  border-color: var(--medium-teal);
}

.login-support-link {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.login-support-link:hover {
  color: var(--light-teal);
  opacity: 0.82;
}

@keyframes login-slide-up {
  from {
    opacity: 0;
    transform: translate3d(0, 1.25rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes login-slide-left {
  from {
    opacity: 0;
    transform: translate3d(1.5rem, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-animate-in {
    animation: none;
    opacity: 1;
    transform: none;
    will-change: auto;
  }
}

@media (max-width: 1023px) {
  .login-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .login-showcase {
    min-height: 40vh;
    padding-bottom: 4.5rem;
  }

  .login-form-side {
    position: relative;
    margin-top: -1.75rem;
    min-height: calc(60vh + 1.75rem);
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
  }
}

@media (min-width: 1024px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.45fr) minmax(25rem, 1fr);
  }

  .login-form-side {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
    min-height: 100vh;
  }
}

@media (min-width: 1238px) {
  .login-shell {
    grid-template-columns: 1.9fr 1fr;
  }
}

/* Sidebar */
:root {
  --app-header-height: 4.5rem;
  --app-z-header: 110;
  --app-z-modal: 120;
}

.app-top-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100vw;
  min-height: var(--app-header-height);
  z-index: var(--app-z-header);
  background:
    linear-gradient(115deg, rgba(204, 23, 29, 0.18) 0%, rgba(204, 23, 29, 0) 22%),
    linear-gradient(90deg, #111c2d 0%, #1b3448 48%, #274f5b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.app-page-content {
  max-width: 100%;
  min-width: 0;
  padding-top: calc(var(--app-header-height) + 1.75rem);
  padding-bottom: 1.5rem;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .app-page-content {
    padding-inline: 2rem;
  }
}

@media (min-width: 1024px) {
  .app-page-content {
    padding-inline: 2.5rem;
  }
}

.drawer-content {
  min-width: 0;
}

.app-sidebar-side {
  top: var(--app-header-height);
  height: calc(100vh - var(--app-header-height));
  overflow: hidden;
}

@supports (height: 100dvh) {
  .app-sidebar-side {
    height: calc(100dvh - var(--app-header-height));
  }
}

.app-sidebar-side .sidebar-nav {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .lg\:drawer-open > .drawer-toggle ~ .app-sidebar-side {
    position: fixed;
    top: var(--app-header-height);
    bottom: 0;
    left: 0;
    height: auto;
    overflow: hidden;
  }

  .lg\:drawer-open > .drawer-toggle ~ .drawer-content {
    margin-left: 16rem;
  }
}

.sidebar-nav {
  background:
    linear-gradient(155deg, rgba(204, 23, 29, 0.16) 0%, rgba(204, 23, 29, 0) 24%),
    linear-gradient(180deg, #111c2d 0%, #1c3649 54%, #274f5b 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
}

@property --sidebar-sb-thumb {
  syntax: '<color>';
  inherits: false;
  initial-value: transparent;
}

.sidebar-menu-scroll {
  --sidebar-sb-thumb: transparent;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-sb-thumb) transparent;
  transition: --sidebar-sb-thumb 0.35s ease;
}

.sidebar-menu-scroll.is-scrolling,
.sidebar-menu-scroll:hover,
.sidebar-menu-scroll:focus-visible {
  --sidebar-sb-thumb: rgba(255, 255, 255, 0.38);
}

.sidebar-menu-scroll:focus-visible {
  outline: 2px solid rgba(184, 224, 229, 0.72);
  outline-offset: -2px;
}

.sidebar-menu-scroll::-webkit-scrollbar {
  width: 3px;
}

.sidebar-menu-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu-scroll::-webkit-scrollbar-thumb {
  background-color: var(--sidebar-sb-thumb);
  border-radius: 999px;
}

.sidebar-menu {
  padding-top: 0.75rem;
}

.app-system-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
}

.app-system-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(9, 18, 31, 0.24);
}

.app-system-name {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.app-menu-button {
  color: rgba(255, 255, 255, 0.84);
}

.app-menu-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.app-header-actions {
  display: flex;
  align-items: center;
}

.app-top-navbar .app-notifications-menu > summary {
  color: rgba(255, 255, 255, 0.84);
}

.app-top-navbar .app-notifications-menu > summary:hover,
.app-top-navbar .app-notifications-menu[open] > summary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.app-top-navbar .app-notifications-menu > summary svg {
  color: currentColor !important;
}

.app-user-chip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  list-style: none;
  transition: transform 0.16s ease;
}

.app-user-chip-trigger::-webkit-details-marker {
  display: none;
}

.app-user-chip-trigger:hover,
.app-profile-menu[open] .app-user-chip-trigger {
  transform: translateY(-1px);
}

.app-profile-menu {
  position: relative;
}

.app-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: var(--medium-teal);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(22, 35, 54, 0.12);
}

.app-profile-dropdown {
  --profile-pad-x: 0.75rem;
  --profile-icon-col: 1.25rem;
  --profile-gap: 0.625rem;

  width: 15rem;
  margin-top: 0.5rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-gray);
  border-radius: 0.75rem;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(22, 35, 54, 0.08);
}

.app-profile-dropdown-header {
  display: grid;
  grid-template-columns: var(--profile-icon-col) minmax(0, 1fr);
  gap: var(--profile-gap);
  align-items: center;
  padding: 0.75rem var(--profile-pad-x);
  border-bottom: 1px solid var(--border-gray);
}

.app-profile-dropdown-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--profile-icon-col);
  height: var(--profile-icon-col);
  border-radius: 9999px;
  background: var(--medium-teal);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.app-profile-dropdown-meta {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.app-profile-dropdown-name {
  overflow: hidden;
  color: var(--dark-navy);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-profile-dropdown-detail {
  overflow: hidden;
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-profile-dropdown-body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.375rem;
}

.app-profile-dropdown-link {
  display: grid;
  grid-template-columns: var(--profile-icon-col) minmax(0, 1fr);
  gap: var(--profile-gap);
  align-items: center;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem calc(var(--profile-pad-x) - 0.375rem);
  border: 1px solid transparent;
  border-radius: 0.375rem;
  background: transparent;
  color: #506572;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.app-profile-dropdown-link[hidden] {
  display: none;
}

.sidebar-app-actions {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 1rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-app-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.sidebar-app-action svg { width: 1.25rem; height: 1.25rem; flex: none; }
.sidebar-app-action:hover, .sidebar-app-action:focus-visible, .sidebar-app-action[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}
.sidebar-app-action:focus-visible { outline: 2px solid #b8e0e5; outline-offset: 2px; }
.sidebar-app-action:disabled { opacity: 0.55; cursor: default; }
.sidebar-app-action[hidden], .sidebar-app-status[hidden] { display: none; }
.sidebar-app-status { padding: 0 0.75rem; color: #cde5e7; font-size: 0.75rem; line-height: 1.4; }

.install-help-dialog {
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: var(--dark-navy);
  box-shadow: 0 18px 55px rgba(9, 18, 31, 0.26);
}
.install-help-dialog::backdrop { background: rgba(9, 18, 31, 0.55); }
.install-help-dialog h2 { font-size: 1.125rem; font-weight: 700; }
.install-help-dialog p { margin-top: 0.75rem; line-height: 1.5; }
.install-help-dialog .install-help-note { color: var(--text-light); font-size: 0.875rem; }
.install-help-dialog form { display: flex; justify-content: flex-end; margin-top: 1.25rem; }
.install-help-dialog button { padding: 0.5rem 1rem; border-radius: 0.5rem; background: var(--medium-teal); color: #fff; font-weight: 600; }
.install-help-dialog button:focus-visible { outline: 2px solid var(--dark-navy); outline-offset: 2px; }

.app-profile-dropdown-link:hover,
.app-profile-dropdown-link:focus-visible {
  background: var(--light-gray);
  color: var(--dark-navy);
  outline: none;
}

.app-profile-dropdown-icon {
  width: var(--profile-icon-col);
  height: var(--profile-icon-col);
  color: #7d939a;
}

.app-profile-dropdown-link:hover .app-profile-dropdown-icon,
.app-profile-dropdown-link:focus-visible .app-profile-dropdown-icon {
  color: var(--medium-teal);
}

.app-profile-dropdown-link--logout:hover,
.app-profile-dropdown-link--logout:focus-visible {
  color: var(--primary-red);
}

.app-profile-dropdown-link--logout:hover .app-profile-dropdown-icon,
.app-profile-dropdown-link--logout:focus-visible .app-profile-dropdown-icon {
  color: var(--primary-red);
}

.app-profile-dropdown-body form {
  margin: 0;
}

.profile-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .profile-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    align-items: start;
  }
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  background: rgba(50, 87, 101, 0.12);
  color: var(--medium-teal);
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-details-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
}

.profile-details-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border-gray);
}

.profile-details-list li:first-child {
  border-top: 1px solid var(--border-gray);
}

.profile-details-list .detail-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
}

.profile-details-list .detail-label svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-light);
}

.profile-details-list .detail-value {
  color: var(--dark-navy);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: right;
}

/* Change Password Form Styles */
.profile-form-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-gray);
  margin-bottom: 1.5rem;
}

.profile-form-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark-navy);
  margin-bottom: 0.15rem;
}

.profile-form-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
}

.profile-field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.profile-input-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
}

.profile-input {
  width: 100%;
  min-height: 2.375rem;
  padding: 0.5rem 2.5rem 0.5rem 0.85rem;
  border: 1px solid var(--border-gray);
  border-radius: 0.5rem;
  background: var(--white);
  font-size: 0.875rem;
  color: var(--text-dark);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-input:focus {
  outline: none;
  border-color: var(--medium-teal);
  box-shadow: 0 0 0 3px rgba(50, 87, 101, 0.08);
}

.password-toggle-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s;
}

.password-toggle-btn:hover {
  color: var(--medium-teal);
}

.password-toggle-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.sidebar-nav .menu li > a,
.sidebar-nav .menu li > details > summary {
  position: relative;
  min-height: 2.5rem;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 0.375rem;
  font-weight: 500;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sidebar-nav .menu li > a svg,
.sidebar-nav .menu li > details > summary svg {
  color: rgba(255, 255, 255, 0.58);
}

.sidebar-nav .menu li > a:hover,
.sidebar-nav .menu li > details > summary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.sidebar-nav .menu li > a:hover svg,
.sidebar-nav .menu li > details > summary:hover svg {
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav .menu li > a.active,
.sidebar-nav .menu li > details > summary.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--white);
  font-weight: 700;
}

.sidebar-nav .menu li > a.active svg,
.sidebar-nav .menu li > details > summary.active svg {
  color: #b8e0e5;
}

.sidebar-nav .menu li > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.sidebar-nav .menu li > details > summary::-webkit-details-marker {
  display: none;
}

.sidebar-submenu-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.sidebar-submenu-chevron {
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.sidebar-submenu details.is-open .sidebar-submenu-chevron {
  transform: rotate(90deg);
}

/* Hide default browser marker and DaisyUI automatic chevron to ensure only one arrow shows */
.sidebar-submenu details > summary::-webkit-details-marker,
.sidebar-submenu details > summary::marker,
.sidebar-submenu details > summary::after {
  display: none !important;
  content: none !important;
}

.sidebar-submenu-list {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.25rem;
  padding-left: 1.15rem;
}

.sidebar-submenu-list li > a {
  min-height: 2rem;
  padding-inline: 0.75rem;
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .settings-tabs,
  .credit-tabs {
    display: none !important;
  }
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Panels & cards */
.panel {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--medium-teal);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Primary button override */
.btn-primary {
  background-color: var(--primary-red) !important;
  border-color: var(--primary-red) !important;
  color: var(--white) !important;
}

.btn-primary:hover {
  background-color: #a81217 !important;
  border-color: #a81217 !important;
}

/* Slightly taller buttons app-wide */
.btn {
  min-height: 3.125rem;
  height: 3.125rem;
}

.btn-sm {
  min-height: 2.375rem;
  height: 2.375rem;
}

.btn-xs {
  min-height: 1.875rem;
  height: 1.875rem;
}

.btn-square:where(.btn-sm) {
  width: 2.375rem;
}

.btn-square:where(.btn-xs) {
  width: 1.875rem;
}

/* Alert variants */
.alert {
  border-width: 1px;
  border-style: solid;
  border-radius: 0.75rem;
}

.alert-error {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.28);
  color: #b42318;
}

.alert-success {
  background: rgba(40, 167, 69, 0.08);
  border-color: rgba(40, 167, 69, 0.28);
  color: #1f7a36;
}

.alert-warning {
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.3);
  color: #9a6700;
}

.alert-info {
  background: rgba(77, 129, 140, 0.1);
  border-color: rgba(77, 129, 140, 0.28);
  color: var(--medium-teal);
}

/* Chart bars */
.chart-bar {
  min-height: 4px;
  transition: height 0.3s ease;
}

/* Tab panels */
.tab-panel.hidden {
  display: none;
}

/* Globals: Form input & select height adjustments */
.input:not([type="checkbox"]):not([type="radio"]) {
  height: 2.375rem !important;
  min-height: 2.375rem !important;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  font-size: 0.875rem !important;
}

.select {
  height: 2.375rem !important;
  min-height: 2.375rem !important;
  padding-left: 0.75rem !important;
  padding-right: 2.25rem !important; /* Extra padding for the chevron icon */
  font-size: 0.875rem !important;
}

/* Form focus ring matching palette */
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--light-teal);
  outline-color: var(--light-teal);
}

.credit-native-select,
.app-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Custom dropdown component */
.app-dropdown {
  position: relative;
  min-width: 9.5rem;
}

.app-dropdown.is-open {
  z-index: 70;
}

.app-dropdown-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.app-dropdown-details {
  position: relative;
}

.app-dropdown-details > summary {
  list-style: none;
}

.app-dropdown-details > summary::-webkit-details-marker {
  display: none;
}

.app-dropdown-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.375rem;
  min-height: 2.375rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.app-dropdown-trigger:hover {
  border-color: rgba(77, 129, 140, 0.45);
}

.app-dropdown-details[open] .app-dropdown-trigger,
.app-dropdown-trigger:focus-visible {
  outline: none;
  border-color: var(--light-teal);
  box-shadow: 0 0 0 3px rgba(77, 129, 140, 0.12);
}

.app-dropdown-details[open] .app-dropdown-trigger-chevron {
  transform: rotate(180deg);
}

.app-dropdown-trigger-icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--medium-teal);
  flex-shrink: 0;
}

.app-dropdown-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.app-dropdown-trigger-chevron {
  position: absolute;
  right: 0.65rem;
  width: 0.85rem;
  height: 0.85rem;
  color: var(--text-light);
  transition: transform 0.15s;
}

.app-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 0.625rem;
  box-shadow: 0 4px 16px rgba(22, 35, 54, 0.1);
}

.app-dropdown-search-wrap {
  padding: 0.25rem;
  border-bottom: 1px solid var(--border-gray);
  margin-bottom: 0.25rem;
}

.app-dropdown-search {
  width: 100%;
  height: 2rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border-gray);
  border-radius: 0.375rem;
  background: var(--light-gray);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.app-dropdown-search:focus {
  border-color: var(--light-teal);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(77, 129, 140, 0.1);
}

.app-dropdown-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  color: var(--text-dark);
  background: transparent;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.app-dropdown-option.hidden {
  display: none !important;
}

.app-dropdown-option:hover,
.app-dropdown-option:focus-visible {
  outline: none;
  background: rgba(77, 129, 140, 0.08);
  color: var(--medium-teal);
}

.app-dropdown-option.is-selected {
  background: rgba(77, 129, 140, 0.12);
  color: var(--medium-teal);
  font-weight: 600;
}

.app-dropdown-option.is-disabled,
.app-dropdown-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: var(--text-light);
  pointer-events: none;
}

.app-dropdown-option.is-disabled:hover,
.app-dropdown-option:disabled:hover {
  background: transparent;
  color: var(--text-light);
}

/* Users page */
.users-panel {
  padding: 0;
  overflow: visible;
}

.users-panel-header {
  position: relative;
  z-index: 20;
  padding: 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--border-gray);
}

.users-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .users-toolbar-layout {
    flex-direction: row;
    align-items: flex-end;
  }
}

.users-filters-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .users-filters-layout {
    flex-direction: row;
    align-items: flex-end;
  }
}

.users-filters {
  align-items: flex-end;
}

.users-search {
  position: relative;
}

.users-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--text-light);
  pointer-events: none;
}

.users-search-input {
  width: 100%;
  height: 2.375rem;
  padding: 0 0.85rem 0 2.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-gray);
  border-radius: 0.5rem;
  background: var(--light-gray);
  color: var(--text-dark);
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.users-search-input::placeholder {
  color: var(--text-light);
}

.users-search-input:focus {
  outline: none;
  border-color: var(--light-teal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(77, 129, 140, 0.12);
}

.users-filters {
  align-items: flex-end;
}

.users-clear-btn {
  align-self: flex-end;
  display: none;
  border: 1px solid rgba(123, 140, 157, 0.35);
  background: transparent;
}

.users-clear-btn.is-visible {
  display: inline-flex;
}

.users-clear-btn:hover,
.users-clear-btn:focus-visible {
  border-color: rgba(77, 129, 140, 0.55);
}

.users-table thead tr {
  background: var(--light-gray);
}

.users-table thead th {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-gray);
  padding: 0.85rem 1rem;
}

.users-table tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.users-table tbody tr[data-user-row]:hover {
  background: rgba(77, 129, 140, 0.04);
}

.users-table-footer {
  font-size: 0.8rem;
  color: var(--text-light);
  background: var(--light-gray);
  border-top: 1px solid var(--border-gray);
}

.users-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgba(50, 87, 101, 0.12);
  color: var(--medium-teal);
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.users-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.users-role-badge,
.users-status-badge {
  min-height: 1.5rem;
  height: 1.5rem;
  padding: 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 9999px;
  border-width: 1px;
}

.users-role-badge {
  text-transform: capitalize;
  border-color: transparent;
}

.users-status-badge {
  border-color: transparent;
}

.users-role-badge--admin {
  background: rgba(204, 23, 29, 0.1);
  color: var(--primary-red);
  border-color: rgba(204, 23, 29, 0.2);
}

.users-role-badge--biomed {
  background: rgba(77, 129, 140, 0.12);
  color: var(--medium-teal);
  border-color: rgba(77, 129, 140, 0.22);
}

.users-role-badge--account {
  background: rgba(255, 193, 7, 0.14);
  color: #9a6700;
  border-color: rgba(255, 193, 7, 0.35);
}

.users-role-badge--product-specialist {
  background: var(--light-gray);
  color: var(--text-light);
  border-color: var(--border-gray);
}

.users-status-badge--active {
  background: rgba(40, 167, 69, 0.1);
  color: #1f7a36;
  border-color: rgba(40, 167, 69, 0.22);
}

.users-status-badge--inactive {
  background: var(--light-gray);
  color: var(--text-light);
  border-color: var(--border-gray);
}

.users-actions-col {
  text-align: right;
}

.users-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.users-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5rem;
  color: var(--text-light);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.users-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.users-icon-btn:hover {
  color: var(--medium-teal);
  background: rgba(77, 129, 140, 0.08);
  border-color: rgba(77, 129, 140, 0.18);
}

.users-icon-btn--deactivate:hover {
  color: var(--danger);
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.18);
}

.users-icon-btn--activate:hover {
  color: var(--success);
  background: rgba(40, 167, 69, 0.08);
  border-color: rgba(40, 167, 69, 0.18);
}

.users-icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--white);
  background: var(--dark-navy);
  border-radius: 0.35rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
}

.users-icon-btn[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 0.15rem);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--dark-navy);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.users-icon-btn[data-tooltip]:hover::after,
.users-icon-btn[data-tooltip]:hover::before,
.users-icon-btn[data-tooltip]:focus-visible::after,
.users-icon-btn[data-tooltip]:focus-visible::before {
  opacity: 1;
}

.users-icon-btn[data-tooltip]:hover::after,
.users-icon-btn[data-tooltip]:focus-visible::after {
  transform: translateX(-50%) scale(1);
}

.users-form-page {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
}

.users-form-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .users-form-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.users-form-back {
  border: 1px solid rgba(123, 140, 157, 0.35);
}

.users-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.users-form .app-dropdown {
  width: 100%;
}

.users-form .app-dropdown-label {
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 0.5rem 0.25rem;
  margin-bottom: 0;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.users-form .app-dropdown-trigger {
  min-height: 2.375rem;
  height: 2.375rem;
  padding-left: 0.75rem;
}

.users-form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .users-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-form-span {
    grid-column: 1 / -1;
  }
}

.users-form-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-gray);
}

@media (min-width: 640px) {
  .users-form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

.users-form-action-btn {
  min-height: 2.75rem;
  height: 2.75rem;
}

.users-form-action-btn.btn-ghost {
  border: 1px solid rgba(123, 140, 157, 0.35);
  background: transparent;
}

.users-form-action-btn.btn-ghost:hover,
.users-form-action-btn.btn-ghost:focus-visible {
  border-color: rgba(77, 129, 140, 0.55);
}

/* Sidebar Profile Overrides */
.sidebar-profile {
  flex-shrink: 0;
  background: rgba(9, 18, 31, 0.2);
  border-top-color: rgba(255, 255, 255, 0.14) !important;
}

.sidebar-profile .app-user-chip-trigger {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0.5rem !important;
  border-radius: 0.5rem !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--white) !important;
  transition: background-color 0.16s ease, border-color 0.16s ease !important;
}

.sidebar-profile .app-user-chip-trigger .app-profile-dropdown-name {
  color: var(--white) !important;
}

.sidebar-profile .app-user-chip-trigger .app-profile-dropdown-detail,
.sidebar-profile .app-user-chip-trigger > svg {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar-profile .app-user-chip-trigger:hover {
  background-color: rgba(255, 255, 255, 0.14) !important;
  transform: none !important;
}

.sidebar-profile .app-profile-dropdown {
  width: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
  bottom: 100% !important;
  left: 0 !important;
  right: 0 !important;
  box-shadow: 0 -4px 20px rgba(22, 35, 54, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

.sidebar-profile details summary::-webkit-details-marker {
  display: none !important;
}
.sidebar-profile details summary {
  list-style: none !important;
}

/* Real-time Notifications Dropdown */
.app-notifications-menu summary::-webkit-details-marker {
  display: none !important;
}
.app-notifications-menu summary {
  list-style: none !important;
}

#notifications-list::-webkit-scrollbar {
  width: 6px;
}

#notifications-list::-webkit-scrollbar-track {
  background: transparent;
}

#notifications-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

#notifications-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Custom AppModal classes for animations and icons */
.app-modal-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}
.app-modal-icon-container.bg-warning-light {
  background-color: rgba(255, 193, 7, 0.12);
}
.app-modal-icon-container.bg-error-light {
  background-color: rgba(220, 53, 69, 0.12);
}
.app-modal-icon-container.bg-success-light {
  background-color: rgba(40, 167, 69, 0.12);
}
.app-modal-icon-container.bg-info-light {
  background-color: rgba(77, 129, 140, 0.12);
}

.app-modal {
  align-items: center !important;
  display: flex !important;
  inset: 0 !important;
  justify-content: center !important;
  opacity: 0 !important;
  overflow-y: auto !important;
  padding: 1rem !important;
  pointer-events: none !important;
  position: fixed !important;
  z-index: var(--app-z-modal) !important;
  visibility: hidden !important;
  transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

.app-modal.is-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.app-modal .modal-box {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-gray);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  text-align: center;
  width: 360px !important;
  max-width: 90% !important;
  transform: scale(0.9) !important;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  z-index: 1;
}

.app-modal .modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
  inset: 0;
  position: fixed;
  z-index: 0;
}

@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  .app-modal .modal-backdrop {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

.app-modal .modal-action:not(.credit-whatsapp-modal-actions) {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0;
  width: 100%;
}

.app-modal .modal-btn-cancel {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

.app-modal .modal-btn-cancel:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Modal action button overrides/colors */
.btn-modal-warning {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
}
.btn-modal-warning:hover {
  background-color: #d97706 !important;
  border-color: #d97706 !important;
}

.btn-modal-error {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  border-color: #ef4444 !important;
}
.btn-modal-error:hover {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
}

.btn-modal-success {
  background-color: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}
.btn-modal-success:hover {
  background-color: #059669 !important;
  border-color: #059669 !important;
}

.btn-modal-primary {
  background-color: var(--medium-teal) !important;
  color: #ffffff !important;
  border-color: var(--medium-teal) !important;
}
.btn-modal-primary:hover {
  background-color: var(--light-teal) !important;
  border-color: var(--light-teal) !important;
}

.app-modal.is-visible .modal-box {
  transform: scale(1) !important;
}

@media (prefers-reduced-motion: reduce) {
  .app-modal,
  .app-modal .modal-box {
    transition: none !important;
  }
}

/* Custom Table Horizontal Scrollbar Style */
.credit-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--medium-teal) transparent;
}

.credit-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  display: block;
}

.credit-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.credit-table-wrap::-webkit-scrollbar-thumb {
  background-color: var(--medium-teal);
  border-radius: 3px;
}

.credit-table-wrap::-webkit-scrollbar-thumb:hover {
  background-color: var(--light-teal);
}
