@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=Inter:wght@400;600;700;800&display=swap');:root {
  --nvl-brand-50: #fff9eb;
  --nvl-brand-100: #fff1cc;
  --nvl-brand-200: #fde7a3;
  --nvl-brand-300: #f7d56a;
  --nvl-brand-400: #ecc137;
  --nvl-brand-500: #d4a017;
  --nvl-brand-600: #bf8f0e;
  --nvl-brand-700: #9f730d;
  --nvl-brand-800: #7f5d11;
  --nvl-brand-900: #5c440f;

  --nvl-gray-50: #fafafa;
  --nvl-gray-100: #f5f5f5;
  --nvl-gray-200: #e5e5e5;
  --nvl-gray-300: #d4d4d4;
  --nvl-gray-400: #a3a3a3;
  --nvl-gray-500: #737373;
  --nvl-gray-600: #525252;
  --nvl-gray-700: #404040;
  --nvl-gray-800: #262626;
  --nvl-gray-900: #171717;
  --nvl-gray-950: #0a0a0a;

  --nvl-accent: var(--theme-accent, var(--nvl-brand-500));
  --nvl-accent-hover: var(--theme-accent-hover, var(--nvl-brand-600));
  --nvl-danger: var(--theme-error, #dc2626);
  --nvl-danger-hover: color-mix(in srgb, var(--nvl-danger) 85%, black);
  --nvl-success: #16a34a;
  --nvl-warning: #d97706;
  --nvl-info: #2563eb;

  --nvl-bg-canvas: var(--theme-bg-primary, #0f0f0f);
  --nvl-bg-surface: var(--theme-bg-secondary, #1a1a1a);
  --nvl-bg-elevated: var(--theme-bg-surface, #242424);
  --nvl-text-primary: var(--theme-text-primary, #f5f5f5);
  --nvl-text-secondary: var(--theme-text-secondary, #d4d4d4);
  --nvl-text-muted: var(--theme-text-muted, #a3a3a3);
  --nvl-text-on-accent: var(--theme-on-accent, #101010);
  --nvl-border-subtle: var(--theme-border, rgba(212, 160, 23, 0.22));
  --nvl-border-strong: color-mix(in srgb, var(--nvl-accent) 38%, transparent);
  --nvl-focus-ring: color-mix(in srgb, var(--nvl-accent) 58%, transparent);

  --nvl-radius-sm: 8px;
  --nvl-radius-md: 12px;
  --nvl-radius-lg: var(--radius-card, 18px);
  --nvl-radius-pill: 999px;

  --nvl-space-1: 4px;
  --nvl-space-2: 8px;
  --nvl-space-3: 12px;
  --nvl-space-4: 16px;
  --nvl-space-5: 20px;
  --nvl-space-6: 24px;
  --nvl-space-7: 32px;
  --nvl-space-8: 40px;

  /* Align with shell when embedded; standalone builds use fallback */
  --nvl-shadow-sm: var(--shadow-elev-1, 0 4px 14px rgba(0, 0, 0, 0.12));
  --nvl-shadow-md: var(--shadow-elev-1, 0 6px 18px rgba(0, 0, 0, 0.16));
  --nvl-shadow-lg: var(--shadow-elev-2, 0 12px 28px rgba(0, 0, 0, 0.2));
  --nvl-motion-fast: 120ms ease;
  --nvl-motion-base: 180ms ease;
}

.nvl-control {
  border-radius: var(--nvl-radius-pill);
  border: 1px solid var(--nvl-border-subtle);
  background: var(--nvl-bg-elevated);
  color: var(--nvl-text-primary);
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.95rem;
  transition: border-color var(--nvl-motion-fast), box-shadow var(--nvl-motion-fast), background var(--nvl-motion-fast);
}

.nvl-control:focus-visible {
  outline: none;
  border-color: var(--nvl-accent);
  box-shadow: 0 0 0 3px var(--nvl-focus-ring);
}

.nvl-control.nvl-control--error {
  border-color: var(--nvl-danger);
}

.nvl-control.nvl-control--sm {
  min-height: 38px;
  font-size: 0.84rem;
}

.nvl-control.nvl-control--lg {
  min-height: 50px;
  font-size: 1rem;
}

.nvl-control.nvl-control--full {
  width: 100%;
}

.nvl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nvl-space-2);
  border-radius: var(--nvl-radius-pill);
  border: 1px solid transparent;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--nvl-motion-fast), box-shadow var(--nvl-motion-fast), background var(--nvl-motion-fast), color var(--nvl-motion-fast), border-color var(--nvl-motion-fast);
}

.nvl-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.nvl-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--nvl-focus-ring);
}

.nvl-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.nvl-btn.nvl-btn--full {
  width: 100%;
}

.nvl-btn.nvl-btn--sm {
  min-height: 38px;
  font-size: 0.84rem;
  padding: 0 14px;
}

.nvl-btn.nvl-btn--lg {
  min-height: 50px;
  font-size: 1rem;
  padding: 0 22px;
}

.nvl-btn--primary {
  background: var(--nvl-accent);
  color: var(--nvl-text-on-accent);
  box-shadow: var(--nvl-shadow-sm);
}

.nvl-btn--primary:hover:not(:disabled) {
  background: var(--nvl-accent-hover);
}

.nvl-btn--soft {
  background: var(--nvl-bg-elevated);
  border-color: var(--nvl-border-subtle);
  color: var(--nvl-text-primary);
}

.nvl-btn--outline {
  background: transparent;
  border-color: var(--nvl-border-strong);
  color: var(--nvl-accent);
}

.nvl-btn--danger {
  background: var(--nvl-danger);
  color: #fff;
  box-shadow: var(--nvl-shadow-sm);
}

.nvl-btn--danger:hover:not(:disabled) {
  background: var(--nvl-danger-hover);
}

.nvl-btn--ghost {
  background: transparent;
  color: var(--nvl-text-secondary);
}

.nvl-container {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 var(--nvl-space-4);
}

.nvl-container__inner {
  width: 100%;
}

.nvl-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nvl-space-3);
  min-height: 42px;
  margin-bottom: var(--nvl-space-3);
  padding: 0 2px;
}

