/* Global visual shell for internal pages that include navbar partials. */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&display=swap');

body.app-shell-theme {
  --shell-bg: linear-gradient(160deg, #f3f8f8 0%, #edf6f6 44%, #f5faf9 100%);
  --shell-radial-a: rgba(44, 139, 138, 0.18);
  --shell-radial-b: rgba(58, 169, 168, 0.14);
  --shell-pattern: rgba(44, 139, 138, 0.07);

  --shell-text: #152433;
  --shell-text-muted: #5d7483;

  --shell-surface: rgba(255, 255, 255, 0.9);
  --shell-surface-strong: #ffffff;
  --shell-surface-soft: #f4f8fb;
  --shell-hover-soft: #edf4f9;

  --shell-line: rgba(26, 66, 80, 0.16);
  --shell-line-strong: rgba(26, 66, 80, 0.3);

  --shell-shadow: 0 22px 44px -30px rgba(27, 39, 54, 0.46);
  --shell-shadow-soft: 0 12px 24px -18px rgba(27, 39, 54, 0.35);

  --shell-topbar-bg: rgba(255, 255, 255, 0.9);
  --shell-brand: #2c8b8a;
  --shell-brand-2: #3aa9a8;
  --shell-accent: #2c8b8a;
}

html[data-theme='dark'] body.app-shell-theme {
  --shell-bg: linear-gradient(162deg, #070a0f 0%, #0b0f14 48%, #070a0f 100%);
  --shell-radial-a: rgba(44, 139, 138, 0.24);
  --shell-radial-b: rgba(58, 169, 168, 0.18);
  --shell-pattern: rgba(136, 171, 176, 0.08);

  --shell-text: #e8f4f5;
  --shell-text-muted: #a2bcc1;

  --shell-surface: rgba(15, 22, 32, 0.84);
  --shell-surface-strong: rgba(15, 22, 32, 0.92);
  --shell-surface-soft: rgba(21, 32, 45, 0.92);
  --shell-hover-soft: rgba(25, 40, 56, 0.95);

  --shell-line: rgba(168, 196, 203, 0.27);
  --shell-line-strong: rgba(186, 214, 220, 0.42);

  --shell-shadow: 0 24px 48px -30px rgba(0, 0, 0, 0.76);
  --shell-shadow-soft: 0 18px 30px -26px rgba(0, 0, 0, 0.68);

  --shell-topbar-bg: rgba(11, 15, 20, 0.88);
  --shell-brand: #3aa9a8;
  --shell-brand-2: #6dc9c8;
  --shell-accent: #52b8b7;
}

body.app-shell-theme {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  color: var(--shell-text);
  font-family: 'Sora', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(circle at 8% 0%, var(--shell-radial-a), transparent 42%),
    radial-gradient(circle at 98% 10%, var(--shell-radial-b), transparent 38%),
    var(--shell-bg);
}

body.app-shell-theme::before,
body.app-shell-theme::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

body.app-shell-theme::before {
  inset: 0;
  background-image: linear-gradient(to right, var(--shell-pattern) 1px, transparent 1px),
                    linear-gradient(to bottom, var(--shell-pattern) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.32;
}

body.app-shell-theme::after {
  width: 22rem;
  height: 22rem;
  right: -9rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(44, 139, 138, 0.24), transparent 66%);
  filter: blur(8px);
}

body.app-shell-theme .navbar.sticky {
  background: var(--shell-topbar-bg) !important;
  border-bottom: 1px solid var(--shell-line) !important;
  backdrop-filter: blur(10px);
}

body.app-shell-theme .app-main-navbar .max-w-6xl,
body.app-shell-theme .app-delivery-navbar .max-w-5xl {
  position: relative;
}

body.app-shell-theme .app-main-navbar-row {
  min-height: 4.2rem;
  display: flex;
  align-items: center;
  gap: 0.34rem;
}

body.app-shell-theme .app-main-navbar-brand {
  flex: 0 1 auto;
  min-width: 0;
}

body.app-shell-theme .app-main-navbar-desktop {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

body.app-shell-theme .app-main-menu {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.08rem;
}

body.app-shell-theme .app-main-menu > li {
  flex: 0 0 auto;
}

body.app-shell-theme .app-main-navbar-actions {
  margin-left: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.34rem;
}

body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > a,
body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > details > summary {
  white-space: nowrap;
  padding-left: 0.46rem;
  padding-right: 0.46rem;
  font-size: 0.86rem;
}

body.app-shell-theme .app-main-navbar .max-w-6xl::after,
body.app-shell-theme .app-delivery-navbar .max-w-5xl::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--shell-brand), var(--shell-brand-2), transparent);
  opacity: 0.74;
}

