/*
* Captain Tayyar — dashboard brand layer
* Loaded after the (customizer managed) core + theme stylesheets in vendor/css/brand.
* Light style  → "Sky Premium": Royal Blue primary, Safety Yellow accent, Cloud White canvas.
* Dark style   → "High Visibility": Safety Yellow primary on Dark Navy.
******************************************************************************/

:root {
  --ct-yellow: #ffd600;
  --ct-yellow-hover: #f2c900;
  --ct-royal: #1e3a8a;
  --ct-royal-light: #2f55c4;
  --ct-navy: #0d1b2a;
  --ct-navy-2: #14263a;
  --ct-graphite: #1e232b;
  --ct-cloud: #f2f6fb;
  --ct-cyan: #7dd3fc;
  --ct-gold: #ffc857;

  --ct-radius: 0.875rem;
  --ct-radius-sm: 0.625rem;

  --ct-surface: #fff;
  --ct-surface-muted: #f7f9fc;
  --ct-border: #e6ebf2;
  --ct-heading: #1d2a3f;
  --ct-text: #4e5a6e;
  --ct-muted: #8a94a6;
  --ct-primary: #1e3a8a;
  --ct-on-primary: #fff;
  --ct-primary-soft: rgba(30, 58, 138, 0.07);
  --ct-brand-accent: #1e3a8a;
  --ct-shadow: 0 1px 2px rgba(13, 27, 42, 0.04), 0 8px 24px -10px rgba(13, 27, 42, 0.12);
  --ct-shadow-lg: 0 18px 40px -18px rgba(13, 27, 42, 0.35);

  /* Panels render at ~90% of the template's default scale (16px base). */
  --bs-root-font-size: 14.4px;

  --bs-font-sans-serif: 'Plus Jakarta Sans', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
}

.dark-style {
  --ct-surface: #14263a;
  --ct-surface-muted: #11202f;
  --ct-border: #22374f;
  --ct-heading: #e8eef7;
  --ct-text: #b9c5d8;
  --ct-muted: #7f90aa;
  --ct-primary: #ffd600;
  --ct-on-primary: #0d1b2a;
  --ct-primary-soft: rgba(255, 214, 0, 0.08);
  --ct-brand-accent: #ffd600;
  --ct-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 30px -12px rgba(0, 0, 0, 0.5);
  --ct-shadow-lg: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

/*
* Typography
******************************************************************************/

body {
  font-family: var(--bs-font-sans-serif);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

/*
* Sidebar
******************************************************************************/

.layout-menu.menu-vertical {
  border-inline-end: 1px solid var(--ct-border);
}

.light-style .bg-menu-theme.menu-vertical {
  box-shadow: none;
}

.menu .app-brand.ct-brand {
  height: 72px;
  margin-inline: 1rem 0.75rem;
  padding-inline: 0.25rem;
}

.ct-brand .app-brand-link {
  gap: 0.625rem;
  min-width: 0;
}

.ct-brand .layout-menu-toggle {
  flex-shrink: 0;
  margin-inline-start: auto;
}

.ct-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #1b3150 0%, var(--ct-navy) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 0, 0.25), 0 6px 14px -6px rgba(13, 27, 42, 0.55);
}

.ct-brand-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

html:not([dir=rtl]) .ct-brand .app-brand-text,
[dir=rtl] .ct-brand .app-brand-text {
  margin-inline: 0 !important;
}

.ct-wordmark {
  font-size: 1.125rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ct-heading);
  white-space: nowrap;
}

/* The Semi Dark theme build overrides these for its dark menu. */
.ct-wordmark .ct-wordmark-accent {
  color: var(--ct-brand-accent);
}

.menu-vertical .menu-header {
  margin-top: 1.25rem !important;
}

.menu-vertical .menu-inner > .menu-header:first-child {
  margin-top: 0.25rem !important;
}

.menu-vertical .menu-header .menu-header-text {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.menu-vertical .menu-inner > .menu-item .menu-link {
  border-radius: var(--ct-radius-sm) !important;
  font-weight: 500;
}

.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-inner > .menu-item:not(.active) > .menu-link:hover,
.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-sub > .menu-item:not(.active) > .menu-link:hover {
  background-color: var(--ct-primary-soft);
}

.light-style .bg-menu-theme .menu-item.active > .menu-link:not(.menu-toggle) .menu-icon {
  color: var(--ct-yellow);
}

/* Dropdown links show their own icon, a little smaller, instead of the theme's bullet. */
.layout-menu.bg-menu-theme.menu-vertical .menu-sub > .menu-item > .menu-link .menu-icon {
  display: inline-block;
  width: 1.125rem;
  font-size: 1.125rem;
  margin-inline-end: 0.625rem;
}

.layout-menu.bg-menu-theme.menu-vertical .menu-sub > .menu-item > .menu-link::before {
  display: none !important;
}

.layout-menu.bg-menu-theme.menu-vertical .menu-sub .menu-link {
  padding-inline-start: 1.75rem;
}

/* An open dropdown shows each page's own badge, so its total would only repeat them. */
.menu-vertical .menu-item.open:not(.menu-item-closing) > .menu-toggle > .ct-menu-badge {
  display: none;
}

/*
* Sidebar motion: icons lift under the pointer, labels nudge forward, a dropdown's links slide in one after
* another as it opens (menu.js sets .menu-item-animating while it slides open), the current page's icon pops
* once, and badges pop in then pulse a few times. Skipped for people who ask for reduced motion.
*/
@media (prefers-reduced-motion: no-preference) {
  .layout-menu {
    --ct-menu-shift: -0.5rem;
  }

  [dir=rtl] .layout-menu {
    --ct-menu-shift: 0.5rem;
  }

  .layout-menu.menu-vertical .menu-inner .menu-link .menu-icon {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, margin 0.3s ease;
  }

  .layout-menu.menu-vertical .menu-inner .menu-link:hover .menu-icon {
    transform: scale(1.18) rotate(-8deg);
  }

  .layout-menu.menu-vertical .menu-inner .menu-link > div {
    transition: opacity 0.3s ease-in-out, transform 0.2s ease;
  }

  .layout-menu.menu-vertical .menu-inner .menu-item:not(.active) > .menu-link:not(.menu-toggle):hover > div {
    transform: translateX(calc(var(--ct-menu-shift) * -0.5));
  }

  .layout-menu .menu-item.open.menu-item-animating:not(.menu-item-closing) > .menu-sub > .menu-item {
    animation: ct-menu-link-in 0.2s ease-out backwards;
  }

  .layout-menu .menu-item.open.menu-item-animating:not(.menu-item-closing) > .menu-sub > .menu-item:nth-child(2) { animation-delay: 25ms; }
  .layout-menu .menu-item.open.menu-item-animating:not(.menu-item-closing) > .menu-sub > .menu-item:nth-child(3) { animation-delay: 50ms; }
  .layout-menu .menu-item.open.menu-item-animating:not(.menu-item-closing) > .menu-sub > .menu-item:nth-child(4) { animation-delay: 75ms; }
  .layout-menu .menu-item.open.menu-item-animating:not(.menu-item-closing) > .menu-sub > .menu-item:nth-child(5) { animation-delay: 100ms; }
  .layout-menu .menu-item.open.menu-item-animating:not(.menu-item-closing) > .menu-sub > .menu-item:nth-child(n+6) { animation-delay: 125ms; }

  .layout-menu .menu-item.active > .menu-link:not(.menu-toggle) .menu-icon {
    animation: ct-menu-icon-pop 0.5s ease-out 0.15s backwards;
  }

  .ct-menu-badge {
    animation: ct-menu-badge-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards, ct-menu-badge-pulse 1.8s ease-out 0.4s 3;
  }

  /* A live count that went up (js/ct-live-updates.js): bounce, then ring twice. */
  .ct-menu-badge.is-bumped {
    animation: ct-menu-badge-bump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), ct-menu-badge-ring 1.8s ease-out 0.3s 2;
  }
}

@keyframes ct-menu-badge-bump {
  40% {
    transform: scale(1.35);
  }
}

@keyframes ct-menu-badge-ring {
  from {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ct-yellow) 70%, transparent);
  }

  to {
    box-shadow: 0 0 0 0.5rem transparent;
  }
}

@keyframes ct-menu-link-in {
  from {
    opacity: 0;
    transform: translateX(var(--ct-menu-shift));
  }
}

@keyframes ct-menu-icon-pop {
  40% {
    transform: scale(1.3) rotate(-10deg);
  }
}

@keyframes ct-menu-badge-pop {
  from {
    transform: scale(0);
  }
}

@keyframes ct-menu-badge-pulse {
  from {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ct-yellow) 70%, transparent);
  }

  to {
    box-shadow: 0 0 0 0.5rem transparent;
  }
}

.ct-menu-badge {
  margin-inline-start: auto;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--ct-yellow);
  color: var(--ct-navy);
}

/* Badges that are zero now stay in the page, hidden, so the live updates can show them again. */
.ct-menu-badge[hidden] {
  display: none;
}

/*
* Navbar
******************************************************************************/

.layout-navbar.navbar-detached {
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-border);
  box-shadow: var(--ct-shadow) !important;
}

.layout-navbar.navbar-detached.bg-navbar-theme {
  background-color: color-mix(in srgb, var(--ct-surface) 88%, transparent) !important;
  backdrop-filter: saturate(160%) blur(10px);
}

.ct-navbar-context {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--ct-muted);
}

.ct-navbar-context .ct-area-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--ct-primary-soft);
  color: var(--ct-primary);
  white-space: nowrap;
}

.ct-navbar-context .ct-area-chip i {
  font-size: 0.95rem;
}

.ct-navbar-context .ct-current-page {
  font-weight: 600;
  color: var(--ct-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-navbar-action {
  width: 2.375rem;
  height: 2.375rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ct-text) !important;
  transition: background-color 0.15s ease;
}

.ct-navbar-action:hover {
  background-color: var(--ct-primary-soft);
}

.ct-navbar-action i {
  font-size: 1.3rem;
}

/* New order sound on / off (js/ct-live-updates.js). A yellow dot asks for a click when the browser held a chime back. */
.ct-sound-toggle {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
}

.ct-sound-toggle.is-off {
  color: var(--ct-muted) !important;
}

.ct-sound-toggle.is-blocked::after {
  content: '';
  position: absolute;
  top: 0.375rem;
  inset-inline-end: 0.375rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ct-yellow);
  box-shadow: 0 0 0 0.125rem var(--ct-surface);
}