.nvl-topbar__left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nvl-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--nvl-space-3);
  margin-left: auto;
}

.nvl-topbar__back,
.nvl-topbar__btn,
.nvl-back-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--nvl-radius-pill);
  border: 1px solid var(--nvl-border-strong);
  background: var(--nvl-bg-elevated);
  color: var(--nvl-accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  box-shadow: var(--nvl-shadow-sm);
  transition: transform var(--nvl-motion-base), box-shadow var(--nvl-motion-base);
  cursor: pointer;
}

.nvl-topbar__back:hover,
.nvl-topbar__btn:hover,
.nvl-back-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--nvl-shadow-md);
}

.nvl-topbar__badge {
  position: absolute;
  right: -6px;
  top: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: var(--nvl-radius-pill);
  background: var(--nvl-accent);
  color: var(--nvl-text-on-accent);
  font-size: 0.62rem;
  font-weight: 800;
}

.nvl-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--nvl-space-3);
  text-align: center;
  border-radius: var(--nvl-radius-lg);
  padding: var(--nvl-space-8) var(--nvl-space-6);
  border: 1px solid var(--nvl-border-subtle);
  background: var(--nvl-bg-surface);
}

.nvl-empty-state__icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--nvl-radius-pill);
  background: color-mix(in srgb, var(--nvl-accent) 12%, transparent);
  color: var(--nvl-accent);
  font-weight: 800;
}