body.app-shell-theme .shell-brand {
  text-decoration: none;
  color: inherit;
}

body.app-shell-theme .shell-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--shell-line);
  background: linear-gradient(145deg, var(--shell-surface-strong), var(--shell-surface-soft));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: var(--shell-shadow-soft);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--shell-brand);
}

body.app-shell-theme .shell-brand-mark-logo {
  padding: 4px;
  overflow: hidden;
}

body.app-shell-theme .shell-brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

body.app-shell-theme .shell-brand-copy {
  min-width: 0;
}

body.app-shell-theme .shell-brand-name {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--shell-text);
  max-width: 210px;
}

body.app-shell-theme .shell-brand-sub {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--shell-text-muted);
}

body.app-shell-theme .navbar .menu > li > a,
body.app-shell-theme .navbar .menu > li > details > summary {
  border-radius: 999px;
  min-height: 2.1rem;
  font-weight: 600;
  color: var(--shell-text-muted);
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
  border: 1px solid transparent;
}

body.app-shell-theme .navbar .menu > li > a:hover,
body.app-shell-theme .navbar .menu > li > details > summary:hover {
  background: var(--shell-surface-soft);
  border-color: var(--shell-line);
  color: var(--shell-text);
}

body.app-shell-theme .navbar .menu a.active,
body.app-shell-theme .navbar .menu summary.active {
  color: var(--shell-brand);
  background: color-mix(in srgb, var(--shell-brand) 14%, transparent);
  border-color: color-mix(in srgb, var(--shell-brand) 28%, transparent);
  font-weight: 700;
}

body.app-shell-theme .navbar .dropdown-content,
body.app-shell-theme .navbar .menu.menu-sm.dropdown-content {
  border: 1px solid var(--shell-line) !important;
  background: var(--shell-surface-strong) !important;
  box-shadow: var(--shell-shadow) !important;
  border-radius: 14px !important;
}

body.app-shell-theme .menu-title > span {
  color: var(--shell-text-muted) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.63rem;
  font-weight: 700;
}

body.app-shell-theme .navbar .btn.btn-circle {
  border: 1px solid var(--shell-line);
  background: var(--shell-surface-soft);
}

body.app-shell-theme .navbar [data-theme-toggle] {
  color: var(--shell-text) !important;
}

body.app-shell-theme .navbar [data-theme-toggle] svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex: 0 0 auto;
  opacity: 0.95;
}

body.app-shell-theme .navbar [data-theme-toggle] [data-icon='lamp-off'] {
  stroke: currentColor;
  fill: none;
}

body.app-shell-theme .navbar [data-theme-toggle] [data-icon='lamp-on'] {
  fill: currentColor;
}

html[data-theme='dark'] body.app-shell-theme .navbar [data-theme-toggle] {
  color: #d8eef2 !important;
}

html[data-theme='dark'] body.app-shell-theme .navbar [data-theme-toggle]:hover {
  color: #f2fdff !important;
}

body.app-shell-theme .navbar .btn.btn-circle:hover {
  border-color: var(--shell-line-strong);
  background: var(--shell-hover-soft);
}