@media (prefers-reduced-motion: no-preference) {
  .ct-sound-toggle.is-blocked i {
    animation: ct-sound-toggle-ring 1.2s ease-in-out 3;
  }
}

@keyframes ct-sound-toggle-ring {
  0%, 60%, 100% {
    transform: rotate(0);
  }

  15%, 45% {
    transform: rotate(14deg);
  }

  30% {
    transform: rotate(-14deg);
  }
}

.ct-user-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0.375rem 0.25rem 0.25rem !important;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}

.ct-user-toggle:hover {
  background-color: var(--ct-primary-soft);
}

.ct-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: start;
}

.ct-user-meta .ct-user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ct-heading);
}

.ct-user-meta .ct-user-role {
  font-size: 0.75rem;
  color: var(--ct-muted);
  text-transform: capitalize;
}

.ct-avatar {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--ct-royal) 0%, var(--ct-navy) 100%);
  color: var(--ct-yellow);
  box-shadow: 0 0 0 2px var(--ct-surface), 0 0 0 3px rgba(255, 214, 0, 0.55);
}

.ct-avatar.ct-avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.8125rem;
  box-shadow: none;
}

.dark-style .ct-avatar {
  background: var(--ct-yellow);
  color: var(--ct-navy);
}

.dropdown-menu {
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  box-shadow: var(--ct-shadow-lg);
}

.dropdown-item {
  border-radius: 0.5rem;
}

/*
* Page header
******************************************************************************/

.ct-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ct-page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ct-heading);
}

.ct-page-subtitle {
  margin: 0.375rem 0 0;
  color: var(--ct-muted);
  font-size: 0.9375rem;
}

.ct-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ct-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-back-link:hover {
  color: var(--ct-primary);
}

[dir=rtl] .ct-back-link .ti-arrow-left {
  transform: scaleX(-1);
}

/*
* Cards
******************************************************************************/

.card {
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-border);
  box-shadow: var(--ct-shadow);
}

.card > .card-header:first-child {
  border-top-left-radius: var(--ct-radius);
  border-top-right-radius: var(--ct-radius);
}

.ct-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--ct-border);
}

.ct-card-header + .card-body {
  padding-top: 1.5rem !important;
}

.ct-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-card-title small {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ct-muted);
}

.ct-icon-tile {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ct-icon-tile i {
  font-size: 1.25rem;
}

.ct-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
  border-bottom-left-radius: var(--ct-radius);
  border-bottom-right-radius: var(--ct-radius);
}

/*
* Hero
******************************************************************************/

.ct-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--ct-radius) + 0.25rem);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  color: #fff;
  background:
    radial-gradient(1200px 300px at 100% 0%, rgba(125, 211, 252, 0.18), transparent 60%),
    linear-gradient(120deg, var(--ct-navy) 0%, #142d63 55%, var(--ct-royal) 100%);
  box-shadow: var(--ct-shadow-lg);
}

.ct-hero > * {
  position: relative;
  z-index: 1;
}

.ct-hero .ct-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-navy);
  background: var(--ct-yellow);
}

.ct-hero .ct-hero-title {
  margin: 0.875rem 0 0.375rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.ct-hero .ct-hero-title span {
  color: var(--ct-yellow);
}

.ct-hero .ct-hero-text {
  margin: 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.78);
}

.ct-hero .ct-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.ct-hero .ct-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ct-hero .ct-hero-chip i {
  color: var(--ct-yellow);
}

.ct-hero-art {
  position: absolute !important;
  inset-inline-end: 0;
  top: 0;
  bottom: 0;
  width: min(48%, 520px);
  z-index: 0 !important;
  pointer-events: none;
}

.ct-hero-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ct-hero-art .ct-hero-mark {
  position: absolute;
  inset-inline-end: 2rem;
  top: 50%;
  width: 150px;
  height: 150px;
  transform: translateY(-50%);
  opacity: 0.9;
  filter: drop-shadow(0 10px 30px rgba(255, 214, 0, 0.25));
}

[dir=rtl] .ct-hero-art svg {
  transform: scaleX(-1);
}

@media (max-width: 767.98px) {
  .ct-hero {
    padding: 1.5rem;
  }

  .ct-hero .ct-hero-title {
    font-size: 1.375rem;
  }

  .ct-hero-art {
    opacity: 0.35;
    width: 100%;
  }

  .ct-hero-art .ct-hero-mark {
    display: none;
  }

  .ct-stat .card-body {
    padding: 1rem;
  }

  .ct-stat .ct-stat-value {
    font-size: 1.5rem;
  }
}

/*
* Stat cards
******************************************************************************/

.ct-stat {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ct-stat .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.375rem;
}

.ct-stat .ct-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.ct-stat .ct-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ct-heading);
}

.ct-stat .ct-stat-label {
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-stat .ct-stat-hint {
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-stat .ct-stat-go {
  font-size: 1.125rem;
  color: var(--ct-muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

a.ct-stat {
  color: inherit;
}

a.ct-stat:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ct-primary) 35%, var(--ct-border));
  box-shadow: var(--ct-shadow-lg);
}

a.ct-stat:hover .ct-stat-go {
  color: var(--ct-primary);
  transform: translateX(3px);
}

[dir=rtl] .ct-stat .ct-stat-go {
  transform: scaleX(-1);
}

[dir=rtl] a.ct-stat:hover .ct-stat-go {
  transform: scaleX(-1) translateX(3px);
}

.ct-stat::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 1.25rem;
  width: 3px;
  height: 2.5rem;
  border-radius: 0 3px 3px 0;
  background: var(--ct-stat-accent, var(--ct-primary));
  opacity: 0;
  transition: opacity 0.18s ease;
}

a.ct-stat:hover::after {
  opacity: 1;
}

/*
* Quick actions
******************************************************************************/

.ct-quick-action {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: var(--ct-radius-sm);
  border: 1px dashed var(--ct-border);
  color: var(--ct-heading);
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ct-quick-action:hover {
  color: var(--ct-heading);
  border-style: solid;
  border-color: color-mix(in srgb, var(--ct-primary) 40%, var(--ct-border));
  background: var(--ct-primary-soft);
}

.ct-quick-action small {
  display: block;
  font-weight: 400;
  color: var(--ct-muted);
}

.ct-quick-action .ti-chevron-right {
  margin-inline-start: auto;
  color: var(--ct-muted);
}

[dir=rtl] .ct-quick-action .ti-chevron-right {
  transform: scaleX(-1);
}

/*
* Tables
******************************************************************************/

.ct-table {
  margin-bottom: 0;
}

.ct-table > thead > tr > th {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  font-size: 0.71875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-muted);
  background: var(--ct-surface-muted);
  border-bottom: 1px solid var(--ct-border);
  white-space: nowrap;
}

.ct-table > tbody > tr > td {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  vertical-align: middle;
  border-color: var(--ct-border);
}

.ct-table > tbody > tr:last-child > td {
  border-bottom: 0;
}

.ct-table.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: var(--ct-primary-soft);
  --bs-table-bg-state: var(--ct-primary-soft);
}

.ct-table .ct-cell-id {
  font-variant-numeric: tabular-nums;
  color: var(--ct-muted);
  font-weight: 600;
}

.ct-table .ct-cell-title {
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-table .ct-cell-sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ct-surface-muted);
  border: 1px solid var(--ct-border);
}

.ct-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ct-muted);
}

.ct-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ct-actions form {
  display: inline-flex;
  margin: 0;
}

.ct-table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ct-border);
}

.ct-table-footer:empty {
  display: none;
}

.ct-table-footer nav {
  margin-inline-start: auto;
}

.ct-table-footer .pagination {
  margin-bottom: 0;
}

.ct-table-footer p.small {
  margin-bottom: 0;
}

/*
* Empty states
******************************************************************************/

.ct-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.375rem;
  padding: 3rem 1.5rem;
  white-space: normal;
}

.ct-empty .ct-empty-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ct-primary-soft);
  color: var(--ct-primary);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--ct-primary-soft) 50%, transparent);
}

.ct-empty .ct-empty-icon i {
  font-size: 1.75rem;
}

.ct-empty h6 {
  margin: 0;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-empty p {
  margin: 0;
  max-width: 26rem;
  color: var(--ct-muted);
}

.ct-empty .btn {
  margin-top: 0.75rem;
}

/*
* Detail lists
******************************************************************************/

.ct-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 0;
}

