:root {
  --shell-bg: #f4f7fb;
  --shell-bg-strong: #eef3f9;
  --shell-panel: rgba(255, 255, 255, 0.72);
  --shell-panel-strong: rgba(255, 255, 255, 0.9);
  --shell-panel-solid: #ffffff;
  --shell-border: rgba(109, 134, 164, 0.18);
  --shell-border-strong: rgba(109, 134, 164, 0.28);
  --shell-text: #14253c;
  --shell-text-strong: #0d1b2f;
  --shell-muted: #66778d;
  --shell-muted-strong: #4d6179;
  --shell-accent: #2f72ff;
  --shell-accent-strong: #1e5add;
  --shell-accent-soft: rgba(47, 114, 255, 0.1);
  --shell-accent-soft-strong: rgba(47, 114, 255, 0.18);
  --shell-cyan: #8de7ff;
  --shell-success: #1f8f68;
  --shell-success-soft: #e8fbf2;
  --shell-danger: #d95b6a;
  --shell-danger-soft: #ffeff1;
  --shell-warning: #bd7d1f;
  --shell-warning-soft: #fff6e5;
  --shell-shadow: 0 22px 58px rgba(26, 43, 71, 0.09);
  --shell-shadow-soft: 0 12px 28px rgba(26, 43, 71, 0.08);
  --shell-shadow-lift: 0 24px 62px rgba(26, 43, 71, 0.12);
  --shell-radius-xl: 32px;
  --shell-radius-lg: 28px;
  --shell-radius: 24px;
  --shell-radius-md: 18px;
  --shell-radius-sm: 14px;
  --shell-max-width: 1520px;
  --topbar-height: 84px;
  --sidebar-width: 248px;
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--shell-text);
  background: var(--shell-bg);
  font-family: "Segoe UI Variable Display", "Aptos", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.app-shell-body,
body.standalone-doc,
body.reference-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(126, 186, 255, 0.18), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(141, 231, 255, 0.22), transparent 22%),
    radial-gradient(circle at 74% 86%, rgba(201, 225, 255, 0.4), transparent 18%),
    linear-gradient(180deg, #f8fbff 0%, #f1f5fa 48%, #edf2f8 100%);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--shell-accent);
}

a:hover {
  color: var(--shell-accent-strong);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid rgba(47, 114, 255, 0.22);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 220;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--shell-text);
  text-decoration: none;
  transform: translateY(-180%);
  box-shadow: 0 14px 30px rgba(16, 31, 57, 0.14);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-bg-glow {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(12px);
  z-index: 0;
}

.app-bg-glow--one {
  top: -50px;
  right: 8%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(141, 231, 255, 0.24) 0%, rgba(141, 231, 255, 0) 72%);
}

.app-bg-glow--two {
  left: 16%;
  bottom: 3%;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(47, 114, 255, 0.12) 0%, rgba(47, 114, 255, 0) 70%);
}

.app-shell {
  position: relative;
  min-height: 100vh;
  z-index: 1;
}

.app-topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--topbar-height);
  padding: 14px 20px;
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-xl);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shell-shadow);
  z-index: 120;
}

.app-topbar__brand,
.app-topbar__meta,
.app-topbar__custom,
.app-header__actions,
.page-actions,
.toolbar,
.form-row,
.cluster,
.actions-row,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.app-topbar__brand {
  gap: 14px;
  min-width: 0;
}

.app-topbar__meta {
  justify-content: flex-end;
}

.app-topbar__custom {
  min-width: 0;
}

.app-topbar__route {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  margin-right: 8px;
  color: var(--shell-muted);
  font-size: 12px;
}

.app-topbar__route strong {
  color: var(--shell-text-strong);
  font-size: 13px;
}

.app-topbar-login {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shell-shadow-soft);
}

.app-topbar-login__copy {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--shell-muted);
  font-size: 12px;
}

.app-topbar-login__copy strong {
  color: var(--shell-text-strong);
  font-size: 13px;
}