.nvl-empty-state__title {
  margin: 0;
  color: var(--nvl-text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.nvl-empty-state__description {
  margin: 0;
  color: var(--nvl-text-muted);
  font-size: 0.92rem;
}

.nvl-skeleton {
  border-radius: var(--nvl-radius-lg);
  padding: var(--nvl-space-4);
  border: 1px solid var(--nvl-border-subtle);
  background: var(--nvl-bg-surface);
  display: grid;
  gap: var(--nvl-space-3);
}

.nvl-skeleton__row {
  height: 40px;
  border-radius: var(--nvl-radius-md);
  background: color-mix(in srgb, var(--nvl-accent) 12%, transparent);
  animation: nvl-pulse 1.2s ease-in-out infinite;
}

@keyframes nvl-pulse {
  0%,
  100% {
    opacity: 0.48;
  }
  50% {
    opacity: 0.92;
  }
}

.nvl-manage {
  display: flex;
  min-height: 100vh;
  background: transparent;
}

.nvl-manage__sidebar {
  width: 280px;
  padding: var(--nvl-space-6);
  border-right: 1px solid var(--nvl-border-subtle);
  background: linear-gradient(180deg, color-mix(in srgb, var(--nvl-bg-canvas) 94%, black) 0%, var(--nvl-bg-surface) 100%);
  color: var(--nvl-text-primary);
}

.nvl-manage__header {
  border: 1px solid var(--nvl-border-subtle);
  background: color-mix(in srgb, var(--nvl-accent) 8%, transparent);
  border-radius: var(--nvl-radius-lg);
  padding: var(--nvl-space-4);
  margin-bottom: var(--nvl-space-6);
}

.nvl-manage__title {
  color: var(--nvl-accent);
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0;
}

.nvl-manage__subtitle {
  color: var(--nvl-text-muted);
  font-size: 0.76rem;
  margin: var(--nvl-space-1) 0 0;
}

.nvl-manage__section {
  color: var(--nvl-text-muted);
  font-size: 0.75rem;
  margin: var(--nvl-space-5) 0 var(--nvl-space-2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nvl-manage__nav {
  display: flex;
  flex-direction: column;
  gap: var(--nvl-space-1);
}

.nvl-manage__link {
  display: flex;
  align-items: center;
  border-radius: var(--nvl-radius-sm);
  padding: 8px 12px;
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 2px;
}

.nvl-manage__link--active {
  background: var(--nvl-accent);
  color: var(--nvl-text-on-accent);
  font-weight: 800;
}

.nvl-manage__link--idle {
  color: var(--nvl-accent);
  opacity: 0.82;
  font-weight: 600;
}

.nvl-manage__main {
  flex: 1;
  min-width: 0;
  padding: 32px;
}

.nvl-footer {
  background: color-mix(in srgb, var(--nvl-bg-canvas) 88%, black);
  border-top: 1px solid var(--nvl-border-subtle);
  padding: 3rem 1.5rem 1.5rem;
}

.nvl-footer__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
}

.nvl-footer__brand {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.nvl-footer__brand-text {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--nvl-accent);
}

.nvl-footer__copy {
  color: var(--nvl-text-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.nvl-footer__heading {
  color: var(--nvl-text-primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.nvl-footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.nvl-footer__link {
  color: var(--nvl-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.7;
}

.nvl-footer__link:hover {
  color: var(--nvl-text-secondary);
}

.nvl-footer__bottom {
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--nvl-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.nvl-footer__copyright {
  color: var(--nvl-text-muted);
  font-size: 0.82rem;
}

.nvl-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--nvl-radius-pill);
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.nvl-status-badge--pending {
  background: color-mix(in srgb, var(--nvl-warning, #d97706) 22%, transparent);
  color: color-mix(in srgb, var(--nvl-warning, #d97706) 80%, white);
}

.nvl-status-badge--processing {
  background: color-mix(in srgb, var(--nvl-info, #2563eb) 22%, transparent);
  color: color-mix(in srgb, var(--nvl-info, #2563eb) 80%, white);
}

.nvl-status-badge--completed {
  background: color-mix(in srgb, var(--nvl-success, #16a34a) 22%, transparent);
  color: color-mix(in srgb, var(--nvl-success, #16a34a) 80%, white);
}

.nvl-status-badge--cancelled {
  background: color-mix(in srgb, var(--nvl-danger) 22%, transparent);
  color: color-mix(in srgb, var(--nvl-danger) 80%, white);
}
/* Notification Bell */
.notif-bell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  position: relative;
  font-size: 1.05rem;
  padding: 6px 10px;
}

.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--theme-accent);
  color: var(--theme-on-accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  box-shadow: var(--shadow-elev-1);
}

/* Notification Panel (dropdown) */
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 9999;
  width: min(380px, 90vw);
  background: var(--card-bg);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 20%, transparent);
  border-radius: 14px;
  box-shadow: var(--shadow-elev-2);
  overflow: hidden;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 15%, transparent);
}

.notif-panel-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-strong);
}

.notif-panel-markall {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--theme-accent);
  font-weight: 700;
  padding: 0;
}

.notif-panel-markall:hover {
  text-decoration: underline;
}

.notif-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
}

.notif-panel-empty {
  padding: 24px 16px;
  text-align: center;
  color: #8f8f8f;
  font-size: 0.85rem;
}

.notif-panel-item {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.14s;
}

.notif-panel-item:hover {
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

.notif-panel-item--unread {
  background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.notif-panel-item--unread:hover {
  background: color-mix(in srgb, var(--theme-accent) 17%, transparent);
}

.notif-panel-item-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: #f0f0f0;
  margin-bottom: 2px;
}

.notif-panel-item-body {
  font-size: 0.78rem;
  color: #b5b5b5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-panel-item-time {
  font-size: 0.72rem;
  color: #8f8f8f;
  margin-top: 4px;
}

.notif-panel-viewall {
  display: block;
  width: 100%;
  padding: 11px 14px;
  background: none;
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--theme-accent) 15%, transparent);
  color: var(--theme-accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.14s;
}

.notif-panel-viewall:hover {
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
}

/* Notifications Page */
.notif-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 10px 28px;
  color: var(--text-strong);
}

.notif-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.notif-page-title {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
}

.notif-page-markall {
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 35%, transparent);
  border-radius: 999px;
  color: var(--theme-accent);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.42rem 0.95rem;
  cursor: pointer;
  transition: background 0.14s;
}

.notif-page-markall:hover {
  background: color-mix(in srgb, var(--theme-accent) 15%, transparent);
}

.notif-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 15%, transparent);
  background: #141414;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
}

.notif-filter-input {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.83rem;
  color: var(--text-strong);
  background: #1a1a1a;
  outline: none;
}

.notif-filter-input::placeholder {
  color: #8e8e8e;
}

.notif-filter-input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

.notif-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 30%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: #f0f0f0;
}

.notif-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-page-item {
  background: #141414;
  border: 1px solid color-mix(in srgb, var(--theme-accent) 12%, transparent);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
}

.notif-page-item:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 35%, transparent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.38);
}

.notif-page-item--unread {
  border-left: 3px solid var(--theme-accent);
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

.notif-page-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notif-page-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-strong);
}

.notif-page-item-time {
  font-size: 0.75rem;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-page-item-body {
  font-size: 0.82rem;
  color: #b8b8b8;
  margin-top: 4px;
}

.notif-item-check {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
}

.notif-item-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.notif-inline-btn {
  border: 1px solid color-mix(in srgb, var(--theme-accent) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
  color: var(--theme-accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.24rem 0.72rem;
  cursor: pointer;
}

.notif-inline-btn--danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

.notif-pagination {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notif-pagination-label {
  font-size: 0.8rem;
  color: #a3a3a3;
}

.notif-page-empty,
.notif-page-loading {
  text-align: center;
  color: #8f8f8f;
  font-size: 0.88rem;
  padding: 34px 0;
}

.notif-settings-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 10px 28px;
}

.notif-settings-card {
  border: 1px solid color-mix(in srgb, var(--theme-accent) 15%, transparent);
  border-radius: 14px;
  background: #141414;
  padding: 14px;
  margin-top: 12px;
}

.notif-settings-card h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--text-strong);
}

.notif-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  font-size: 0.82rem;
  color: #c2c2c2;
}

.notif-events-table {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: #d2d2d2;
}

.notif-events-header {
  font-weight: 700;
  color: var(--text-strong);
}

.notif-event-label {
  color: #b6b6b6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.notif-settings-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-settings-saved {
  font-size: 0.75rem;
  color: #9b9b9b;
}

@media (max-width: 900px) {
  .notif-filters {
    grid-template-columns: 1fr;
  }

  .notif-settings-grid {
    grid-template-columns: 1fr;
  }

  .notif-events-table {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    overflow-x: auto;
  }

  .notif-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .notif-page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* ===== Support pages — dark theme ===== */

/* ---- Shared layout ---- */
.sup-page {
  padding: 0;
  width: 100%;
  color: var(--text-strong, #f5f5f5);
}

.sup-page-narrow {
  padding: 0;
  max-width: 720px;
  width: 100%;
  color: var(--text-strong, #f5f5f5);
}

/* ---- Page header ---- */
.sup-page-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  color: var(--text-strong, #f5f5f5);
}

.sup-page-subtitle {
  color: var(--text-muted, #a3a3a3);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

/* ---- Cards ---- */
.sup-card {
  background: var(--surface-strong, #1c1c1c);
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  border-radius: var(--radius-card, 18px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.sup-card-accent {
  background: var(--surface-strong, #1c1c1c);
  border: 1px solid var(--border-strong, rgba(212,160,23,0.3));
  border-radius: var(--radius-card, 18px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.sup-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #a3a3a3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.875rem;
}

/* ---- Quick actions ---- */
.sup-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.sup-btn-primary {
  background: var(--brand-900);
  color: var(--theme-on-accent);
  padding: 0 1.5rem;
  height: var(--height-btn, 40px);
  border-radius: var(--radius-pill, 999px);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.15s;
}

.sup-btn-primary:hover {
  opacity: 0.88;
}

.sup-btn-secondary {
  background: color-mix(in srgb, var(--theme-accent) 7%, transparent);
  color: var(--text-strong, #f5f5f5);
  padding: 0 1.4rem;
  height: var(--height-btn, 40px);
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s;
}

.sup-btn-secondary:hover {
  background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.sup-btn-ghost {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #a3a3a3);
  font-size: 0.88rem;
  padding: 0;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.sup-btn-ghost:hover {
  color: var(--text-strong, #f5f5f5);
}

.sup-btn-danger {
  background: rgba(198, 40, 40, 0.12);
  color: #ef9a9a;
  border: 1px solid rgba(198, 40, 40, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s;
}

.sup-btn-danger:hover {
  background: rgba(198, 40, 40, 0.22);
}

.sup-btn-reopen {
  background: rgba(21, 101, 192, 0.12);
  color: #90caf9;
  border: 1px solid rgba(21, 101, 192, 0.3);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.15s;
}

.sup-btn-reopen:hover {
  background: rgba(21, 101, 192, 0.22);
}

/* ---- SLA tier cards ---- */
.sup-sla-grid {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.sup-sla-item {
  background: var(--bg-alt, #111);
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  border-radius: 12px;
  padding: 0.875rem 1rem;
  flex: 1 1 180px;
}

.sup-sla-plan {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-strong, #f5f5f5);
  margin-bottom: 3px;
}

.sup-sla-label {
  font-size: 0.82rem;
  color: var(--text-muted, #a3a3a3);
}

/* ---- Account manager card ---- */
.sup-manager-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sup-manager-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 197, 24, 0.4);
}

.sup-manager-name {
  font-weight: 700;
  color: #f5f5f5;
  margin-bottom: 2px;
}

.sup-manager-email {
  font-size: 0.85rem;
  color: #a0a0a0;
}

.sup-manager-links {
  display: flex;
  gap: 0.875rem;
  margin-top: 6px;
}

.sup-manager-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f5c518;
  text-decoration: none;
}

.sup-manager-links a:hover {
  text-decoration: underline;
}

/* ---- Help articles grid ---- */
.sup-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.875rem;
}

.sup-article-card {
  background: var(--surface-strong, #1c1c1c);
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  border-radius: 14px;
  padding: 1rem 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sup-article-card:hover {
  border-color: var(--border-strong, rgba(212,160,23,0.3));
  box-shadow: var(--shadow-card-hover, 0 16px 30px rgba(212,160,23,0.08));
}

.sup-article-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f5f5f5;
  margin-bottom: 4px;
}

.sup-article-summary {
  font-size: 0.82rem;
  color: #a0a0a0;
  margin: 0;
}

.sup-article-video {
  display: block;
  margin-top: 8px;
  color: #f5c518;
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
}

/* ---- Tickets list ---- */
.sup-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sup-filter-btn {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #a0a0a0;
  transition: all 0.15s;
}

.sup-filter-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f5f5f5;
}

.sup-filter-btn.active {
  background: #f5c518;
  color: #111;
  border-color: #f5c518;
}

.sup-ticket-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sup-ticket-item {
  background: var(--surface-strong, #1c1c1c);
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sup-ticket-item:hover {
  border-color: var(--border-strong, rgba(212,160,23,0.3));
  box-shadow: var(--shadow-card-hover, 0 16px 30px rgba(212,160,23,0.08));
}

.sup-ticket-number {
  font-family: monospace;
  color: #7a7a7a;
  font-size: 0.78rem;
}

.sup-ticket-subject {
  font-weight: 700;
  color: #f5f5f5;
  margin-top: 2px;
}

.sup-ticket-meta {
  color: #7a7a7a;
  font-size: 0.82rem;
  margin-top: 2px;
}

.sup-ticket-date {
  color: #7a7a7a;
  font-size: 0.78rem;
  margin-top: 3px;
}

.sup-ticket-sla-breach {
  color: #ef9a9a;
  font-size: 0.78rem;
  margin-top: 2px;
  font-weight: 700;
}

/* ---- Status badge ---- */
.sup-status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
}

/* ---- Pagination ---- */
.sup-pagination {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  justify-content: center;
  align-items: center;
}

.sup-pagination button {
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.sup-pagination button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.sup-pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sup-pagination-info {
  color: #7a7a7a;
  font-size: 0.85rem;
}

/* ---- Form elements ---- */
.sup-form-group {
  margin-bottom: 1.25rem;
}

.sup-form-label {
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-muted, #a3a3a3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.sup-form-input,
.sup-form-select,
.sup-form-textarea {
  width: 100%;
  height: var(--height-input, 44px);
  padding: 0 1rem;
  border-radius: var(--radius-input, 10px);
  border: 1px solid color-mix(in srgb, var(--theme-accent) 18%, transparent);
  background: var(--surface-strong, #1c1c1c);
  color: var(--text-strong, #f5f5f5);
  font-size: 0.9rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  /* Custom select arrow */
  appearance: none;
  -webkit-appearance: none;
}

.sup-form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a3a3a3' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.sup-form-select option {
  background: #1c1c1c;
  color: #f5f5f5;
}

.sup-form-textarea {
  height: auto;
  padding: 0.75rem 1rem;
  resize: vertical;
}

.sup-form-input::placeholder,
.sup-form-textarea::placeholder {
  color: #4a4a4a;
}

.sup-form-input:focus,
.sup-form-select:focus,
.sup-form-textarea:focus {
  border-color: color-mix(in srgb, var(--theme-accent) 50%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

.sup-form-hint {
  text-align: right;
  color: #4a4a4a;
  font-size: 0.75rem;
  margin-top: 4px;
}

/* ---- Error / info text ---- */
.sup-error {
  color: #ef9a9a;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.sup-info {
  color: #a0a0a0;
  font-size: 0.875rem;
}

/* ---- Ticket detail — message thread ---- */
.sup-thread {
  background: var(--bg-alt, #111);
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  border-radius: 14px;
  padding: 1rem;
  min-height: 300px;
  max-height: 480px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.sup-msg-row {
  display: flex;
  margin-bottom: 0.875rem;
}

.sup-msg-row.customer {
  justify-content: flex-end;
}

.sup-msg-row.support {
  justify-content: flex-start;
}

.sup-msg-bubble {
  border-radius: 12px;
  padding: 0.625rem 0.875rem;
  max-width: 75%;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sup-msg-bubble.customer {
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.2);
  color: #f5f5f5;
}

.sup-msg-bubble.support {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f5f5f5;
}

.sup-msg-meta {
  font-size: 0.7rem;
  color: #7a7a7a;
  margin-bottom: 4px;
}

.sup-msg-attachment {
  display: block;
  margin-top: 5px;
  color: #f5c518;
  font-size: 0.78rem;
  text-decoration: none;
}

/* ---- Reply box ---- */
.sup-reply-box {
  margin-top: 0.5rem;
}

.sup-reply-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.sup-btn-send {
  background: var(--brand-900);
  color: #000;
  padding: 0 1.4rem;
  height: var(--height-btn, 40px);
  border-radius: var(--radius-pill, 999px);
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  transition: opacity 0.15s;
}

.sup-btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sup-btn-send:hover:not(:disabled) {
  opacity: 0.88;
}

/* ---- Upgrade nudge ---- */
.sup-upgrade-nudge {
  background: var(--brand-100, rgba(212,160,23,0.07));
  border: 1px solid var(--border-soft, rgba(212,160,23,0.15));
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: var(--brand-900);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ---- Chatwoot widget overrides ---- */
/* Move the launcher above the footer on mobile */
.woot-widget-bubble {
  bottom: 4.5rem !important;
  right: 1.25rem !important;
}

@media (min-width: 768px) {
  .woot-widget-bubble {
    bottom: 1.5rem !important;
    right: 1.5rem !important;
  }
}

/* ─── Light theme overrides ─────────────────────────────────────────── */
[data-theme="light"] .sup-manager-name {
  color: var(--text-strong);
}

[data-theme="light"] .sup-manager-email {
  color: var(--text-muted);
}

[data-theme="light"] .sup-manager-links a {
  color: var(--brand-900);
}

[data-theme="light"] .sup-article-card {
  background: #ffffff;
}

[data-theme="light"] .sup-article-title {
  color: var(--text-strong);
}

[data-theme="light"] .sup-article-summary {
  color: var(--text-muted);
}

[data-theme="light"] .sup-filter-btn {
  border-color: var(--border-strong);
  color: var(--text-muted);
  background: var(--input-bg);
}

[data-theme="light"] .sup-filter-btn:hover {
  background: var(--bg-alt);
  color: var(--text-strong);
}

[data-theme="light"] .sup-ticket-item {
  background: #ffffff;
}

[data-theme="light"] .sup-ticket-subject {
  color: var(--text-strong);
}

[data-theme="light"] .sup-ticket-number,
[data-theme="light"] .sup-ticket-meta,
[data-theme="light"] .sup-ticket-date {
  color: var(--text-muted);
}

[data-theme="light"] .sup-pagination button {
  border-color: var(--border-strong);
  color: var(--text-strong);
  background: var(--input-bg);
}

[data-theme="light"] .sup-pagination button:hover:not(:disabled) {
  background: var(--bg-alt);
}

[data-theme="light"] .sup-form-input,
[data-theme="light"] .sup-form-select,
[data-theme="light"] .sup-form-textarea {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-strong);
}

[data-theme="light"] .sup-form-select option {
  background: #ffffff;
  color: var(--text-strong);
}

[data-theme="light"] .sup-form-input::placeholder,
[data-theme="light"] .sup-form-textarea::placeholder {
  color: #9ca3af;
}

[data-theme="light"] .sup-thread {
  background: var(--bg-alt);
}

[data-theme="light"] .sup-msg-bubble.customer {
  color: var(--text-strong);
  background: rgba(180, 83, 9, 0.08);
  border-color: rgba(180, 83, 9, 0.18);
}

[data-theme="light"] .sup-msg-bubble.support {
  background: #ffffff;
  border-color: var(--border-soft);
  color: var(--text-strong);
}

[data-theme="light"] .sup-sla-item {
  background: #ffffff;
}

[data-theme="light"] .sup-sla-plan {
  color: var(--text-strong);
}

[data-theme="light"] .sup-btn-secondary {
  color: var(--text-strong);
  background: var(--input-bg);
}

[data-theme="light"] .sup-btn-ghost {
  color: var(--text-muted);
}

[data-theme="light"] .sup-btn-ghost:hover {
  color: var(--text-strong);
}


*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Layout tokens — shared across all MFEs */
  --radius-card: 18px;
  --radius-input: 9px;
  --radius-pill: 999px;
  --height-input: 44px;
  --height-btn: 40px;
  --gap-page: 22px;
  --gap-section: clamp(1.5rem, 3vw, 2.25rem);
  /* Typography — display vs UI (keep Inter + Playfair imports) */
  --font-ui: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --text-title-lh: 1.2;
  --text-title-track: -0.02em;
  --text-body-lh: 1.55;
  /* Semantic aliases consumed across MFEs */
  --theme-bg-primary: var(--color-bg-primary);
  --theme-bg-secondary: var(--color-bg-secondary);
  --theme-bg-surface: var(--color-bg-surface);
  --theme-text-primary: var(--color-text-primary);
  --theme-text-secondary: var(--color-text-secondary);
  --theme-text-muted: var(--color-text-muted);
  --theme-border: var(--color-border);
  --theme-accent: var(--color-accent);
  --theme-accent-hover: var(--color-accent-hover);
  --theme-error: var(--color-error);
  --theme-success: var(--color-success);
  --theme-warning: var(--color-warning);
  --theme-on-accent: #000000;
  --theme-on-error: #ffffff;
  --theme-overlay: rgba(0, 0, 0, 0.4);
  --theme-surface-soft: color-mix(in srgb, var(--surface-strong) 92%, var(--theme-accent) 8%);
  --theme-border-soft-accent: color-mix(in srgb, var(--theme-accent) 28%, transparent);
  --theme-border-strong-accent: color-mix(in srgb, var(--theme-accent) 42%, transparent);
  font-family: var(--font-ui);
  line-height: var(--text-body-lh);
  font-weight: 400;
  color: var(--text-strong);
  background: var(--bg-base);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Dark theme (padrão) ─────────────────────────────── */

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --brand-950: #0a0a0a;
  --brand-900: #d4a017;
  --brand-800: #b8860b;
  --brand-700: #9a7009;
  --brand-100: rgba(212,160,23,0.12);
  --accent-200: #d4a017;
  --bg-base: #0d0d0d;
  --bg-alt: #111111;
  --surface: rgba(28,28,28,0.92);
  --surface-strong: #1c1c1c;
  --text-strong: #f5f5f5;
  --text-muted: #a3a3a3;
  --border-soft: rgba(212,160,23,0.15);
  --border-strong: rgba(212,160,23,0.30);
  --shadow-soft: 0 12px 30px rgba(0,0,0,0.40);
  --shadow-strong: 0 28px 60px rgba(0,0,0,0.60);
  /* Neutral elevation (clean) — prefer over gold-tinted shadows */
  --shadow-elev-1: 0 4px 18px rgba(0,0,0,0.38);
  --shadow-elev-2: 0 14px 36px rgba(0,0,0,0.48);
  --shadow-card-hover: 0 12px 28px rgba(0,0,0,0.42);
  /* ui-specific */
  --navbar-bg: #080808;
  --sidebar-bg: #0a0a0a;
  --card-bg: #141414;
  --input-bg: #1c1c1c;
  --filter-btn-bg: #1a1a1a;
  --filter-btn-hover: #222222;
  /* spec semantic vars */
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-surface: #1e293b;
  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-border: #334155;
  /* Accent = brand line (single gold family; was #f59e0b) */
  --color-accent: var(--brand-900);
  --color-accent-hover: var(--brand-800);
  --color-error: #f87171;
  --color-success: #4ade80;
  --color-warning: var(--brand-800);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.40);
  --theme-overlay: rgba(0, 0, 0, 0.4);
  --theme-on-accent: #000000;
  --theme-on-error: #ffffff;
}

/* ─── Light theme ─────────────────────────────────────── */

[data-theme="light"] {
  color-scheme: light;
  --brand-950: #fdf8f0;
  --brand-900: #b45309;
  --brand-800: #92400e;
  --brand-700: #78350f;
  --brand-100: rgba(180,83,9,0.10);
  --accent-200: #b45309;
  --bg-base: #f8f5f0;
  --bg-alt: #f0ece4;
  --surface: rgba(255,255,255,0.95);
  --surface-strong: #ffffff;
  --text-strong: #111827;
  --text-muted: #6b7280;
  --border-soft: rgba(180,83,9,0.12);
  --border-strong: rgba(180,83,9,0.25);
  --shadow-soft: 0 12px 30px rgba(0,0,0,0.08);
  --shadow-strong: 0 28px 60px rgba(0,0,0,0.12);
  --shadow-elev-1: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-elev-2: 0 14px 34px rgba(0,0,0,0.09);
  --shadow-card-hover: 0 10px 26px rgba(0,0,0,0.08);
  /* ui-specific */
  --navbar-bg: #ffffff;
  --sidebar-bg: #f8f5f0;
  --card-bg: #ffffff;
  --input-bg: #f0ece4;
  --filter-btn-bg: #f0ece4;
  --filter-btn-hover: #e8e0d6;
  /* spec semantic vars */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f5f5f5;
  --color-bg-surface: #fafafa;
  --color-text-primary: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-accent: var(--brand-900);
  --color-accent-hover: var(--brand-800);
  --color-error: #dc2626;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.10);
  --theme-overlay: rgba(0, 0, 0, 0.3);
  --theme-on-accent: #ffffff;
  --theme-on-error: #ffffff;
}

[data-theme="light"] .shell-quick-action {
  background: var(--input-bg) !important;
  color: var(--theme-accent);
  border-color: var(--theme-border-strong-accent);
  box-shadow: var(--shadow-elev-1);
}

[data-theme="light"] .shell-quick-action__badge {
  background: var(--theme-accent);
  color: var(--theme-on-accent);
}

body {
  min-width: 320px;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:
    radial-gradient(circle at 16% 8%, color-mix(in srgb, var(--brand-900) 14%, transparent), transparent 38%),
    radial-gradient(circle at 84% 12%, color-mix(in srgb, var(--brand-900) 10%, transparent), transparent 36%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-alt) 100%);
}

@media (prefers-reduced-motion: no-preference) {
  body,
  .shell-navbar,
  .shell-sidebar,
  .shell-content,
  .shell-admin__header,
  .shell-metric-card,
  .shell-panel {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
}

.shell-theme-toggle {
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--brand-900);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.6rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shell-theme-toggle:hover {
  background: var(--brand-100);
  transform: scale(1.08);
}

#root {
  min-height: 100vh;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

button {
  cursor: pointer;
}

.shell-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
}

.shell-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.shell-content {
  flex: 1;
  overflow: auto;
  padding: 1.5rem 1.1rem;
  padding-bottom: 1.5rem;
}

.shell-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  height: 60px;
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-strong);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-elev-1);
  backdrop-filter: blur(8px);
}

.shell-navbar-left,
.shell-navbar-right {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.shell-navbar-right {
  justify-content: flex-end;
  flex: 1;
}

.shell-brand {
  color: var(--theme-accent);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  font-family: var(--font-display);
}

.shell-nav-btn {
  border: 1px solid var(--theme-border-strong-accent);
  background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
  color: var(--theme-accent);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.shell-logout {
  background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
  border: 1px solid var(--theme-border-strong-accent);
  color: var(--theme-accent);
  padding: 0.38rem 0.86rem;
  border-radius: 999px;
  font-weight: 700;
}

.shell-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.25rem;
  flex-shrink: 0;
  overflow: hidden;
  transform-origin: right center;
  transition: opacity 0.22s ease, transform 0.22s ease, max-width 0.22s ease, margin-right 0.22s ease;
  will-change: opacity, transform, max-width;
}

.shell-quick-actions--visible {
  opacity: 1;
  transform: translateY(0);
  max-width: 360px;
  pointer-events: auto;
  margin-right: 0.25rem;
}

.shell-quick-actions--hidden {
  opacity: 0;
  transform: translateY(-4px);
  max-width: 0;
  pointer-events: none;
  margin-right: 0;
}

.shell-quick-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--theme-accent);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  box-shadow: var(--shadow-elev-1);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  cursor: pointer;
  text-decoration: none;
}

.shell-quick-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-elev-2);
}

.shell-quick-action__badge {
  position: absolute;
  right: -6px;
  top: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--theme-accent);
  color: var(--theme-on-accent);
  font-size: 0.62rem;
  font-weight: 800;
}

.shell-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--theme-accent);
  border: 1px solid var(--theme-border-strong-accent);
  background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
  border-radius: 999px;
  padding: 0.38rem 0.92rem;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shell-user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* ─── User menu dropdown ─────────────────────────────── */

.shell-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.shell-user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.28rem 0.75rem 0.28rem 0.28rem;
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.shell-user-menu__trigger:hover {
  background: var(--bg-alt);
  box-shadow: var(--shadow-elev-1);
}

.shell-user-menu__chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.1rem;
}

.shell-user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-elev-2);
  padding: 0.4rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.shell-user-menu__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-strong);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  position: relative;
}

.shell-user-menu__item:hover {
  background: var(--brand-100);
  color: var(--brand-900);
}

.shell-user-menu__item--danger {
  color: var(--theme-error);
}

.shell-user-menu__item--danger:hover {
  background: color-mix(in srgb, var(--theme-error) 14%, transparent);
  color: var(--theme-error);
}

.shell-user-menu__badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--theme-accent);
  color: var(--theme-on-accent);
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .shell-user-menu__badge {
  color: #ffffff;
}

.shell-user-menu__divider {
  height: 1px;
  background: var(--border-soft);
  margin: 0.3rem 0.4rem;
}

@media (max-width: 1120px) {
  .shell-user-name {
    max-width: 120px;
  }

  .shell-quick-action {
    min-height: 32px;
    padding: 0.3rem 0.72rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 960px) {
  .shell-user-name {
    display: none;
  }

  .shell-navbar-right {
    gap: 0.6rem;
  }

  .shell-quick-actions {
    margin-right: 0;
    gap: 0.45rem;
  }

  .shell-quick-action span:not([aria-hidden='true']) {
    display: none;
  }

  .shell-quick-action {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
  }

  .shell-quick-action__badge {
    right: -5px;
    top: -5px;
  }

  .shell-logout,
  .shell-auth-link {
    padding: 0.34rem 0.68rem;
    font-size: 0.8rem;
  }
}

.shell-sidebar {
  overflow: hidden;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-soft);
  transition: width 0.3s ease, background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shell-sidebar-link {
  display: block;
  padding: 0.78rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 14px;
  margin-bottom: 0.22rem;
  font-weight: 700;
}

.shell-sidebar-link.active {
  color: var(--theme-on-accent);
  background: var(--theme-accent);
  box-shadow: var(--shadow-elev-1);
}

.shell-skeleton {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: pulse 1.5s infinite;
}

.shell-skeleton div {
  background: var(--brand-100);
  border-radius: 8px;
}

.shell-navbar {
  background: var(--navbar-bg);
  color: var(--text-strong);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-elev-1);
}

.shell-brand {
  color: var(--theme-accent);
  font-weight: 900;
  font-family: var(--font-display);
}

.shell-nav-btn {
  color: var(--theme-accent);
  border-color: var(--theme-border-strong-accent);
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
}

.shell-search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: min(42vw, 560px);
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--input-bg);
  padding: 0 0.7rem;
  color: var(--text-muted);
}

.shell-search input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--text-strong);
}

.shell-quick-action {
  background: var(--input-bg);
}

.shell-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--theme-accent), var(--theme-accent-hover));
  color: var(--theme-on-accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.shell-logout {
  color: var(--theme-accent);
  border-color: var(--theme-border-strong-accent);
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
}

.shell-auth-link {
  color: var(--theme-accent);
  border-color: var(--theme-border-strong-accent);
  background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
}

.shell-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-soft);
}

.shell-sidebar-link {
  color: var(--text-muted);
}

.shell-sidebar-link.active {
  color: var(--theme-on-accent);
  background: var(--theme-accent);
  border: none;
}

.shell-sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.shell-sidebar-group-label {
  display: block;
  padding: 0.78rem 1rem 0.4rem;
  color: var(--text-muted);
  font-weight: 700;
  border-radius: 14px;
  margin-bottom: 0.1rem;
  font-size: 1rem;
  cursor: default;
  user-select: none;
}

.shell-sidebar-group-label.active {
  color: var(--theme-accent);
}

.shell-sidebar-sublink {
  display: block;
  padding: 0.5rem 1rem 0.5rem 1.6rem;
  color: var(--theme-text-muted, var(--text-muted));
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  border-left: 2px solid transparent;
  margin-left: 0.5rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.shell-sidebar-sublink.active {
  color: var(--theme-accent);
  border-left-color: var(--theme-accent);
  background: color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

.shell-sidebar-sublink:hover {
  color: var(--theme-accent);
}

.shell-content {
  background: var(--bg-base);
}

.shell-admin {
  display: flex;
  flex-direction: column;
  gap: var(--gap-page);
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  padding-inline: 10px;
}

.shell-admin__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  /* nvl-topbar margin-bottom equivalent: total gap to first card = 12px + 22px(flex gap) = 34px */
}

.shell-admin__topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.shell-admin__topbar-back {
  margin-right: auto;
}

.shell-admin__header {
  border-radius: var(--radius-card);
  padding: 20px 22px;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.shell-admin__eyebrow {
  display: block;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--theme-accent);
  font-weight: 800;
  margin-bottom: 2px;
}

.shell-admin__header h1 {
  font-size: clamp(1.7rem, 2.7vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 4px;
}

.shell-admin__header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.shell-admin__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.shell-metric-card {
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shell-metric-card span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.shell-metric-card strong {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--theme-accent);
  line-height: 1.1;
}

.shell-admin__error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--theme-error) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-error) 36%, transparent);
  color: var(--theme-error);
  font-size: 0.88rem;
  font-weight: 600;
}