.ct-details.ct-details-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 575.98px) {
  .ct-details.ct-details-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ct-details .ct-detail-full {
  grid-column: 1 / -1;
}

.ct-details dt {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-details dd {
  margin: 0;
  font-weight: 500;
  color: var(--ct-heading);
  overflow-wrap: anywhere;
}

.ct-file-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  color: var(--ct-heading);
  min-width: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ct-file-link:hover {
  color: var(--ct-heading);
  border-color: color-mix(in srgb, var(--ct-primary) 40%, var(--ct-border));
  background: var(--ct-primary-soft);
}

.ct-file-link .ct-file-name {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-file-link .ct-file-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--ct-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-file-link > div {
  min-width: 0;
  flex: 1;
}

/*
* Forms
******************************************************************************/

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-heading);
  text-transform: none;
  letter-spacing: 0;
}

.form-control,
.form-select,
.input-group-text {
  border-radius: var(--ct-radius-sm);
}

.form-control,
.form-select {
  min-height: 2.75rem;
}

textarea.form-control {
  min-height: 6rem;
}

.form-control-sm,
.form-select-sm {
  min-height: 2.25rem;
}

.ct-form-section + .ct-form-section {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px dashed var(--ct-border);
}

.ct-form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.125rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-form-section-title i {
  color: var(--ct-primary);
  font-size: 1.125rem;
}

.ct-form-hint {
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-map-picker-canvas {
  width: 100%;
  height: 20rem;
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  overflow: hidden;
}

.ct-map-picker-canvas.is-invalid {
  border-color: var(--bs-form-invalid-border-color, #ff4c51);
}

.ct-map-picker-search gmp-place-autocomplete {
  width: 100%;
  color-scheme: light;
}

.dark-style .ct-map-picker-search gmp-place-autocomplete {
  color-scheme: dark;
}

.ct-upload-preview {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--ct-radius-sm);
  object-fit: cover;
  border: 1px solid var(--ct-border);
}

/*
* Buttons & badges
******************************************************************************/

.btn {
  border-radius: var(--ct-radius-sm);
  font-weight: 600;
}

.btn.rounded-pill {
  border-radius: 999px;
}

.btn-accent {
  color: var(--ct-navy) !important;
  background-color: var(--ct-yellow);
  border-color: var(--ct-yellow);
  box-shadow: 0 6px 16px -8px rgba(255, 214, 0, 0.9);
}

.btn-accent:hover,
.btn-accent:focus,
.btn-accent:active,
.btn-accent.active {
  color: var(--ct-navy) !important;
  background-color: var(--ct-yellow-hover) !important;
  border-color: var(--ct-yellow-hover) !important;
}

.badge {
  font-weight: 600;
  border-radius: 0.4375rem;
}

.ct-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.ct-status::before {
  content: '';
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: currentColor;
}

/*
* Alerts (flash messages)
******************************************************************************/

.ct-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: var(--ct-radius-sm);
  border-width: 1px;
  border-inline-start-width: 4px;
}

.ct-alert .ct-alert-icon {
  font-size: 1.25rem;
  line-height: 1.25rem;
  flex-shrink: 0;
}

.ct-alert .ct-alert-body {
  flex: 1;
  min-width: 0;
}

.ct-alert ul {
  margin: 0;
  padding-inline-start: 1rem;
}

.ct-flash {
  padding-bottom: 0 !important;
}

/*
* Pagination
******************************************************************************/

.page-link {
  border-radius: 0.5rem !important;
  margin-inline: 0.125rem;
  font-weight: 600;
}

/*
* Template customizer (kept, branded)
******************************************************************************/

.template-customizer-open-btn {
  background: var(--ct-yellow) !important;
  box-shadow: 0 8px 20px -8px rgba(255, 214, 0, 0.9);
}

.template-customizer-open-btn::before {
  filter: brightness(0);
  opacity: 0.85;
}

/*
* SweetAlert2 (confirm dialogs)
******************************************************************************/

.swal2-popup {
  border-radius: calc(var(--ct-radius) + 0.25rem) !important;
  font-family: var(--bs-font-sans-serif) !important;
  background: var(--ct-surface) !important;
  color: var(--ct-text) !important;
}

.swal2-popup .swal2-title {
  color: var(--ct-heading) !important;
  font-size: 1.25rem !important;
}

.swal2-popup .swal2-html-container {
  color: var(--ct-text) !important;
  font-size: 0.9375rem !important;
}

.swal2-popup .swal2-actions {
  gap: 0.5rem;
}

.swal2-container.swal2-backdrop-show {
  background: rgba(13, 27, 42, 0.55) !important;
  backdrop-filter: blur(2px);
}

/*
* Standalone pages (auth, registration, application status)
******************************************************************************/

/* Login: a centered card over a quiet, slowly moving brand backdrop. */
.ct-login {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2.5rem 1rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(47, 85, 196, 0.55) 0%, transparent 62%),
    linear-gradient(165deg, #0a1522 0%, var(--ct-navy) 42%, #0f2247 100%);
}

.ct-login-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ct-login-grid {
  position: absolute;
  inset: -24px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1.4px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 25%, transparent 78%);
  animation: ct-grid-drift 48s linear infinite;
}

.ct-login-glow {
  position: absolute;
  width: 40rem;
  height: 40rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
}

.ct-login-glow.is-yellow {
  bottom: -22rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(255, 214, 0, 0.5), transparent 65%);
  animation: ct-drift-a 20s ease-in-out infinite alternate;
}

.ct-login-glow.is-blue {
  top: -20rem;
  right: -14rem;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.45), transparent 65%);
  animation: ct-drift-b 24s ease-in-out infinite alternate;
}

.ct-login-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ct-login-route .ct-route-path {
  fill: none;
  stroke: rgba(255, 214, 0, 0.5);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1 12;
  animation: ct-route-dash 2.4s linear infinite;
}

.ct-login-route .ct-route-path.is-faint {
  stroke: rgba(255, 255, 255, 0.12);
  animation-duration: 4s;
}

.ct-login-route .ct-route-plane {
  fill: var(--ct-yellow);
  filter: drop-shadow(0 0 6px rgba(255, 214, 0, 0.6));
}

.ct-login-route .ct-route-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: ct-ring-pulse 6s ease-in-out infinite;
}

.ct-login-route .ct-route-ring:nth-of-type(2) {
  animation-delay: 1.5s;
}

.ct-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  color: #fff;
  animation: ct-fade-down 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ct-login-brand:hover {
  color: #fff;
}

.ct-login-brand img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(255, 214, 0, 0.25));
  animation: ct-hover 5s ease-in-out infinite;
}

.ct-login-brand .ct-wordmark {
  font-size: 1.625rem;
  color: #fff;
}

.ct-login-brand .ct-wordmark .ct-wordmark-accent {
  color: var(--ct-yellow);
}

.ct-login-card {
  position: relative;
  width: 100%;
  max-width: 29rem;
  padding: 2.25rem 2.25rem 2rem;
  border-radius: 1.5rem;
  color: var(--ct-text);
  background: #fff;
  box-shadow: 0 40px 90px -35px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: ct-rise 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s both;
}

.ct-login-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 2.5rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--ct-yellow), transparent);
}

.ct-login-card > * {
  animation: ct-fade-up 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ct-login-card > :nth-child(1) { animation-delay: 0.18s; }
.ct-login-card > :nth-child(2) { animation-delay: 0.24s; }
.ct-login-card > :nth-child(3) { animation-delay: 0.3s; }
.ct-login-card > :nth-child(4) { animation-delay: 0.36s; }
.ct-login-card > :nth-child(5) { animation-delay: 0.42s; }
.ct-login-card > :nth-child(n + 6) { animation-delay: 0.48s; }

.ct-login-card h1 {
  margin-bottom: 0.375rem;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: var(--ct-heading);
}

.ct-login-card .ct-login-sub {
  margin-bottom: 1.75rem;
  text-align: center;
  color: var(--ct-muted);
}

.ct-login-card .btn-primary {
  position: relative;
  overflow: hidden;
}

.ct-login-card .btn-primary .ti-arrow-right {
  transition: transform 0.2s ease;
}

.ct-login-card .btn-primary:hover .ti-arrow-right {
  transform: translateX(4px);
}

[dir=rtl] .ct-login-card .btn-primary .ti-arrow-right {
  transform: scaleX(-1);
}

.ct-login-card .btn-primary.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.ct-login-foot {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  animation: ct-fade-up 0.6s ease 0.55s both;
}

@media (max-width: 575.98px) {
  .ct-login {
    justify-content: flex-start;
    padding-top: 2rem;
  }

  .ct-login-card {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 1.25rem;
  }
}

@keyframes ct-grid-drift {
  to { transform: translate3d(24px, 24px, 0); }
}

@keyframes ct-drift-a {
  to { transform: translate3d(7rem, -5rem, 0) scale(1.12); }
}

@keyframes ct-drift-b {
  to { transform: translate3d(-6rem, 5rem, 0) scale(1.06); }
}

@keyframes ct-route-dash {
  to { stroke-dashoffset: -26; }
}

@keyframes ct-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.45; }
}

@keyframes ct-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes ct-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes ct-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes ct-fade-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-login *,
  .ct-login *::before,
  .ct-login-grid,
  .ct-login-glow {
    animation: none !important;
  }

  .ct-login-route .ct-route-plane {
    display: none;
  }
}

.ct-segmented {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.3125rem;
  border-radius: calc(var(--ct-radius-sm) + 0.3125rem);
  background: #eef2f8;
  box-shadow: inset 0 1px 2px rgba(13, 27, 42, 0.06);
}

.ct-segmented .ct-segmented-indicator {
  position: absolute;
  top: 0.3125rem;
  bottom: 0.3125rem;
  inset-inline-start: 0.3125rem;
  width: calc((100% - 0.625rem - 0.75rem) / 4);
  border-radius: var(--ct-radius-sm);
  background: #fff;
  box-shadow: 0 6px 14px -8px rgba(13, 27, 42, 0.45), 0 0 0 1px rgba(30, 58, 138, 0.06);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.ct-segmented:has(.btn-check:nth-of-type(2):checked) .ct-segmented-indicator {
  transform: translateX(calc(100% + 0.25rem));
}

.ct-segmented:has(.btn-check:nth-of-type(3):checked) .ct-segmented-indicator {
  transform: translateX(calc(200% + 0.5rem));
}

.ct-segmented:has(.btn-check:nth-of-type(4):checked) .ct-segmented-indicator {
  transform: translateX(calc(300% + 0.75rem));
}

[dir=rtl] .ct-segmented:has(.btn-check:nth-of-type(2):checked) .ct-segmented-indicator {
  transform: translateX(calc(-100% - 0.25rem));
}

[dir=rtl] .ct-segmented:has(.btn-check:nth-of-type(3):checked) .ct-segmented-indicator {
  transform: translateX(calc(-200% - 0.5rem));
}

[dir=rtl] .ct-segmented:has(.btn-check:nth-of-type(4):checked) .ct-segmented-indicator {
  transform: translateX(calc(-300% - 0.75rem));
}

.ct-segmented .btn-check + label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.625rem 0.25rem;
  border-radius: var(--ct-radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--ct-text);
  cursor: pointer;
  transition: color 0.2s ease;
}

.ct-segmented .btn-check + label i {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.ct-segmented .btn-check + label:hover {
  color: var(--ct-royal);
}

.ct-segmented .btn-check:checked + label {
  color: var(--ct-royal);
}

.ct-segmented .btn-check:checked + label i {
  color: var(--ct-royal);
  transform: translateY(-1px) scale(1.08);
}

.ct-segmented .btn-check:focus-visible + label {
  outline: 2px solid var(--ct-royal);
  outline-offset: 2px;
}

.ct-divider-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-divider-text::before,
.ct-divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ct-border);
}

.ct-register-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ct-register-links a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem;
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ct-heading);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ct-register-links a:hover {
  border-color: var(--ct-royal);
  box-shadow: 0 8px 18px -12px rgba(30, 58, 138, 0.7);
  transform: translateY(-1px);
}