.app-topbar-login__form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-topbar-login__form input {
  width: 148px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 999px;
}

.app-topbar-login__form button {
  min-height: 40px;
  padding: 8px 14px;
}

.app-topbar-login__error {
  max-width: 240px;
  color: var(--shell-danger);
  font-size: 12px;
  font-weight: 700;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.app-brand--topbar {
  max-width: 420px;
}

.app-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 245, 255, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 12px 24px rgba(34, 55, 92, 0.1);
}

.app-brand__mark img {
  display: block;
  width: 100%;
  object-fit: contain;
}

.app-brand__meta {
  display: inline-flex;
  flex-direction: column;
  min-width: 0;
}

.app-brand__eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-muted);
}

.app-brand__title {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--shell-text-strong);
}

.app-brand__subtitle {
  display: block;
  margin-top: 6px;
  color: var(--shell-muted);
  line-height: 1.45;
  font-size: 13px;
}

.app-user-chip,
.app-session-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--shell-text);
  backdrop-filter: blur(14px);
}

.app-user-chip {
  gap: 8px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 48px;
}

.app-user-chip__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--shell-text-strong);
  line-height: 1;
}

.app-user-chip__role {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shell-muted);
  line-height: 1;
}

.app-user-chip--guest {
  background: rgba(255, 255, 255, 0.62);
}

.app-session-chip {
  font-size: 12px;
  color: var(--shell-muted);
}

.app-session-chip strong {
  color: var(--shell-text-strong);
  font-variant-numeric: tabular-nums;
}

.app-shell__overlay {
  display: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app-sidebar {
  position: fixed;
  top: calc(18px + var(--topbar-height) + 16px);
  left: 18px;
  bottom: 18px;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-xl);
  background: rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(18px);
  box-shadow: var(--shell-shadow);
  z-index: 90;
}

.app-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-sidebar__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shell-muted);
}

.app-sidebar__close {
  display: none;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--shell-text);
  box-shadow: none;
}

.app-nav {
  display: grid;
  gap: 10px;
}

.app-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--shell-muted-strong);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.36);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.app-nav__link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(47, 114, 255, 0.18);
  flex-shrink: 0;
}

.app-nav__link:hover {
  transform: translateY(-1px);
  color: var(--shell-text-strong);
  border-color: rgba(47, 114, 255, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 22px rgba(26, 43, 71, 0.08);
}

.app-nav__link.is-active,
.app-nav__link[aria-current="page"] {
  color: var(--shell-text-strong);
  border-color: rgba(47, 114, 255, 0.12);
  background: linear-gradient(135deg, rgba(47, 114, 255, 0.12), rgba(141, 231, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), 0 16px 28px rgba(47, 114, 255, 0.1);
}

.app-nav__link.is-active::before,
.app-nav__link[aria-current="page"]::before {
  background: linear-gradient(135deg, var(--shell-accent), #69c6ff);
}

.app-sidebar__foot {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(47, 114, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(240, 247, 255, 0.72));
  color: var(--shell-muted);
  font-size: 13px;
  line-height: 1.55;
}

.app-main {
  min-width: 0;
  margin-left: calc(var(--sidebar-width) + 36px);
  padding: calc(18px + var(--topbar-height) + 24px) 24px 28px;
}

.app-main--wide .app-content {
  max-width: none;
}

.app-menu-toggle {
  display: none;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--shell-border);
  border-radius: 999px;
  color: var(--shell-text);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 28px 30px;
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 255, 0.78));
  backdrop-filter: blur(18px);
  box-shadow: var(--shell-shadow);
}

.app-header--compact {
  justify-content: flex-end;
}

.app-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--shell-muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-breadcrumbs a {
  text-decoration: none;
}

.app-eyebrow {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--shell-accent-strong);
}

.app-header h1 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.04;
  color: var(--shell-text-strong);
}

.app-header p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--shell-muted);
  line-height: 1.6;
}

.app-content {
  max-width: none;
}

