/* GiftKarts / Digiosk dashboard shell — aligned with auth theme */

/* ── Base polish ─────────────────────────────────────────────── */

::selection {
  background: color-mix(in srgb, var(--color-cyan, #00aeef) 28%, transparent);
  color: var(--color-ink-900, #152033);
}

.gk-accent-rule {
  display: block;
  width: 3rem;
  height: 3px;
  border-radius: 9999px;
  background: var(--gk-accent-rule, linear-gradient(90deg, #f58220 0%, #8dc63f 28%, #00aeef 58%, #ec008c 100%));
}

#main-content {
  scroll-behavior: smooth;
}

#main-content:focus {
  outline: none;
}

.sidebar-nav-scroll,
#main-content {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--color-ink-300, #8a97b4) 55%, transparent) transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar,
#main-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb,
#main-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-ink-300, #8a97b4) 45%, transparent);
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb:hover,
#main-content::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--color-ink-500, #4a5878) 55%, transparent);
}

/* Mobile drawer: hidden by default (works before Alpine), open via data-open="1".
   Breakpoint matches Tailwind `lg` (1024px). */
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(calc(-100% - 1.25rem));
    pointer-events: none;
  }

  #sidebar[data-open="1"] {
    transform: translateX(0);
    pointer-events: auto;
  }
}

@media (min-width: 1024px) {
  #sidebar {
    transform: none;
    pointer-events: auto;
  }
}

/* ── Page transitions (HTMX SPA) ─────────────────────────────── */
/* Use opacity-only for the resting state. A lasting `transform`
   (even translateY(0)) makes position:fixed descendants bind to
   #spa-page and breaks mobile modals/sheets. */
#spa-page.shell-page-enter {
  opacity: 0;
}

#spa-page.shell-page-enter.shell-page-enter--active {
  opacity: 1;
  animation: shell-spa-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes shell-spa-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.is-loading #spa-page {
  opacity: 0.88;
  transition: opacity 0.18s ease;
}

/* Full-screen click lock + spinner (forms, fetch, HTMX). Max hold via JS = 30s.
   Markup starts with the HTML `hidden` attribute so a missing/stale shell.css
   cannot leak the "Working…" label into document flow (top-left FOUC). */