.ct-register-links a i {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--ct-royal);
  background: rgba(30, 58, 138, 0.07);
}

@media (max-width: 420px) {
  .ct-register-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Standalone shell used by registration and application status pages */
.ct-shell {
  min-height: 100vh;
  background:
    radial-gradient(900px 300px at 50% -120px, rgba(30, 58, 138, 0.14), transparent 70%),
    var(--ct-cloud);
}

.ct-shell-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--ct-border);
}

.ct-shell-bar .ct-shell-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}

.ct-shell-bar a.ct-shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.ct-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-muted);
  background: var(--ct-surface);
  border: 1px solid var(--ct-border);
}

.ct-steps li span {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: var(--ct-surface-muted);
  border: 1px solid var(--ct-border);
}

.ct-steps li.is-done span {
  background: #28c76f;
  border-color: #28c76f;
  color: #fff;
}

.ct-steps li.is-current {
  color: var(--ct-royal);
  border-color: color-mix(in srgb, var(--ct-royal) 35%, var(--ct-border));
}

.ct-steps li.is-current span {
  background: var(--ct-yellow);
  border-color: var(--ct-yellow);
  color: var(--ct-navy);
}

.ct-status-hero {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.ct-status-hero .ct-status-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ct-status-hero .ct-status-icon i {
  font-size: 2.25rem;
}

.ct-status-hero h3 {
  font-weight: 800;
  color: var(--ct-heading);
}

.ct-status-hero p {
  max-width: 34rem;
  margin-inline: auto;
  color: var(--ct-muted);
}
.min-w-0 {
  min-width: 0;
}

.light-style .btn-label-secondary {
  color: var(--ct-text);
}

.light-style .btn-label-secondary:hover {
  color: var(--ct-heading);
}

.ct-media-preview {
  width: 10rem;
  height: 7.5rem;
  object-fit: cover;
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
}

.ct-upload-preview.ct-thumb-placeholder,
.ct-media-preview.ct-thumb-placeholder {
  background: var(--ct-surface-muted);
}

/*
* Option cards (Vuexy custom-option) and clickable badges
******************************************************************************/

.custom-option {
  border-radius: var(--ct-radius-sm);
  border-color: var(--ct-border);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-option:hover {
  border-color: color-mix(in srgb, var(--ct-primary) 35%, var(--ct-border));
}

.custom-option.checked {
  border-color: var(--ct-primary);
  background-color: var(--ct-primary-soft);
  box-shadow: 0 0 0 1px var(--ct-primary);
}

.custom-option-icon .custom-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.custom-option-icon .custom-option-content .form-check-input {
  margin-top: auto;
}

a.badge {
  transition: filter 0.15s ease;
}

a.badge:hover {
  filter: brightness(0.95);
  text-decoration: underline;
}

/*
* Page entrance
******************************************************************************/

.content-wrapper > .container-xxl:not(.ct-flash) {
  animation: ct-page-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes ct-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .content-wrapper > .container-xxl {
    animation: none;
  }
}

/*
* Index toolbars, filter tabs and row actions
******************************************************************************/

.ct-tabs {
  display: flex;
  gap: 1.5rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--ct-border);
  scrollbar-width: none;
}

.ct-tabs::-webkit-scrollbar {
  display: none;
}

.ct-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: -1px;
  padding: 0.9375rem 0 0.8125rem;
  border-bottom: 2px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ct-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.ct-tabs a:hover {
  color: var(--ct-heading);
}

.ct-tabs a.active {
  color: var(--ct-primary);
  border-bottom-color: var(--ct-primary);
}

.ct-tab-count {
  min-width: 1.5rem;
  padding: 0.0625rem 0.4375rem;
  border-radius: 999px;
  font-size: 0.71875rem;
  font-weight: 700;
  text-align: center;
  color: var(--ct-text);
  background: var(--ct-surface-muted);
  border: 1px solid var(--ct-border);
}

.ct-tabs a.active .ct-tab-count {
  color: var(--ct-on-primary);
  background: var(--ct-primary);
  border-color: transparent;
}

.ct-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--ct-border);
}

.ct-search {
  position: relative;
  flex: 1 1 16rem;
  max-width: 24rem;
}

.ct-search > i {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.875rem;
  transform: translateY(-50%);
  font-size: 1.0625rem;
  color: var(--ct-muted);
  pointer-events: none;
}

.ct-search .form-control {
  padding-inline-start: 2.5rem;
  background-color: var(--ct-surface-muted);
}

.ct-search .form-control:focus {
  background-color: var(--ct-surface);
}

.ct-toolbar .form-select {
  width: auto;
  min-width: 10.5rem;
}

.ct-toolbar-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.ct-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.375rem 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
}

.ct-filter-chip a {
  display: inline-flex;
  color: inherit;
  opacity: 0.7;
}

.ct-filter-chip a:hover {
  opacity: 1;
}

.ct-action-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  font-size: 1.0625rem;
  color: var(--ct-muted);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ct-action-btn:hover,
.ct-action-btn:focus-visible {
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
  border-color: color-mix(in srgb, var(--ct-primary) 18%, transparent);
}

.ct-action-btn.is-danger:hover,
.ct-action-btn.is-danger:focus-visible {
  color: #ea5455;
  background: rgba(234, 84, 85, 0.1);
  border-color: rgba(234, 84, 85, 0.2);
}

.ct-table > tbody > tr {
  transition: background-color 0.15s ease;
}

.ct-table .ct-cell-date {
  display: block;
  color: var(--ct-heading);
  font-weight: 500;
}

.ct-table .ct-cell-date + small {
  display: block;
  color: var(--ct-muted);
  font-size: 0.75rem;
}

.ct-table .ct-cell-money {
  font-weight: 700;
  color: var(--ct-heading);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ct-table td.text-end .ct-actions {
  justify-content: flex-end;
}

.ct-table-summary {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-table-summary strong {
  color: var(--ct-heading);
}

.ct-table-footer .pagination {
  gap: 0.125rem;
}

/*
* Profile header (show pages)
******************************************************************************/

.ct-profile {
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.ct-profile-cover {
  position: relative;
  height: 7rem;
  background:
    radial-gradient(600px 160px at 85% 0%, rgba(125, 211, 252, 0.25), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.4px) 0 0 / 16px 16px,
    linear-gradient(120deg, var(--ct-navy) 0%, #142d63 55%, var(--ct-royal) 100%);
}

.ct-profile-cover::after {
  content: '';
  position: absolute;
  inset-inline-end: 8%;
  bottom: 1.25rem;
  width: 40%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 214, 0, 0.9) 0 2px, transparent 2px 12px);
  transform: rotate(-8deg);
  transform-origin: right center;
  opacity: 0.8;
}

.ct-profile-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ct-profile-body {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 0.875rem 1.5rem 1.25rem;
}

.ct-profile-avatar {
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 4px solid var(--ct-surface);
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ct-yellow);
  background: linear-gradient(135deg, var(--ct-royal) 0%, var(--ct-navy) 100%);
  box-shadow: var(--ct-shadow-lg);
  align-self: flex-start;
  margin-top: -3.25rem;
}

.ct-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ct-surface);
}

.ct-profile-avatar i {
  font-size: 2.25rem;
}

.ct-profile-info {
  flex: 1 1 16rem;
  min-width: 0;
  padding-bottom: 0.125rem;
}

.ct-profile-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--ct-heading);
}

.ct-profile-name .badge {
  font-size: 0.75rem;
}

.ct-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.125rem;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--ct-muted);
}

.ct-profile-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ct-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.125rem;
}

.ct-profile-actions form {
  margin: 0;
}

.ct-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  margin: 0;
  border-top: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
}

.ct-profile-stats > div {
  padding: 0.875rem 1.5rem;
  border-inline-end: 1px solid var(--ct-border);
}

.ct-profile-stats > div:last-child {
  border-inline-end: 0;
}

.ct-profile-stats dt {
  margin-bottom: 0.125rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-profile-stats dd {
  margin: 0;
  font-weight: 700;
  color: var(--ct-heading);
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .ct-profile-body {
    padding-inline: 1rem;
  }

  .ct-profile-actions {
    width: 100%;
  }

  .ct-profile-stats > div {
    border-inline-end: 0;
    border-bottom: 1px solid var(--ct-border);
  }
}

.ct-meta-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-meta-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ct-meta-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  font-size: 1.0625rem;
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
}

.ct-meta-label {
  display: block;
  font-size: 0.75rem;
  color: var(--ct-muted);
}

.ct-meta-value {
  display: block;
  font-weight: 600;
  color: var(--ct-heading);
  overflow-wrap: anywhere;
}

.ct-danger-zone {
  border-color: color-mix(in srgb, #ea5455 28%, var(--ct-border));
}

.ct-danger-zone .ct-card-header {
  border-bottom-color: color-mix(in srgb, #ea5455 18%, var(--ct-border));
}

.ct-danger-zone p {
  color: var(--ct-muted);
  font-size: 0.875rem;
}

/*
* Split form sections (create / edit)
******************************************************************************/

.ct-form-section.is-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 2.5rem;
}

@media (min-width: 992px) {
  .ct-form-section.is-split {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  }
}

.ct-form-section.is-split .ct-form-section-title {
  margin-bottom: 0.375rem;
}

.ct-form-section-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ct-muted);
}

.ct-card-footer.is-sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--ct-surface-muted) 90%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
}

.ct-card-footer .ct-footer-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-inline-end: auto;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
}

.ct-switch-row .form-check-input {
  flex-shrink: 0;
  width: 2.5rem;
  height: 1.375rem;
  margin: 0;
  cursor: pointer;
}

.ct-switch-row label {
  cursor: pointer;
}

.ct-switch-row strong {
  display: block;
  font-size: 0.875rem;
  color: var(--ct-heading);
}

.ct-switch-row small {
  display: block;
  color: var(--ct-muted);
}

.ct-settings-nav {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem;
}

.ct-settings-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--ct-radius-sm);
  font-weight: 600;
  color: var(--ct-heading);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ct-settings-nav a small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ct-muted);
}

.ct-settings-nav a:hover,
.ct-settings-nav a.active {
  background: var(--ct-primary-soft);
  color: var(--ct-primary);
}