.app-content > * + * {
  margin-top: 24px;
}

.app-header__custom {
  max-width: 440px;
  width: 100%;
}

.app-header__login {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(47, 114, 255, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shell-shadow-soft);
}

.app-header__login-copy {
  display: grid;
  gap: 8px;
}

.app-header__login-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-accent-strong);
}

.app-header__login h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: var(--shell-text-strong);
}

.app-header__login p {
  max-width: none;
  margin: 0;
}

.app-header__login-form {
  display: grid;
  gap: 14px;
}

.surface,
.metric-card,
.notice,
.empty-state,
.quick-link-card,
.list-item,
.cookie-banner,
.modal-box,
.standalone-hero,
.reference-card,
.doc-card {
  border: 1px solid var(--shell-border);
  border-radius: var(--shell-radius);
  background: var(--shell-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shell-shadow);
}

.surface,
.standalone-hero,
.reference-card,
.doc-card {
  padding: 26px;
}

.surface,
.metric-card,
.quick-link-card,
.list-item {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.surface:hover,
.metric-card:hover,
.quick-link-card:hover,
.list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shell-shadow-lift);
  border-color: rgba(47, 114, 255, 0.14);
}

.surface--tight {
  padding: 20px;
}

.surface--danger {
  border-color: rgba(217, 91, 106, 0.22);
  background: linear-gradient(180deg, rgba(255, 249, 250, 0.92), rgba(255, 240, 243, 0.86));
}

.surface__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.surface__header > div:first-child::before {
  content: "Section";
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-muted);
}

.surface__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  color: var(--shell-text-strong);
}

.surface__subtitle,
.helper-text,
.section-note,
.field-note {
  margin: 8px 0 0;
  color: var(--shell-muted);
  line-height: 1.62;
}

.helper-text,
.field-note {
  font-size: 13px;
}

.table-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.quick-link-grid,
.metric-grid,
.grid,
.login-grid {
  display: grid;
  gap: 18px;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--2,
.quick-link-grid,
.login-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.68);
}

.quick-link-card__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--shell-text-strong);
}

.quick-link-card__text {
  color: var(--shell-muted);
  line-height: 1.6;
}

.metric-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(247, 251, 255, 0.7));
}

.metric-card__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shell-muted);
}

.metric-card__value {
  margin-top: 12px;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  line-height: 1;
  color: var(--shell-text-strong);
}

.metric-card__text {
  margin-top: 10px;
  color: var(--shell-muted);
  line-height: 1.55;
}

.notice,
.empty-state {
  padding: 18px 20px;
}

.notice--warning {
  border-color: rgba(189, 125, 31, 0.18);
  background: var(--shell-warning-soft);
}

.notice--success {
  border-color: rgba(31, 143, 104, 0.18);
  background: var(--shell-success-soft);
}

.notice--error {
  border-color: rgba(217, 91, 106, 0.18);
  background: var(--shell-danger-soft);
}

.app-button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, #3d86ff 0%, #245cf3 100%);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    border-color 0.16s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 14px 30px rgba(47, 114, 255, 0.24);
}

.app-button:hover,
button:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.app-button--secondary {
  color: var(--shell-text);
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--shell-border);
  box-shadow: none;
}

.app-button--ghost {
  color: var(--shell-text);
  background: rgba(47, 114, 255, 0.06);
  border-color: rgba(47, 114, 255, 0.1);
  box-shadow: none;
}

.app-button--success {
  background: linear-gradient(135deg, #29a777 0%, #1b8760 100%);
}

.app-button--danger {
  background: linear-gradient(135deg, #ea6677 0%, #ce4f61 100%);
}

.app-button--logout {
  background: linear-gradient(135deg, #162843 0%, #22395c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 30px rgba(20, 37, 60, 0.22);
}

.app-button--full {
  width: 100%;
}

.app-button--small,
.button-small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: none;
}

label,
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-muted-strong);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control__slider {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: rgba(109, 134, 164, 0.28);
  transition: background 0.2s ease;
}

.switch-control__slider::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 34, 51, 0.16);
  transition: transform 0.2s ease;
}