body.app-shell-theme .card,
body.app-shell-theme .collapse,
body.app-shell-theme .modal-box,
body.app-shell-theme .stats,
body.app-shell-theme .alert,
body.app-shell-theme .hero,
body.app-shell-theme .timeline,
body.app-shell-theme .steps {
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--shell-brand-2) 12%, transparent), transparent 44%),
    linear-gradient(162deg, color-mix(in srgb, var(--shell-surface-soft) 55%, var(--shell-surface-strong)), var(--shell-surface) 62%, var(--shell-surface-strong));
  border: 1px solid color-mix(in srgb, var(--shell-line) 72%, var(--shell-brand) 8%) !important;
  box-shadow: 0 20px 42px -34px rgba(15, 23, 42, 0.6);
  border-radius: 20px;
}

body.app-shell-theme .card:hover,
body.app-shell-theme .collapse:hover {
  border-color: color-mix(in srgb, var(--shell-line-strong) 76%, var(--shell-brand-2) 24%) !important;
}

body.app-shell-theme .card,
body.app-shell-theme .stats,
body.app-shell-theme .collapse {
  position: relative;
  overflow: hidden;
}

body.app-shell-theme .card::before,
body.app-shell-theme .stats::before,
body.app-shell-theme .collapse::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--shell-brand), var(--shell-brand-2), color-mix(in srgb, var(--shell-brand) 34%, #ffffff));
  opacity: 0.9;
  pointer-events: none;
}

body.app-shell-theme .stat-title {
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.68rem;
  color: color-mix(in srgb, var(--shell-text-muted) 88%, var(--shell-brand) 12%);
}

body.app-shell-theme .stat-value {
  letter-spacing: -0.02em;
  font-weight: 800;
}

body.app-shell-theme .table {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--shell-line) 80%, var(--shell-brand-2) 10%);
  background: color-mix(in srgb, var(--shell-surface-strong) 80%, transparent);
}

body.app-shell-theme .table thead th {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--shell-surface-soft) 88%, var(--shell-brand) 5%), var(--shell-surface-soft));
  color: var(--shell-text-muted);
  border-color: var(--shell-line);
  text-transform: uppercase;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  font-weight: 800;
}

body.app-shell-theme .table tbody td,
body.app-shell-theme .table tbody th {
  border-color: var(--shell-line);
}

body.app-shell-theme .table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--shell-surface-soft) 64%, transparent);
}

body.app-shell-theme .table tbody tr:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--shell-brand) 10%, transparent), transparent 28%),
    var(--shell-hover-soft) !important;
}

body.app-shell-theme .auto-table-shell {
  overflow: auto;
  max-height: min(68vh, 760px);
  border: 1px solid color-mix(in srgb, var(--shell-line) 74%, var(--shell-brand) 10%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--shell-surface-strong) 92%, transparent);
}

body.app-shell-theme .auto-table-shell .table {
  margin: 0;
  border: 0;
  border-radius: 0;
}

body.app-shell-theme .auto-table-shell thead th {
  position: sticky;
  top: 0;
  z-index: 8;
}

body.app-shell-theme .auto-sortable-th {
  cursor: pointer;
  user-select: none;
}

body.app-shell-theme .auto-sortable-th .auto-sort-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: .4rem;
  opacity: .45;
  font-size: .72rem;
  transition: opacity 120ms ease;
}

body.app-shell-theme .auto-sortable-th.is-active .auto-sort-indicator {
  opacity: 1;
}

body.app-shell-theme .btn {
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.58);
}

