:root {
  --light: white;
  --panel: white;
  --dark: black;
  --primary: black;
  --secondary-light: #d7d2cb;
  --secondary-dark: #979699;
  --secondary-brown: #887861;
  --accent: #c89328;
  --secondary-gray: #8F9092;
  --secondary-red: #AB262A;
  --secondary-green: #132D28;

  --shade: rgba(125, 125, 125, 0.5);
  --shadow: rgba(200, 200, 200, 0.5);
  --sidebarwidth: 200px;
  --sidebarwidth-collapsed: 76px;
  --topbarheight: 100px;

  /* Elevation scale: layered shadows (tight + soft) instead of one flat blur, for real depth. */
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, 0.06), 0 1px 1px rgba(20, 20, 20, 0.08);
  --shadow-md: 0 2px 6px rgba(20, 20, 20, 0.08), 0 10px 24px rgba(20, 20, 20, 0.08);
  --shadow-lg: 0 4px 10px rgba(20, 20, 20, 0.10), 0 18px 44px rgba(20, 20, 20, 0.13);
  --shadow-gold: 0 2px 12px rgba(200, 147, 40, 0.28);

  /* Radius scale, replacing ad hoc per-component values. */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Status pill/badge tokens (light theme default). */
  --status-success-bg: #e8f8f5;
  --status-success-fg: #1abc9c;
  --status-error-bg: #fdecea;
  --status-error-fg: #e74c3c;
  --status-warn-bg: #fff8e1;
  --status-warn-fg: #f39c12;

  --zebra-bg: rgba(215, 210, 203, 0.18);

  /* Opaque equivalents of --zebra-bg / row-hover, for sticky cells that must fully occlude
     scrolled content behind them (a translucent background would let it bleed through). */
  --zebra-bg-solid: #f8f7f6;
  --row-hover-bg-solid: #f9f4e9;
}

.darkmode {
  /* Was pure black — read as harsh/"super black" against the gold accent. Near-black instead,
     with panels one step lighter than the page background for real depth (see --panel below). */
  --light: #141414;
  --panel: #1e1e1e;
  --dark: #ededed;
  /* Neutral/structural tokens get dark-safe values too — --accent and the semantic
     secondary-red/green/brown/gray brand colors below are intentionally untouched. */
  --secondary-light: #3a3a3a;
  --secondary-dark: #b8b8b8;
  --shade: rgba(0, 0, 0, 0.6);
  --shadow: rgba(0, 0, 0, 0.65);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.55), 0 10px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.6), 0 18px 44px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 2px 14px rgba(200, 147, 40, 0.35);

  --status-success-bg: rgba(26, 188, 156, 0.16);
  --status-success-fg: #4fd8bd;
  --status-error-bg: rgba(231, 76, 60, 0.18);
  --status-error-fg: #ff8478;
  --status-warn-bg: rgba(243, 156, 18, 0.18);
  --status-warn-fg: #ffbb54;

  --zebra-bg: rgba(255, 255, 255, 0.045);

  --zebra-bg-solid: #282828;
  --row-hover-bg-solid: #2f2a1f;
}

@font-face {
  font-family: "Montserrat-Reg";
  src: url("../fonts/Montserrat/Montserrat-Regular.ttf");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat-Bold";
  src: url("../fonts/Montserrat/Montserrat-Bold.ttf");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat-Light";
  src: url("../fonts/Montserrat/Montserrat-Light.ttf");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat-SemiBold";
  src: url("../fonts/Montserrat/Montserrat-SemiBold.ttf");
  font-display: swap;
}
* {
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--light);
  font-family: "Montserrat-Reg";
}