.switch-control input:checked + .switch-control__slider {
  background: linear-gradient(135deg, #3d86ff 0%, #1d72ff 100%);
}

.switch-control input:checked + .switch-control__slider::after {
  transform: translateX(26px);
}

.switch-control__text {
  min-width: 72px;
  font-size: 13px;
  font-weight: 700;
  color: var(--shell-text);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--shell-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--shell-text);
  box-shadow: inset 0 1px 1px rgba(19, 36, 60, 0.02);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--shell-border-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 114, 255, 0.3);
  box-shadow: 0 0 0 4px rgba(47, 114, 255, 0.08);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
}

input[readonly] {
  background: #edf2f7;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.table-scroller {
  position: relative;
  overflow-x: auto;
  border: 1px solid rgba(109, 134, 164, 0.12);
  border-radius: 24px;
  scrollbar-gutter: stable both-edges;
  background:
    linear-gradient(to right, rgba(244, 247, 251, 0.95), rgba(244, 247, 251, 0)) 0 0 / 28px 100% no-repeat,
    linear-gradient(to left, rgba(244, 247, 251, 0.95), rgba(244, 247, 251, 0)) 100% 0 / 28px 100% no-repeat,
    rgba(255, 255, 255, 0.54);
}

.table-scroller[data-scrollable="true"]::after {
  content: "Scroll";
  position: sticky;
  right: 12px;
  bottom: 10px;
  float: right;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(20, 37, 60, 0.78);
  color: #f3fbff;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

.data-table caption {
  padding: 16px 18px;
  text-align: left;
  font-weight: 700;
  color: var(--shell-text);
}

.data-table th,
.data-table td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(109, 134, 164, 0.12);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--shell-muted);
  background: rgba(246, 250, 255, 0.94);
  backdrop-filter: blur(12px);
}

.data-table tbody tr {
  transition: background 0.16s ease;
}

.data-table tbody tr:hover {
  background: rgba(47, 114, 255, 0.045);
}

.data-table tbody tr.is-muted {
  color: #7b8795;
  background: rgba(208, 215, 223, 0.12);
}

.data-table tbody tr.is-highlight {
  background: rgba(232, 251, 242, 0.66);
}

.status-pill,
.badge,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chip {
  color: var(--shell-text);
  background: rgba(47, 114, 255, 0.08);
}

.status-pill--draft,
.badge-warning,
.chip--warning {
  color: var(--shell-warning);
  background: var(--shell-warning-soft);
}

.status-pill--active,
.badge-ok,
.chip--success {
  color: var(--shell-success);
  background: var(--shell-success-soft);
}

.status-pill--inactive,
.badge-danger,
.chip--danger {
  color: var(--shell-danger);
  background: var(--shell-danger-soft);
}

.status-pill--license {
  border: 1px solid rgba(109, 134, 164, 0.18);
  background: rgba(255, 255, 255, 0.74);
  color: var(--shell-text);
  backdrop-filter: blur(14px);
}

.status-pill--license-valid {
  color: var(--shell-success);
  background: var(--shell-success-soft);
}

.status-pill--license-missing {
  color: var(--shell-warning);
  background: var(--shell-warning-soft);
}

.status-pill--license-expired,
.status-pill--license-invalid {
  color: var(--shell-danger);
  background: var(--shell-danger-soft);
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.66);
}

.inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--shell-muted);
  font-size: 13px;
}

.cookie-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(460px, calc(100vw - 48px));
  padding: 20px 20px 18px;
  display: none;
  z-index: 160;
  background: rgba(20, 37, 60, 0.94);
  color: #f5fbff;
  border-radius: 24px;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 50px rgba(9, 19, 35, 0.28);
}

.cookie-banner.show {
  display: block;
}

.cookie-banner p {
  margin: 0 0 14px;
  line-height: 1.6;
}