.ct-settings-nav a.active .ct-icon-tile {
  background: var(--ct-primary) !important;
  color: var(--ct-on-primary) !important;
}

.ct-settings-section {
  scroll-margin-top: 6.5rem;
}

/*
* Home & reports: KPI tiles, deltas, bar lists, charts
******************************************************************************/

.ct-hero.is-compact {
  padding: 1.625rem 1.875rem;
}

.ct-hero.is-compact .ct-hero-title {
  margin-top: 0.75rem;
  font-size: 1.5rem;
}

.ct-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ct-hero-stat {
  min-width: 8.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--ct-radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}

.ct-hero-stat span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.ct-hero-stat strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.ct-kpi {
  height: 100%;
}

.ct-kpi .card-body {
  display: flex;
  flex-direction: column;
  padding: 1.125rem 1.25rem 1rem;
}

.ct-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ct-kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-kpi-label .ct-icon-tile {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5625rem;
}

.ct-kpi-label .ct-icon-tile i {
  font-size: 1.0625rem;
}

.ct-kpi-value {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ct-heading);
  overflow-wrap: anywhere;
}

.ct-kpi-value small {
  margin-inline-end: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ct-muted);
}

.ct-kpi-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ct-muted);
}

.ct-kpi-spark {
  height: 3rem;
  margin: 0.75rem -0.5rem -0.75rem;
}

.ct-info-tip {
  display: inline-flex;
  color: var(--ct-muted);
  cursor: help;
}

.ct-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.125rem 0.4375rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.ct-delta i {
  font-size: 0.875rem;
}

.ct-delta.is-good {
  color: #0f7a3d;
  background: rgba(40, 199, 111, 0.14);
}

.ct-delta.is-bad {
  color: #c23a3b;
  background: rgba(234, 84, 85, 0.12);
}

.ct-delta.is-flat {
  color: var(--ct-text);
  background: var(--ct-surface-muted);
}

.dark-style .ct-delta.is-good {
  color: #4ade80;
}

.dark-style .ct-delta.is-bad {
  color: #ff8a8b;
}

.ct-barlist {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-barlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.375rem 0.75rem;
}

.ct-barlist-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-barlist-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-barlist-value {
  font-size: 0.8125rem;
  color: var(--ct-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ct-barlist-value strong {
  color: var(--ct-heading);
}

.ct-barlist-track {
  grid-column: 1 / -1;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ct-surface-muted);
  box-shadow: inset 0 0 0 1px var(--ct-border);
}

.ct-barlist-fill {
  display: block;
  width: var(--ct-bar, 0%);
  height: 100%;
  border-radius: 999px;
  background: var(--ct-primary);
  animation: ct-bar-grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: left center;
}

[dir=rtl] .ct-barlist-fill {
  transform-origin: right center;
}

@keyframes ct-bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.ct-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ct-muted);
}

.ct-chart {
  min-height: 18rem;
  margin: 0 -0.5rem;
}

.ct-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 16rem;
  text-align: center;
  color: var(--ct-muted);
}

.ct-chart-empty i {
  font-size: 2rem;
  color: color-mix(in srgb, var(--ct-primary) 45%, var(--ct-border));
}

.ct-chart-empty strong {
  color: var(--ct-heading);
}

.ct-ratio {
  display: grid;
  gap: 0.375rem;
}

.ct-ratio-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-ratio-head strong {
  font-size: 1.125rem;
  color: var(--ct-heading);
}

.ct-rank {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ct-text);
  background: var(--ct-surface-muted);
  border: 1px solid var(--ct-border);
}

.ct-rank.is-first {
  color: var(--ct-navy);
  background: var(--ct-yellow);
  border-color: transparent;
}

/*
* Report filters
******************************************************************************/

.ct-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.875rem 1.25rem;
}

.ct-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.ct-presets a {
  padding: 0.4375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--ct-border);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-text);
  background: var(--ct-surface);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ct-presets a:hover {
  color: var(--ct-primary);
  border-color: color-mix(in srgb, var(--ct-primary) 35%, var(--ct-border));
}

.ct-presets a.active {
  color: var(--ct-on-primary);
  background: var(--ct-primary);
  border-color: transparent;
}

.ct-custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ct-custom-range .form-control {
  width: 10rem;
  min-height: 2.375rem;
}

/*
* Confirmation dialog
******************************************************************************/

.ct-swal-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  color: #ea5455;
  background: rgba(234, 84, 85, 0.12);
  box-shadow: 0 0 0 10px rgba(234, 84, 85, 0.06);
  animation: ct-swal-pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ct-swal-icon i {
  font-size: 2rem;
}

.ct-swal-icon.is-warning {
  color: #ff9f43;
  background: rgba(255, 159, 67, 0.14);
  box-shadow: 0 0 0 10px rgba(255, 159, 67, 0.07);
}

.swal2-popup.ct-swal {
  width: 26rem;
  padding: 1.75rem 1.75rem 1.5rem;
}

.swal2-popup.ct-swal .swal2-icon {
  display: none !important;
}

.swal2-popup.ct-swal .swal2-actions {
  width: 100%;
  flex-wrap: nowrap;
}

.swal2-popup.ct-swal .swal2-actions .btn {
  flex: 1;
}

@keyframes ct-swal-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/*
* Print (reports)
******************************************************************************/

@media print {
  .layout-menu,
  .layout-navbar,
  .layout-overlay,
  .ct-no-print,
  .template-customizer,
  .template-customizer-open-btn {
    display: none !important;
  }

  .layout-page,
  .layout-content-navbar .layout-page {
    padding: 0 !important;
  }

  .content-wrapper > .container-xxl {
    max-width: none;
    padding: 0 !important;
    animation: none;
  }

  .card {
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/*
* Split layout for forms built from shared partials (title in the left column)
******************************************************************************/

@media (min-width: 992px) {
  .ct-form-auto-split .ct-form-section {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    column-gap: 2.5rem;
    row-gap: 0;
  }

  .ct-form-auto-split .ct-form-section > .ct-form-section-title {
    grid-column: 1;
    grid-row: 1 / span 6;
    align-self: start;
  }

  .ct-form-auto-split .ct-form-section > :not(.ct-form-section-title) {
    grid-column: 2;
  }
}

[dir=rtl] .pagination .ti-chevron-left,
[dir=rtl] .pagination .ti-chevron-right {
  transform: scaleX(-1);
}

.ct-upload {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--ct-radius-sm);
  border: 1px dashed color-mix(in srgb, var(--ct-primary) 25%, var(--ct-border));
  background: var(--ct-surface-muted);
}

.ct-upload .ct-upload-preview {
  flex-shrink: 0;
  background: var(--ct-surface);
}

/*
* Document gallery & lightbox
******************************************************************************/

.ct-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1rem;
}

.ct-doc {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--ct-radius-sm);
  border: 1px solid var(--ct-border);
  background: var(--ct-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ct-doc:not(.is-missing):hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ct-primary) 35%, var(--ct-border));
  box-shadow: var(--ct-shadow-lg);
}

.ct-doc.is-missing {
  border-style: dashed;
  background: transparent;
}

.ct-doc-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--ct-border);
  background:
    radial-gradient(rgba(30, 58, 138, 0.08) 1px, transparent 1.2px) 0 0 / 12px 12px,
    var(--ct-surface-muted);
  cursor: pointer;
}

.ct-doc.is-missing .ct-doc-thumb {
  cursor: default;
  border-bottom-style: dashed;
}

.ct-doc-thumb img {
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.ct-doc:hover .ct-doc-thumb img {
  transform: scale(1.04);
}

.ct-doc-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ct-muted);
}

.ct-doc-file i {
  font-size: 2.75rem;
  color: color-mix(in srgb, var(--ct-primary) 55%, var(--ct-muted));
}

.ct-doc.is-missing .ct-doc-file i {
  color: var(--ct-muted);
  opacity: 0.6;
}

.ct-doc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 27, 42, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ct-doc-overlay i {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.375rem;
  color: var(--ct-navy);
  background: var(--ct-yellow);
  transform: scale(0.8);
  transition: transform 0.2s ease;
}

.ct-doc-thumb:hover .ct-doc-overlay,
.ct-doc-thumb:focus-visible .ct-doc-overlay {
  opacity: 1;
}

.ct-doc-thumb:hover .ct-doc-overlay i,
.ct-doc-thumb:focus-visible .ct-doc-overlay i {
  transform: scale(1);
}

.ct-doc-badge {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  background: rgba(13, 27, 42, 0.75);
  backdrop-filter: blur(4px);
}

.ct-doc-badge.is-private {
  color: var(--ct-navy);
  background: var(--ct-yellow);
}

.ct-doc-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
}

.ct-doc-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-doc-meta {
  display: block;
  font-size: 0.71875rem;
  color: var(--ct-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-lightbox .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: calc(var(--ct-radius) + 0.25rem);
  color: #fff;
  background: #0a1522;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}

.ct-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ct-lightbox-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.ct-lightbox-file {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-lightbox-counter {
  margin-inline-end: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.ct-lightbox-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.625rem;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ct-lightbox-btn:hover {
  color: var(--ct-navy);
  background: var(--ct-yellow);
}

.ct-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 1.25rem 4rem;
  background: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px) 0 0 / 18px 18px;
}

.ct-lightbox-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.ct-lightbox-media img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: var(--ct-radius-sm);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  animation: ct-fade-up 0.3s ease both;
}

.ct-lightbox-media iframe {
  width: 100%;
  height: 74vh;
  border: 0;
  border-radius: var(--ct-radius-sm);
  background: #fff;
}

.ct-lightbox-nav {
  position: absolute;
  top: 50%;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 1.25rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-50%);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ct-lightbox-nav:hover {
  color: var(--ct-navy);
  background: var(--ct-yellow);
}

.ct-lightbox-nav.is-prev {
  inset-inline-start: 0.75rem;
}

.ct-lightbox-nav.is-next {
  inset-inline-end: 0.75rem;
}

[dir=rtl] .ct-lightbox-nav i {
  transform: scaleX(-1);
}

@media (max-width: 575.98px) {
  .ct-lightbox-stage {
    padding: 1rem 0.75rem 4rem;
  }

  .ct-lightbox-nav {
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }
}

/*
* Roles & permissions
******************************************************************************/

@property --ct-ring {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

/* Role cards (index) */

.ct-role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-border);
  background: var(--ct-surface);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ct-role-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--ct-primary) 35%, var(--ct-border));
  box-shadow: var(--ct-shadow-lg);
}