.req {
  color: red;
  font-weight: 1000;
}

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast-enter {
  animation: toast-slide-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.add-btn {
  width: 20%;
  font-size: clamp(0.5rem, 2vw, 0.8rem);
  margin: 10px;
  padding: 5px;
  background-color: var(--accent);
  text-align: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--light);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.register {
  background-color: var(--accent);
  text-align: center;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--light);
  width: 35%;
  border: 1px solid var(--accent);
  margin-bottom: 5px;
  padding: 5px 15px 5px 5px;
  height: 25px;
  font-size: 0.6vw;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.register i {
  margin-right: 10px;
}

.btn-success {
  color: #fff !important;
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  display: block !important;
  width: 100% !important;
  margin-bottom: 5px !important;
  border-radius: var(--radius-md) !important;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-info {
  color: #000000 !important;
  background-color: #D7D2CB !important;
  border-color: #D7D2CB !important;
  display: block !important;
  width: 100% !important;
  margin-bottom: 5px !important;
  border-radius: var(--radius-md) !important;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

/* On-brand hover: darken the button's own gold rather than swap to an unrelated navy. */
.add-btn:hover {
  background: #a97e22;
  box-shadow: var(--shadow-gold);
}

.btn-success:hover {
  background: black !important;
  box-shadow: var(--shadow-md);
  border-color: black !important;
}

.btn-info:hover {
  background: black !important;
  box-shadow: var(--shadow-md);
  border-color: black !important;
  color: white !important;
}

.register:hover {
  background: #a97e22;
  box-shadow: var(--shadow-gold);
}

.add-btn:active,
.register:active,
.btn-success:active,
.btn-info:active {
  transform: scale(0.97);
}

.add-btn:disabled,
.register:disabled,
.btn-success:disabled,
.btn-info:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.add-btn:focus-visible,
.register:focus-visible,
.btn-success:focus-visible,
.btn-info:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tbl-actions,
.tbl-edit,
.tbl-delete,
.tbl-view,
.tbl-sendemail,
.admin-tbl-edit,
.admin-tbl-delete,
.admin-tbl-sendemail,
.corp-tbl-edit,
.corp-tbl-delete,
.corp-tbl-sendemail {
  display: flex;
  gap: 5px;
  margin: 0 5px;
  justify-content: center;
  padding: 5px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tbl-actions:hover,
.tbl-edit:hover,
.tbl-delete:hover,
.tbl-view:hover,
.tbl-sendemail:hover,
.admin-tbl-edit:hover,
.admin-tbl-delete:hover,
.corp-tbl-edit:hover,
.corp-tbl-delete:hover,
.corp-tbl-sendemail:hover {
  background-color: var(--accent);
  color: white;
}

/* Sliding sun/moon pill switch, replaces the old single icon-swap button. */
.theme-switch {
  position: relative;
  width: 52px;
  height: 26px;
  margin: auto 0;
  padding: 0 5px;
  border: none;
  background-color: var(--secondary-dark);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, box-shadow 0.15s ease;
}

.theme-switch:hover { box-shadow: var(--shadow-gold); }
.theme-switch:active .theme-switch-thumb { width: 22px; }

.theme-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-switch-icon {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  z-index: 1;
  transition: color 0.2s ease;
}

.theme-switch:not(.is-dark) .theme-switch-icon.sun { color: var(--accent); }
.theme-switch.is-dark .theme-switch-icon.moon { color: var(--accent); }

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, width 0.1s ease;
}

.theme-switch.is-dark .theme-switch-thumb {
  transform: translateX(26px);
}

.btn-hamburger {
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font: inherit;
  font-size: 18px;
  color: var(--dark);
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-right: 8px;
}

.btn-hamburger:hover {
  color: var(--accent);
}

.btn-hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
he.sidebar-collapsed {
  --sidebarwidth: var(--sidebarwidth-collapsed);
}

/* .sidebar establishes its own stacking context (position:fixed + z-index), so the flyout's
   own z-index below can only ever compete with siblings *inside* .sidebar — it can't out-rank
   .topbar (z-index:3) that way. Raise .sidebar itself above the topbar, but only while
   collapsed (i.e. only when the flyout can appear), to avoid changing the normal stacking. */
.sidebar-collapsed .sidebar {
  z-index: 4;
}

.sidebar {
  width: var(--sidebarwidth);
  height: 100vh;
  background-color: var(--light);
  box-shadow: var(--shadow-lg);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
}

.sidebar-toggle {
  position: absolute;
  top: 12px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(200, 147, 40, 0.1);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.15s ease, transform 0.25s ease, color 0.15s ease;
  z-index: 1;
}

.sidebar-toggle:hover {
  background: var(--accent);
  color: #fff;
}

.sidebar-collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

@media (max-width: 1100px) {
  .sidebar-toggle {
    display: none;
  }
}

.sidebar .img-container {
  width: 70%;
  margin: 10px auto;
  transition: width 0.25s ease;
}

/* Collapsed rail: the logo file is a wide banner (mark + wordmark baked into one image, no
   separate icon-only asset exists) — crop to just the circular gold mark on the left instead
   of shrinking the whole banner (which would squash the wordmark illegibly small). */
.sidebar-collapsed .sidebar .img-container {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
}

.sidebar-collapsed .sidebar .img-container .logo {
  width: auto;
  height: 100%;
  max-width: none;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: left center;
     object-position: left center;
}

.sidebar .sidenav {
  flex: 1;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.sidebar .sidenav ul {
  list-style: none;
  width: 100%;
}

.sidebar .sidenav ul li {
  height: 44px;
  font-size: clamp(0.5rem, 1.6vw, 0.85rem);
  display: flex;
  width: 100%;
}

.sidebar .sidenav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-left: 10px;
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--dark);
}

.sidebar .sidenav ul li a:hover,
.sidebar .sidenav ul li a.active {
  color: var(--accent);
  fill: var(--accent);
  background-color: rgba(200, 147, 40, 0.1);
  border-left-color: var(--accent);
}

.sidebar .sidenav ul li a .nav-icon {
  width: 24px;
  height: 24px;
  margin: auto;
  fill: var(--dark);
  display: flex;
  align-items: center;
}

.sidebar .sidenav ul li a.active .nav-icon,
.sidebar .sidenav ul li a:hover .nav-icon {
  fill: var(--accent);
}

.sidebar .sidenav ul li a span {
  flex: 1;
  text-align: left;
}

/* Specificity must beat ".sidebar .sidenav ul li { height: 44px }" above (2 classes + 2 types)
   or that rule wins and li.maintenance never actually grows to fit the expanded submenu — it
   did, silently, until this got verified: the collapsed-rail flyout never depended on this li
   growing (it escapes flow via position:fixed), so the bug had no visible symptom until now. */
.sidebar .sidenav ul li.maintenance {
  height: auto;
  flex-direction: column;
  align-items: stretch;
}

.sidenav li.maintenance > a {
  height: 44px;
  flex: 0 0 44px;
  padding-right: 12px;
}

.sidenav ul.sub-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  /* .sub-nav is a flex item inside li.maintenance (display:flex; flex-direction:column).
     Flex items get an automatic min-height of 0 once overflow isn't visible, which lets
     flex-shrink collapse this to 0 regardless of max-height — pin it so max-height is what
     actually governs the size. */
  flex-shrink: 0;
}

.sidenav ul.sub-nav li {
  height: 32px;
  font-size: 0.78rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.sidenav ul.sub-nav li > a {
  width: 100%;
  padding-left: 56px;
}

/* Accordion: expansion is purely click-driven (.open, toggled from SideBar.razor's
   ToggleMaintenance) — no :hover auto-expand here, that would fight the deliberate click
   control. Collapsed icon-rail mode restores hover as a flyout further down, where it doesn't
   conflict with anything since there's no inline accordion to fight in that mode. */
.sidenav li.maintenance.open .sub-nav {
  max-height: 320px;
}

.maintenance-chevron {
  margin-left: auto;
  font-size: 0.7em;
  transition: transform 0.25s ease;
}

.sidenav li.maintenance.open .maintenance-chevron {
  transform: rotate(180deg);
}

/* Desktop icon-rail: hide labels, center icons. */
.sidebar-collapsed .sidebar .sidenav ul li a span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}

.sidebar-collapsed .sidebar .sidenav ul li a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* No inline accordion when collapsed (the submenu becomes a flyout instead, below) — the
   chevron only makes sense next to the "Maintenance" label, which is hidden in this mode too. */
.sidebar-collapsed .maintenance-chevron {
  display: none;
}

/* Collapsed rail: hovering the icon reveals the flyout. This doesn't fight anything the way
   hover-to-expand did in the normal accordion, since there's no inline expansion happening here. */
.sidebar-collapsed .sidenav li.maintenance:hover .sub-nav {
  max-height: 320px;
}

/* Collapsed Maintenance submenu becomes a flyout panel. position:fixed (not absolute/relative)
   so it escapes .sidenav's overflow-y:auto, which would otherwise clip anything extending past
   the rail's own (now much narrower) width. */
.sidebar-collapsed .sidenav li.maintenance .sub-nav {
  position: fixed;
  left: calc(var(--sidebarwidth) + 8px);
  top: 60px;
  width: 210px;
  background: var(--light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

.sidebar-collapsed .sidenav li.maintenance .sub-nav li {
  justify-content: flex-start;
  padding: 0 12px;
}

.sidebar-version {
  flex-shrink: 0;
  padding: 10px 0 14px;
  text-align: center;
  font-size: 0.7rem;
  color: var(--dark);
  opacity: 0.45;
}

.sidebar-collapsed .sidebar .sidebar-version {
  opacity: 0;
  height: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: var(--shade);
  z-index: 19;
}

@media (max-width: 1100px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease-in-out;
    z-index: 20;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }
}
.topbar {
  width: calc(100% - var(--sidebarwidth));
  height: var(--topbarheight);
  background-color: var(--light);
  border-bottom: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 0;
}

.topbar .page-title {
  height: 100%;
  flex: 1 1 auto;
  min-width: 0;
  margin: auto 0;
  display: flex;
  justify-content: flex-start;
  padding-left: 16px;
}

.topbar .page-title > h1 {
  margin: auto 0;
  color: var(--accent);
  font-family: "Montserrat-SemiBold";
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar .user-panel {
  height: 100%;
  flex: 0 0 auto;
  margin: auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-panel .theme-toggle {
  height: 100%;
  margin: auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.user-panel .avatar {
  height: 100%;
  margin: auto 0;
  display: flex;
  justify-content: center;
}

.btn-hamburger {
  display: none;
}

@media (max-width: 1100px) {
  .topbar {
    width: 100%;
    padding-left: 12px;
  }

  .btn-hamburger {
    display: inline-flex;
  }
}

.user {
  margin: auto 0;
  display: flex;
  justify-content: center;
}

.user .profile {
  width: 50px;
  height: 50px;
  overflow: hidden;
  margin: auto 0;
  border-radius: 50%;
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--accent);
  background-color: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user .profile img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.user .info {
  margin: auto 10px;
}

.info .name {
  font-size: clamp(0.3rem, 2vw, 1rem);
  color: var(--dark);
}

.info .role {
  font-size: clamp(0.3rem, 2vw, 0.7rem);
  color: var(--accent);
}
.hero {
  background-image: url("https://www.alfardanoysterprivilegeclub.com/build/assets/black-cover-pattern-f558a9d0.jpg");
  width: 100%;
  height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: end;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1rem, 3vw, 2rem);
  margin: 20px auto;
  color: var(--accent);
  font-family: "Montserrat-Bold";
}

.form-container {
  position: relative;
  right: 0;
  top: 0;
  height: 100vh;
  width: 600px;
  display: flex;
  flex-direction: column;
  z-index: 2;
  margin: auto;
}

.login-logo-conctainer {
  margin: 200px auto 0 auto;
}

.form-container .form {
  width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  z-index: 4;
}

.form a {
  color: var(--accent);
  align-self: flex-end;
  margin: 10px 0;
  cursor: pointer;
  text-decoration: none;
}

.form-container .form input[type="text"],
.form-container .form input[type="password"] {
  height: 40px;
  font-size: 1rem;
  padding: 0 10px;
  border: 0;
  box-shadow: inset 1px 1px 3px 1px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.btn-save {
  width: -moz-fit-content;
  width: fit-content;
  padding: 10px 20px;
  font-size: 1.2rem;
  border: 0;
  background-color: var(--accent);
  color: var(--light);
  align-self: flex-end;
  border-radius: 10px;
  cursor: pointer;
}

.btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

form .pass-cont {
  font-family: "Montserrat-Reg";
  background-color: white;
  display: flex;
  box-shadow: inset 1px 2px 2px 1px rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  overflow: hidden;
}

form .pass-cont > .cl-pass {
  height: 30px;
  background-color: transparent;
  border: none;
  padding: 5px 10px;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  width: 90%;
}

form .pass-cont > .view-pass {
  display: flex;
  justify-content: center;
  width: 10%;
  align-items: center;
  padding: 5px 10px;
  box-shadow: 1px 2px 2px 1px rgba(0, 0, 0, 0.595);
  background-color: #d7d2cb;
  cursor: pointer;
}

.otp-hint {
  color: white;
}

#caps-warning {
  color: var(--secondary-red);
  font-weight: 800;
}
main {
  width: calc(100% - var(--sidebarwidth));
  margin-left: var(--sidebarwidth);
  margin-top: var(--topbarheight);
  min-height: calc(100vh - var(--topbarheight));
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
}
/* ============================================================
   Dashboard layout — ported from the legacy AOPC dashboard.css
   ============================================================ */
.main-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Corporate Dashboard: modern Users Count --- */
.corp-count-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.corp-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.corp-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius, 14px);
  background: var(--panel, #fff);
  border: 1px solid var(--secondary-light);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.corp-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.corp-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}
.corp-stat-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: var(--accent);
}
.corp-stat-body { display: flex; flex-direction: column; line-height: 1.15; }
.corp-stat-value { font-size: 28px; font-weight: 800; color: var(--primary, #111); }
.corp-stat-label { font-size: 13px; color: var(--secondary-gray); margin-top: 2px; }
.corp-stat--registered::before { background: #2f855a; }
.corp-stat--registered .corp-stat-icon { background: #2f855a; }
.corp-stat--unregistered::before { background: #c53030; }
.corp-stat--unregistered .corp-stat-icon { background: #c53030; }
.corp-stat--vip::before { background: #d69e2e; }
.corp-stat--vip .corp-stat-icon { background: #d69e2e; }
.corp-stat--remaining::before { background: var(--secondary-brown); }
.corp-stat--remaining .corp-stat-icon { background: var(--secondary-brown); }
.corp-count-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: var(--radius, 14px);
  background: var(--panel, #fff);
  border: 1px solid var(--secondary-light);
}
@media (max-width: 976px) {
  .corp-count-layout { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .corp-stat-grid { grid-template-columns: 1fr; }
  .corp-stat-value { font-size: 24px; }
}

/* --- Universal date-filter bar --- */
.dash-filter-bar {
  padding: 15px;
  box-shadow: var(--shadow-md);
  background: var(--light);
  border-radius: var(--radius-lg);
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.select-date-btn {
  background-color: var(--accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.select-date-btn:hover { background-color: #a97e22; box-shadow: var(--shadow-gold); }
.select-date-btn:active { transform: scale(0.97); }
.select-date-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.option-filters {
  background-color: var(--accent);
  color: white;
  padding: 5px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.option-filters:hover { background-color: #a97e22; }
.option-filters:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.option-filters option { color: black; background: white; }

.btn-view-more {
  background-color: var(--dark);
  color: var(--light);
  margin: 10px 0 0 auto;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  width: -moz-fit-content;
  width: fit-content;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-view-more:hover { background-color: var(--accent); box-shadow: var(--shadow-gold); }
.btn-view-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.clear-filter {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  align-self: center;
  text-decoration: underline;
}

/* --- Row group 1: Total User graph + counters --- */
.row-group1 {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-class {
  flex: 1 1 55%;
  min-width: 400px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 15px;
  background-color: var(--light);
  transition: box-shadow 0.2s ease;
}
.chart-class h4 { color: var(--accent); margin-bottom: 10px; }
.chart-class .chart-holder { position: relative; height: 350px; }

.inner-group {
  flex: 1 1 35%;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.new-users, .supports {
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 15px;
  background-color: var(--light);
  transition: box-shadow 0.2s ease;
}
.new-users .controls, .supports .controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.new-users .controls h4, .supports .controls h4 { color: var(--accent); }
.new-users .controls .filters { display: flex; gap: 8px; align-items: center; }

.user-counter {
  margin: 15px auto;
  width: 90%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
}
.user-counter .count, .support-counter .count {
  font-size: 55px;
  font-family: "Montserrat-Bold";
  color: var(--accent);
  text-align: center;
}
.total-user-container { color: var(--dark); text-align: center; }
.nur-note { font-size: 13px; color: var(--dark); }
#percent-registered { color: var(--accent); font-weight: bold; }
.support-counter { display: flex; justify-content: center; padding: 10px 0; }

/* --- Row group 2: Top-3 carousel --- */
.carousel-holder { position: relative; }
.carousel {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-track {
  display: flex;
  gap: 10px;
}
.dash-card {
  scroll-snap-align: start;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 15px;
  background-color: var(--light);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
  position: relative;
}

/* Scoped to the carousel context — .dash-card is reused as a plain stat tile elsewhere
   (e.g. CorporateDashboard.razor's .dashboard-cards), which isn't a flex/scroll row and
   must not get carousel-only sizing. */
.carousel-track .dash-card {
  flex: 0 0 calc((100% - 2 * 10px) / 3);
  max-width: calc((100% - 2 * 10px) / 3);
}

/* Relative wrapper so a section's Spinner overlay clips to its table area. */
.grid-holder { position: relative; }
.dash-card h4 { color: var(--dark); font-weight: 700; }
.dash-card .card-body {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 220px;
}
.dash-card .chart-holder { position: relative; width: 45%; height: 100%; }
.dash-card .legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 55%;
  min-width: 0;
}
.dash-card .legend .data { display: flex; align-items: center; gap: 8px; }
.dash-card .legend .data-label { height: 12px; width: 12px; border-radius: 2px; flex-shrink: 0; }
.dash-card .legend .data-name {
  font-size: clamp(0.55rem, 1.5vw, 0.75rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--dark);
}
.dash-card .legend .data-value { font-size: clamp(0.55rem, 1.5vw, 0.75rem); margin-left: auto; }
.dash-card .card-controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.donut-empty { color: var(--secondary-dark); font-size: 0.85rem; padding: 20px 0; }

/* ============================================================
   Spinner / loading indicator (Spinner.razor)
   ============================================================ */
@keyframes aopc-spin { to { transform: rotate(360deg); } }

.aopc-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.aopc-spinner-ring {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 3px solid var(--secondary-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: aopc-spin 0.7s linear infinite;
  flex-shrink: 0;
}
.aopc-spinner-ring.sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.aopc-spinner-label { color: var(--secondary-dark); font-size: 0.85rem; }

/* Overlay variant: dims and covers a position:relative section while it loads. */
.aopc-spinner-overlay {
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: color-mix(in srgb, var(--light) 72%, transparent);
  border-radius: inherit;
  z-index: 5;
}

/* Anchor-based export triggers (.btn-view-more) can't use the disabled attribute. */
.btn-view-more.disabled { pointer-events: none; opacity: 0.6; }

.carousel-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
/* Only surface the arrows while the carousel is actually being interacted with — hovered, or
   focused via keyboard (:focus-within so tabbing onto either button reveals both, since the
   other one would otherwise stay invisible while still reachable by Tab). */
.carousel-holder:hover .carousel-btn,
.carousel-holder:focus-within .carousel-btn {
  opacity: 1;
  pointer-events: auto;
}
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
.carousel-btn:hover { background-color: #a97e22; box-shadow: var(--shadow-gold); transform: translateY(-50%) scale(1.06); }
.carousel-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Row groups 3 & 4: tables --- */
.row-group3, .row-group4 { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.cta-table, .news-feed, .ci-table {
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 20px;
  background-color: var(--light);
  transition: box-shadow 0.2s ease;
}
.cta-table { flex: 6 1 55%; min-width: 400px; }
.news-feed { flex: 4 1 30%; min-width: 300px; }
.ci-table { flex: 1 1 100%; }
.cta-table .controls, .news-feed .controls, .ci-table .controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cta-table .controls h4, .news-feed .controls h4, .ci-table .controls h4 { color: var(--accent); }
.cta-table .filters, .news-feed .filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   DataGrid
   ============================================================ */
.datagrid { display: flex; flex-direction: column; width: 100%; }
.datagrid-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.datagrid-search { display: flex; align-items: center; gap: 8px; background: var(--light); border-radius: var(--radius-pill); box-shadow: inset 1px 1px 4px 1px var(--shadow); padding: 6px 14px; transition: box-shadow 0.15s ease; }
.datagrid-search:focus-within { box-shadow: inset 1px 1px 4px 1px var(--shadow), 0 0 0 2px var(--accent); }
.datagrid-search input { border: none; background: transparent; outline: none; color: var(--dark); width: 220px; }
.datagrid-search i { color: var(--secondary-dark); }
/* Fixed (not just minimum) height regardless of how many rows the current page actually has
   (e.g. a 2-row last page), so paging never shrinks/grows the table, and the pagination bar
   right after it (a sibling, not nested in here) always lands at the same spot. Default is a
   flat 60% of viewport height; short pages leave blank space below their rows instead of
   shrinking the container, and a page whose rows overflow that scrolls internally instead of
   growing the card and pushing pagination down. */
.datagrid-scroll { overflow: auto; width: 100%; border-radius: var(--radius-md); height: 60vh; }

/* Opt-out (DataGrid.razor's FixedRowHeight="true") for pages whose grids are meant to size to
   their own row count rather than stretch to 60vh — sized from --dg-rows (set to PageSize) at
   --dg-row-height per row (default ~40px for a plain text cell; DataGrid.razor's RowHeight
   parameter raises this for taller cells, e.g. a 44px TableThumb image column) plus a ~46px
   header row. */
.datagrid-scroll.fixed-rows { height: calc(var(--dg-rows, 10) * var(--dg-row-height, 40px) + 46px); }

/* Explicit per-grid viewport-height override (DataGrid.razor's HeightVh) — e.g. Business
   Locations/Types/Hotels and Membership Privilege's Privileges/Membership Tiers grids, which
   need their own fixed proportion of the viewport rather than the page-wide default above. */
.datagrid-scroll.vh-custom { height: calc(var(--dg-vh, 60) * 1vh); }
.datagrid-table { width: 100%; border-collapse: collapse; text-align: left; }
.datagrid-table thead tr { border-bottom: 2px solid var(--accent); }
.datagrid-table th { font-size: 14px; padding: 10px 12px; color: var(--dark); white-space: nowrap; }
.datagrid-table td { border-bottom: 1px solid var(--secondary-light); padding: 10px 12px; font-size: 13px; color: var(--dark); }
.datagrid-table tbody tr { transition: background-color 0.15s ease; box-shadow: inset 0 0 0 0 var(--accent); }
.datagrid-table tbody tr:nth-child(even) { background-color: var(--zebra-bg); }
.datagrid-table tbody tr:hover { background-color: rgba(200,147,40,0.10); box-shadow: inset 3px 0 0 0 var(--accent); }
.datagrid-empty { text-align: center; color: var(--secondary-dark); padding: 20px; }
.datagrid-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.datagrid-pagination .page-btn {
  border: 1px solid var(--secondary-light);
  background: var(--light);
  color: var(--dark);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.datagrid-pagination .page-btn:hover:not(:disabled) { background: var(--accent); color: white; border-color: var(--accent); }
.datagrid-pagination .page-btn:disabled { opacity: 0.4; cursor: default; }
.datagrid-pagination .page-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.datagrid-pagination .page-info { font-size: 13px; color: var(--dark); }
/* Numbered page buttons (Pagination.razor). .page-num is a .page-btn, so it inherits the base
   look above; .active marks the current page and stays legible even though page-btn:disabled
   would otherwise fade it (the current page's button is disabled to block re-clicking itself). */
.datagrid-pagination .page-num.active { background: var(--accent); color: white; border-color: var(--accent); opacity: 1; font-weight: 700; }
.datagrid-pagination .page-ellipsis { color: var(--secondary-dark); font-size: 13px; padding: 0 2px; -webkit-user-select: none; -moz-user-select: none; user-select: none; }

/* ============================================================
   Modal — canonical chrome, shared by Modal.razor and DateRangeModal.razor
   ============================================================ */
@keyframes aopc-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes aopc-modal-pop-in {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.aopc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: aopc-modal-fade-in 0.15s ease;
}
.aopc-modal {
  background: var(--light);
  color: var(--dark);
  border-radius: var(--radius-lg);
  width: 600px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: aopc-modal-pop-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.aopc-modal.wide { width: 900px; }
.aopc-modal.confirm { width: 420px; }
.aopc-modal.confirm .aopc-modal-body p { color: var(--dark); font-size: 14px; line-height: 1.5; }
.aopc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--secondary-light);
}
.aopc-modal-header h4 { color: var(--accent); font-family: "Montserrat-SemiBold"; }
.aopc-modal-close {
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--secondary-light);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.aopc-modal-close:hover { background: var(--secondary-red); color: white; border-color: var(--secondary-red); }
.aopc-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.aopc-modal-body { padding: 20px; overflow-y: auto; }
.aopc-modal-footer { padding: 14px 20px; border-top: 1px solid var(--secondary-light); display: flex; justify-content: flex-end; gap: 10px; }

/* --- Date range modal content (DateRangeModal.razor now reuses .aopc-modal chrome above) --- */
.date-controller-holder { display: flex; width: 100%; gap: 15px; }
.date-filter-contorl { display: flex; flex-direction: column; gap: 4px; width: 50%; }
.date-filter-contorl input {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: inset 1px 1px 3px 1px var(--shadow);
  background: var(--light);
  color: var(--dark);
  font-size: 14px;
}
.date-filter-contorl label { font-weight: 600; color: var(--dark); font-size: 13px; }

/* --- Export filter (checkbox) popover --- */
.export-filter-form { display: flex; flex-direction: column; gap: 4px; }
.export-filter-form .form-check { display: flex; justify-content: space-between; padding: 8px 4px; }

/* ============================================================
   Responsive breakpoints (tablet/mobile)
   ============================================================ */
@media (max-width: 976px) {
  .carousel-track .dash-card { flex: 0 0 calc((100% - 10px) / 2); max-width: calc((100% - 10px) / 2); }
}

@media (max-width: 768px) {
  .chart-class { min-height: 300px; }
  .chart-class .chart-holder { height: 260px; }

  .carousel-track .dash-card { flex: 0 0 100%; max-width: 100%; }
  .dash-card .card-body {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }
  .dash-card .chart-holder { width: 100%; height: 180px; }
  .dash-card .legend { width: 100%; }

  .carousel-btn { width: 32px; height: 32px; font-size: 16px; }
  .carousel-btn.prev { left: 0; }
  .carousel-btn.next { right: 0; }
}
/* Shared maintenance (Module 3) page shell */
.page-panel {
  width: 100%;
  background-color: var(--panel, var(--light));
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s ease;
}
.page-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}
.page-panel-header h3 {
  color: var(--accent);
  font-family: "Montserrat-SemiBold";
  font-size: 20px;
}

/* Wraps the action buttons in a page-panel-header (History / Import / Template / Add New) so they
   lay out as a deliberate row instead of relying on native <button> inline-block default flow. */
.page-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-panel-actions .action-divider {
  width: 1px;
  align-self: stretch;
  min-height: 20px;
  background: var(--secondary-light);
  margin: 0 2px;
}

.excel-import-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-add {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn-add:hover { background-color: #a97e22; box-shadow: var(--shadow-gold); }
.btn-add:active { transform: scale(0.97); }
.btn-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tbl-action {
  cursor: pointer;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  margin: 0 2px;
  color: var(--dark);
  display: inline-flex;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tbl-action:hover { background-color: var(--accent); color: white; }
.tbl-action.delete:hover { background-color: var(--secondary-red); color: white; }
/* Faded-but-clickable — used where clicking still gives an explanatory message (e.g. "why can't I delete this"), not a true disabled state. */
.tbl-action.disabled-look { opacity: 0.4; }
.tbl-action.disabled-look:hover { background-color: transparent; color: var(--dark); opacity: 0.6; }

/* Form layout inside modal */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid-tight { margin-bottom: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; color: var(--dark); font-weight: 600; }
.form-field label .req { color: var(--secondary-red); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  box-shadow: inset 1px 1px 3px 1px var(--shadow);
  background-color: var(--light);
  color: var(--dark);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 70px; }

/* Narrow numeric-entry column inside a datagrid table (e.g. privilege-matrix User/VIP counts). */
.col-narrow { width: 80px; }

.btn-save-modal {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn-save-modal:hover { background-color: #a97e22; box-shadow: var(--shadow-gold); }
.btn-save-modal:active { transform: scale(0.97); }
.btn-save-modal:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-save-modal:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-save-modal-spaced { margin-top: 0.5rem; }

/* Destructive-action variant (ConfirmDialog's Delete button) — reuses the existing brand red. */
.btn-save-modal.danger { background-color: var(--secondary-red); }
.btn-save-modal.danger:hover { background-color: #8a1f22; box-shadow: 0 2px 12px rgba(171, 38, 42, 0.32); }

.btn-cancel-modal {
  background: transparent;
  color: var(--dark);
  border: none;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s ease;
}
.btn-cancel-modal:hover { color: var(--accent); }
.btn-cancel-modal:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Status pill */
.status-pill { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; }
.status-pill.active { background: var(--status-success-bg); color: var(--status-success-fg); border: 1px solid var(--status-success-fg); }
.status-pill.inactive { background: var(--status-error-bg); color: var(--status-error-fg); border: 1px solid var(--status-error-fg); }

/* Tabs (registration) */
.tab-bar { display: flex; gap: 6px; margin-bottom: 15px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--secondary-light);
  color: var(--dark);
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tab-btn.active { background: var(--accent); color: white; }
.tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Audit timeline */
/* Fixed height, same rationale as .datagrid-scroll in dashboard.css: a short last page (fewer
   than the full 15-item page) shouldn't shrink this and shift the pagination bar below it. */
.audit-timeline { display: flex; flex-direction: column; gap: 14px; height: 60vh; overflow-y: auto; }
/* Opt-out for AuditHistoryModal.razor — a single entity's history sits inside a modal, not a
   full page, and shouldn't be forced to reserve 60% of the viewport for a handful of records. */
.audit-timeline.auto-height { height: auto; overflow-y: visible; }
.audit-item { display: flex; gap: 12px; }
.audit-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.audit-dot.insert { background: var(--status-success-fg); }
.audit-dot.update { background: var(--status-warn-fg); }
.audit-dot.delete { background: var(--status-error-fg); }
.audit-dot.default { background: var(--secondary-dark); }
.audit-card-item {
  flex: 1;
  border: 1px solid var(--secondary-light);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease;
}
.audit-card-item:hover { box-shadow: var(--shadow-md); }
.audit-card-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.audit-badge { padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.audit-badge.insert { background: var(--status-success-bg); color: var(--status-success-fg); }
.audit-badge.update { background: var(--status-warn-bg); color: var(--status-warn-fg); }
.audit-badge.delete { background: var(--status-error-bg); color: var(--status-error-fg); }
.audit-badge.default { background: var(--secondary-light); color: var(--dark); }
.audit-meta { font-size: 12px; color: var(--secondary-dark); }

/* Audit diff table (old vs new value comparison inside a history record) */
.audit-diff-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.audit-diff-table th { text-align: left; padding: 5px 8px; color: var(--secondary-dark); font-weight: 600; border-bottom: 1px solid var(--secondary-light); }
.audit-diff-table td { padding: 5px 8px; border-bottom: 1px solid var(--secondary-light); color: var(--dark); word-break: break-word; }
.audit-diff-table tr.changed td:nth-child(2) { color: var(--status-error-fg); text-decoration: line-through; }
.audit-diff-table tr.changed td:nth-child(3) { color: var(--status-success-fg); font-weight: 600; }

/* Sticky Actions column — pins the last column of a datagrid table so row actions stay reachable
   without horizontal scrolling. Applied via a `sticky-actions` class on `.datagrid-scroll`. */
.sticky-actions table th:last-child,
.sticky-actions table td:last-child {
  position: sticky;
  right: 0;
  background: var(--panel, var(--light));
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}
/* Zebra/hover states use flattened, fully opaque colors (not the translucent --zebra-bg/gold-tint
   used on regular rows) — a sticky cell sits on top of scrolled content, so a translucent
   background lets that content bleed through as the row is scrolled underneath it. */
.sticky-actions table tbody tr:nth-child(even) td:last-child { background: var(--zebra-bg-solid); }
.sticky-actions table tbody tr:hover td:last-child { background: var(--row-hover-bg-solid); }

/* Thumbnail + title in a single datagrid cell (e.g. Offering/Business grids), instead of a
   separate leading "Image" column. */
.cell-with-thumb { display: flex; align-items: center; gap: 8px; }

/* Image upload field (Add/Edit modals) */
.image-upload-field { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.image-upload-thumb { position: relative; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--secondary-light); }
.image-upload-thumb img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }
.image-upload-remove {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.6); color: white; cursor: pointer; font-size: 13px; line-height: 1;
}
.image-upload-remove:hover { background: var(--secondary-red); }
.image-upload-dropzone {
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--secondary-light); border-radius: var(--radius-sm); cursor: pointer; font-size: 12px;
  color: var(--secondary-dark); transition: border-color 0.15s ease, color 0.15s ease; position: relative;
}
.image-upload-dropzone:hover { border-color: var(--accent); color: var(--accent); }
.image-upload-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* Global item b: themed tooltip used by Tip.razor. CSS-driven (no JS) via the data-tip attribute. */
.aopc-tip {
  position: relative;
  display: inline-flex;
}
.aopc-tip::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 30;
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  background: #262626;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  box-shadow: var(--shadow-md);
}
.aopc-tip:hover::after,
.aopc-tip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.aopc-tip-top::after { bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 2px); }
.aopc-tip-top:hover::after, .aopc-tip-top:focus-visible::after { transform: translate(-50%, 0); }
.aopc-tip-bottom::after { top: calc(100% + 6px); left: 50%; transform: translate(-50%, -2px); }
.aopc-tip-bottom:hover::after, .aopc-tip-bottom:focus-visible::after { transform: translate(-50%, 0); }
.aopc-tip-left::after { right: calc(100% + 6px); top: 50%; transform: translate(2px, -50%); }
.aopc-tip-left:hover::after, .aopc-tip-left:focus-visible::after { transform: translate(0, -50%); }
.aopc-tip-right::after { left: calc(100% + 6px); top: 50%; transform: translate(-2px, -50%); }
.aopc-tip-right:hover::after, .aopc-tip-right:focus-visible::after { transform: translate(0, -50%); }

/* Global item i: DataGrid record-count badge + sortable column headers. */
.datagrid-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(200, 147, 40, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.datagrid-table th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  white-space: nowrap;
}
.datagrid-table th.sortable i { margin-left: 6px; opacity: 0.6; font-size: 11px; }
.datagrid-table th.sortable:hover { color: var(--accent); }
.datagrid-table th.sortable:hover i { opacity: 1; }

/* Global item j: skeleton loading rows/bars (shimmer). */
.skeleton-bar {
  display: block;
  height: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--secondary-light) 25%, rgba(200, 200, 200, 0.35) 50%, var(--secondary-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.datagrid-skeleton-row td { padding: 10px 12px; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* SkeletonLoader shared component variants (card / stat / lines) — reuse the .skeleton-bar shimmer. */
.skeleton-card {
  width: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--secondary-light) 25%, rgba(200, 200, 200, 0.35) 50%, var(--secondary-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.skeleton-stat-card {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--secondary-light);
}
.skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Sidebar pending-count badge (Support Logs — live via SignalR). */
.sidebar-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--secondary-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
/* Collapsed icon-rail: labels (and this badge's sibling <span>) are hidden, so pin the badge as a
   small dot on the icon itself instead of letting it disappear with the label. */
.sidebar-collapsed .sidebar .sidenav ul li a { position: relative; }
.sidebar-collapsed .sidebar-badge {
  position: absolute;
  top: 4px;
  right: 14px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
}

/* Profile-style image upload (ProfileImageUpload.razor): large rounded avatar with a pencil
   "edit" button pinned bottom-right, plus an optional multi-image gallery strip. */
.profile-upload { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-bottom: 10px; }
.profile-upload-main { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.profile-upload-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: visible;
  cursor: pointer;
  display: block;
}
.profile-upload-avatar img,
.profile-upload-placeholder,
.profile-upload-spinner {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-light);
  color: var(--secondary-dark);
  font-size: 26px;
  border: 2px solid var(--secondary-light);
}
.profile-upload-avatar.is-busy { pointer-events: none; opacity: 0.7; }
.profile-upload-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--panel, var(--light));
}
.profile-upload-avatar input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.profile-upload-label { font-size: 12px; color: var(--secondary-dark); font-weight: 600; }

.profile-upload-gallery { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.profile-upload-gallery-title { font-size: 12px; color: var(--secondary-dark); font-weight: 600; }
.profile-upload-gallery-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-upload-gallery-thumb { position: relative; width: 60px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--secondary-light); }
.profile-upload-gallery-thumb img { width: 100%; height: 100%; -o-object-fit: cover; object-fit: cover; display: block; }
.profile-upload-gallery-remove {
  position: absolute; top: 1px; right: 1px; width: 18px; height: 18px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 1;
}
.profile-upload-gallery-remove:hover { background: var(--secondary-red); }
.profile-upload-gallery-add {
  width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--secondary-light); border-radius: var(--radius-sm); cursor: pointer;
  color: var(--secondary-dark); position: relative; transition: border-color 0.15s ease, color 0.15s ease;
}
.profile-upload-gallery-add:hover { border-color: var(--accent); color: var(--accent); }
.profile-upload-gallery-add.is-busy { pointer-events: none; opacity: 0.7; }
.profile-upload-gallery-add input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Drag-and-drop import modal (ImportModal.razor). */
.import-modal { display: flex; flex-direction: column; gap: 14px; }
.import-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 20px;
  border: 2px dashed var(--secondary-light);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  color: var(--secondary-dark);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.import-dropzone:hover,
.import-dropzone.is-dragover { border-color: var(--accent); color: var(--accent); background: rgba(200, 147, 40, 0.06); }
.import-dropzone.is-busy { pointer-events: none; opacity: 0.7; }
.import-dropzone-icon { font-size: 26px; color: var(--accent); }
.import-dropzone-text { font-size: 13px; }
.import-dropzone-file { font-size: 12px; font-weight: 600; color: var(--dark); }
.import-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.import-template { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--secondary-dark); }

/* Rich text editor (RichTextEditor.razor, Quill-backed). */
.rte { display: flex; flex-direction: column; gap: 6px; }
.rte-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rte-emoji { position: relative; }
.rte-emoji-toggle, .rte-clear {
  background: transparent; border: 1px solid var(--secondary-light); border-radius: var(--radius-sm);
  padding: 5px 10px; font-size: 12px; color: var(--dark); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.rte-emoji-toggle:hover, .rte-clear:hover { border-color: var(--accent); color: var(--accent); }
.rte-emoji-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  padding: 8px; background: var(--panel, var(--light)); border: 1px solid var(--secondary-light);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); width: 240px;
}
.rte-emoji-panel button { background: transparent; border: none; font-size: 16px; padding: 4px; cursor: pointer; border-radius: var(--radius-sm); }
.rte-emoji-panel button:hover { background: rgba(200, 147, 40, 0.12); }
.rte-surface {
  min-height: 140px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-light);
  background: var(--light);
  color: var(--dark);
}

/* Adjustment pass 2 — long table-cell content: single-line ellipsis, full text on hover via title=. */
.cell-truncate {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Adjustment pass 2 — center a field's contents within its .form-field/.form-field.full wrapper
   (ProfileImageUpload etc. center themselves internally, but their wrapper is flex-start by default). */
.form-field-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Adjustment pass 3 — Offering "Offer Days" Mon-Sun checkbox group. */
.offer-days-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Adjustment pass 3 — Notifications compose modal: preset messages stacked one per row, and the
   "send to all" checkbox + "select corporates" button placed on one row. */
.filter-radio-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.corporate-select-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.offer-day-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
}

/* Adjustment pass 2 — place two upload fields (e.g. ProfileImageUpload) side by side at the top of a modal. */
.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}
.upload-row > * { flex: 1 1 200px; }

/* Adjustment pass 2 — inline checkbox list (e.g. Vendor's multi-select Business Type field). */
.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 10px;
  border: 1px solid var(--secondary-light);
  border-radius: var(--radius-sm);
  background: var(--light);
}
.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--dark);
  font-weight: 400;
  cursor: pointer;
}

/* Adjustment pass 3 — custom-drawn checkbox/radio, applied globally so every checkbox and radio in
   the app (data-grid select boxes, filters, forms) shares one consistent look instead of the bare
   native browser default. Checkmark/dot color is hardcoded white (not a theme token) because it must
   stay visible against the gold --accent fill in both light and dark mode. */
input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--secondary-light);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  transition: background .15s ease, border-color .15s ease;
}
input[type="radio"] { border-radius: 50%; }

input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 9px;
  transform: scale(0);
  transition: transform .1s ease-in-out;
  box-shadow: inset 1em 1em #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform .1s ease-in-out;
  background: #fff;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before { transform: scale(1); }

input[type="checkbox"]:disabled,
input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Adjustment pass 2 — searchable country combobox (Membership Tier modal). */
.combo-box {
  position: relative;
}
.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: var(--panel, var(--light));
  border: 1px solid var(--secondary-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
}
.combo-item {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--dark);
}
.combo-item:hover, .combo-item.active { background: rgba(200, 147, 40, 0.12); color: var(--accent); }
.combo-empty { padding: 8px 10px; font-size: 13px; color: var(--secondary-dark); }

/* Adjustment pass 2 — Text Card Color field: swatch + hex text + contrast-adaptive live preview. */
.color-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-field-row input[type="color"] {
  width: 40px;
  height: 34px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-light);
  cursor: pointer;
}
.color-hex-text {
  font-family: monospace;
  font-size: 13px;
  color: var(--dark);
  min-width: 70px;
}
.color-preview-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary-light);
  font-weight: 600;
  font-size: 13px;
}

/* Adjustment pass 2 — check-all header checkbox + search/count toolbar in nested "settings" modals
   (Vendor Selection modal, Setting Privileges modal). Reuses .datagrid-toolbar/.datagrid-search/
   .datagrid-count for the toolbar row itself. */
.matrix-checkall { display: inline-flex; align-items: center; gap: 6px; }

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/* ! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com *//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.static {
  position: static;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.right-4 {
  right: 1rem;
}
.top-4 {
  top: 1rem;
}
.z-\[9999\] {
  z-index: 9999;
}
.mt-1 {
  margin-top: 0.25rem;
}
.block {
  display: block;
}
.inline {
  display: inline;
}
.flex {
  display: flex;
}
.table {
  display: table;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}
.w-80 {
  width: 20rem;
}
.w-full {
  width: 100%;
}
.flex-1 {
  flex: 1 1 0%;
}
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.flex-col {
  flex-direction: column;
}
.items-start {
  align-items: flex-start;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-5 {
  gap: 1.25rem;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-\[10px\] {
  border-radius: 10px;
}
.bg-accent {
  --tw-bg-opacity: 1;
  background-color: rgb(200 147 40 / var(--tw-bg-opacity, 1));
}
.bg-secondary-green {
  --tw-bg-opacity: 1;
  background-color: rgb(19 45 40 / var(--tw-bg-opacity, 1));
}
.bg-secondary-red {
  --tw-bg-opacity: 1;
  background-color: rgb(171 38 42 / var(--tw-bg-opacity, 1));
}
.p-8 {
  padding: 2rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.font-bold {
  font-family: Montserrat-Bold;
}
.text-sm {
  font-size: 14px;
  line-height: 20px;
}
.font-bold {
  font-weight: 700;
}
.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
}
.opacity-90 {
  opacity: 0.9;
}
.shadow-lg {
  --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.ring {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}

/* Tailwind Preflight (base) resets margins on all elements with the same specificity as the
   plain-CSS rules above, and since it's injected after them in the cascade it silently wins —
   re-assert the shell's layout-critical margins here so the fixed topbar/sidebar don't cover
   the scrollable content. */
main {
  margin-left: var(--sidebarwidth);
  margin-top: var(--topbarheight);
}

/* Sidebar goes off-canvas below 1100px (see sidebar.css/topbar.css) — must live here, after the
   Preflight reassertion above, or the plain `main` rule wins on specificity/source-order and the
   content stays shifted even though the sidebar is no longer visible. */
@media (max-width: 1100px) {
  main {
    margin-left: 0;
    width: 100%;
  }
}
@media (min-width: 976px) {

  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