.cookie-banner .app-button {
  box-shadow: none;
}

.news-banner {
  padding: 16px 20px;
  border: 1px solid rgba(47, 114, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(230, 244, 255, 0.9), rgba(255, 255, 255, 0.82));
  color: var(--shell-text);
  box-shadow: var(--shell-shadow-soft);
}

.license-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(217, 91, 106, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 239, 241, 0.96), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shell-shadow-soft);
}

.license-banner strong {
  color: var(--shell-text-strong);
}

.license-banner__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--shell-muted);
  font-size: 13px;
}

.license-popup {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 27, 47, 0.2);
  backdrop-filter: blur(6px);
}

.license-popup__card {
  width: min(540px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px 28px;
  border: 1px solid rgba(109, 134, 164, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shell-shadow-lift);
}

.license-popup__card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.1;
  color: var(--shell-text-strong);
}

.license-popup__card p {
  margin: 0;
  color: var(--shell-muted-strong);
  line-height: 1.65;
}

.license-summary {
  display: grid;
  gap: 18px;
}

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

.license-summary__grid > div {
  padding: 14px 16px;
  border: 1px solid var(--shell-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.license-summary__grid p {
  margin: 0;
  color: var(--shell-text-strong);
}

.license-token {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 14px 16px;
  border: 1px solid rgba(13, 27, 47, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, #102034 0%, #182d48 100%);
  color: #e8f3ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.license-note {
  color: var(--shell-muted-strong);
  line-height: 1.65;
}

.license-form {
  display: grid;
  gap: 16px;
}

.news-banner strong {
  color: var(--shell-accent-strong);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 17, 32, 0.46);
  padding: 24px;
  z-index: 180;
  overflow-y: auto;
}

.modal.is-open {
  display: block;
}

.modal-box {
  max-width: 620px;
  margin: 60px auto 0;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.rich-text {
  line-height: 1.78;
  white-space: normal;
}

.rich-text p:first-child {
  margin-top: 0;
}

.standalone-shell {
  width: min(1180px, calc(100vw - 36px));
  margin: 28px auto;
}

.standalone-hero h1,
.reference-card h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  color: var(--shell-text-strong);
}

.standalone-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  color: var(--shell-muted);
}

.doc-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.doc-card h2,
.doc-card h3 {
  margin-top: 0;
}

.doc-card table {
  width: 100%;
  border-collapse: collapse;
}

.doc-card th,
.doc-card td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(109, 134, 164, 0.12);
  text-align: left;
  vertical-align: top;
}

.doc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.doc-gallery button {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.doc-gallery button:hover {
  transform: translateY(-1px);
  filter: none;
}

.doc-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.doc-step + .doc-step {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(109, 134, 164, 0.12);
}

.doc-modal {
  display: none;
  position: fixed;
  inset: 0;
  padding: 22px;
  background: rgba(4, 16, 29, 0.78);
  z-index: 220;
  align-items: center;
  justify-content: center;
}

.doc-modal.is-open {
  display: flex;
}

.doc-modal__inner {
  position: relative;
  width: min(1100px, 100%);
}

.doc-modal__close {
  position: absolute;
  top: -12px;
  right: -12px;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 12px 30px rgba(5, 17, 32, 0.32);
}

.doc-modal img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 90px);
  margin: 0 auto;
  border-radius: 18px;
}

.reference-card pre {
  margin: 18px 0 0;
  padding: 20px;
  overflow-x: auto;
  border-radius: 18px;
  background: #10223b;
  color: #e9f6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 1180px) {
  .app-topbar__route {
    display: none;
  }

  .app-main {
    padding-right: 18px;
  }
}