.shell-admin__retry {
  background: transparent;
  color: var(--theme-error);
  border: 1px solid color-mix(in srgb, var(--theme-error) 52%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.shell-admin__retry:hover {
  background: color-mix(in srgb, var(--theme-error) 16%, transparent);
}

.shell-badge--active {
  background: color-mix(in srgb, var(--theme-success) 16%, transparent);
  color: var(--theme-success);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.shell-badge--inactive {
  background: color-mix(in srgb, var(--theme-error) 16%, transparent);
  color: var(--theme-error);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.shell-btn--danger {
  background: color-mix(in srgb, var(--theme-error) 12%, transparent);
  color: var(--theme-error);
  border: 1px solid color-mix(in srgb, var(--theme-error) 36%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.shell-btn--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--theme-error) 22%, transparent);
}

.shell-btn--success {
  background: color-mix(in srgb, var(--theme-success) 12%, transparent);
  color: var(--theme-success);
  border: 1px solid color-mix(in srgb, var(--theme-success) 36%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.shell-btn--success:hover:not(:disabled) {
  background: color-mix(in srgb, var(--theme-success) 22%, transparent);
}

.shell-btn--danger:disabled,
.shell-btn--success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shell-admin__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.shell-panel {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  background: var(--card-bg);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

.shell-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.shell-panel__header h2 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-strong);
}

.shell-panel__empty {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.shell-table-wrapper {
  overflow-x: auto;
}

.shell-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.shell-table th,
.shell-table td {
  text-align: left;
  padding: 0.68rem 0.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

.shell-table tbody tr {
  cursor: pointer;
}

.shell-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--theme-accent) 8%, transparent);
}

.shell-manager-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.shell-manager-list li {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shell-manager-list span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.shell-onboarding-list {
  display: grid;
  gap: 0.8rem;
}

.shell-onboarding-item {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.shell-onboarding-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.shell-status-badge {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.shell-status-badge--pending {
  background: var(--brand-100);
  color: var(--brand-900);
}

.shell-status-badge--approved {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}

.shell-status-badge--rejected {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.shell-onboarding-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.shell-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-soft);
  background: var(--filter-btn-bg);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.shell-filter-btn:hover {
  background: var(--filter-btn-hover);
  border-color: var(--border-strong);
}

.shell-filter-btn--active {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: var(--theme-on-accent);
}

.shell-filter-count {
  background: color-mix(in srgb, var(--theme-text-primary) 16%, transparent);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.73rem;
}

.shell-filter-btn:not(.shell-filter-btn--active) .shell-filter-count {
  background: color-mix(in srgb, var(--theme-accent) 14%, transparent);
  color: var(--theme-accent);
}

.shell-onboarding-actions {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.shell-onboarding-actions button {
  border: 1px solid var(--theme-border-soft-accent);
  background: color-mix(in srgb, var(--theme-accent) 12%, transparent);
  color: var(--theme-accent);
  border-radius: 999px;
  min-height: 32px;
  padding: 0.2rem 0.7rem;
  font-weight: 700;
  font-size: 0.77rem;
}

.shell-onboarding-actions button:disabled {
  opacity: 0.55;
}

.shell-site-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.shell-site-link:hover {
  color: var(--theme-accent);
  border-color: var(--theme-border-strong-accent);
}

@media (max-width: 760px) {
  .shell-site-link {
    display: none;
  }
}

@media (max-width: 1040px) {
  .shell-search {
    min-width: 220px;
  }

  .shell-admin__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell-search {
    display: none;
  }

  .shell-user-avatar {
    display: none;
  }
}