body.app-shell-theme .btn-primary {
  color: #f5fbff;
  border-color: transparent;
  background: linear-gradient(128deg, color-mix(in srgb, var(--shell-brand) 92%, #ffffff 8%), color-mix(in srgb, var(--shell-brand-2) 84%, #ffffff 16%) 64%, #2563eb);
}

body.app-shell-theme .btn-primary:hover {
  background: linear-gradient(128deg, color-mix(in srgb, var(--shell-brand) 96%, #000 4%), color-mix(in srgb, var(--shell-brand-2) 74%, #ffffff 26%) 64%, #1d4ed8);
}

body.app-shell-theme .btn-secondary {
  color: #fff9f0;
  border-color: transparent;
  background: linear-gradient(132deg, #9a3412, #b45309);
}

body.app-shell-theme .btn-secondary:hover {
  background: linear-gradient(132deg, #7c2d12, #92400e);
}

body.app-shell-theme .btn-ghost,
body.app-shell-theme .btn-outline {
  border-color: var(--shell-line);
  background: var(--shell-surface-soft);
  color: var(--shell-text);
}

body.app-shell-theme .btn-ghost:hover,
body.app-shell-theme .btn-outline:hover {
  border-color: var(--shell-line-strong);
  background: var(--shell-hover-soft);
}

body.app-shell-theme .badge {
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
}

body.app-shell-theme .badge-error {
  background: #be123c;
  color: #fff;
}

body.app-shell-theme .input,
body.app-shell-theme .select,
body.app-shell-theme .textarea {
  background: var(--shell-surface-soft);
  border-color: var(--shell-line);
  color: var(--shell-text);
  border-radius: 11px;
}

body.app-shell-theme .input:focus,
body.app-shell-theme .select:focus,
body.app-shell-theme .textarea:focus {
  border-color: color-mix(in srgb, var(--shell-brand) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shell-brand) 20%, transparent);
}

body.app-shell-theme .tabs .tab {
  border-radius: 999px;
}

body.app-shell-theme .tabs .tab-active {
  background: var(--shell-surface-soft);
  color: var(--shell-brand);
  border-color: var(--shell-line);
}

body.app-shell-theme .link,
body.app-shell-theme .text-primary {
  color: var(--shell-brand) !important;
}

body.app-shell-theme .footer {
  border-top: 1px solid var(--shell-line);
  background: var(--shell-topbar-bg);
}

body.app-shell-theme .app-shell-footer {
  border-top: 1px solid var(--shell-line);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--shell-brand) 8%, var(--shell-surface-strong)), var(--shell-surface-strong) 58%);
}

body.app-shell-theme .app-shell-footer-grid {
  border: 1px solid var(--shell-line);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: var(--shell-surface);
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.app-shell-theme .app-shell-footer-kicker {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: color-mix(in srgb, var(--shell-brand) 70%, var(--shell-text));
}

body.app-shell-theme .app-shell-footer-title {
  margin: 0.12rem 0 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--shell-text);
}

body.app-shell-theme .app-shell-footer-copy {
  margin: 0.16rem 0 0;
  color: var(--shell-text-muted);
  font-size: 0.77rem;
}

body.app-shell-theme .app-shell-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

body.app-shell-theme .divider::before,
body.app-shell-theme .divider::after {
  border-color: var(--shell-line);
}

body.app-shell-theme .avatar > div {
  border: 1px solid var(--shell-line);
}

/* Module classes remain for semantics; palette is unified across all modules. */
body.app-shell-theme.module-dashboard,
body.app-shell-theme.module-pedidos,
body.app-shell-theme.module-compras,
body.app-shell-theme.module-financeiro,
body.app-shell-theme.module-crm,
body.app-shell-theme.module-logistica {
  --shell-brand: #2c8b8a;
  --shell-brand-2: #3aa9a8;
  --shell-accent: #2c8b8a;
  --shell-radial-a: rgba(44, 139, 138, 0.18);
  --shell-radial-b: rgba(58, 169, 168, 0.14);
}

html[data-theme='dark'] body.app-shell-theme.module-dashboard,
html[data-theme='dark'] body.app-shell-theme.module-pedidos,
html[data-theme='dark'] body.app-shell-theme.module-compras,
html[data-theme='dark'] body.app-shell-theme.module-financeiro,
html[data-theme='dark'] body.app-shell-theme.module-crm,
html[data-theme='dark'] body.app-shell-theme.module-logistica {
  --shell-brand: #3aa9a8;
  --shell-brand-2: #6dc9c8;
  --shell-accent: #52b8b7;
  --shell-radial-a: rgba(44, 139, 138, 0.24);
  --shell-radial-b: rgba(58, 169, 168, 0.18);
}

body.app-shell-theme .module-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--shell-line) 68%, var(--shell-brand) 18%);
  padding: 18px 20px;
  gap: 1rem;
  background:
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--shell-brand-2) 34%, transparent), transparent 56%),
    radial-gradient(circle at 12% 100%, color-mix(in srgb, var(--shell-brand) 20%, transparent), transparent 52%),
    linear-gradient(122deg, color-mix(in srgb, var(--shell-brand) 15%, transparent), transparent 58%),
    var(--shell-surface-strong);
  box-shadow: 0 24px 48px -36px rgba(15, 23, 42, 0.66);
}