@media (max-width: 1080px) {
  body.app-sidebar-open {
    overflow: hidden;
  }

  .app-topbar {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    min-height: 76px;
    padding: 12px 14px;
  }

  .app-topbar__meta {
    gap: 8px;
  }

  .app-shell__overlay {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(5, 17, 32, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 80;
  }

  body.app-sidebar-open .app-shell__overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .app-sidebar {
    top: 98px;
    left: 12px;
    bottom: 12px;
    width: min(320px, calc(100vw - 24px));
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    z-index: 110;
  }

  body.app-sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar__close,
  .app-menu-toggle {
    display: inline-flex;
  }

  .app-main {
    margin-left: 0;
    padding: 110px 16px 24px;
  }

  .app-header {
    padding: 22px;
  }
}

@media (max-width: 860px) {
  .app-topbar {
    align-items: flex-start;
  }

  .app-topbar__brand,
  .app-topbar__meta {
    width: 100%;
  }

  .app-topbar__meta {
    justify-content: flex-start;
  }

  .app-topbar-login {
    width: 100%;
    border-radius: 24px;
  }

  .app-topbar-login__form {
    flex-wrap: wrap;
  }

  .app-topbar-login__form input {
    flex: 1 1 180px;
    width: auto;
  }

  .app-user-chip {
    min-width: 130px;
  }
}

@media (max-width: 720px) {
  .toggle-row,
  .surface__header,
  .table-summary,
  .app-header,
  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-topbar {
    min-height: auto;
  }

  .app-topbar__meta {
    width: 100%;
  }

  .app-topbar__custom,
  .app-topbar-login,
  .app-topbar-login__form {
    width: 100%;
  }

  .surface,
  .metric-card,
  .notice,
  .empty-state,
  .quick-link-card,
  .list-item,
  .modal-box {
    padding: 18px;
  }

  .app-header {
    gap: 14px;
    padding: 18px;
  }

  .app-header__custom {
    max-width: none;
  }

  .app-header__login {
    padding: 18px;
  }

  .data-table {
    min-width: 560px;
  }

  .table-scroller[data-scrollable="true"]::after {
    content: "Swipe";
  }

  .cookie-banner {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
  }

  .standalone-shell {
    width: calc(100vw - 22px);
    margin: 12px auto 20px;
  }

  .standalone-hero,
  .reference-card,
  .doc-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .app-topbar,
  .app-sidebar,
  .app-menu-toggle,
  .cookie-banner,
  .app-header__actions,
  .page-actions,
  .actions-row button,
  .actions-row .app-button,
  .app-shell__overlay,
  .modal {
    display: none !important;
  }

  .app-main,
  .app-content,
  .table-scroller {
    display: block;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: #ffffff;
    box-shadow: none;
  }

  body.app-shell-body,
  body.standalone-doc,
  body.reference-page {
    background: #ffffff;
  }

  .surface,
  .metric-card,
  .notice,
  .empty-state,
  .quick-link-card,
  .list-item,
  .standalone-hero,
  .reference-card,
  .doc-card {
    border: 1px solid #d8dde5;
    box-shadow: none;
    background: #ffffff;
    backdrop-filter: none;
  }

  .data-table th {
    position: static;
  }
}

/* Legacy compatibility for any remaining pages that still reference older classes. */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #ddd;
}

.logo {
  font-size: 20px;
  font-weight: 700;
}

.auth-box form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-box input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.error {
  margin-top: 4px;
  color: #c00;
  font-size: 12px;
}

.user-info {
  font-size: 14px;
  text-align: right;
}

.content {
  padding: 32px;
  min-height: 600px;
}

.logout-btn {
  margin-left: 12px;
  font-size: 13px;
  text-decoration: none;
  color: #0077cc;
}

.logout-btn:hover {
  text-decoration: underline;
}

.settings-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.settings-table th,
.settings-table td {
  border: 1px solid #ccc;
  padding: 8px;
  vertical-align: top;
}

.settings-table th {
  background: #f2f2f2;
}

.menu-title {
  margin-right: 20px;
  font-size: 1.1em;
  font-weight: 700;
}

.menu-btn {
  display: inline-block;
  margin-left: 10px;
  padding: 6px 12px;
  background-color: #0080ff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.95em;
}