.ct-role-card.is-protected {
  background:
    linear-gradient(180deg, rgba(255, 214, 0, 0.09) 0%, transparent 5.5rem),
    var(--ct-surface);
}

.ct-role-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem 1.25rem 0;
}

.ct-role-card-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ct-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-role-card-title:hover {
  color: var(--ct-primary);
}

.ct-role-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}

.ct-role-card-badges .badge {
  font-size: 0.6875rem;
}

.ct-role-card-head .ct-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ct-role-card-head .ct-actions {
  margin-inline-start: auto;
  margin-top: -0.25rem;
  margin-inline-end: -0.375rem;
}

.ct-role-card-body {
  display: grid;
  gap: 1rem;
  flex: 1;
  padding: 1.125rem 1.25rem 1.25rem;
}

.ct-role-access {
  display: grid;
  gap: 0.5rem;
}

.ct-role-access-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-role-access-head strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ct-heading);
  font-variant-numeric: tabular-nums;
}

.ct-role-access-head strong small {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-role-access .ct-barlist-track {
  height: 0.375rem;
}

.ct-role-card.is-protected .ct-barlist-fill {
  background: linear-gradient(90deg, var(--ct-gold), var(--ct-yellow));
}

.ct-role-card-foot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
  border-bottom-left-radius: var(--ct-radius);
  border-bottom-right-radius: var(--ct-radius);
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-role-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: auto;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ct-primary);
}

.ct-role-card-link i {
  transition: transform 0.18s ease;
}

.ct-role-card:hover .ct-role-card-link i {
  transform: translateX(3px);
}

[dir=rtl] .ct-role-card-link i {
  transform: scaleX(-1);
}

[dir=rtl] .ct-role-card:hover .ct-role-card-link i {
  transform: scaleX(-1) translateX(3px);
}

.ct-role-card.is-new {
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 15rem;
  padding: 1.5rem;
  text-align: center;
  border-style: dashed;
  border-width: 1.5px;
  background: transparent;
  color: var(--ct-muted);
}

.ct-role-card.is-new:hover {
  background: var(--ct-primary-soft);
  box-shadow: none;
}

.ct-role-card.is-new strong {
  color: var(--ct-heading);
}

.ct-role-card.is-new small {
  max-width: 16rem;
}

.ct-role-card-plus {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ct-navy);
  background: var(--ct-yellow);
  box-shadow: 0 8px 20px -10px rgba(255, 214, 0, 0.9);
  transition: transform 0.18s ease;
}

.ct-role-card.is-new:hover .ct-role-card-plus {
  transform: scale(1.06) rotate(90deg);
}

/* Module coverage strip: one chip per dashboard module */

.ct-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-modules li {
  width: 1.875rem;
  height: 1.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px dashed var(--ct-border);
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--ct-muted) 70%, transparent);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ct-modules li.is-partial {
  border-style: solid;
  border-color: color-mix(in srgb, var(--ct-primary) 22%, transparent);
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
}

.ct-modules li.is-full {
  border-style: solid;
  border-color: transparent;
  color: var(--ct-on-primary);
  background: var(--ct-primary);
}

/* Overlapping avatars of the admins holding a role */

.ct-avatar-stack {
  display: inline-flex;
  align-items: center;
}

.ct-avatar-stack > * + * {
  margin-inline-start: -0.5rem;
}

.ct-avatar-stack .ct-avatar {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.6875rem;
  box-shadow: 0 0 0 2px var(--ct-surface-muted);
}

.ct-avatar-stack .ct-avatar-more {
  font-weight: 700;
  color: var(--ct-text);
  background: var(--ct-surface);
  box-shadow: 0 0 0 2px var(--ct-surface-muted), inset 0 0 0 1px var(--ct-border);
}

/* Permission matrix */

.ct-perm-matrix-wrap {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius-sm);
}

.ct-perm-matrix {
  --ct-row-bg: var(--ct-surface);
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.ct-perm-matrix thead th {
  padding: 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  vertical-align: bottom;
  white-space: nowrap;
  color: var(--ct-muted);
  background: var(--ct-surface-muted);
  border-bottom: 1px solid var(--ct-border);
}

.ct-perm-matrix thead th:first-child {
  position: sticky;
  inset-inline-start: 0;
  z-index: 2;
  text-align: start;
  padding-inline-start: 1rem;
  border-start-start-radius: var(--ct-radius-sm);
}

.ct-perm-matrix thead th:last-child {
  border-start-end-radius: var(--ct-radius-sm);
}

.ct-perm-action-head {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ct-perm-action-head i {
  font-size: 0.9375rem;
}

.ct-perm-matrix thead .form-check-input {
  display: block;
  margin: 0.5rem auto 0;
  cursor: pointer;
}

.ct-perm-section > th {
  padding: 1.125rem 1rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: start;
  color: var(--ct-muted);
  background: var(--ct-surface);
}

.ct-perm-section > th span {
  position: sticky;
  inset-inline-start: 1rem;
}

.ct-perm-row > * {
  background: var(--ct-row-bg);
  border-top: 1px solid var(--ct-border);
  transition: background-color 0.15s ease;
}

.ct-perm-row:hover {
  --ct-row-bg: color-mix(in srgb, var(--ct-primary) 4%, var(--ct-surface));
}

.ct-perm-module {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  min-width: 19rem;
  padding: 0.75rem 1rem;
  font-weight: 400;
  text-align: start;
}

.ct-perm-module-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ct-perm-module-inner > .form-check-input {
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.ct-perm-module .ct-icon-tile {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.ct-perm-module .ct-icon-tile i {
  font-size: 1.125rem;
}

.ct-perm-row:not(.has-access) .ct-perm-module .ct-icon-tile {
  filter: grayscale(1);
  opacity: 0.55;
}

.ct-perm-module-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-perm-module-desc {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--ct-muted);
}

.ct-perm-module-count {
  flex-shrink: 0;
  margin-inline-start: auto;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.71875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ct-muted);
  background: var(--ct-surface-muted);
  border: 1px solid var(--ct-border);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ct-perm-row.has-access .ct-perm-module-count {
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
  border-color: transparent;
}

.ct-perm-row.is-full .ct-perm-module-count {
  color: var(--ct-on-primary);
  background: var(--ct-primary);
}

.ct-perm-cell {
  min-width: 5.25rem;
  padding: 0.5rem;
  text-align: center;
  vertical-align: middle;
}

.ct-perm-toggle {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.ct-perm-toggle:hover {
  background: var(--ct-primary-soft);
}

.ct-perm-toggle .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
}

.ct-perm-toggle.is-sensitive::after,
.ct-perm-legend .ct-sensitive-dot {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #ff9f43;
  box-shadow: 0 0 0 2px var(--ct-row-bg, var(--ct-surface));
}

.ct-perm-toggle.is-sensitive::after {
  position: absolute;
  top: 0.3125rem;
  inset-inline-end: 0.3125rem;
}

.ct-perm-toggle.is-sensitive .form-check-input:checked {
  background-color: #ff9f43;
  border-color: #ff9f43;
  box-shadow: 0 2px 6px 0 rgba(255, 159, 67, 0.35);
}

.ct-perm-na {
  font-weight: 600;
  color: color-mix(in srgb, var(--ct-muted) 40%, transparent);
  cursor: default;
}

.ct-perm-state {
  width: 1.875rem;
  height: 1.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
}

.ct-perm-state.is-granted {
  color: #0f7a3d;
  background: rgba(40, 199, 111, 0.14);
}

.ct-perm-state.is-granted.is-sensitive {
  color: #b85f0b;
  background: rgba(255, 159, 67, 0.16);
}

.ct-perm-state.is-denied {
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--ct-muted) 70%, transparent);
  border: 1px dashed var(--ct-border);
}

.dark-style .ct-perm-state.is-granted {
  color: #4ade80;
}

.dark-style .ct-perm-state.is-granted.is-sensitive {
  color: #ffb76b;
}

.ct-perm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: var(--ct-muted);
}

.ct-perm-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.ct-perm-legend .ct-perm-state {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.75rem;
}

.ct-perm-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

@media (max-width: 767.98px) {
  .ct-perm-module {
    min-width: 12.5rem;
  }

  .ct-perm-module-desc {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .ct-perm-module {
    min-width: 10rem;
    padding-inline: 0.75rem;
  }

  .ct-perm-module .ct-icon-tile {
    display: none;
  }

  .ct-perm-cell {
    min-width: 4.25rem;
  }
}

/* Access summary (create / edit sidebar) */

.ct-access-summary {
  position: sticky;
  top: 6.5rem;
}

.ct-access-figure {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.ct-ring {
  --ct-ring: 0;
  position: relative;
  flex-shrink: 0;
  width: 5.5rem;
  height: 5.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ct-primary) calc(var(--ct-ring) * 1%), var(--ct-surface-muted) 0);
  transition: --ct-ring 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ct-ring::before {
  content: '';
  position: absolute;
  inset: 0.5rem;
  border-radius: 50%;
  background: var(--ct-surface);
  box-shadow: inset 0 0 0 1px var(--ct-border);
}

.ct-ring span {
  position: relative;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ct-heading);
  font-variant-numeric: tabular-nums;
}

.ct-access-total strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ct-heading);
  font-variant-numeric: tabular-nums;
}

.ct-access-total strong small {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ct-muted);
}

.ct-access-total > span {
  display: block;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-access-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ct-text);
}

.ct-access-note[hidden] {
  display: none;
}

.ct-access-note i {
  font-size: 1.125rem;
  color: #28c76f;
}

.ct-access-block + .ct-access-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--ct-border);
}

.ct-access-label {
  display: block;
  margin-bottom: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-elevated {
  padding: 0.875rem 1rem;
  border-radius: var(--ct-radius-sm);
  border: 1px solid rgba(255, 159, 67, 0.32);
  background: rgba(255, 159, 67, 0.08);
}

.ct-elevated-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #b85f0b;
}

.dark-style .ct-elevated-title {
  color: #ffb76b;
}

.ct-elevated p {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  color: var(--ct-text);
}