body.app-shell-theme .module-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--shell-brand), var(--shell-brand-2));
  opacity: 0.88;
}

body.app-shell-theme .module-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--shell-brand) 10%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--shell-brand) 8%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.24;
  pointer-events: none;
}

body.app-shell-theme .module-hero-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

body.app-shell-theme .module-hero-kicker {
  margin: 0 0 4px;
  font-size: 0.66rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 800;
  color: color-mix(in srgb, var(--shell-brand) 82%, var(--shell-text));
}

body.app-shell-theme .module-hero-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.9vw, 2.2rem);
  line-height: 1.07;
  letter-spacing: 0.01em;
  font-weight: 800;
  color: var(--shell-text);
}

body.app-shell-theme .module-hero-sub {
  margin: 6px 0 0;
  color: color-mix(in srgb, var(--shell-text-muted) 84%, var(--shell-brand) 16%);
  font-size: 0.9rem;
  max-width: 58ch;
}

body.app-shell-theme .module-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--shell-brand) 32%, var(--shell-line));
  background: color-mix(in srgb, var(--shell-surface-soft) 72%, transparent);
  position: relative;
  z-index: 1;
}

body.app-shell-theme .module-hero .btn {
  box-shadow: none;
  border-radius: 11px;
}

/* Global structural layer (applied by navbar enhancer) */
body.app-shell-theme .shell-module-strip {
  position: sticky;
  top: 65px;
  z-index: 35;
  border-bottom: 1px solid var(--shell-line);
  background:
    linear-gradient(118deg, color-mix(in srgb, var(--shell-brand) 9%, var(--shell-surface-strong)), var(--shell-surface-strong) 62%),
    var(--shell-surface-strong);
  backdrop-filter: blur(8px);
}

body.app-shell-theme .shell-module-strip .shell-module-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.6rem 0.9rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.app-shell-theme .shell-module-info {
  min-width: 0;
}

body.app-shell-theme .shell-module-kicker {
  margin: 0;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: color-mix(in srgb, var(--shell-brand) 75%, var(--shell-text));
}

body.app-shell-theme .shell-module-title {
  margin: 0.1rem 0 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.99rem;
  color: var(--shell-text);
}

body.app-shell-theme .shell-module-sub {
  margin: 0.06rem 0 0;
  font-size: 0.8rem;
  color: var(--shell-text-muted);
}

body.app-shell-theme .shell-module-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

body.app-shell-theme .shell-module-link {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--shell-brand) 24%, var(--shell-line));
  padding: 0.34rem 0.64rem;
  background: color-mix(in srgb, var(--shell-brand) 8%, var(--shell-surface-soft));
  color: var(--shell-text);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

body.app-shell-theme .shell-module-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--shell-brand) 48%, var(--shell-line-strong));
  background: color-mix(in srgb, var(--shell-brand) 16%, var(--shell-surface-soft));
}