.global-ui-lock {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 240;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color-ink-900, #0f172a) 28%, transparent);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

body.is-loading .global-ui-lock,
body.ui-action-locked .global-ui-lock,
.global-ui-lock.is-active {
  display: flex;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

/* When JS removes [hidden], keep inactive state invisible until .is-active. */
.global-ui-lock:not(.is-active):not([hidden]) {
  display: none;
}

.global-ui-lock__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 9.5rem;
  padding: 1.15rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--color-border, #dde3ef) 80%, white);
  background: color-mix(in srgb, white 94%, var(--color-surface-2, #f1f5f9));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.global-ui-lock__spinner {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 2.5px solid color-mix(in srgb, var(--color-cyan, #00aeef) 22%, transparent);
  border-top-color: var(--color-cyan, #00aeef);
  animation: global-ui-lock-spin 0.7s linear infinite;
}

.global-ui-lock__label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-700, #334155);
}

@keyframes global-ui-lock-spin {
  to {
    transform: rotate(360deg);
  }
}

body.ui-action-locked,
body.is-loading {
  cursor: wait;
}

.shell-progress-bar {
  pointer-events: none;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 3px;
  opacity: 0;
  overflow: hidden;
  background: transparent;
  transition: opacity 0.14s ease;
}

.shell-progress-bar.htmx-request,
.htmx-request .shell-progress-bar {
  opacity: 1;
}

.shell-progress-bar__track {
  display: block;
  height: 100%;
  width: 38%;
  min-width: 9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #00aeef, #0074a1);
  box-shadow: 0 0 22px rgba(0, 174, 239, 0.32);
  animation: shell-progress-slide 1.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

#global-htmx-indicator .shell-loader-card {
  animation: shell-loader-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes shell-progress-slide {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(280%);
  }
}

@keyframes shell-loader-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ── Panels & cards (premium hybrid) ─────────────────────────── */

.shell-panel,
.shell-card {
  border: 1px solid var(--shell-card-border, color-mix(in srgb, #00aeef 10%, #d5e8f0));
  border-radius: var(--radius-xl, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, var(--color-surface, #fff) 100%);
  box-shadow: var(--shell-card-shadow, var(--shadow-sm));
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.shell-card:hover,
.shell-panel--lift:hover {
  border-color: color-mix(in srgb, var(--color-cyan, #00aeef) 28%, var(--color-border, #d5e8f0));
  box-shadow: var(--shell-card-hover-shadow, var(--shadow-md));
  transform: translateY(-2px);
}

.shell-panel--elevated,
.shell-card--elevated {
  box-shadow: var(--shadow-md);
}

.shell-panel--glass {
  background: color-mix(in srgb, white 82%, var(--color-sky-soft, #e6f8fd));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.shell-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-cyan, #00aeef) 18%, var(--color-border, #d5e8f0));
  background: color-mix(in srgb, white 88%, var(--color-sky-soft, #e6f8fd));
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink-500, #5b6b86);
  box-shadow: var(--shadow-sm);
}

.shell-chip--live::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #8dc63f;
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.22);
}

.admin-page-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-2xl, 28px);
  background:
    radial-gradient(80% 120% at 100% -10%, rgba(0, 174, 239, 0.16), transparent 58%),
    radial-gradient(55% 90% at 0% 110%, rgba(245, 130, 32, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7fcfe 100%);
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: var(--shell-card-shadow, var(--shadow-sm));
}

.admin-page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.35), rgba(245, 130, 32, 0.18), rgba(236, 0, 140, 0.12));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.admin-page-header::after {
  content: "";
  position: absolute;
  left: 1.35rem;
  right: 1.35rem;
  bottom: 0;
  height: 3px;
  border-radius: 9999px 9999px 0 0;
  background: var(--gk-accent-rule);
  opacity: 0.95;
}

@media (max-width: 640px) {
  .admin-page-header {
    border-radius: var(--radius-xl, 22px);
    padding: 1.1rem 1.1rem 1.25rem;
    gap: 0.75rem;
  }

  .admin-page-header__title {
    font-size: 1.25rem;
    letter-spacing: -0.03em;
  }

  .admin-page-header__description {
    font-size: 0.85rem;
    line-height: 1.55;
  }
}

.admin-page-header__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-cyan-deep, #0074a1);
}

.admin-page-header__title {
  margin-top: 0.3rem;
  font-family: var(--font-display, "Sora", ui-sans-serif, system-ui, sans-serif);
  font-size: clamp(1.4rem, 2.1vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-ink-900, #152033);
}

.admin-page-header__description {
  margin-top: 0.55rem;
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-ink-500, #5b6b86);
}

.admin-page-header__badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-cyan, #00aeef) 30%, white);
  background: color-mix(in srgb, var(--color-cyan, #00aeef) 12%, white);
  padding: 0.45rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-cyan-deep, #0074a1);
}

.admin-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem;
}

.admin-table-section {
  border: 1px solid var(--shell-card-border, #d5e8f0);
  border-radius: var(--radius-xl, 22px);
  background: var(--color-surface, #fff);
  box-shadow: var(--shell-card-shadow, var(--shadow-sm));
}

.admin-table-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border, #d5e8f0) 90%, white);
  padding: 1rem 1.15rem;
}

.shell-stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--shell-card-border, #d5e8f0);
  border-radius: var(--radius-xl, 22px);
  background:
    radial-gradient(90% 80% at 100% 0%, rgba(0, 174, 239, 0.08), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7fcfe 100%);
  box-shadow: var(--shell-card-shadow, var(--shadow-sm));
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.shell-stat-card::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gk-accent-rule);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.shell-stat-card:hover {
  border-color: color-mix(in srgb, var(--color-cyan, #00aeef) 32%, var(--color-border, #d5e8f0));
  box-shadow: var(--shell-card-hover-shadow, var(--shadow-md));
  transform: translateY(-2px);
}

.shell-stat-card:hover::after {
  opacity: 0.9;
}

.shell-stat-card__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-500, #5b6b86);
}

.shell-stat-card__value {
  margin-top: 0.55rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink-900, #152033);
}

.shell-stat-card__hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--color-ink-500, #5b6b86);
}

/* ── Filter bars ─────────────────────────────────────────────── */

.shell-filter-bar {
  border: 1px solid var(--shell-card-border, #d5e8f0);
  border-radius: var(--radius-xl, 22px);
  background: linear-gradient(180deg, #ffffff 0%, #f7fcfe 100%);
  box-shadow: var(--shell-card-shadow, var(--shadow-sm));
}

.shell-filter-bar input[type="search"],
.shell-filter-bar input[type="text"],
.shell-filter-bar input[type="number"],
.shell-filter-bar input[type="date"],
.shell-filter-bar select,
.shell-input {
  border-radius: 14px;
  border: 1px solid var(--color-border, #d5e8f0);
  background: var(--color-surface, #fff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shell-filter-bar input:focus,
.shell-filter-bar select:focus,
.shell-input:focus,
.shell-input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--color-cyan, #00aeef) 50%, var(--color-border, #d5e8f0));
  box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.16);
}

/* ── Buttons ─────────────────────────────────────────────────── */

.shell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, filter 0.15s ease;
}

.shell-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.shell-btn--primary {
  background: var(--auth-primary-gradient, linear-gradient(90deg, #0074a1 0%, #00aeef 62%, #3fc4f2 100%));
  color: #fff;
  box-shadow: var(--auth-primary-shadow, 0 14px 34px rgba(0, 174, 239, 0.28));
}

.shell-btn--primary:hover {
  filter: brightness(1.05);
}

.shell-btn--secondary {
  border: 1px solid color-mix(in srgb, var(--color-cyan, #00aeef) 18%, var(--color-border, #d5e8f0));
  background: #fff;
  color: var(--color-ink-800, #243247);
  box-shadow: var(--shadow-sm);
}

.shell-btn--secondary:hover {
  background: var(--color-surface-muted, #eef8fc);
  border-color: color-mix(in srgb, var(--color-cyan, #00aeef) 35%, var(--color-border, #d5e8f0));
}

.shell-btn--ghost {
  background: color-mix(in srgb, var(--color-cyan, #00aeef) 8%, white);
  color: var(--color-ink-800, #243247);
}

.shell-btn--ghost:hover {
  background: color-mix(in srgb, var(--color-cyan, #00aeef) 14%, white);
}

.shell-btn--danger {
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: #dc2626;
  color: #fff;
  box-shadow: 0 8px 22px rgba(220, 38, 38, 0.16);
}

.shell-btn--danger:hover {
  background: #b91c1c;
}

.shell-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #dfe5ef;
  background: #f5f7fc;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  color: var(--color-ink-700, #283653);
}

.shell-status-badge--success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.shell-status-badge--warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.shell-status-badge--danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.shell-status-badge--info {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.shell-status-badge--neutral {
  border-color: #dfe5ef;
  background: #f8fafc;
  color: var(--color-ink-600, #36445f);
}

/* ── Tables ──────────────────────────────────────────────────── */

.shell-table-wrap {
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--color-border, #dde3ef) 88%, white);
  border-radius: var(--radius-lg, 18px);
  background: var(--color-surface, #fff);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, var(--color-surface-soft, #f5f7fc) 0%, var(--color-surface-muted, #eef1f8) 100%);
}

.data-table thead th {
  padding: 0.75rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-500, #4a5878);
  border-bottom: 1px solid var(--color-border, #dde3ef);
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid color-mix(in srgb, var(--color-border, #dde3ef) 70%, transparent);
  transition: background-color 0.14s ease;
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-cyan, #00b3d4) 5%, var(--color-surface, #fff));
}

.data-table tbody td {
  padding: 0.85rem 0.75rem;
  color: var(--color-ink-800, #162038);
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--color-surface-soft, #f5f7fc) 55%, transparent);
}

.data-table tbody tr:nth-child(even):hover {
  background: color-mix(in srgb, var(--color-cyan, #00b3d4) 6%, var(--color-surface-soft, #f5f7fc));
}

/* ── Empty state ─────────────────────────────────────────────── */

.shell-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--color-cyan, #00b3d4) 28%, var(--color-border, #dde3ef));
  border-radius: var(--radius-lg, 18px);
  padding: 2.75rem 1.5rem;
  text-align: center;
  color: var(--color-ink-500, #4a5878);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--color-cyan, #00b3d4) 8%, transparent), transparent 70%),
    var(--color-surface-soft, #f5f7fc);
}

.shell-empty-state__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-cyan, #00b3d4) 12%, white);
  color: var(--color-cyan-deep, #0097b8);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-cyan, #00b3d4) 18%, transparent);
}

.shell-empty-state__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-ink-900, #0d1321);
}

.shell-empty-state__message {
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-ink-500, #4a5878);
}

.shell-empty-state__action {
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-navy, #0f2d6b), color-mix(in srgb, var(--color-cyan-deep, #0097b8) 40%, var(--color-navy, #0f2d6b)));
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-navy, #0f2d6b) 16%, transparent);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.shell-empty-state__action:hover {
  filter: brightness(1.06);
}

.shell-empty-state__action:focus-visible {
  outline: 2px solid var(--color-cyan, #00b3d4);
  outline-offset: 2px;
}

/* ── Pagination ──────────────────────────────────────────────── */

.shell-pagination {
  border: 1px solid color-mix(in srgb, var(--color-border, #dde3ef) 88%, white);
  border-radius: var(--radius-lg, 18px);
  background: var(--color-surface, #fff);
  box-shadow: var(--shadow-sm);
}

.shell-pagination a {
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.shell-pagination a:hover {
  border-color: color-mix(in srgb, var(--color-cyan, #00b3d4) 30%, var(--color-border, #dde3ef));
  background: color-mix(in srgb, var(--color-cyan, #00b3d4) 6%, var(--color-surface-2, #eef1f8));
}

/* ── Alerts (flash messages) ───────────────────────────────── */

#messages-container .alert {
  animation: shell-alert-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes shell-alert-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Topbar chrome ───────────────────────────────────────────── */

#topbar {
  border: 1px solid color-mix(in srgb, var(--color-cyan, #00aeef) 12%, var(--color-border, #d5e8f0));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body.is-loading #topbar {
  box-shadow: 0 12px 32px rgba(0, 174, 239, 0.1);
}

/* ── Responsive tables ───────────────────────────────────────── */

@media (max-width: 768px) {
  .data-table thead {
    display: none;
  }

  .shell-table-wrap {
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .data-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border, #dde3ef);
    border-radius: var(--radius-lg, 18px);
    padding: 0.75rem 1rem;
    background: var(--color-surface, #fff);
    box-shadow: var(--shadow-sm);
  }

  .data-table tbody tr:nth-child(even) {
    background: var(--color-surface, #fff);
  }

  .data-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border: none;
    text-align: right;
  }

  .data-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-ink-500, #4a5878);
    text-align: left;
    flex: 1 1 42%;
  }

  .data-table tbody td[colspan] {
    display: block;
    text-align: center;
  }

  .data-table tbody td[colspan]::before {
    display: none;
  }
}

/* ── Dashboard forms ─────────────────────────────────────────── */

.shell-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.shell-form select,
.shell-form textarea {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.shell-form input:not([type="checkbox"]):not([type="radio"]):focus,
.shell-form select:focus,
.shell-form textarea:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-cyan, #00b3d4) 18%, transparent);
}

.shell-form input.is-invalid,
.shell-form select.is-invalid,
.shell-form textarea.is-invalid {
  border-color: var(--color-danger, #dc2626);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger, #dc2626) 14%, transparent);
}

.shell-form button[type="submit"].is-loading,
.shell-form input[type="submit"].is-loading {
  opacity: 0.72;
  pointer-events: none;
  position: relative;
}

.shell-form button[type="submit"].is-loading::after,
.shell-form input[type="submit"].is-loading::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.475rem;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  border-radius: 999px;
  animation: shell-form-spin 0.65s linear infinite;
}

@keyframes shell-form-spin {
  to {
    transform: rotate(360deg);
  }
}

.shell-form:not([data-shell-form-entered]) {
  animation: shell-form-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.shell-form[data-shell-form-entered] {
  animation: none;
}

@keyframes shell-form-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #spa-page.shell-page-enter,
  #spa-page.shell-page-enter.shell-page-enter--active,
  body.is-loading #spa-page,
  .shell-stat-card,
  .shell-btn,
  #messages-container .alert,
  #global-htmx-indicator .shell-loader-card,
  .shell-form,
  .shell-form:not([data-shell-form-entered]),
  .shell-form button[type="submit"].is-loading::after,
  .shell-form input[type="submit"].is-loading::after,
  .shell-progress-bar__track,
  .global-ui-lock__spinner {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Corporate panel — charcoal + brownish yellow (ochre) ─── */

.shell-theme--corporate {
  --color-navy: #1c1917;
  --color-navy-strong: #0c0a09;
  --color-cyan: #B8922E;
  --color-cyan-deep: #8a6b1e;
  --color-sky-soft: #F5EDD4;
  --color-gold-soft: #ebe0b8;
  --color-brand-50: #f7f3ea;
  --color-brand-100: #f0e8d4;
  --color-brand-200: #e2d3b0;
  --color-brand-300: #B8922E;
  --color-brand-400: #8a6b1e;
  --color-brand-500: #1c1917;
  --color-brand-600: #1c1917;
  --color-brand-700: #0c0a09;
  --color-brand-800: #0c0a09;
  --color-surface-0: #f5f4f2;
  --color-surface-2: #eeecea;
  --color-surface-3: #e8e5e1;
  --color-surface-4: #dfdbd5;
  --color-surface-soft: #f5f4f2;
  --color-surface-muted: #eeecea;
  --color-border: #e2dfd9;
  --color-border-soft: #e2dfd9;
  --color-ink-900: #141210;
  --color-ink-800: #1c1917;
  --color-ink-700: #292524;
  --color-ink-500: #57534e;
  --color-ink-300: #a8a29e;
  --color-ink-100: #d6d3d1;
  --shadow-sm: 0 2px 10px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 16px 40px rgba(28, 25, 23, 0.09);
  --shadow-lg: 0 24px 64px rgba(28, 25, 23, 0.14);
}

.shell-theme--corporate ::selection {
  background: color-mix(in srgb, #B8922E 32%, transparent);
  color: #141210;
}

.shell-theme--corporate .shell-btn--primary {
  background: linear-gradient(135deg, #1c1917 0%, #3f3a34 58%, #5c5348 100%);
  color: #fff;
  box-shadow:
    0 8px 22px rgba(28, 25, 23, 0.22),
    inset 0 1px 0 rgba(196, 160, 53, 0.22);
}

.shell-theme--corporate .shell-btn--primary:hover {
  filter: brightness(1.06);
}

.shell-theme--corporate .shell-btn--secondary:hover,
.shell-theme--corporate .shell-btn--ghost:hover {
  border-color: color-mix(in srgb, #B8922E 28%, var(--color-border, #e2dfd9));
}

.shell-theme--corporate .shell-stat-card:hover {
  border-color: color-mix(in srgb, #B8922E 30%, var(--color-border, #e2dfd9));
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.08);
}

.shell-theme--corporate .shell-input:focus,
.shell-theme--corporate .shell-input:focus-visible {
  border-color: color-mix(in srgb, #B8922E 55%, var(--color-border, #e2dfd9));
  box-shadow: 0 0 0 4px color-mix(in srgb, #B8922E 16%, transparent);
}

.shell-theme--corporate #topbar {
  border: 1px solid color-mix(in srgb, #B8922E 14%, transparent);
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.05);
}

/* ── Cardholder panel — ocean sapphire ─────────────────────── */

.shell-theme--customer {
  --color-navy: #0a2f42;
  --color-navy-strong: #071f2e;
  --color-cyan: #14a3c7;
  --color-cyan-deep: #0b6b8a;
  --color-sky-soft: #e4f4f9;
  --color-brand-50: #eef8fb;
  --color-brand-100: #dff2f8;
  --color-brand-200: #b8e4f0;
  --color-brand-300: #14a3c7;
  --color-brand-400: #0b6b8a;
  --color-brand-500: #0a2f42;
  --color-brand-600: #0a2f42;
  --color-brand-700: #071f2e;
  --color-brand-800: #071f2e;
  --color-surface-0: #f3f8fb;
  --color-surface-2: #e8f1f6;
  --color-surface-3: #dde8ef;
  --color-surface-4: #d0dde6;
  --color-surface-soft: #f3f8fb;
  --color-surface-muted: #e8f1f6;
  --color-border: #d5e3eb;
  --color-border-soft: #d5e3eb;
  --color-ink-900: #0c1a24;
  --color-ink-800: #132735;
  --color-ink-700: #1e3a4a;
  --color-ink-500: #4a6575;
  --color-ink-300: #8aa0ad;
  --color-ink-100: #c5d4dc;
  --shadow-sm: 0 2px 10px rgba(10, 47, 66, 0.06);
  --shadow-md: 0 16px 40px rgba(10, 47, 66, 0.09);
  --shadow-lg: 0 24px 64px rgba(10, 47, 66, 0.14);
}

.shell-theme--customer ::selection {
  background: color-mix(in srgb, #14a3c7 30%, transparent);
  color: #0c1a24;
}

.shell-theme--customer .shell-btn--primary {
  background: linear-gradient(135deg, #0a2f42 0%, #0f4a63 55%, #14a3c7 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(10, 47, 66, 0.22);
}

.shell-theme--customer .shell-btn--primary:hover {
  filter: brightness(1.06);
}

.shell-theme--customer .shell-btn--secondary:hover,
.shell-theme--customer .shell-btn--ghost:hover {
  border-color: color-mix(in srgb, #14a3c7 30%, var(--color-border, #d5e3eb));
}

.shell-theme--customer .shell-stat-card:hover {
  border-color: color-mix(in srgb, #14a3c7 32%, var(--color-border, #d5e3eb));
  box-shadow: 0 12px 28px rgba(10, 47, 66, 0.08);
}

.shell-theme--customer .shell-input:focus,
.shell-theme--customer .shell-input:focus-visible {
  border-color: color-mix(in srgb, #14a3c7 55%, var(--color-border, #d5e3eb));
  box-shadow: 0 0 0 4px color-mix(in srgb, #14a3c7 16%, transparent);
}

.shell-theme--customer #topbar {
  border: 1px solid color-mix(in srgb, #14a3c7 14%, transparent);
  box-shadow: 0 8px 24px rgba(10, 47, 66, 0.05);
}

/* ── Premium Digiosk sidebar ─────────────────────────────────── */

.sidebar-shell {
  --sb-accent: #00aeef;
  --sb-accent-soft: rgba(0, 174, 239, 0.16);
  --sb-text: rgba(236, 246, 252, 0.72);
  --sb-text-strong: #ffffff;
  --sb-muted: rgba(236, 246, 252, 0.42);
  --sb-hover: rgba(255, 255, 255, 0.075);
  --sb-line: rgba(255, 255, 255, 0.08);
  position: relative;
  isolation: isolate;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 14%),
    linear-gradient(165deg, #04070a 0%, #061018 38%, #002838 72%, #003d56 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 24px 60px -36px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 174, 239, 0.04);
}

.sidebar-shell__glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(80% 42% at 100% -8%, rgba(0, 174, 239, 0.34) 0%, transparent 58%),
    radial-gradient(55% 35% at 0% 100%, rgba(245, 130, 32, 0.1) 0%, transparent 60%);
  opacity: 0.95;
}

.sidebar-shell__edge {
  pointer-events: none;
  position: absolute;
  top: 12%;
  right: 0;
  bottom: 12%;
  width: 2px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(180deg, transparent, #00aeef 35%, #8dc63f 62%, #ec008c 82%, transparent);
  opacity: 0.55;
}

.sidebar-shell--partner {
  --sb-accent: #10b981;
  --sb-accent-soft: rgba(16, 185, 129, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 14%),
    linear-gradient(165deg, #04070a 0%, #071816 42%, #0a2a2b 100%);
}

.sidebar-shell--corporate {
  --sb-accent: #c4a035;
  --sb-accent-soft: rgba(196, 160, 53, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 14%),
    linear-gradient(165deg, #14110f 0%, #1c1917 48%, #12100e 100%);
}

.sidebar-shell--customer {
  --sb-accent: #14a3c7;
  --sb-accent-soft: rgba(20, 163, 199, 0.16);
}

.sidebar-shell--staff {
  --sb-accent: #fbbf24;
  --sb-accent-soft: rgba(251, 191, 36, 0.16);
}

.sidebar-brand__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.4rem;
  border-radius: 1rem;
  transition: background 0.18s ease;
}

.sidebar-brand__link:hover {
  background: var(--sb-hover);
}

.sidebar-brand__link:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sb-accent) 55%, transparent);
}

.sidebar-brand__mark {
  position: relative;
  display: inline-flex;
  height: 2.4rem;
  width: 2.4rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #ffffff 0%, #e8f7fc 100%);
  box-shadow:
    0 10px 22px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sidebar-brand__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-brand__title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sb-text-strong);
  line-height: 1.15;
}

.sidebar-brand__meta {
  font-size: 0.66rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--sb-accent) 70%, white);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand__meta.is-corporate { color: #c4a035; }
.sidebar-brand__meta.is-partner { color: #6ee7b7; }
.sidebar-brand__meta.is-customer { color: #9ad8e8; }

.sidebar-brand__rule {
  display: block;
  margin: 0.85rem 0.35rem 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f58220 0%, #8dc63f 28%, #00aeef 58%, #ec008c 100%);
  opacity: 0.85;
}

.sidebar-rail-toggle {
  align-items: center;
  justify-content: center;
  height: 1.85rem;
  width: 1.85rem;
  flex-shrink: 0;
  border-radius: 0.65rem;
  border: 1px solid var(--sb-line);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(186, 230, 253, 0.85);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-rail-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: color-mix(in srgb, var(--sb-accent) 35%, transparent);
  color: #fff;
}

.sidebar-rail-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sb-accent) 50%, transparent);
}

.sidebar-section-kicker {
  margin: 0.15rem 0 0.65rem;
  padding-inline: 0.55rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sb-muted);
}

.s-nav-partner-flat,
.s-nav-admin-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.s-nav-admin-group {
  margin-bottom: 0.15rem;
}

.s-nav-icon {
  display: inline-flex;
  height: 2rem;
  width: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(186, 230, 253, 0.92);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.s-nav-icon svg {
  height: 1.05rem;
  width: 1.05rem;
}

.s-nav-icon--danger {
  color: rgba(254, 202, 202, 0.95);
  border-color: rgba(244, 63, 94, 0.18);
  background: rgba(244, 63, 94, 0.08);
}

.s-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.55rem;
  padding: 0.35rem 0.45rem 0.35rem 0.35rem;
  border-radius: 0.95rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sb-text);
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.s-nav-link:hover {
  color: var(--sb-text-strong);
  background: var(--sb-hover);
}

.s-nav-link:hover .s-nav-icon {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.s-nav-link.is-open {
  color: var(--sb-text-strong);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.s-nav-link.is-active {
  color: var(--sb-text-strong);
  font-weight: 650;
  background: linear-gradient(90deg, var(--sb-accent-soft) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: color-mix(in srgb, var(--sb-accent) 28%, transparent);
  box-shadow: inset 3px 0 0 0 var(--sb-accent);
}

.s-nav-link.is-active .s-nav-icon,
.s-nav-link.is-open .s-nav-icon {
  border-color: color-mix(in srgb, var(--sb-accent) 35%, transparent);
  background: color-mix(in srgb, var(--sb-accent) 18%, transparent);
  color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sb-accent) 12%, transparent);
}

.s-nav-link:focus-visible,
.s-nav-sub-link:focus-visible,
.s-nav-rail-btn:focus-visible,
.s-nav-logout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sb-accent) 50%, transparent);
}

.s-nav-chevron {
  display: inline-flex;
  height: 1.5rem;
  width: 1.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-right: 0.15rem;
  border-radius: 0.5rem;
  color: var(--sb-muted);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.s-nav-chevron svg {
  height: 0.85rem;
  width: 0.85rem;
}

.s-nav-chevron.is-open {
  transform: rotate(180deg);
  color: color-mix(in srgb, var(--sb-accent) 80%, white);
  background: rgba(255, 255, 255, 0.06);
}

.s-nav-admin-sub {
  display: none !important;
  flex-direction: column;
  gap: 0.15rem;
  margin: 0.15rem 0 0.4rem;
  padding: 0.35rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.s-nav-admin-sub.is-panel-open {
  display: flex !important;
}

.s-nav-sub-link {
  display: flex;
  align-items: center;
  min-height: 2.05rem;
  padding: 0.45rem 0.75rem 0.45rem 0.85rem;
  border-radius: 0.7rem;
  border: 1px solid transparent;
  color: rgba(236, 246, 252, 0.62);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.s-nav-sub-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.s-nav-sub-link.is-active {
  color: #fff;
  font-weight: 650;
  background: var(--sb-accent-soft);
  border-color: color-mix(in srgb, var(--sb-accent) 22%, transparent);
  box-shadow: inset 2px 0 0 0 var(--sb-accent);
}

.s-nav-rail-btn {
  display: inline-flex;
  height: 2.55rem;
  width: 2.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(186, 230, 253, 0.92);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.s-nav-rail-btn .s-nav-icon {
  height: 100%;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: inherit;
}

.s-nav-rail-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--sb-accent) 32%, transparent);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.s-nav-rail-btn.is-active {
  border-color: color-mix(in srgb, var(--sb-accent) 40%, transparent);
  background: var(--sb-accent-soft);
  color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sb-accent) 18%, transparent);
}

.sidebar-footer {
  padding: 0.65rem 0.75rem 0.85rem;
}

.sidebar-footer__dock {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 -8px 24px -18px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.sidebar-footer__dock.is-rail {
  align-items: center;
  padding: 0.4rem;
}

.s-nav-logout {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.55rem;
  padding: 0.35rem 0.45rem 0.35rem 0.35rem;
  border-radius: 0.95rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(254, 205, 211, 0.92);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.s-nav-logout:hover {
  color: #ffe4e6;
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.28);
}

.s-nav-logout.s-nav-rail-btn {
  width: 2.55rem;
  min-height: 2.55rem;
  padding: 0;
  justify-content: center;
}

.sidebar-shell .sidebar-nav-scroll {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--sb-accent) 35%, transparent) transparent;
}

.sidebar-shell .sidebar-nav-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-shell .sidebar-nav-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--sb-accent) 40%, transparent);
}