.ct-elevated-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.ct-elevated-chips span {
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  font-size: 0.71875rem;
  font-weight: 600;
  color: var(--ct-heading);
  background: var(--ct-surface);
  border: 1px solid rgba(255, 159, 67, 0.32);
}

.ct-change-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ct-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ct-change.is-added {
  color: #0f7a3d;
  background: rgba(40, 199, 111, 0.14);
}

.ct-change.is-removed {
  color: #c23a3b;
  background: rgba(234, 84, 85, 0.12);
}

.ct-change.is-none {
  color: var(--ct-muted);
  background: var(--ct-surface-muted);
}

.dark-style .ct-change.is-added {
  color: #4ade80;
}

.dark-style .ct-change.is-removed {
  color: #ff8a8b;
}

.ct-footer-hint.has-changes {
  color: var(--ct-heading);
  font-weight: 600;
}

.ct-footer-hint.has-changes i {
  color: #ff9f43;
}

/* Role members (show) */

.ct-member-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  margin-inline: -0.75rem;
  border-radius: var(--ct-radius-sm);
  color: inherit;
  transition: background-color 0.15s ease;
}

a.ct-member:hover {
  color: inherit;
  background: var(--ct-primary-soft);
}

.ct-member > span:not(.ct-avatar) {
  flex: 1;
  min-width: 0;
}

.ct-member strong,
.ct-member small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-member strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-member small {
  font-size: 0.75rem;
  color: var(--ct-muted);
}

.ct-member .ti-chevron-right {
  color: var(--ct-muted);
  opacity: 0;
  transition: opacity 0.15s ease;
}

a.ct-member:hover .ti-chevron-right {
  opacity: 1;
}

[dir=rtl] .ct-member .ti-chevron-right {
  transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
  .ct-role-card,
  .ct-ring {
    transition: none;
  }
}

/*
* Menu builder (vendor menu, item form and admin review)
******************************************************************************/

.ct-tabs.is-standalone {
  border-bottom: 0;
}

.ct-tabs a i {
  font-size: 1rem;
}

a.ct-stat.is-active {
  border-color: color-mix(in srgb, var(--ct-stat-accent, var(--ct-primary)) 55%, var(--ct-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ct-stat-accent, var(--ct-primary)) 14%, transparent);
}

a.ct-stat.is-active::after {
  opacity: 1;
}

.ct-sticky-card {
  position: sticky;
  top: 6.5rem;
}

@media (max-width: 991.98px) {
  .ct-sticky-card {
    position: static;
  }
}

/* Drag and drop ordering */

.ct-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  color: var(--ct-muted);
  cursor: grab;
  opacity: 0.55;
  touch-action: none;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.ct-drag-handle:hover {
  opacity: 1;
  color: var(--ct-heading);
  background: var(--ct-surface-muted);
}

.ct-drag-handle:active {
  cursor: grabbing;
}

.ct-sortable-ghost {
  opacity: 0.5;
  background: var(--ct-primary-soft) !important;
}

.ct-sortable-chosen {
  background: var(--ct-surface);
  box-shadow: var(--ct-shadow-lg);
}

/* Section list */

.ct-section-list {
  display: grid;
  gap: 0.125rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
}

.ct-section-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.25rem;
  border-radius: var(--ct-radius-sm);
  transition: background-color 0.15s ease;
}

.ct-section-item:hover {
  background: var(--ct-surface-muted);
}

.ct-section-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  color: var(--ct-heading);
}

.ct-section-link:hover {
  color: var(--ct-primary);
}

.ct-section-link strong,
.ct-section-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-section-link strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.ct-section-link small {
  font-size: 0.75rem;
  color: var(--ct-muted);
}

.ct-section-item.is-hidden .ct-section-link strong {
  color: var(--ct-muted);
}

.ct-section-item .dropdown-item:disabled {
  opacity: 0.45;
}

/* Item groups and rows */

.ct-menu-group {
  scroll-margin-top: 6.5rem;
}

.ct-menu-group + .ct-menu-group {
  border-top: 1px solid var(--ct-border);
}

.ct-menu-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
}

.ct-menu-group-head h6 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.625rem;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-menu-group-head h6 bdi {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-menu-group-head small {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-menu-group.is-warning .ct-menu-group-head {
  background: color-mix(in srgb, var(--bs-warning) 9%, var(--ct-surface));
}

.ct-menu-group-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.125rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-menu-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-menu-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.5rem 0.875rem 1rem;
  scroll-margin-top: 6.5rem;
  transition: background-color 0.2s ease;
}

.ct-menu-item + .ct-menu-item {
  border-top: 1px dashed var(--ct-border);
}

.ct-menu-item:hover {
  background: color-mix(in srgb, var(--ct-surface-muted) 70%, transparent);
}

.ct-menu-item:target {
  background: var(--ct-primary-soft);
}

.ct-menu-item-thumb {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.ct-menu-item-thumb.ct-thumb-placeholder i {
  font-size: 1.25rem;
}

.ct-menu-item-body {
  flex: 1;
  min-width: 0;
}

.ct-menu-item-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-menu-item-name:hover {
  color: var(--ct-primary);
}

.ct-menu-item-ar {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-menu-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.875rem;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--ct-muted);
}

.ct-menu-item-meta > span:not(.badge) {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ct-menu-item-meta i {
  font-size: 0.875rem;
}

.ct-menu-item-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--ct-radius-sm);
  font-size: 0.8125rem;
  white-space: normal;
  color: var(--bs-danger);
  background: color-mix(in srgb, var(--bs-danger) 8%, transparent);
}

.ct-menu-item-note i {
  margin-top: 0.125rem;
}

.ct-menu-item-price {
  flex-shrink: 0;
  min-width: 6.5rem;
  text-align: end;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ct-heading);
}

.ct-menu-item-price small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-menu-item-toggle {
  flex-shrink: 0;
  margin: 0;
}

.ct-menu-item-toggle .form-check-input {
  width: 2.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
}

.ct-menu-item.is-unavailable .ct-menu-item-thumb {
  filter: grayscale(1);
  opacity: 0.55;
}

.ct-menu-item.is-unavailable .ct-menu-item-name,
.ct-menu-item.is-unavailable .ct-menu-item-price {
  color: var(--ct-muted);
}

.ct-unavailable-flag {
  display: none !important;
}

.ct-menu-item.is-unavailable .ct-unavailable-flag {
  display: inline-flex !important;
}

@media (max-width: 575.98px) {
  .ct-menu-item {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .ct-menu-item-body {
    flex-basis: calc(100% - 7.5rem);
  }

  .ct-menu-item-price {
    min-width: 0;
    margin-inline-start: auto;
  }
}

/* Empty menu onboarding */

.ct-menu-onboard {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 0 1rem;
  text-align: center;
}

.ct-menu-onboard > .ct-icon-tile {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  border-radius: 1.25rem;
}

.ct-menu-onboard > .ct-icon-tile i {
  font-size: 1.875rem;
}

.ct-menu-onboard h5 {
  margin-bottom: 0.5rem;
  color: var(--ct-heading);
}

.ct-menu-onboard > p {
  max-width: 30rem;
  margin: 0 auto 1.5rem;
  color: var(--ct-muted);
}

.ct-menu-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
  text-align: start;
}

@media (max-width: 575.98px) {
  .ct-menu-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ct-menu-step {
  padding: 1rem;
  border-radius: var(--ct-radius-sm);
  border: 1px dashed var(--ct-border);
}

.ct-menu-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
}

.ct-menu-step strong {
  display: block;
  font-size: 0.875rem;
  color: var(--ct-heading);
}

.ct-menu-step small {
  display: block;
  margin-top: 0.125rem;
  color: var(--ct-muted);
}

.ct-menu-copy {
  padding: 1.25rem;
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
  text-align: start;
}

/* Item form repeaters */

.ct-repeat-list {
  display: grid;
  gap: 0.75rem;
}

.ct-repeat-head,
.ct-repeat-row {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1fr) 2.25rem;
  gap: 0.75rem;
  align-items: start;
}

/* A size row's prices (individual, special, corporate) sit on a second line under its names. */
.ct-variant-prices {
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ct-variant-prices .form-label {
  color: var(--ct-muted);
}

.ct-repeat-head.is-option,
.ct-repeat-row.is-option {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 11rem) 2.25rem;
}

.ct-repeat-head {
  margin-bottom: -0.25rem;
  font-size: 0.71875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ct-muted);
}

.ct-title-badge {
  margin-inline-start: 0.5rem;
  font-size: 0.75rem;
  vertical-align: middle;
}

.ct-repeat-default {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
}

.ct-repeat-default .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
}

.ct-repeat-row > .ct-action-btn {
  margin-top: 0.375rem;
}

.ct-repeat-row .invalid-feedback {
  display: block;
}

@media (max-width: 767.98px) {
  .ct-repeat-head {
    display: none;
  }

  .ct-repeat-row,
  .ct-repeat-row.is-option {
    grid-template-columns: minmax(0, 1fr) 2.25rem;
    padding: 0.875rem;
    border-radius: var(--ct-radius-sm);
    border: 1px solid var(--ct-border);
  }

  .ct-repeat-row > :not(.ct-action-btn) {
    grid-column: 1;
  }

  .ct-repeat-row > .ct-action-btn {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }

  .ct-repeat-default {
    justify-content: flex-start;
    height: auto;
  }

  .ct-variant-prices {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ct-option-group {
  padding: 1.25rem;
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-border);
  background: var(--ct-surface-muted);
}

.ct-option-group + .ct-option-group {
  margin-top: 1rem;
}

.ct-option-group-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--ct-border);
}

.ct-option-group-head > .row {
  flex: 1;
  min-width: 0;
}

.ct-option-group .form-control,
.ct-option-group .input-group-text {
  background-color: var(--ct-surface);
}

.ct-repeat-empty {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--ct-radius);
  border: 1px dashed var(--ct-border);
  color: var(--ct-muted);
}

.ct-repeat-empty strong {
  display: block;
  color: var(--ct-heading);
}

/* Live item preview */

.ct-item-preview {
  overflow: hidden;
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-border);
  background: var(--ct-surface);
}

.ct-item-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  font-size: 2.25rem;
  color: var(--ct-muted);
  background: var(--ct-surface-muted);
}

.ct-item-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ct-item-preview-body {
  padding: 1rem 1.125rem 1.125rem;
}