body.app-shell-theme .shell-module-link.active {
  border-color: color-mix(in srgb, var(--shell-brand) 56%, var(--shell-line-strong));
  background: color-mix(in srgb, var(--shell-brand) 18%, var(--shell-surface-soft));
  color: color-mix(in srgb, var(--shell-brand) 86%, var(--shell-text));
}

body.app-shell-theme .shell-workspace {
  position: relative;
  z-index: 2;
}

body.app-shell-theme .shell-auto-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--shell-brand) 28%, var(--shell-line));
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--shell-brand-2) 24%, transparent), transparent 48%),
    linear-gradient(112deg, color-mix(in srgb, var(--shell-brand) 15%, var(--shell-surface-strong)), var(--shell-surface-strong) 64%);
  padding: 0.92rem 1rem 1rem;
}

body.app-shell-theme .shell-auto-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--shell-brand), var(--shell-brand-2));
}

body.app-shell-theme .shell-auto-hero .title {
  margin: 0.24rem 0 0;
  font-family: 'Sora', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: 0.01em;
  font-size: clamp(1.14rem, 2.2vw, 1.8rem);
  line-height: 1.12;
  color: var(--shell-text);
}

body.app-shell-theme .shell-auto-hero .meta {
  margin-top: 0.36rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

body.app-shell-theme .shell-auto-hero .meta .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--shell-brand) 28%, var(--shell-line));
  background: color-mix(in srgb, var(--shell-brand) 10%, var(--shell-surface-strong));
  color: color-mix(in srgb, var(--shell-brand) 80%, var(--shell-text));
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.3rem 0.58rem;
}

body.app-shell-theme .shell-workspace .shell-stage {
  position: relative;
}

body.app-shell-theme .shell-workspace .shell-stage::before {
  content: '';
  position: absolute;
  left: -0.42rem;
  top: 0.48rem;
  bottom: 0.48rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--shell-brand) 58%, transparent), transparent);
  opacity: 0.75;
  pointer-events: none;
}

@keyframes shellFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.app-shell-theme .card,
body.app-shell-theme .stats,
body.app-shell-theme .alert {
  animation: shellFadeUp 240ms ease-out;
}

@media (max-width: 768px) {
  body.app-shell-theme .app-main-navbar-row {
    min-height: 3.65rem;
    gap: 0.3rem;
  }

  body.app-shell-theme .shell-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  body.app-shell-theme .module-hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 14px;
  }

  body.app-shell-theme .module-hero-actions {
    justify-content: flex-start;
    margin-top: 4px;
    width: 100%;
  }

  body.app-shell-theme .shell-module-strip {
    top: 57px;
  }

  body.app-shell-theme .shell-module-strip .shell-module-inner {
    grid-template-columns: 1fr;
  }

  body.app-shell-theme .shell-module-links {
    justify-content: flex-start;
  }

  body.app-shell-theme .app-shell-footer-grid {
    grid-template-columns: 1fr;
  }

  body.app-shell-theme .app-shell-footer-links {
    justify-content: flex-start;
  }

  body.app-shell-theme .navbar .menu > li > a,
  body.app-shell-theme .navbar .menu > li > details > summary {
    border-radius: 10px;
  }
}

@media (max-width: 1600px) {
  body.app-shell-theme .app-main-navbar .shell-brand-copy {
    display: none !important;
  }
}

@media (max-width: 1500px) {
  body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > a,
  body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > details > summary {
    padding-left: 0.36rem;
    padding-right: 0.36rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1360px) {
  body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > a,
  body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > details > summary {
    padding-left: 0.28rem;
    padding-right: 0.28rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 1240px) {
  body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > a,
  body.app-shell-theme .app-main-navbar .menu.menu-horizontal > li > details > summary {
    padding-left: 0.22rem;
    padding-right: 0.22rem;
    font-size: 0.73rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.app-shell-theme * {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .auto-table-shell {
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
  }
}