.ct-item-preview-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-item-preview-title span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ct-item-preview-price {
  flex-shrink: 0;
  color: var(--ct-primary);
  white-space: nowrap;
}

.ct-item-preview-desc {
  display: -webkit-box;
  margin: 0.375rem 0 0;
  overflow: hidden;
  font-size: 0.8125rem;
  color: var(--ct-muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ct-item-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.ct-item-preview-chips span {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.71875rem;
  font-weight: 600;
  color: var(--ct-primary);
  background: var(--ct-primary-soft);
}

.ct-item-preview-chips:empty {
  display: none;
}

/* Admin review */

.ct-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--ct-border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ct-heading);
  background: var(--ct-primary-soft);
}

.ct-bulkbar[hidden] {
  display: none;
}

.ct-bulkbar .btn {
  margin-inline-start: auto;
}

.ct-check-cell {
  width: 1%;
}

.ct-check-cell .form-check-input {
  margin: 0;
  cursor: pointer;
}

.ct-option-summary + .ct-option-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--ct-border);
}

.ct-option-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.ct-option-summary-head strong {
  color: var(--ct-heading);
}

.ct-option-summary-head bdi {
  margin-inline-start: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-option-summary ul {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ct-option-summary li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--ct-radius-sm);
  font-size: 0.875rem;
  background: var(--ct-surface-muted);
}

.ct-option-summary li bdi {
  margin-inline-start: 0.5rem;
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

@media (prefers-reduced-motion: reduce) {
  .ct-menu-item,
  .ct-menu-item-thumb,
  .ct-section-item {
    transition: none;
  }
}

.ct-form-actionbar {
  margin-top: 1.5rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-shadow);
}

.ct-repeat-empty span:not(.ct-icon-tile) {
  display: block;
  font-size: 0.8125rem;
}

/*
* Live new order toasts (js/ct-live-updates.js): one card per order, newest on top, tinted by order type.
* The progress bar is the card's lifetime: it pauses on hover, on focus and while the tab is hidden.
******************************************************************************/

.ct-live-toasts {
  position: fixed;
  top: 5.25rem;
  inset-inline-end: 1.5rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(23rem, calc(100vw - 2rem));
  pointer-events: none;
}

.ct-live-toast {
  --ct-toast-accent: #2f55c4;
  --ct-toast-on-accent: #fff;
  --ct-toast-from: 110%;
  position: relative;
  display: flex;
  gap: 0.875rem;
  padding-block: 1rem 1.125rem;
  padding-inline: 1.125rem 2.75rem;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  box-shadow: var(--ct-shadow-lg);
  color: var(--ct-text);
  overflow: hidden;
  pointer-events: auto;
  animation: ct-live-toast-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

[dir='rtl'] .ct-live-toast {
  --ct-toast-from: -110%;
}

.ct-live-toast::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 0.25rem;
  background: var(--ct-toast-accent);
}

.ct-live-toast.is-leaving {
  pointer-events: none;
  animation: ct-live-toast-out 0.3s ease-in forwards;
}

.ct-live-toast[data-type='shipping'] {
  --ct-toast-accent: #0e7490;
}

.ct-live-toast[data-type='mystery_shopping'] {
  --ct-toast-accent: #7c3aed;
}

.ct-live-toast[data-type='family'] {
  --ct-toast-accent: #be185d;
}

.ct-live-toast[data-type='surprise'] {
  --ct-toast-accent: #c2410c;
}

.ct-live-toast[data-type='summary'] {
  --ct-toast-accent: var(--ct-royal);
}

.dark-style .ct-live-toast {
  --ct-toast-accent: #8fb0ff;
  --ct-toast-on-accent: var(--ct-navy);
}

.dark-style .ct-live-toast[data-type='shipping'] {
  --ct-toast-accent: #5fd4ea;
}

.dark-style .ct-live-toast[data-type='mystery_shopping'] {
  --ct-toast-accent: #b9a1ff;
}

.dark-style .ct-live-toast[data-type='family'] {
  --ct-toast-accent: #f58bbd;
}

.dark-style .ct-live-toast[data-type='surprise'] {
  --ct-toast-accent: #fdab6d;
}

.dark-style .ct-live-toast[data-type='summary'] {
  --ct-toast-accent: var(--ct-yellow);
}

.ct-live-toast__icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  font-size: 1.375rem;
  color: var(--ct-toast-accent);
  background: color-mix(in srgb, var(--ct-toast-accent) 12%, transparent);
}

.ct-live-toast__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: ct-live-toast-ring 1.6s ease-out 0.35s 3;
}

.ct-live-toast__body {
  flex: 1;
  min-width: 0;
}

.ct-live-toast__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-toast-accent);
}

.ct-live-toast__dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.1875rem color-mix(in srgb, currentColor 20%, transparent);
}

.ct-live-toast__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin-top: 0.25rem;
}

.ct-live-toast__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ct-heading);
}

.ct-live-toast__code {
  padding: 0.0625rem 0.4375rem;
  border: 1px solid var(--ct-border);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ct-heading);
  background: var(--ct-surface-muted);
}

.ct-live-toast__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
}

.ct-live-toast__meta i {
  flex: none;
  font-size: 0.9375rem;
  color: var(--ct-muted);
}

.ct-live-toast__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct-live-toast__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--ct-border);
}

.ct-live-toast__total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ct-heading);
}

.ct-live-toast__total small {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-live-toast__action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ct-toast-on-accent);
  background: var(--ct-toast-accent);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.ct-live-toast__action:hover,
.ct-live-toast__action:focus-visible {
  color: var(--ct-toast-on-accent);
  filter: brightness(1.08);
  box-shadow: 0 6px 16px -6px var(--ct-toast-accent);
}

.ct-live-toast__action i {
  font-size: 0.875rem;
  transition: transform 0.15s ease;
}

.ct-live-toast__action:hover i {
  transform: translateX(0.125rem);
}

[dir='rtl'] .ct-live-toast__action i {
  transform: scaleX(-1);
}

[dir='rtl'] .ct-live-toast__action:hover i {
  transform: scaleX(-1) translateX(0.125rem);
}

.ct-live-toast__close {
  position: absolute;
  top: 0.625rem;
  inset-inline-end: 0.625rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: var(--ct-muted);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ct-live-toast__close:hover,
.ct-live-toast__close:focus-visible {
  color: var(--ct-heading);
  background: var(--ct-surface-muted);
}

.ct-live-toast__progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 0.1875rem;
  background: var(--ct-toast-accent);
  opacity: 0.6;
  transform-origin: left center;
  animation: ct-live-toast-timer 10s linear forwards;
}

[dir='rtl'] .ct-live-toast__progress {
  transform-origin: right center;
}

.ct-live-toast:hover .ct-live-toast__progress,
.ct-live-toast:focus-within .ct-live-toast__progress,
.ct-live-toasts.is-paused .ct-live-toast__progress {
  animation-play-state: paused;
}

@keyframes ct-live-toast-in {
  from {
    opacity: 0;
    transform: translateX(var(--ct-toast-from)) scale(0.96);
  }
}

@keyframes ct-live-toast-out {
  to {
    opacity: 0;
    transform: translateX(var(--ct-toast-from)) scale(0.96);
  }
}

@keyframes ct-live-toast-ring {
  from {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ct-toast-accent) 45%, transparent);
  }

  to {
    box-shadow: 0 0 0 0.625rem transparent;
  }
}

@keyframes ct-live-toast-timer {
  to {
    transform: scaleX(0);
  }
}

@media (max-width: 575.98px) {
  .ct-live-toasts {
    top: auto;
    bottom: 1rem;
    inset-inline: 1rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-live-toast,
  .ct-live-toast.is-leaving {
    animation-duration: 0.01ms;
  }

  .ct-live-toast__icon::after {
    animation: none;
  }
}

/*
* Invoices: printable statements of what one party owes another (office ↔ captain, Captain Tayyar ↔ vendor or office)
******************************************************************************/

.ct-invoice-head,
.ct-invoice-parties {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--ct-border);
}

.ct-invoice-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-invoice-number {
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

.ct-invoice-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.25rem 1.25rem;
  margin: 0;
  font-size: 0.8125rem;
}

.ct-invoice-meta dt {
  font-weight: 500;
  color: var(--ct-muted);
}

.ct-invoice-meta dd {
  margin: 0;
  text-align: end;
  font-weight: 600;
  color: var(--ct-heading);
}

.ct-invoice-party {
  flex: 1 1 14rem;
  min-width: 0;
}

.ct-invoice-party-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ct-invoice-party-name {
  display: block;
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-invoice-party-line {
  display: block;
  font-size: 0.8125rem;
  color: var(--ct-text);
  overflow-wrap: anywhere;
}

.ct-statement {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 0;
}

.ct-statement dt,
.ct-statement dd {
  margin: 0;
  padding: 0.625rem 0;
  border-top: 1px solid var(--ct-border);
}

.ct-statement dt {
  font-weight: 500;
  color: var(--ct-text);
}

.ct-statement dt small {
  display: block;
  font-weight: 400;
  color: var(--ct-muted);
}

.ct-statement dd {
  text-align: end;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ct-heading);
}

/* A line that splits the one above it, not added to the total again. */
.ct-statement .is-part {
  padding-block: 0.375rem;
  border-top-style: dashed;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ct-muted);
}

.ct-statement dt.is-part {
  padding-inline-start: 1rem;
}

/* The sum of the lines above it, before what comes off it. */
.ct-statement .is-subtotal {
  border-top: 2px solid var(--ct-border);
  font-weight: 700;
  color: var(--ct-heading);
}

.ct-statement .is-total {
  padding-inline: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--ct-heading);
  background: var(--ct-primary-soft);
}

.ct-statement .is-total.is-collect {
  background: rgba(255, 159, 67, 0.16);
}

.ct-statement .is-total.is-pay {
  background: rgba(40, 199, 111, 0.14);
}

.ct-invoice-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding: 3rem 1.5rem 1.5rem;
}

.ct-invoice-signatures span {
  display: block;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ct-border);
  font-size: 0.8125rem;
  color: var(--ct-muted);
}

@media print {
  .ct-invoice {
    border: 0 !important;
  }

  .ct-invoice .table-responsive {
    overflow: visible !important;
  }

  .ct-invoice-section {
    break-inside: avoid;
  }
}
