:root {
  color-scheme: dark;
  --container-max: 1680px;
  --container-gutter: 14px;
  --bg: #0d1110;
  --bg-deep: #060807;
  --surface: rgba(20, 25, 23, 0.95);
  --surface-strong: rgba(25, 31, 28, 0.985);
  --surface-alt: rgba(31, 38, 34, 0.97);
  --surface-tint: rgba(72, 87, 66, 0.34);
  --surface-glass: rgba(10, 13, 12, 0.8);
  --border: rgba(162, 135, 84, 0.22);
  --border-strong: rgba(212, 181, 112, 0.36);
  --text: #eceee6;
  --text-strong: #fffaf0;
  --muted: #bab9b0;
  --muted-soft: #8a9083;
  --accent: #907347;
  --accent-strong: #d7b67b;
  --accent-soft: rgba(215, 182, 123, 0.15);
  --accent-olive: #4f6045;
  --accent-forest: #233229;
  --font-body: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
  --font-display: "Segoe UI Variable Display", "Aptos Display", "Segoe UI Semibold", sans-serif;
  --header-bg: #141816;
  --header-text: #f5efe3;
  --danger: #c56f64;
  --danger-soft: rgba(197, 111, 100, 0.12);
  --warning-soft: rgba(191, 150, 66, 0.14);
  --hero-surface: #151a18;
  --hero-surface-deep: #0d1110;
  --hero-edge: rgba(214, 185, 125, 0.18);
  --font-size-xs: 0.78rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 0.98rem;
  --font-size-lg: 1.08rem;
  --font-size-xl: clamp(1.6rem, 2.5vw, 2.25rem);
  --font-size-hero: clamp(2.75rem, 4.2vw, 4.3rem);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --shadow-lg: 0 34px 80px rgba(0, 0, 0, 0.48);
  --shadow-md: 0 22px 48px rgba(0, 0, 0, 0.34);
  --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.24);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0ea;
  --bg-deep: #e4ddd3;
  --surface: rgba(252, 250, 246, 0.94);
  --surface-strong: rgba(255, 253, 249, 0.98);
  --surface-alt: rgba(244, 240, 233, 0.98);
  --surface-tint: rgba(188, 179, 161, 0.18);
  --surface-glass: rgba(255, 253, 248, 0.78);
  --border: rgba(113, 98, 72, 0.14);
  --border-strong: rgba(125, 108, 79, 0.22);
  --text: #3b352c;
  --text-strong: #1f1a13;
  --muted: #625b50;
  --muted-soft: #837a6d;
  --accent: #857252;
  --accent-strong: #b89a64;
  --accent-soft: rgba(184, 154, 100, 0.12);
  --accent-olive: #708060;
  --accent-forest: #495844;
  --header-bg: #f5f1ea;
  --header-text: #2b241b;
  --danger-soft: rgba(197, 111, 100, 0.18);
  --warning-soft: rgba(191, 150, 66, 0.18);
  --hero-surface: #faf8f3;
  --hero-surface-deep: #ebe5dc;
  --hero-edge: rgba(125, 108, 79, 0.1);
  --shadow-lg: 0 18px 40px rgba(59, 50, 34, 0.08);
  --shadow-md: 0 12px 28px rgba(59, 50, 34, 0.06);
  --shadow-sm: 0 6px 16px rgba(59, 50, 34, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

a {
  color: var(--accent-strong);
  text-decoration-color: rgba(207, 177, 118, 0.4);
  text-underline-offset: 0.16em;
  transition:
    color 0.18s ease,
    text-decoration-color 0.18s ease;
}

a:hover {
  color: var(--text-strong);
  text-decoration-color: rgba(245, 241, 232, 0.7);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(88, 107, 71, 0.24), transparent 22%),
    radial-gradient(circle at top right, rgba(170, 139, 79, 0.16), transparent 24%),
    radial-gradient(circle at 50% -8%, rgba(255, 244, 214, 0.05), transparent 24%),
    linear-gradient(180deg, #141917 0%, #0d1110 36%, #090c0b 72%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(176, 168, 152, 0.11), transparent 24%),
    radial-gradient(circle at top right, rgba(140, 154, 135, 0.08), transparent 24%),
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.46), transparent 24%),
    linear-gradient(180deg, #faf8f4 0%, #f3f0ea 42%, #e9e3da 76%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(6, 8, 7, 0.34), rgba(6, 8, 7, 0.56)),
    linear-gradient(90deg, rgba(211, 190, 151, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(211, 190, 151, 0.03) 1px, transparent 1px);
  background-repeat: no-repeat, repeat, repeat;
  background-position: 0 0, 0 0, 0 0;
  background-size: auto, 180px 180px, 180px 180px;
  opacity: 1;
}

:root[data-theme="light"] body::before {
  background:
    linear-gradient(rgba(255, 252, 247, 0.42), rgba(241, 236, 228, 0.54)),
    linear-gradient(90deg, rgba(111, 98, 75, 0.028) 1px, transparent 1px),
    linear-gradient(rgba(111, 98, 75, 0.024) 1px, transparent 1px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 14%, rgba(146, 121, 77, 0.12), transparent 20%),
    radial-gradient(circle at 82% 16%, rgba(92, 111, 77, 0.14), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(207, 177, 118, 0.08), transparent 34%);
}

:root[data-theme="light"] body::after {
  background:
    radial-gradient(circle at 18% 14%, rgba(193, 162, 102, 0.12), transparent 20%),
    radial-gradient(circle at 82% 16%, rgba(132, 149, 112, 0.12), transparent 18%),
    radial-gradient(circle at 50% 100%, rgba(207, 177, 118, 0.12), transparent 34%);
}

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

button,
input,
select,
textarea {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: rgba(207, 177, 118, 0.48);
  box-shadow: 0 0 0 3px rgba(207, 177, 118, 0.12);
}

select option,
select optgroup {
  background-color: #111614;
  color: #f3ead8;
}

select option:checked,
select option:hover,
select option:focus {
  background-color: #d4b170;
  color: #17130c;
}

:root[data-theme="light"] select option,
:root[data-theme="light"] select optgroup {
  background-color: #fffaf1;
  color: #2b241b;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.home-organization-name {
  width: fit-content;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(207, 177, 118, 0.3);
  border-radius: 999px;
  color: var(--accent-soft, #dfc98f);
  background: rgba(207, 177, 118, 0.08);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(var(--container-max), calc(100vw - (var(--container-gutter) * 2)));
  margin: 0 auto;
  padding: 24px var(--container-gutter) 40px;
}

.auth-experience {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
  display: grid;
  align-items: center;
}

.auth-experience__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(340px, 388px);
  gap: 22px;
  align-items: center;
  width: min(1520px, 100%);
  margin: 0 auto;
}

.auth-experience__brand-panel,
.auth-experience__form-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(16, 20, 18, 0.97), rgba(8, 11, 10, 0.98));
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 248, 230, 0.04);
}

:root[data-theme="light"] .auth-experience__brand-panel,
:root[data-theme="light"] .auth-experience__form-card {
  border: 1px solid rgba(166, 127, 57, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.97), rgba(245, 238, 227, 0.98));
  box-shadow:
    0 28px 56px rgba(82, 65, 30, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-experience__brand-panel {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 16px;
  min-height: 0;
  padding: clamp(22px, 3.2vw, 36px);
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 174, 108, 0.16), transparent 24%),
    linear-gradient(160deg, rgba(11, 17, 14, 0.98), rgba(18, 26, 22, 0.96) 46%, rgba(10, 16, 13, 0.98));
}

:root[data-theme="light"] .auth-experience__brand-panel {
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 174, 108, 0.18), transparent 24%),
    linear-gradient(160deg, rgba(252, 247, 239, 0.98), rgba(243, 234, 220, 0.96) 46%, rgba(237, 226, 210, 0.98));
}

.auth-experience__brand-panel::before,
.auth-experience__form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top right, rgba(88, 102, 74, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 248, 230, 0.03), transparent 24%);
}

.auth-experience__eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.auth-experience__scenic-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  align-items: end;
  justify-items: center;
  min-height: 0;
  aspect-ratio: 1.34 / 1;
  padding: 14px;
  border-radius: 30px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    radial-gradient(circle at 50% 8%, rgba(247, 210, 142, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(18, 25, 21, 0.98), rgba(9, 12, 11, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 24px 48px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.auth-experience__scenic-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 9, 7, 0.1), rgba(5, 9, 7, 0.26) 42%, rgba(5, 9, 7, 0.68) 100%),
    radial-gradient(circle at 70% 12%, rgba(255, 215, 146, 0.16), transparent 20%);
}

.auth-experience__scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: -20% 58%;
  opacity: 0.82;
  filter: saturate(0.98) brightness(0.84) contrast(1);
  transform: scale(1.01);
}

.auth-experience__scenic-stage > picture {
  display: contents;
}

.auth-experience__logo-plaque {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 34px 10px 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-experience__logo {
  position: relative;
  z-index: 1;
  width: min(100%, 230px);
  max-width: 100%;
  margin: auto;
  justify-self: center;
  align-self: center;
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.58));
}

.auth-experience__brand-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.auth-experience__title {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  max-width: 12ch;
  font-size: clamp(2.5rem, 4.4vw, 4.6rem);
  color: var(--text-strong);
}

.auth-experience__summary {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.auth-experience__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-experience__pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  background: rgba(255, 248, 230, 0.04);
  color: #e9dcc0;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-experience__form-shell {
  display: grid;
  align-items: center;
}

.auth-experience__form-card {
  display: grid;
  gap: 16px;
  padding: clamp(24px, 2.6vw, 32px);
}

.auth-card-head {
  margin-bottom: 2px;
}

.auth-experience__title--compact,
.auth-experience__summary--compact {
  margin: 0;
}

.auth-form {
  gap: 14px;
}

#authLoginFields:not(.hidden),
#authForgotFields:not(.hidden),
#authResetFields:not(.hidden) {
  display: grid;
  gap: 14px;
}

.auth-form__field {
  display: grid;
  gap: 7px;
}

.auth-form__label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d8ccb4;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid rgba(207, 177, 118, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(39, 48, 41, 0.96), rgba(23, 30, 26, 0.98));
  color: var(--text-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.12);
  font-size: 1rem;
}

:root[data-theme="light"] .auth-form input {
  border: 1px solid rgba(166, 127, 57, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(245, 238, 227, 0.98));
  color: var(--text-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 18px rgba(82, 65, 30, 0.08);
}

:root[data-theme="light"] .auth-form__label {
  color: #7a6540;
}

:root[data-theme="light"] .auth-form input::placeholder {
  color: #9d927f;
}

.auth-form input::placeholder {
  color: #8f9588;
}

.auth-form input:hover {
  border-color: rgba(214, 185, 125, 0.28);
  background:
    linear-gradient(180deg, rgba(43, 53, 45, 0.96), rgba(26, 34, 29, 0.98));
}

.auth-form input:focus {
  border-color: rgba(214, 185, 125, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 4px rgba(215, 182, 123, 0.12),
    0 14px 24px rgba(0, 0, 0, 0.16);
}

.auth-form__actions--stacked {
  justify-content: stretch;
  gap: 10px;
}

.auth-form__actions--stacked .primary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.auth-form__actions--stacked .secondary-button {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  font-size: 0.98rem;
}

.layout-shell {
  display: grid;
  grid-template-columns: 316px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  padding: 18px 14px 14px;
  border-radius: 24px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(16, 20, 18, 0.99), rgba(8, 11, 10, 0.98));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 247, 229, 0.04);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top, rgba(88, 102, 74, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 248, 230, 0.03), transparent 16%);
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}

.sidebar-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(207, 177, 118, 0.08);
}

.sidebar-brand__logo-tile {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 220px;
  min-height: 64px;
  padding: 10px 12px;
  aspect-ratio: auto;
  border-radius: 12px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    radial-gradient(circle at top, rgba(87, 104, 72, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(24, 29, 27, 0.96), rgba(10, 14, 13, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 18px 36px rgba(0, 0, 0, 0.18);
}

.sidebar-brand__logo {
  display: block;
  width: 100%;
  height: auto;
  margin: auto;
  object-fit: contain;
  object-position: center;
  transform: none;
  border-radius: 0;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.26));
}

.sidebar-brand__logo-tile > picture,
.tab-section-head__media > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.sidebar-link-main > picture {
  display: block;
  width: 24px;
  height: 24px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.sidebar-nav-group {
  display: grid;
  gap: 8px;
}

.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(207, 177, 118, 0.1);
}

.sidebar-nav-heading {
  margin: 0 4px 2px;
  color: rgba(236, 231, 219, 0.56);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-nav-heading-block {
  display: grid;
  gap: 3px;
  margin: 0 0 2px;
}

.sidebar-nav-heading-meta {
  margin: 0 4px;
  color: rgba(236, 231, 219, 0.46);
  font-size: 0.74rem;
  line-height: 1.35;
}

.sidebar-nav::-webkit-scrollbar {
  width: 10px;
}

.sidebar-nav::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.04);
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 11, 10, 0.98);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(215, 182, 123, 0.78), rgba(97, 122, 75, 0.82));
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(236, 202, 139, 0.9), rgba(116, 147, 89, 0.9));
}

.sidebar-utility {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  padding-top: 6px;
  border-top: 1px solid rgba(207, 177, 118, 0.08);
}

.sidebar-export-button {
  width: 100%;
  justify-self: stretch;
  min-height: 46px;
  padding: 11px 14px;
}

.auth-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border-top: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(20, 25, 23, 0.82), rgba(12, 16, 15, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.025),
    0 6px 12px rgba(0, 0, 0, 0.1);
}

.auth-panel__copy {
  display: grid;
  gap: 2px;
}

.auth-panel__eyebrow {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.auth-panel__name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  line-height: 1.15;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel__meta {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.25;
}

.auth-panel__actions {
  display: grid;
  gap: 6px;
}

.auth-panel .primary-button,
.auth-panel .secondary-button {
  width: 100%;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 0.7rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 238, 0.04),
    0 4px 8px rgba(0, 0, 0, 0.1);
}

#workspaceSwitcherPanel {
  display: grid;
  gap: 8px;
}

#workspaceSwitcherPanel.hidden {
  display: none;
}

#workspaceSwitcherPanel .admin-subpage-field {
  gap: 6px;
}

#workspaceSwitcherPanel .admin-subpage-field__label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

#workspaceSwitcherPanel .admin-subpage-field select {
  min-height: 36px;
  padding: 8px 32px 8px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
}

#workspaceSwitcherStatus {
  margin: 0;
}

.auth-panel--compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.auth-panel--compact .auth-panel__meta {
  display: none;
}

.auth-panel--compact > .auth-panel__actions {
  grid-column: 2;
  grid-row: 1;
}

.auth-panel--compact .auth-panel__actions .primary-button,
.auth-panel--compact .auth-panel__actions .secondary-button {
  min-width: 66px;
  width: auto;
  white-space: nowrap;
}

.sidebar-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.014), rgba(255, 255, 255, 0));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
}

.sidebar-link-main {
  display: inline-grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sidebar-link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-link-icon {
  width: 24px;
  height: 24px;
  opacity: 0.98;
}

.nav-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  flex-shrink: 0;
}

.nav-icon--photo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  object-position: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(216, 194, 122, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(255, 248, 230, 0.06), rgba(8, 11, 10, 0.18));
  box-shadow:
    inset 0 0 0 1px rgba(216, 194, 122, 0.16),
    0 6px 12px rgba(0, 0, 0, 0.16);
}

.nav-icon--logo {
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  transform: translate(-19px, 5px);
  padding: 4px;
  margin: 0;
  background:
    radial-gradient(circle at 50% 36%, rgba(216, 194, 122, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(255, 248, 230, 0.05), rgba(8, 11, 10, 0.26));
}

.sidebar-link::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}

.sidebar-link:hover {
  border-color: rgba(207, 177, 118, 0.1);
  background: linear-gradient(180deg, rgba(207, 177, 118, 0.07), rgba(207, 177, 118, 0.02));
}

.sidebar-link.active {
  border-color: rgba(123, 155, 94, 0.24);
  background:
    linear-gradient(180deg, rgba(77, 100, 59, 0.3), rgba(53, 66, 42, 0.16)),
    linear-gradient(180deg, rgba(255, 248, 230, 0.02), rgba(255, 248, 230, 0));
  box-shadow:
    inset 0 1px 0 rgba(221, 241, 190, 0.06),
    0 10px 18px rgba(26, 34, 24, 0.16);
}

.sidebar-link.active::after {
  background: linear-gradient(180deg, #86a865, #617a4b);
}

.sidebar-link-label {
  min-width: 0;
  font-size: 0.89rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sidebar-link-meta {
  min-width: 0;
  color: rgba(236, 231, 219, 0.58);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-height: 1020px) and (min-width: 1025px) {
  .sidebar {
    gap: 6px;
    padding-top: 14px;
  }

  .sidebar-brand {
    min-height: 104px;
    padding-bottom: 6px;
  }

  .sidebar-brand__logo-tile {
    max-width: 100px;
    min-height: 96px;
    border-radius: 18px;
  }

  .sidebar-nav {
    gap: 4px;
  }

  .sidebar-nav-group {
    gap: 4px;
  }

  .sidebar-nav-group + .sidebar-nav-group {
    margin-top: 4px;
    padding-top: 6px;
  }

  .sidebar-nav-heading-block {
    min-height: 0;
    padding: 6px 8px;
  }

  .sidebar-nav-heading-meta,
  .sidebar-link-meta {
    display: none;
  }

  .sidebar-link {
    min-height: 40px;
    padding-block: 6px;
  }
}

@media (max-height: 820px) and (min-width: 1025px) {
  .sidebar {
    position: relative;
    max-height: none;
    min-height: 0;
  }
}

.sidebar-link-count {
  min-width: 24px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 9px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background: rgba(255, 248, 230, 0.035);
  color: var(--text-strong);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
}

.sidebar-link--utility {
  border-color: rgba(207, 177, 118, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(207, 177, 118, 0.03), rgba(207, 177, 118, 0));
}

.sidebar-link--admin {
  border-color: rgba(140, 166, 108, 0.16);
  background:
    linear-gradient(180deg, rgba(102, 130, 74, 0.16), rgba(63, 78, 49, 0.06)),
    linear-gradient(180deg, rgba(255, 248, 230, 0.015), rgba(255, 248, 230, 0));
}

.main-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.app-shell::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 254px;
  width: min(42vw, 660px);
  height: min(42vw, 660px);
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(214, 180, 122, 0.05), transparent 42%),
    radial-gradient(circle at center, rgba(76, 95, 67, 0.045), transparent 62%);
  opacity: 1;
}

.hero,
.tabs,
.status-banner,
main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 148px;
  overflow: hidden;
  border: 1px solid rgba(181, 143, 74, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 248, 228, 0.045), transparent 22%),
    radial-gradient(circle at 18% 20%, rgba(124, 98, 48, 0.18), transparent 30%),
    radial-gradient(circle at 78% 16%, rgba(78, 104, 54, 0.16), transparent 28%),
    linear-gradient(135deg, #131815 0%, #0b0f0d 54%, #060807 100%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--header-text);
  padding: 0;
  isolation: isolate;
}

.armory-header {
  position: relative;
  padding: 14px 18px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  right: -72px;
  bottom: -124px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207, 177, 118, 0.2), transparent 72%);
  filter: blur(2px);
}

.hero::after {
  left: -90px;
  top: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 102, 74, 0.22), transparent 74%);
}

.hero-main {
  position: relative;
  z-index: 1;
  display: block;
  padding: 22px 24px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 250, 238, 0.03), transparent 20%),
    linear-gradient(180deg, rgba(20, 24, 22, 0.94), rgba(10, 13, 12, 0.9));
  border: 1px solid rgba(255, 249, 233, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 240, 0.06),
    inset 0 -28px 60px rgba(0, 0, 0, 0.14),
    inset 0 0 0 1px rgba(198, 166, 102, 0.025);
  min-height: 184px;
}

.armory-header__brand,
.armory-header__scene,
.armory-header__actions,
.armory-stats,
.armory-stat-card {
  position: relative;
  z-index: 1;
}

.armory-header::before,
.armory-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.armory-header::before {
  background:
    radial-gradient(circle at center, rgba(194, 165, 102, 0.08), transparent 30%),
    linear-gradient(90deg, rgba(94, 116, 78, 0.08), transparent 18%, transparent 82%, rgba(181, 147, 84, 0.08)),
    linear-gradient(180deg, rgba(255, 250, 238, 0.03), transparent 24%),
    linear-gradient(180deg, rgba(20, 24, 22, 0.94), rgba(10, 13, 12, 0.9));
  background-repeat: no-repeat;
  background-position:
    0 0,
    0 0,
    0 0,
    0 0;
  background-size:
    auto,
    auto,
    auto,
    auto;
  border-radius: 26px;
  border: 1px solid rgba(255, 249, 233, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 240, 0.06),
    inset 0 -28px 60px rgba(0, 0, 0, 0.14),
    inset 0 0 0 1px rgba(198, 166, 102, 0.025);
}

.armory-header::after {
  content: none;
}

.armory-header__scene {
  position: absolute;
  inset: 10px 12px;
  z-index: 0;
  pointer-events: none;
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(194, 165, 102, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(7, 9, 8, 0.28) 0%, rgba(7, 9, 8, 0.06) 30%, rgba(7, 9, 8, 0.34) 100%),
    linear-gradient(90deg, rgba(7, 9, 8, 0.46) 0%, rgba(7, 9, 8, 0.08) 16%, rgba(7, 9, 8, 0.08) 84%, rgba(7, 9, 8, 0.46) 100%);
  background-repeat: no-repeat;
  background-position: center center, 0 0, 0 0;
  background-size: auto, auto, auto;
  opacity: 1;
  mix-blend-mode: normal;
  filter: grayscale(0.03) sepia(0.08) saturate(0.98) contrast(1.04) brightness(0.98);
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(207, 177, 118, 0.08),
    inset 0 24px 44px rgba(0, 0, 0, 0.14),
    inset 0 -18px 34px rgba(0, 0, 0, 0.18);
}

.armory-header__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 248, 228, 0.03) 0%, transparent 32%, rgba(7, 9, 8, 0.18) 100%),
    linear-gradient(90deg, rgba(7, 9, 8, 0.42) 0%, transparent 18%, transparent 82%, rgba(7, 9, 8, 0.42) 100%);
  opacity: 1;
}

.armory-header__scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(207, 177, 118, 0.08), transparent 24%),
    linear-gradient(90deg, transparent 0%, rgba(207, 177, 118, 0.08) 28%, rgba(207, 177, 118, 0.08) 72%, transparent 100%);
}

.armory-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero";
  gap: 0;
  align-items: center;
  min-height: 0;
}

.armory-header__brand {
  position: relative;
  grid-area: hero;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  min-height: clamp(132px, 17vw, 188px);
  padding: 12px 18px;
}

.armory-header__brand::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 8% 28%;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(5, 7, 6, 0.72), rgba(5, 7, 6, 0.3) 48%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}

.armory-header__brand-image {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 1320px);
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 30px rgba(0, 0, 0, 0.4))
    saturate(1.02)
    contrast(1.04);
}

.armory-header__brand-mark {
  position: absolute;
  z-index: 3;
  width: clamp(230px, 27vw, 390px);
  max-width: 46%;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 18px rgba(207, 177, 118, 0.14))
    saturate(1.04)
    contrast(1.04);
  pointer-events: none;
}

.armory-header__title-block {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 16px;
  max-width: 720px;
  min-height: 0;
  padding: 18px 4px 8px;
  isolation: isolate;
}

.armory-header__title-block h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2.45rem, 3.7vw, 3.9rem);
  line-height: 0.92;
  color: var(--text-strong);
  font-weight: 825;
  letter-spacing: -0.04em;
  text-transform: none;
  text-align: left;
  text-wrap: pretty;
  text-shadow:
    0 10px 22px rgba(0, 0, 0, 0.26),
    0 1px 0 rgba(255, 248, 228, 0.06);
}

.armory-header__title-block::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -18px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(215, 182, 123, 0.9), rgba(88, 102, 74, 0.18));
  box-shadow: 0 0 18px rgba(215, 182, 123, 0.2);
}

.armory-header__title-block::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(215, 182, 123, 0.3), rgba(215, 182, 123, 0.08) 42%, rgba(88, 102, 74, 0.16));
}

.armory-header__actions {
  display: none;
}

.armory-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.armory-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 7px;
  min-height: 74px;
  min-width: 0;
  padding: 12px 14px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.05), rgba(255, 252, 245, 0.012)),
    linear-gradient(180deg, rgba(31, 36, 34, 0.92), rgba(18, 22, 21, 0.9));
  border: 1px solid rgba(207, 177, 118, 0.16);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 245, 0.06),
    inset 0 -14px 24px rgba(0, 0, 0, 0.1),
    0 16px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.armory-stat-card__icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  margin-bottom: 2px;
  opacity: 0.92;
}

.stat-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: transparent;
  border: 0;
  display: block;
  opacity: 0.95;
}

.armory-stat-card::before,
.armory-stat-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.armory-stat-card::before {
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 247, 228, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 42%);
}

.armory-stat-card::after {
  left: 14px;
  right: 14px;
  bottom: 10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(207, 177, 118, 0.8), rgba(88, 102, 74, 0.2));
}

.armory-stat-card__value {
  position: relative;
  z-index: 1;
  display: block;
  font-size: clamp(1.8rem, 2vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text-strong);
}

.armory-stat-card__label {
  position: relative;
  z-index: 1;
  color: rgba(236, 231, 219, 0.68);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
}

.armory-export-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  justify-self: end;
  align-self: center;
  border-radius: 12px;
  border: 1px solid rgba(207, 177, 118, 0.18);
  background:
    linear-gradient(180deg, rgba(36, 42, 39, 0.96), rgba(20, 24, 23, 0.92));
  color: var(--text-strong);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 12px 20px rgba(0, 0, 0, 0.14);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.armory-export-button__icon {
  width: 17px;
  height: 17px;
  background: transparent;
  border: 0;
}

.armory-export-button:hover {
  border-color: rgba(207, 177, 118, 0.26);
  background:
    linear-gradient(180deg, rgba(207, 177, 118, 0.14), rgba(207, 177, 118, 0.05)),
    linear-gradient(180deg, rgba(36, 42, 39, 0.98), rgba(20, 24, 23, 0.94));
}

.hero-main::before,
.hero-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-main::before {
  background:
    radial-gradient(circle at 14% 24%, rgba(207, 177, 118, 0.07), transparent 24%),
    radial-gradient(circle at 72% 18%, rgba(92, 116, 76, 0.1), transparent 22%),
    repeating-radial-gradient(circle at 78% 26%, rgba(255, 255, 255, 0) 0 14px, rgba(182, 157, 101, 0.045) 14px 15px, rgba(255, 255, 255, 0) 15px 24px),
    linear-gradient(115deg, rgba(255, 255, 255, 0.03), transparent 22%, transparent 76%, rgba(198, 166, 102, 0.04));
  opacity: 0.68;
}

.hero-main::after {
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(206, 176, 115, 0.07);
  box-shadow: inset 0 0 36px rgba(207, 177, 118, 0.035);
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.98fr);
  gap: 24px;
  align-items: center;
  padding: 0;
  min-height: 138px;
  width: 100%;
}

.hero-copy-block,
.brand-text {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  justify-items: start;
  text-align: left;
}

.hero-copy-block {
  position: relative;
  padding: 4px 0;
}

.hero-copy-block::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(207, 177, 118, 0.28), rgba(207, 177, 118, 0.1) 34%, rgba(78, 104, 54, 0.26) 100%);
  opacity: 0.9;
}

.hero-brand-block {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 0 18px;
}

.hero-logo {
  width: clamp(86px, 9vw, 110px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.26));
}

.hero-brand-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.hero-eyebrow,
.section-kicker,
.detail-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 800;
}

.hero-eyebrow {
  margin-bottom: 2px;
  color: rgba(236, 220, 187, 0.7);
}

.hero h1 {
  margin-bottom: 0;
  position: relative;
  display: inline-block;
  padding-bottom: 0;
  font-size: clamp(2.5rem, 4vw, 4.4rem);
  line-height: 0.92;
  max-width: none;
  color: var(--text-strong);
  font-weight: 850;
  letter-spacing: -0.045em;
  text-transform: none;
  text-align: left;
  text-wrap: pretty;
  text-shadow:
    0 14px 28px rgba(0, 0, 0, 0.32),
    0 1px 0 rgba(255, 248, 228, 0.06);
}

.hero h1::after {
  content: none;
}

.hero-copy {
  max-width: 40ch;
  margin-bottom: 0;
  color: rgba(242, 237, 226, 0.82);
  font-size: 0.98rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.workspace-pulse {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.workspace-pulse__item {
  display: grid;
  gap: 5px;
  min-width: 190px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(27, 33, 30, 0.88), rgba(17, 21, 19, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 12px 22px rgba(0, 0, 0, 0.12);
}

.workspace-pulse__label {
  color: rgba(236, 220, 187, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-pulse__value {
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.hero-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hero-trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(17, 22, 20, 0.86), rgba(11, 14, 13, 0.78));
  color: rgba(242, 238, 230, 0.76);
  font-size: 0.79rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.05);
}

.hero-trust-strip span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(207, 177, 118, 0.8);
  box-shadow: 0 0 0 4px rgba(207, 177, 118, 0.08);
}

.hero-aside {
  position: relative;
  min-height: 100%;
  display: grid;
  align-items: stretch;
  justify-items: end;
  gap: 14px;
  padding-left: 0;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  align-self: stretch;
  width: min(100%, 456px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border-top: 0;
  box-shadow: none;
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 9px;
  min-height: 88px;
  min-width: 0;
  padding: 14px 16px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.05), rgba(255, 252, 245, 0.012)),
    linear-gradient(180deg, rgba(31, 36, 34, 0.92), rgba(18, 22, 21, 0.9));
  border: 1px solid rgba(207, 177, 118, 0.16);
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 245, 0.06),
    inset 0 -14px 24px rgba(0, 0, 0, 0.1),
    0 16px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.stat-card::before,
.stat-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.stat-card::before {
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 247, 228, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 42%);
}

.stat-card::after {
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(207, 177, 118, 0.8), rgba(88, 102, 74, 0.2));
}

.stat-card span {
  position: relative;
  z-index: 1;
  display: block;
  font-size: clamp(2rem, 2.4vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text-strong);
}

.stat-card label {
  position: relative;
  z-index: 1;
  color: rgba(236, 231, 219, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  justify-self: start;
  text-align: left;
  min-height: auto;
}

.hero-export-button {
  min-height: 46px;
  padding-inline: 18px;
  justify-self: end;
  border-radius: 14px;
  border-color: rgba(207, 177, 118, 0.18);
  background:
    linear-gradient(180deg, rgba(36, 42, 39, 0.96), rgba(20, 24, 23, 0.92));
  color: var(--text-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 16px 24px rgba(0, 0, 0, 0.16);
}

.hero-export-button:hover {
  border-color: rgba(207, 177, 118, 0.26);
  background:
    linear-gradient(180deg, rgba(207, 177, 118, 0.14), rgba(207, 177, 118, 0.05)),
    linear-gradient(180deg, rgba(36, 42, 39, 0.98), rgba(20, 24, 23, 0.94));
}

.hero-main,
.hero-stage,
.hero-copy-block,
.hero-brand-block,
.hero-brand-copy,
.hero-aside,
.hero-stats,
.stat-card,
.hero-export-button {
  display: none;
}

.tabs {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  margin: 8px 0 14px;
  padding: 6px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 22, 21, 0.94), rgba(9, 12, 11, 0.92)),
    rgba(17, 22, 20, 0.92);
  backdrop-filter: blur(18px);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#mobileDuplicateTabNavigation[hidden] {
  display: none !important;
}

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

.tabs::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(207, 177, 118, 0.08), transparent 10%, transparent 90%, rgba(88, 102, 74, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%);
}

.tabs::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 1px;
  background: linear-gradient(90deg, rgba(207, 177, 118, 0.18), rgba(207, 177, 118, 0.04) 30%, rgba(207, 177, 118, 0.04) 70%, rgba(88, 102, 74, 0.16));
  pointer-events: none;
}

.tabs-admin-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mobile-nav-toggle {
  display: none;
}

.mobile-nav-panel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.export-button {
  margin-left: auto;
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  white-space: nowrap;
  padding-inline: 12px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.025);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
  color: var(--muted);
  font-weight: 650;
  font-size: 0.86rem;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
  position: relative;
  overflow: hidden;
}

.tabs-divider {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 8px;
  color: rgba(236, 231, 219, 0.48);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tab-button:hover {
  background:
    linear-gradient(180deg, rgba(207, 177, 118, 0.12), rgba(207, 177, 118, 0.04));
  color: var(--text-strong);
  border-color: rgba(207, 177, 118, 0.16);
}

.tab-button::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(215, 182, 123, 0), rgba(215, 182, 123, 0.85), rgba(90, 110, 77, 0));
  transform: scaleX(0.28);
  transform-origin: center;
  opacity: 0;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.tab-button:hover::before {
  opacity: 0.65;
  transform: scaleX(0.82);
}

.tab-button.active {
  background:
    linear-gradient(180deg, rgba(214, 183, 121, 0.28), rgba(112, 85, 48, 0.42));
  color: var(--text-strong);
  border-color: rgba(214, 185, 125, 0.2);
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 244, 222, 0.14),
    0 0 0 1px rgba(255, 229, 170, 0.05);
}

.tab-button.active::before {
  opacity: 1;
  transform: scaleX(1);
}

.tab-count {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.tab-button.active .tab-count {
  background: rgba(255, 244, 222, 0.12);
}

.tab-button--utility {
  color: rgba(236, 231, 219, 0.86);
}

.tab-button--admin {
  border-color: rgba(140, 166, 108, 0.18);
  background:
    linear-gradient(180deg, rgba(102, 130, 74, 0.18), rgba(63, 78, 49, 0.08)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(27, 33, 30, 0.96), rgba(16, 20, 19, 0.96));
  color: var(--muted);
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 248, 230, 0.04);
}

.status-banner > span {
  min-width: 0;
}

.status-banner__action {
  flex: 0 0 auto;
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 12px;
}

.status-banner.is-hidden {
  display: none;
}

.auth-inline-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  background:
    linear-gradient(180deg, rgba(24, 28, 26, 0.98), rgba(15, 18, 17, 0.96));
  box-shadow: var(--shadow-sm);
}

.auth-inline-banner__eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.auth-inline-banner strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  color: var(--text-strong);
}

.auth-inline-banner p:last-child {
  margin: 0;
  color: var(--muted);
}

.status-banner::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--muted-soft);
  flex: 0 0 auto;
}

.status-banner[data-tone="success"] {
  border-color: rgba(111, 168, 123, 0.38);
  background:
    linear-gradient(180deg, rgba(34, 60, 42, 0.96), rgba(26, 47, 35, 0.94));
  color: #cfe5d1;
}

.status-banner[data-tone="success"]::before {
  background: #7fbe8c;
}

.status-banner[data-tone="info"] {
  border-color: rgba(207, 177, 118, 0.18);
  background: linear-gradient(180deg, rgba(34, 30, 22, 0.96), rgba(24, 22, 18, 0.94));
  color: #e3d5b7;
}

.status-banner[data-tone="info"]::before {
  background: #cfb176;
}

.status-banner[data-tone="error"] {
  border-color: rgba(197, 111, 100, 0.36);
  background: linear-gradient(180deg, rgba(59, 24, 22, 0.96), rgba(42, 18, 17, 0.94));
  color: var(--danger);
}

.status-banner[data-tone="error"]::before {
  background: var(--danger);
}

.subpage-nav {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 14px;
  background: rgba(12, 15, 14, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.subpage-button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.subpage-button:hover {
  color: var(--text-strong);
  background: rgba(207, 177, 118, 0.08);
}

.subpage-button.active {
  color: #17130c;
  border-color: rgba(214, 185, 125, 0.28);
  background: linear-gradient(180deg, rgba(214, 183, 121, 0.92), rgba(156, 124, 72, 0.92));
}

.home-shell {
  display: grid;
  gap: 22px;
}

.home-eyebrow {
  margin: 0 0 10px;
  color: #d6b47a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-brand-panel,
.home-kpi-card,
.home-action-card,
.home-system-card,
.home-section-head {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(24, 29, 27, 0.98), rgba(15, 19, 18, 0.98));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-brand-panel {
  display: grid;
  gap: 0;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(19, 23, 22, 0.98), rgba(11, 14, 13, 0.98));
}

.home-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 16%),
    linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.22));
}

.home-brand-panel__media {
  position: relative;
  z-index: 1;
  padding: 18px 18px 0;
}

.home-brand-panel__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid rgba(214, 180, 122, 0.12);
  box-shadow:
    0 24px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-brand-panel__bar {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 24px 28px 28px;
}

.home-brand-panel__copy {
  display: grid;
  gap: 12px;
}

.home-brand-panel__copy h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 17ch;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #f8f4ea;
}

.home-brand-panel__lede {
  position: relative;
  z-index: 1;
  max-width: 62ch;
  margin: 0;
  color: #b8beb3;
  font-size: 0.98rem;
  line-height: 1.7;
}

.home-brand-panel__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-self: end;
}

.home-brand-panel__primary,
.home-brand-panel__secondary {
  min-width: 176px;
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-kpi-card {
  display: grid;
  gap: 10px;
  padding: 22px 20px;
  border-radius: 22px;
}

.home-kpi-card__label {
  color: #9aa295;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-kpi-card__value {
  color: #f7f3e8;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-kpi-card__hint {
  color: var(--muted-soft);
  font-size: 0.92rem;
}

.home-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-action-card {
  display: grid;
  gap: 22px;
  padding: 24px;
  border-radius: 24px;
}

.home-action-card--accent {
  background:
    radial-gradient(circle at top right, rgba(214, 180, 122, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(27, 32, 29, 0.98), rgba(15, 19, 18, 0.98));
}

.home-action-card__head {
  display: grid;
  gap: 10px;
}

.home-action-card__eyebrow {
  margin: 0;
  color: #d8b377;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-action-card__head h3 {
  margin: 0;
  font-size: 1.34rem;
  color: var(--text-strong);
}

.home-action-card__head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.home-action-card__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-action-card__button {
  min-height: 48px;
}

.home-system-section {
  display: grid;
  gap: 18px;
}

.home-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: end;
  padding: 22px 24px;
  border-radius: 22px;
}

.home-section-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.52rem;
}

.home-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.home-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-system-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
}

.home-system-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-system-card__head h4 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.22rem;
}

.home-system-card__badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214, 180, 122, 0.16);
  background: rgba(214, 180, 122, 0.08);
  color: #e8d2a7;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-system-card__copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-system-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.home-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.home-spotlight,
.home-stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(24, 29, 27, 0.98), rgba(15, 19, 18, 0.98));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 16px;
  align-items: center;
  min-height: 0;
  padding: 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(214, 180, 122, 0.12), transparent 26%),
    radial-gradient(circle at 85% 22%, rgba(92, 116, 76, 0.12), transparent 20%),
    linear-gradient(135deg, rgba(25, 30, 28, 0.98), rgba(12, 15, 14, 0.98) 68%);
}

.home-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), transparent 24%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2));
}

.home-spotlight__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  align-content: center;
  max-width: none;
  min-width: 0;
  padding: 0;
}

.home-spotlight__copy h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: #f8f4ea;
}

.home-spotlight__lede {
  max-width: 56ch;
  margin: 0;
  color: #c4ccc1;
  font-size: 0.98rem;
  line-height: 1.55;
}

.home-spotlight__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-spotlight__metric {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 92px;
  align-content: space-between;
  padding: 15px 16px 18px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(215, 182, 123, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(31, 36, 34, 0.94), rgba(17, 22, 21, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 245, 0.04),
    inset 0 -18px 28px rgba(0, 0, 0, 0.08),
    0 12px 22px rgba(0, 0, 0, 0.14);
}

.home-spotlight__metric::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(207, 177, 118, 0.85), rgba(88, 102, 74, 0.16));
  opacity: 0.9;
}

.home-spotlight__metric strong {
  color: #f7f3e8;
  font-size: clamp(1.8rem, 2.25vw, 2.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.home-spotlight__metric span {
  color: rgba(236, 231, 219, 0.68);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-spotlight__actions {
  display: contents;
}

.home-spotlight__actions .primary-button,
.home-spotlight__actions .secondary-button {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 4px 12px;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 735;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.1);
}

.home-spotlight__command-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  align-items: center;
  gap: 8px;
  padding-top: 2px;
  min-width: 0;
  max-width: 100%;
}

.home-spotlight__quicklinks {
  display: contents;
}

.home-spotlight__link {
  width: 100%;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(29, 35, 32, 0.96), rgba(18, 22, 21, 0.94));
  color: #edf0e8;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  width: auto;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.home-spotlight__link:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(42, 49, 45, 0.98), rgba(23, 29, 26, 0.96));
  border-color: rgba(207, 177, 118, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 16px 28px rgba(0, 0, 0, 0.18);
}

.home-priority-card {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    radial-gradient(circle at top right, rgba(214, 180, 122, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(9, 12, 11, 0.92), rgba(16, 20, 19, 0.72));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 24px 40px rgba(0, 0, 0, 0.2);
}

.home-priority-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(207, 177, 118, 0.06);
  pointer-events: none;
  z-index: 2;
}

:root[data-theme="light"] .home-priority-card,
:root[data-theme="light"] .settings-workspace-card,
:root[data-theme="light"] .search-results-advanced {
  border-color: rgba(125, 108, 79, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(242, 235, 225, 0.94));
}

.home-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-stat-card {
  display: grid;
  gap: 12px;
  padding: 22px 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(214, 180, 122, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(24, 29, 27, 0.98), rgba(14, 18, 17, 0.98));
}

.home-stat-card::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(214, 180, 122, 0.7), rgba(92, 116, 76, 0.12));
}

.home-stat-card__label {
  color: #9aa295;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-stat-card__value {
  color: #f7f3e8;
  font-size: clamp(2.15rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.home-stat-card__hint {
  color: var(--muted-soft);
  font-size: 0.92rem;
}

.home-operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* The desktop sidebar leaves a narrower content canvas below this point. Keep
   the dashboard in a readable grid instead of allowing its shortcut row to
   force the spotlight or cards wider than the available workspace. */
@media (max-width: 1500px) and (min-width: 1025px) {
  .home-spotlight {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .home-spotlight__copy {
    align-content: start;
  }

  .home-spotlight__command-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(34px, auto);
    align-items: stretch;
  }

  .home-spotlight__actions .primary-button,
  .home-spotlight__actions .secondary-button,
  .home-spotlight__link {
    width: 100%;
    min-height: 34px;
  }

  .home-stat-grid,
  .home-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) and (min-width: 1025px) {
  .home-spotlight__command-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-operations-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-ops-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(24, 29, 27, 0.98), rgba(14, 18, 17, 0.98));
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-ops-card__head {
  display: grid;
  gap: 6px;
}

.home-ops-card__head .home-eyebrow {
  margin: 0;
}

.home-ops-card__head h3 {
  margin: 0;
  color: #f8f4ea;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.home-ops-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-ops-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 58px;
  padding: 12px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 12px;
  background: rgba(10, 13, 12, 0.48);
}

.home-ops-item.is-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.home-ops-item.is-clickable:hover {
  border-color: rgba(207, 177, 118, 0.3);
  background: rgba(207, 177, 118, 0.06);
  transform: translateY(-1px);
}

.home-ops-item.is-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.home-ops-item strong,
.home-ops-item span {
  display: block;
}

.home-ops-item strong {
  color: var(--text-strong);
  font-size: 0.92rem;
}

.home-ops-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.home-ops-pill {
  min-width: 74px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(91, 116, 76, 0.16);
  color: #a9d5a3;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-ops-pill.is-removed {
  background: rgba(174, 91, 77, 0.16);
  color: #e0a196;
}

.home-ops-pill.is-restored {
  background: rgba(94, 126, 177, 0.16);
  color: #a9c6f0;
}

.home-ops-pill.is-warning {
  background: rgba(214, 180, 122, 0.15);
  color: #e1c789;
}

.home-ops-empty {
  padding: 16px;
  border: 1px dashed rgba(207, 177, 118, 0.12);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(10, 13, 12, 0.36);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(214, 180, 122, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(25, 31, 29, 0.98), rgba(16, 21, 20, 0.96));
  box-shadow:
    0 28px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}

.tab-section-head:has(.tab-section-head__media) {
  grid-template-columns: minmax(0, 1fr) minmax(248px, 356px);
  align-items: stretch;
}

.tab-section-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.035), transparent 30%),
    linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.18));
}

.tab-section-head__copy,
.tab-section-head__media {
  position: relative;
  z-index: 1;
}

.tab-section-head__copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 6px 2px;
}

.tab-section-head__copy h2,
.tab-section-head__copy p {
  margin: 0;
}

.tab-section-head__copy h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.tab-section-head__copy p:last-child {
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.58;
}

.tab-section-head__media {
  display: grid;
  width: 100%;
  max-width: 356px;
  justify-self: end;
  min-height: 232px;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(214, 180, 122, 0.14);
  background:
    radial-gradient(circle at top right, rgba(214, 180, 122, 0.18), transparent 28%),
    rgba(11, 14, 13, 0.96);
  box-shadow:
    0 24px 42px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tab-section-head__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 13, 12, 0.08), rgba(10, 13, 12, 0.24)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.tab-section-head__image {
  display: block;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  margin: auto;
  justify-self: stretch;
  align-self: stretch;
  transform: none;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.32));
}

.brand-panel__image {
  object-fit: cover;
  object-position: center;
}

.brand-panel__image--ghost {
  padding: 28px;
}

.tab-section-head__badge {
  display: none;
}

.tab-section-head__badge img {
  display: none;
}

.ballistics-section-head .tab-section-head__badge {
  width: 52px;
  height: 52px;
  left: 16px;
  bottom: 16px;
}

.ballistics-section-head .tab-section-head__badge img {
  width: 24px;
  height: 24px;
}

.settings-shell {
  display: grid;
  gap: 22px;
  padding: 24px;
}

.settings-shell .form-grid {
  gap: 18px 24px;
}

.settings-shell label {
  display: grid;
  gap: 8px;
  color: var(--text-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.settings-shell input,
.settings-shell select,
.settings-shell textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(31, 36, 34, 0.98), rgba(18, 22, 20, 0.98));
  color: var(--text-strong);
  font-size: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 18px rgba(0, 0, 0, 0.14);
}

.settings-shell textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}

.settings-shell input:focus,
.settings-shell select:focus,
.settings-shell textarea:focus {
  outline: none;
  border-color: rgba(214, 180, 122, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(214, 180, 122, 0.1),
    0 14px 24px rgba(0, 0, 0, 0.16);
}

.settings-shell input[readonly] {
  color: var(--muted);
  cursor: default;
}

.settings-panel__note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.settings-workspace-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(24, 29, 27, 0.92), rgba(15, 19, 18, 0.94));
}

.settings-workspace-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-workspace-card__default {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(207, 177, 118, 0.12);
}

:root[data-theme="light"] .settings-shell input,
:root[data-theme="light"] .settings-shell select,
:root[data-theme="light"] .settings-shell textarea {
  border: 1px solid rgba(166, 127, 57, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(245, 238, 227, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 18px rgba(82, 65, 30, 0.08);
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settings-tab-select {
  display: none;
}

.settings-tab {
  appearance: none;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(26, 31, 28, 0.96), rgba(14, 18, 16, 0.96));
  color: var(--text-strong);
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.settings-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 180, 122, 0.22);
}

.settings-tab:focus-visible {
  border-color: rgba(214, 180, 122, 0.44);
  box-shadow:
    0 0 0 3px rgba(207, 177, 118, 0.16),
    inset 0 0 0 1px rgba(214, 180, 122, 0.1);
}

.settings-tab.active {
  border-color: rgba(214, 180, 122, 0.28);
  background:
    radial-gradient(circle at top, rgba(214, 180, 122, 0.16), transparent 80%),
    linear-gradient(180deg, rgba(35, 44, 34, 0.98), rgba(18, 24, 20, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(214, 180, 122, 0.08),
    0 14px 26px rgba(0, 0, 0, 0.18);
}

.settings-panel {
  display: grid;
  gap: 20px;
}

.settings-list {
  display: grid;
  gap: 14px;
}

.settings-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.settings-list__item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-strong);
}

.settings-list__item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 64ch;
}

.settings-security-stack {
  display: grid;
  gap: 18px;
}

.settings-security-card,
.settings-security-secret,
.settings-security-backup {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(18, 23, 21, 0.92), rgba(12, 16, 15, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 24px rgba(0, 0, 0, 0.12);
}

.settings-security-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(207, 177, 118, 0.18);
  background: rgba(22, 27, 25, 0.78);
}

.settings-security-inline strong,
.settings-security-passkey-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-strong);
}

.settings-security-inline p,
.settings-security-passkey-row p,
.settings-security-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.settings-security-inline__meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--text-strong);
  font-size: 0.9rem;
}

.settings-security-code-list,
.settings-security-passkey-list {
  display: grid;
  gap: 12px;
}

.settings-security-code-list {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.settings-security-code {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background: rgba(20, 25, 23, 0.9);
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.settings-security-passkey-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background: rgba(21, 26, 24, 0.86);
}

.settings-security-passkey-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.settings-security-passkey-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-security-empty {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(207, 177, 118, 0.18);
  background: rgba(18, 23, 21, 0.74);
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .tab-section-head,
  .tab-section-head:has(.tab-section-head__media) {
    grid-template-columns: 1fr;
  }

  .tab-section-head__media,
  .tab-section-head__image {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .tab-section-head {
    gap: 18px;
    padding: 18px;
    border-radius: 24px;
  }

  .tab-section-head__copy h2 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .tab-section-head__media,
  .tab-section-head__image {
    min-height: 190px;
  }

  .tab-section-head__badge {
    width: 62px;
    height: 62px;
    left: 14px;
    bottom: 14px;
    border-radius: 18px;
  }

  .tab-section-head__badge img {
    width: 34px;
    height: 34px;
  }
}

.entry-workspace-shell,
.entry-workspace-active,
.entry-form-host {
  --entry-workspace-accent: rgba(200, 162, 74, 0.42);
  display: grid;
  gap: 16px;
}

.entry-workspace-shell {
  position: relative;
  isolation: isolate;
  padding: 20px 22px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    radial-gradient(circle at top right, rgba(200, 162, 74, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(29, 34, 31, 0.98), rgba(23, 28, 26, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 14px 26px rgba(0, 0, 0, 0.12);
}

.entry-workspace-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 56px;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 244, 214, 0.055), rgba(255, 244, 214, 0) 78%),
    radial-gradient(circle at 12% 0%, rgba(216, 194, 122, 0.12), transparent 38%),
    radial-gradient(circle at 88% 0%, rgba(116, 143, 84, 0.12), transparent 34%);
  z-index: 0;
}

.entry-workspace-shell__intro {
  display: grid;
  gap: 6px;
  max-width: 56ch;
  position: relative;
  z-index: 1;
}

.entry-workspace-shell__intro h2,
.entry-workspace-active h3 {
  margin: 0;
}

.entry-workspace-shell__intro p:last-child,
.entry-workspace-active__hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.entry-selector-grid {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 14px 18px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.entry-selector-field {
  display: grid;
  gap: 7px;
  font-weight: 650;
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8b4aa;
}

.entry-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  justify-content: flex-start;
}

.entry-switcher__button {
  flex: 0 0 auto;
  min-width: 116px;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 12px;
  background: rgba(24, 29, 27, 0.84);
  color: #d8d2c4;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.entry-switcher__button:hover {
  border-color: rgba(214, 185, 125, 0.28);
  background: rgba(31, 37, 34, 0.96);
}

.entry-switcher__button:focus-visible {
  outline: none;
  border-color: rgba(214, 185, 125, 0.44);
  box-shadow: 0 0 0 3px rgba(215, 182, 123, 0.12);
}

.entry-switcher__button.active {
  border-color: rgba(214, 185, 125, 0.46);
  background:
    linear-gradient(180deg, rgba(74, 60, 28, 0.98), rgba(47, 39, 21, 0.98));
  color: #fff7e6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.12);
}

.entry-workspace-active {
  padding: 20px 22px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(32, 37, 34, 0.96), rgba(23, 28, 26, 0.96));
  box-shadow:
    inset 4px 0 0 var(--entry-workspace-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 24px rgba(0, 0, 0, 0.12);
}

.entry-workspace-active__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.entry-workspace-active__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 220, 187, 0.72);
}

.entry-workspace-active__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 185, 125, 0.22);
  background: rgba(200, 162, 74, 0.12);
  color: #f2dfb8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.entry-form-host {
  gap: 0;
}

.entry-form-card--active {
  border-color: rgba(214, 185, 125, 0.18);
  box-shadow:
    inset 4px 0 0 var(--entry-workspace-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 30px rgba(0, 0, 0, 0.14);
}

.entry-workspace-active[data-active-entry-form="firearm"],
.entry-form-host[data-active-entry-form="firearm"] {
  --entry-workspace-accent: rgba(200, 162, 74, 0.42);
}

.entry-workspace-active[data-active-entry-form="ballistics"],
.entry-form-host[data-active-entry-form="ballistics"] {
  --entry-workspace-accent: rgba(100, 159, 196, 0.42);
}

.entry-workspace-active[data-active-entry-form="suppressor"],
.entry-form-host[data-active-entry-form="suppressor"] {
  --entry-workspace-accent: rgba(123, 181, 129, 0.42);
}

.entry-workspace-active[data-active-entry-form="ammo"],
.entry-form-host[data-active-entry-form="ammo"] {
  --entry-workspace-accent: rgba(196, 124, 88, 0.42);
}

.entry-workspace-active[data-active-entry-form="reloading"],
.entry-form-host[data-active-entry-form="reloading"] {
  --entry-workspace-accent: rgba(156, 130, 196, 0.42);
}

.entry-selector-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  align-self: center;
}

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

.admin-control-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(33, 39, 36, 0.98), rgba(26, 31, 29, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.admin-section-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-section-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 160px;
  padding: 18px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(40, 47, 43, 0.98), rgba(28, 34, 31, 0.98));
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 6px 14px rgba(0, 0, 0, 0.1);
}

.admin-section-card:hover {
  transform: translateY(-1px);
  border-color: rgba(214, 185, 125, 0.26);
}

.admin-section-card.active {
  border-color: rgba(214, 185, 125, 0.34);
  background:
    linear-gradient(180deg, rgba(58, 66, 58, 0.98), rgba(36, 43, 39, 0.98)),
    linear-gradient(140deg, rgba(210, 182, 122, 0.12), transparent 60%);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 228, 0.08),
    0 12px 26px rgba(0, 0, 0, 0.14);
}

.admin-section-card__eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 220, 187, 0.74);
}

.admin-section-card__title {
  font-size: 1.2rem;
  line-height: 1.2;
}

.admin-section-card__copy {
  color: var(--muted);
  line-height: 1.6;
}

.admin-control-bar__row {
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
}

.admin-control-bar__hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 52ch;
}

.admin-subpage-field {
  display: grid;
  gap: 10px;
}

.admin-subpage-field__label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 220, 187, 0.74);
}

.admin-subpage-field select {
  width: 100%;
  min-height: 56px;
  padding: 14px 52px 14px 16px;
  border: 1px solid rgba(207, 177, 118, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(54, 60, 56, 0.98), rgba(39, 45, 42, 0.98));
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(215, 182, 123, 0.88) 50%),
    linear-gradient(135deg, rgba(215, 182, 123, 0.88) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 4px 10px rgba(0, 0, 0, 0.08);
}

.admin-subpage-field select:hover {
  border-color: rgba(214, 185, 125, 0.28);
}

.admin-subpage-field select:focus {
  outline: none;
  border-color: rgba(214, 185, 125, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(215, 182, 123, 0.12),
    0 12px 22px rgba(0, 0, 0, 0.16);
}

.admin-subpage-nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px;
}

.admin-subpage-nav .subpage-button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  text-align: center;
  padding-inline: 10px;
  line-height: 1.2;
}

.admin-overview-grid,
.admin-security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.admin-overview-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(47, 54, 50, 0.98), rgba(34, 40, 37, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.12);
}

.admin-overview-card__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(236, 220, 187, 0.68);
}

.admin-overview-card__value {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--text-strong);
  line-height: 1.2;
}

.admin-overview-card__meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.admin-action-item {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background: rgba(18, 23, 21, 0.46);
  color: var(--text);
  line-height: 1.65;
}

.admin-security-policy-summary {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background: rgba(18, 23, 21, 0.46);
  color: var(--text);
  line-height: 1.65;
}

.customization-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(37, 43, 40, 0.98), rgba(29, 34, 32, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.customization-card--wide {
  width: 100%;
}

.customization-card .form-section-head {
  gap: 8px;
  margin-bottom: 4px;
}

.customization-card .form-section-head h3 {
  font-size: 1.16rem;
  letter-spacing: -0.03em;
}

.customization-card .form-section-head p {
  color: #c5c1b7;
  line-height: 1.65;
  max-width: 62ch;
}

.customization-card label,
.custom-image-card label,
.custom-section-row label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 220, 187, 0.72);
}

.customization-card input:not([type="color"]):not([type="checkbox"]),
.customization-card select,
.customization-card textarea,
.custom-image-card input:not([type="file"]),
.custom-section-row input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(56, 62, 58, 0.98), rgba(43, 49, 46, 0.96));
  color: var(--text-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 3px 8px rgba(0, 0, 0, 0.06);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.customization-card input[type="color"] {
  width: 100%;
  min-height: 54px;
  padding: 6px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(56, 62, 58, 0.98), rgba(43, 49, 46, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 3px 8px rgba(0, 0, 0, 0.06);
}

.customization-card select,
.custom-section-row input[type="text"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.customization-card select {
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(207, 177, 118, 0.8) 50%),
    linear-gradient(135deg, rgba(207, 177, 118, 0.8) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.customization-card textarea {
  min-height: 144px;
  line-height: 1.65;
}

.customization-card input::placeholder,
.customization-card textarea::placeholder,
.custom-image-card input::placeholder,
.custom-section-row input[type="text"]::placeholder {
  color: #9fa59b;
}

.customization-card input:hover,
.customization-card select:hover,
.customization-card textarea:hover,
.custom-image-card input:hover,
.custom-section-row input[type="text"]:hover {
  border-color: rgba(214, 185, 125, 0.24);
}

.customization-card input:focus,
.customization-card select:focus,
.customization-card textarea:focus,
.custom-image-card input:focus,
.custom-section-row input[type="text"]:focus {
  outline: none;
  border-color: rgba(214, 185, 125, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(215, 182, 123, 0.12),
    0 5px 12px rgba(0, 0, 0, 0.08);
}

.custom-image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.custom-image-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background: linear-gradient(180deg, rgba(33, 38, 36, 0.88), rgba(24, 29, 27, 0.82));
}

.custom-image-preview-wrap {
  min-height: 164px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(207, 177, 118, 0.08);
  background:
    linear-gradient(180deg, rgba(36, 41, 38, 0.98), rgba(23, 28, 25, 0.98));
}

.custom-image-preview {
  display: block;
  width: 100%;
  height: 164px;
  object-fit: cover;
}

.custom-image-actions,
.custom-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-section-table {
  display: grid;
  gap: 12px;
}

.admin-table-layout-editor {
  display: grid;
  gap: 14px;
}

.admin-table-layout-list {
  display: grid;
  gap: 12px;
}

.admin-table-layout-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.admin-table-layout-row__meta {
  display: grid;
  gap: 4px;
}

.admin-table-layout-row__meta strong {
  color: var(--text-strong);
  font-size: 0.95rem;
}

.admin-table-layout-row__meta span {
  color: var(--muted-soft);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-table-layout-actions,
.admin-table-layout-add {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-table-layout-add select {
  min-width: 220px;
}

.admin-table-layout-empty {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(207, 177, 118, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.admin-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-log-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-log-overview-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.admin-log-overview-card strong {
  color: var(--text-strong);
  font-size: 0.98rem;
}

.admin-log-overview-card span {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.admin-audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.admin-audit-toolbar__summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 64ch;
}

.admin-users-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-users-stat {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.admin-users-stat strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-strong);
}

.admin-users-stat span {
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.admin-user-access-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-user-access-summary__card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 43, 39, 0.9), rgba(25, 31, 28, 0.92));
}

.admin-user-access-summary__card strong {
  color: var(--text-strong);
  font-size: 1.08rem;
}

.admin-user-access-summary__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-user-access-summary__label {
  color: rgba(236, 220, 187, 0.74);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-tenant-access-editor {
  display: grid;
  gap: 12px;
}

.admin-tenant-access-editor__empty {
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  color: var(--muted);
  background: var(--panel-soft);
}

.admin-tenant-access-editor__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
}

.admin-tenant-access-editor__row.is-inactive {
  opacity: 0.76;
}

.admin-tenant-access-editor__org {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-tenant-access-editor__org strong {
  color: var(--text-strong);
}

.admin-tenant-access-editor__org span {
  color: var(--muted-soft);
  font-size: 0.84rem;
}

.admin-tenant-access-editor__hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-tenant-access-editor__role {
  display: grid;
  gap: 6px;
}

.admin-tenant-access-editor__role span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-users-table-wrap {
  overflow-x: auto;
}

.admin-users-table {
  min-width: 860px;
}

.admin-users-table td strong {
  display: block;
  color: var(--text-strong);
}

.admin-users-table td span {
  display: block;
  color: var(--muted-soft);
  font-size: 0.82rem;
}

.admin-users-table tbody tr.is-selected {
  background: rgba(215, 182, 123, 0.08);
}

.admin-user-role-badge,
.admin-user-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-role-badge {
  background: rgba(215, 182, 123, 0.14);
  color: var(--accent-strong);
  border: 1px solid rgba(215, 182, 123, 0.16);
}

.admin-user-status-badge.is-active {
  background: rgba(111, 168, 123, 0.14);
  color: #cfe5d1;
  border: 1px solid rgba(111, 168, 123, 0.2);
}

.admin-user-status-badge.is-inactive {
  background: rgba(197, 111, 100, 0.12);
  color: #f0c9c3;
  border: 1px solid rgba(197, 111, 100, 0.2);
}

.admin-user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-log-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.admin-log-card__head {
  display: grid;
  gap: 6px;
}

.admin-log-card__head h4 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
}

.admin-log-card__head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-log-list {
  display: grid;
  gap: 10px;
}

.admin-log-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.admin-log-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.admin-log-item__title {
  color: var(--text-strong);
  font-size: 0.92rem;
}

.admin-log-item__time {
  color: var(--muted-soft);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-log-item__detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.88rem;
}

.admin-log-empty {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(207, 177, 118, 0.16);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 920px) {
  .admin-table-layout-row {
    grid-template-columns: 1fr;
  }

  .admin-table-layout-add {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-table-layout-add select {
    min-width: 0;
    width: 100%;
  }

  .admin-log-grid {
    grid-template-columns: 1fr;
  }

  .admin-log-overview {
    grid-template-columns: 1fr;
  }

  .admin-users-summary {
    grid-template-columns: 1fr;
  }

  .admin-user-access-summary {
    grid-template-columns: 1fr;
  }
}

.custom-section-row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(19, 24, 22, 0.86), rgba(12, 16, 14, 0.78));
}

.custom-section-row__meta {
  display: grid;
  gap: 4px;
}

.custom-section-row__meta strong {
  font-size: 0.95rem;
  color: var(--text-strong);
}

.custom-section-row__meta span {
  color: var(--muted-soft);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.custom-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.customization-card .form-grid.two-column {
  gap: 18px 18px;
}

.custom-toggle input {
  width: 16px;
  height: 16px;
}

.section-span-full {
  grid-column: 1 / -1;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
}

.form-card {
  position: static;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(37, 43, 40, 0.98), rgba(29, 34, 32, 0.97));
  border-color: rgba(207, 177, 118, 0.12);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 68px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 245, 220, 0.05), transparent 72%),
    linear-gradient(90deg, rgba(215, 182, 123, 0.08), transparent 24%, transparent 76%, rgba(88, 102, 74, 0.1));
}

.entry-form-card {
  padding: 22px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(215, 182, 123, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(28, 34, 31, 0.99), rgba(16, 21, 19, 0.98));
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.entry-form-card > .card-head {
  margin-bottom: 22px;
  padding-bottom: 20px;
}

.entry-form-card > .card-head h2 {
  font-size: clamp(1.8rem, 2.1vw, 2.3rem);
  letter-spacing: -0.045em;
}

.entry-form-card > .card-head p {
  font-size: 1rem;
  color: #c7c5bf;
}

.inventory-card {
  overflow: hidden;
  padding: 18px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(29, 35, 32, 0.98), rgba(21, 26, 24, 0.96));
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-head {
  display: grid;
  gap: 8px;
  align-items: start;
  justify-items: start;
  margin-bottom: 18px;
  padding: 2px 2px 18px;
  border-bottom: 1px solid rgba(207, 177, 118, 0.1);
  position: relative;
}

.card-head::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: -1px;
  width: 92px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(215, 182, 123, 0.95), rgba(88, 102, 74, 0.1));
}

.card-head h2,
.card-head p,
.form-section-head h3,
.form-section-head p,
.photo-section-head h3,
.photo-section-head p,
.compact-head h3,
.compact-head p {
  margin: 0;
}

.card-head h2 {
  font-size: 1.56rem;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-strong);
}

.card-head p,
.form-section-head p,
.photo-section-head p,
.compact-head p {
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.55;
}

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

.form-section,
.subgrid,
.photo-section {
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    radial-gradient(circle at top left, rgba(215, 182, 123, 0.045), transparent 24%),
    linear-gradient(180deg, rgba(37, 43, 40, 0.9), rgba(22, 27, 25, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 24px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.form-section::before,
.photo-section::before,
.subgrid::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 56px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 249, 233, 0.035), transparent 72%);
}

.form-section-head,
.photo-section-head,
.compact-head {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.form-section-head h3,
.photo-section-head h3,
.compact-head h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

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

.scanner-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.scanner-trigger {
  white-space: nowrap;
}

.form-grid.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-span-full {
  grid-column: 1 / -1;
}

.entry-form label,
.menu-panel label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #d0ccc2;
}

.entry-form input,
.entry-form select,
.entry-form textarea,
.entry-selector-field select,
.inventory-search input,
.menu-panel input,
.menu-panel select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(42, 48, 45, 0.96), rgba(26, 32, 30, 0.94));
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 14px rgba(0, 0, 0, 0.08);
  font-size: var(--font-size-md);
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.entry-form select,
.entry-selector-field select,
.menu-panel select,
.page-size-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(207, 177, 118, 0.8) 50%),
    linear-gradient(135deg, rgba(207, 177, 118, 0.8) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.entry-form input:hover,
.entry-form select:hover,
.entry-form textarea:hover,
.entry-selector-field select:hover,
.inventory-search input:hover,
.menu-panel input:hover,
.menu-panel select:hover {
  border-color: rgba(214, 185, 125, 0.22);
}

.entry-form input:focus,
.entry-form select:focus,
.entry-form textarea:focus,
.entry-selector-field select:focus,
.inventory-search input:focus,
.menu-panel input:focus,
.menu-panel select:focus {
  outline: none;
  border-color: rgba(214, 185, 125, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(215, 182, 123, 0.12),
    0 10px 16px rgba(0, 0, 0, 0.12);
}

.entry-form input::placeholder,
.entry-form textarea::placeholder,
.inventory-search input::placeholder {
  color: #8e9289;
}

textarea {
  resize: vertical;
  min-height: 108px;
  line-height: 1.55;
}

.toggle-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.toggle-card {
  min-height: 88px;
  padding: 16px 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(31, 37, 34, 0.9), rgba(20, 25, 23, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 18px rgba(0, 0, 0, 0.08);
}

.toggle-card span {
  display: grid;
  gap: 3px;
}

.menu-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 14px;
}

.menu-card select {
  min-width: 0;
}

.toggle-card strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.toggle-card small {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.76rem;
  line-height: 1.35;
}

.photo-upload {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 136px;
  padding: 22px 20px;
  border: 1px dashed rgba(207, 177, 118, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(215, 182, 123, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(23, 28, 26, 0.8), rgba(15, 19, 18, 0.72));
  color: var(--accent-strong);
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 650;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(255, 243, 214, 0.03),
    0 12px 22px rgba(0, 0, 0, 0.1);
}

.photo-upload:hover {
  background:
    radial-gradient(circle at top, rgba(215, 182, 123, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(26, 31, 28, 0.86), rgba(17, 21, 20, 0.78));
  border-color: rgba(214, 185, 125, 0.34);
}

.photo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  background:
    radial-gradient(circle at top, rgba(214, 180, 122, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(16, 21, 20, 0.92), rgba(9, 12, 11, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 30px rgba(0, 0, 0, 0.12);
}

.photo-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(11, 14, 13, 0.96), rgba(19, 24, 22, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 34px rgba(0, 0, 0, 0.2);
}

.photo-actions,
.photo-meta,
.form-actions,
.toolbar-actions,
.row-actions {
  display: flex;
  gap: 8px;
}

.photo-meta,
.form-actions {
  justify-content: space-between;
  align-items: center;
}

.form-actions {
  padding: 16px 18px;
  margin-top: 4px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(18, 22, 20, 0.84), rgba(12, 15, 14, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 20px rgba(0, 0, 0, 0.1);
}

.form-actions .primary-button,
.form-actions .secondary-button,
.form-actions .danger-button {
  min-height: 48px;
  padding-inline: 18px;
}

.photo-meta strong {
  overflow-wrap: anywhere;
}

.document-preview {
  padding: 14px;
  border: 1px dashed rgba(207, 177, 118, 0.2);
  border-radius: 14px;
  background: rgba(15, 19, 18, 0.7);
}

.primary-button,
.secondary-button,
.danger-button,
.action-button,
.menu-toggle-button,
.detail-close-button {
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  font-weight: 680;
  font-size: var(--font-size-md);
  letter-spacing: 0.01em;
}

.primary-button {
  background: linear-gradient(135deg, #5d7051, #a2814f 58%, #c3a066 100%);
  color: var(--text-strong);
  box-shadow:
    0 14px 24px rgba(72, 81, 58, 0.28),
    inset 0 1px 0 rgba(255, 242, 213, 0.18);
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.secondary-button,
.menu-toggle-button,
.detail-close-button {
  background: linear-gradient(180deg, rgba(42, 49, 45, 0.98), rgba(24, 29, 27, 0.98));
  color: var(--text);
  border: 1px solid rgba(207, 177, 118, 0.14);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 250, 238, 0.05);
}

.secondary-button:hover,
.menu-toggle-button:hover,
.detail-close-button:hover {
  background: linear-gradient(180deg, rgba(51, 59, 54, 0.96), rgba(35, 42, 38, 0.96));
}

.danger-button {
  background: linear-gradient(135deg, #8b4038, var(--danger));
  color: #fff5f4;
  box-shadow: 0 12px 22px rgba(94, 27, 20, 0.22);
}

.danger-button:hover {
  transform: translateY(-1px);
}

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(88, 102, 74, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(34, 40, 37, 0.96), rgba(23, 28, 26, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.12);
}

.inventory-search {
  flex: 1;
  min-width: 260px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.page-size-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 12px 7px 14px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 12px;
  background: rgba(16, 20, 19, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.page-size-group label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-size-group select {
  min-width: 64px;
  min-height: 34px;
  padding: 6px 30px 6px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.inventory-search input {
  min-height: 54px;
  padding: 0 18px 0 20px;
  border-radius: 18px;
  border-color: rgba(207, 177, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(11, 14, 13, 0.98), rgba(16, 20, 18, 0.96));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.03),
    0 12px 24px rgba(0, 0, 0, 0.1);
  font-size: 1rem;
}

.mobile-inventory-sort {
  display: none;
}

.inventory-state-row td {
  height: clamp(150px, 22vw, 220px);
  padding: 20px;
}

.inventory-state {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 10px;
  min-height: 110px;
  color: var(--muted);
}

.inventory-state strong {
  color: var(--text-strong);
}

.inventory-state--error .secondary-button {
  margin-top: 4px;
}

.inventory-state__skeleton {
  width: min(100%, 520px);
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(207, 177, 118, 0.14), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  animation: inventory-state-shimmer 1.4s ease-in-out infinite;
}

.inventory-state__skeleton--short {
  width: min(72%, 360px);
}

.home-resource-status {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(210, 126, 103, 0.24);
  border-radius: 16px;
  background: rgba(115, 49, 39, 0.14);
  color: var(--muted);
}

.home-resource-status strong {
  color: var(--text-strong);
}

.home-resource-status__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@keyframes inventory-state-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .inventory-state__skeleton {
    animation: none;
  }
}

.menu-group {
  position: relative;
}

.menu-toggle-button {
  min-width: 96px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.menu-toggle-button.active {
  background: linear-gradient(180deg, rgba(161, 132, 83, 0.92), rgba(125, 98, 60, 0.92));
  color: #120f0a;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 5;
  width: 270px;
  max-width: min(270px, calc(100vw - 48px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(31, 37, 34, 0.98), rgba(21, 26, 24, 0.96));
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.26);
}

.menu-panel.hidden,
.hidden {
  display: none;
}

#authenticatedAppShell.hidden,
#authenticatedAppShell[hidden] {
  display: none !important;
}

.menu-panel label {
  font-size: 0.8rem;
}

.menu-reset-button {
  justify-self: start;
}

.scanner-trigger {
  min-height: 48px;
  padding-inline: 16px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

input:disabled,
select:disabled,
textarea:disabled {
  border-color: rgba(207, 177, 118, 0.08);
  background:
    linear-gradient(180deg, rgba(12, 15, 14, 0.74), rgba(14, 18, 16, 0.7));
  color: #8f9488;
  box-shadow: none;
}

.table-wrap {
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(24, 29, 27, 0.98), rgba(16, 20, 18, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 38px rgba(0, 0, 0, 0.16);
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 115, 72, 0.7) rgba(255, 255, 255, 0.08);
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(166, 136, 86, 0.9), rgba(112, 92, 58, 0.75));
  border-radius: 999px;
  border: 2px solid rgba(15, 19, 18, 0.54);
}

.ammo-summary-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  align-items: start;
}

.ammo-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-stat-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 18px 20px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(207, 177, 118, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(34, 41, 37, 0.94), rgba(22, 28, 25, 0.92));
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.summary-stat-label {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-stat-value {
  font-size: clamp(2rem, 2.5vw, 2.5rem);
  line-height: 1;
  color: var(--text-strong);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.ammo-summary-chart-card {
  display: grid;
  gap: 18px;
  padding: 18px 20px;
  min-height: 100%;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(88, 102, 74, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(34, 41, 37, 0.92), rgba(22, 28, 25, 0.9));
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart-card-head h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.chart-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.ammo-bar-chart {
  display: grid;
  gap: 14px;
}

.ammo-bar-row {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background: rgba(20, 25, 23, 0.88);
  text-align: left;
}

.ammo-bar-row--interactive:hover {
  transform: translateY(-1px);
  border-color: rgba(207, 177, 118, 0.2);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
}

.ammo-bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ammo-bar-meta span {
  color: var(--muted);
  font-size: 0.95rem;
}

.ammo-bar-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

.ammo-bar-fill {
  height: 100%;
  min-width: 10px;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d7f57 0%, #b08f59 100%);
  box-shadow: 0 6px 14px rgba(86, 64, 34, 0.22);
}

.empty-summary-state {
  padding: 22px 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.toolbar-filter-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-filter-group {
  display: grid;
  gap: 6px;
  min-width: 136px;
}

.toolbar-filter-group span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toolbar-filter-group select {
  min-height: 44px;
  padding: 10px 36px 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background: rgba(16, 20, 19, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ammo-toolbar {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.ammo-toolbar__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.ammo-toolbar__secondary {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.ammo-toolbar__filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ammo-toolbar__filters label,
.ammo-toolbar__filters label span,
.inventory-page-size {
  display: grid;
  gap: 6px;
}

.ammo-toolbar__filters label,
.inventory-page-size {
  color: var(--muted);
  font-size: 0.82rem;
}

.ammo-toolbar__filters input,
.ammo-toolbar__filters select,
.inventory-page-size select {
  min-height: 44px;
}

.ammo-toolbar__filters label span {
  color: rgba(225, 209, 174, 0.7);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ammo-toolbar__search-field {
  min-width: 0;
}

.ammo-toolbar__search-field input {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 14px;
}

.ammo-toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.inventory-page-size {
  align-items: center;
  grid-auto-flow: column;
  justify-content: start;
  margin-right: auto;
}

.is-derived-field {
  opacity: 0.9;
  box-shadow: inset 0 0 0 1px rgba(215, 182, 123, 0.28);
}

.ammo-toolbar__add {
  min-height: 48px;
  padding-inline: 20px;
  white-space: nowrap;
}

.inventory-caption {
  margin: -8px 0 14px;
  padding: 0 2px;
}

.inventory-caption p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ammo-totals-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(88, 102, 74, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(27, 33, 30, 0.94), rgba(20, 25, 23, 0.92));
}

.ammo-totals-intro__summary {
  margin: 0;
  color: var(--text-strong);
  font-size: 0.95rem;
  font-weight: 700;
}

.ammo-totals-intro__hint {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(240, 230, 210, 0.82);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ammo-inventory-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.ammo-inventory-meta__card {
  display: grid;
  gap: 10px;
  min-height: 88px;
  padding: 16px 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(88, 102, 74, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(23, 28, 26, 0.94), rgba(17, 22, 20, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ammo-inventory-meta__label {
  color: rgba(225, 209, 174, 0.64);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ammo-inventory-meta__value {
  color: var(--text-strong);
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  line-height: 1;
}

.ammo-filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ammo-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(240, 230, 210, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
}

.ammo-filter-chip.is-empty {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 760px;
}

.ammo-totals-table-wrap table {
  min-width: 680px;
}

.ammo-total-link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.ammo-total-link .status-pill,
.ammo-bar-row--interactive {
  cursor: pointer;
}

.ammo-total-row {
  cursor: default;
}

.ammo-total-row td {
  vertical-align: middle;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ammo-total-row td:first-child {
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.ammo-total-row td:last-child {
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.ammo-total-row:hover td {
  background: rgba(38, 46, 41, 0.98);
}

.ammo-total-row:hover .status-pill,
.ammo-total-link:focus-visible .status-pill {
  border-color: rgba(207, 177, 118, 0.24);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.ammo-total-link:focus-visible {
  border-radius: 999px;
}

.ammo-total-supporting {
  display: block;
  margin-top: 8px;
  color: rgba(225, 209, 174, 0.64);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ammo-total-action-cell {
  width: 1%;
  white-space: nowrap;
}

.ammo-total-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(240, 230, 210, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ammo-total-row:hover .ammo-total-action {
  transform: translateX(2px);
  border-color: rgba(207, 177, 118, 0.2);
  background: rgba(207, 177, 118, 0.08);
}

.firearm-manufacturer-table-wrap table {
  min-width: 760px;
}

thead th {
  position: sticky;
  top: -8px;
  z-index: 2;
  padding: 12px 14px 13px;
  border-bottom: 0;
  background: rgba(36, 43, 39, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(238, 226, 203, 0.84);
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

thead th:first-child {
  padding-left: 18px;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

thead th:last-child {
  padding-right: 18px;
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.table-sort-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.table-sort-button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.sort-indicator {
  min-width: 10px;
  color: #d3b985;
}

tbody tr {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    filter 0.18s ease;
}

tbody td {
  padding: 15px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(207, 177, 118, 0.12);
  vertical-align: middle;
  background: rgba(28, 34, 31, 0.9);
  background-clip: padding-box;
}

tbody td:first-child {
  padding-left: 18px;
  border-left: 1px solid rgba(207, 177, 118, 0.12);
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

tbody td:last-child {
  padding-right: 18px;
  border-right: 1px solid rgba(207, 177, 118, 0.12);
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
}

.empty-row td {
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(23, 28, 26, 0.92) !important;
  border-top: 1px dashed rgba(207, 177, 118, 0.14);
  border-bottom: 1px dashed rgba(207, 177, 118, 0.14);
  font-size: 0.96rem;
  line-height: 1.7;
}

.inventory-row-clickable {
  cursor: pointer;
}

tbody tr:hover td {
  background: rgba(34, 41, 37, 0.98);
}

tbody tr:hover {
  transform: translateY(-2px);
  filter: none;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 rgba(207, 177, 118, 0.4);
}

.inventory-card tbody tr {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.inventory-card tbody tr td {
  transition: background 180ms ease, border-color 180ms ease;
}

.inventory-card tbody tr:hover td {
  border-color: rgba(215, 182, 123, 0.18);
}

.ammo-inventory-row td {
  position: static;
}

.ammo-inventory-row.is-low-stock td:first-child {
  box-shadow: inset 4px 0 0 rgba(240, 196, 107, 0.42);
}

.action-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 10px;
  background: rgba(16, 20, 19, 0.82);
  font-weight: 650;
  font-size: 0.88rem;
  line-height: 1.1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
  background: rgba(27, 33, 30, 0.96);
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.row-actions--split {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.row-actions--split .action-group {
  position: relative;
}

.row-actions--split .action-group--quick,
.row-actions--split .action-group--manage {
  padding-right: 10px;
}

.row-actions--split .action-group--quick::after,
.row-actions--split .action-group--manage::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 0;
  bottom: 6px;
  width: 1px;
  background: rgba(207, 177, 118, 0.14);
}

.table-actions-cell .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0.9;
  transition: opacity 160ms ease, transform 160ms ease;
}

tbody tr:hover .table-actions-cell .row-actions {
  opacity: 1;
  transform: translateY(-1px);
}

.ammo-inventory-row .table-actions-cell .row-actions {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

.ammo-inventory-row .ammo-row-actions {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  margin-left: auto;
}

.ammo-inventory-table .table-actions-cell {
  min-width: 420px;
}

.ammo-inventory-row .action-button {
  min-width: 0;
  padding: 8px 11px;
  font-size: 0.8rem;
}

.action-button.preview {
  background: rgba(31, 46, 42, 0.78);
  color: rgba(235, 225, 203, 0.96);
}

.action-button.adjust {
  background: rgba(39, 54, 45, 0.78);
  color: rgba(239, 225, 193, 0.96);
}

.action-button.quick-adjust {
  min-width: 46px;
  font-family: "Cascadia Mono", "Consolas", monospace;
  letter-spacing: 0.02em;
  background: rgba(26, 30, 28, 0.9);
  color: rgba(228, 218, 194, 0.94);
}

.action-button.edit {
  background: rgba(42, 57, 45, 0.72);
  color: var(--accent-strong);
}

.action-button.delete {
  background: rgba(77, 34, 30, 0.72);
  border-color: rgba(197, 111, 100, 0.16);
  color: var(--danger);
}

.table-primary-cell {
  display: grid;
  gap: 6px;
}

.table-primary-cell > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.table-primary-cell.with-brand-mark {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.table-primary-cell strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.brand-logo-shell,
.brand-mark-fallback {
  width: 72px;
  height: 36px;
  border-radius: 10px;
}

.brand-logo-shell {
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(207, 177, 118, 0.08);
  background: rgba(243, 238, 230, 0.96);
  box-shadow:
    0 10px 18px rgba(31, 42, 25, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: 4px 8px;
  justify-items: center;
  align-items: center;
}

.brand-logo-image {
  width: auto;
  height: auto;
  max-width: 94%;
  max-height: 74%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  border-radius: 0;
  display: block;
  margin: auto;
  filter: contrast(1.08) saturate(1.02);
}

.brand-logo-image--blend-multiply {
  mix-blend-mode: multiply;
}

.brand-logo-shell[data-brand="pmc"] .brand-logo-image,
.brand-logo-shell[data-brand="fiocchi"] .brand-logo-image,
.brand-logo-shell[data-brand="winchester"] .brand-logo-image,
.brand-logo-shell[data-brand="american eagle"] .brand-logo-image {
  max-width: 98%;
  max-height: 84%;
  transform: scale(1.28);
  transform-origin: center;
}

.brand-logo-shell--missing {
  background: linear-gradient(180deg, rgba(33, 38, 36, 0.96), rgba(22, 27, 24, 0.98));
}

.brand-mark-fallback {
  display: grid;
  place-items: center;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background: linear-gradient(180deg, rgba(248, 244, 236, 0.96), rgba(231, 221, 206, 0.98));
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
}

.brand-mark-fallback--word {
  padding: 0 8px;
  font-size: 0.46rem;
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.table-primary-cell .brand-logo-shell .brand-mark-fallback.hidden {
  display: none;
}

.table-primary-cell span,
.table-note-snippet {
  display: block;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
}

.table-primary-cell small {
  color: var(--muted-soft);
  font-size: 0.78rem;
  line-height: 1.3;
}

.ammo-brand-cell strong {
  letter-spacing: 0.01em;
}

.table-primary-cell.with-brand-mark strong,
.table-primary-cell.with-brand-mark span,
.table-primary-cell.with-brand-mark small,
.table-primary-cell strong,
.table-primary-cell span,
.table-primary-cell small {
  white-space: normal;
}

.table-note-snippet {
  display: -webkit-box;
  overflow: hidden;
  max-width: 28ch;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.table-main-cell {
  min-width: 220px;
}

.structured-inventory-table {
  min-width: 920px;
}

.structured-inventory-table .inventory-row-clickable {
  cursor: pointer;
}

.structured-inventory-table .inventory-row-clickable:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(215, 182, 123, 0.82);
  outline-offset: -2px;
}

.structured-inventory-table .inventory-row-clickable:hover td:last-child {
  box-shadow: inset -3px 0 0 rgba(207, 177, 118, 0.3);
}

.ammo-inventory-table {
  min-width: 920px;
}

.table-chip-cell,
.table-photo-cell,
.table-actions-cell {
  white-space: nowrap;
}

.table-actions-cell {
  width: 1%;
}

.firearm-inventory-table {
  min-width: 920px;
}

.firearm-inventory-table tbody td {
  padding-block: 10px;
  vertical-align: middle;
}

.firearm-inventory-table .table-actions-cell {
  min-width: 188px;
  vertical-align: middle;
  text-align: right;
}

.firearm-inventory-table .table-actions-cell .row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 12px;
  background: rgba(9, 12, 11, 0.32);
}

.firearm-inventory-table .row-actions--split .action-group {
  flex-wrap: nowrap;
  gap: 4px;
}

.firearm-inventory-table .row-actions--split .action-group--manage {
  padding-right: 6px;
}

.firearm-inventory-table .row-actions--split .action-group--manage::after {
  top: 3px;
  right: 0;
  bottom: 3px;
}

.firearm-inventory-table .action-button {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 0.76rem;
}

.firearm-inventory-table .photo-thumb-wrap {
  width: 54px;
  height: 54px;
  padding: 3px;
  border-radius: 12px;
}

.firearm-inventory-table .table-primary-cell {
  gap: 3px;
}

.firearm-inventory-table .table-primary-cell strong {
  font-size: 0.92rem;
}

.firearm-inventory-table td[data-label="Model"] .table-primary-cell strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.firearm-inventory-table .table-accessory-snippet {
  overflow: hidden;
  color: var(--muted-soft);
  font-size: 0.73rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firearm-inventory-table td[data-label="Caliber"] .table-text-strong,
.firearm-inventory-table .inventory-optic-text {
  max-width: 18ch;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

@media (max-width: 1180px) {
  .firearm-inventory-table {
    min-width: 920px;
  }
}

.table-code,
.table-text-strong,
.table-location {
  display: inline-block;
}

.table-code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #d3c2a3;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.table-text-strong {
  font-weight: 650;
  color: var(--text-strong);
}

.table-location {
  color: #d4c4a8;
  font-weight: 500;
}

.table-notes-cell {
  max-width: 240px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.88;
}

.status-pill.accent {
  color: var(--accent-strong);
}

.status-pill.neutral {
  color: #c5bbac;
}

.status-pill.category {
  color: #dec59a;
}

.status-pill.warning {
  color: #f0c46b;
}

.inline-alert {
  display: inline-flex;
  margin-top: 6px;
  color: #f0c46b;
  font-size: 0.76rem;
  font-weight: 700;
}

body.modal-open {
  overflow: hidden;
}

body.mobile-nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.detail-modal-body--single {
  grid-template-columns: minmax(0, 1fr);
}

.inventory-category-label {
  display: inline-block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c7bdaf;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.inventory-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: none;
}

.inventory-photo-state,
.inventory-optic-text {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
  padding: 6px 10px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.inventory-photo-state.has-photo,
.inventory-optic-text.has-optic {
  color: var(--accent-strong);
  font-weight: 650;
}

.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 6px 2px 2px;
  flex-wrap: wrap;
}

.pagination-summary {
  min-width: 220px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(18, 22, 21, 0.82);
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 650;
}

@media (max-width: 1024px) {
  .app-shell {
    --container-gutter: 12px;
    padding-bottom: 36px;
  }

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

  .sidebar {
    display: none;
  }

  .tabs {
    display: grid;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 10px;
    overflow: visible;
  }

  .mobile-nav-toggle {
    display: grid;
    justify-items: start;
    gap: 2px;
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid rgba(207, 177, 118, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(29, 35, 32, 0.96), rgba(18, 22, 21, 0.94));
    color: var(--text-strong);
  }

  .mobile-nav-toggle__eyebrow {
    color: rgba(236, 231, 219, 0.58);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .mobile-nav-toggle__title {
    font-size: 1rem;
    line-height: 1.1;
  }

  .mobile-nav-panel {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: min(70svh, calc(100svh - 180px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-right: 4px;
  }

  .mobile-nav-panel.is-open {
    display: grid;
  }

  .mobile-nav-panel .tabs-admin-group {
    display: grid;
    gap: 8px;
  }

  .tab-button,
  .tab-button--utility,
  .tab-button--admin {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .tabs-divider {
    min-height: 0;
    padding: 4px 2px 0;
  }

  .hero-stage {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .armory-header {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .armory-header__brand {
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
    gap: 10px;
    min-height: 184px;
    padding-bottom: 0;
  }

  .armory-header__title-block h1 {
    text-align: left;
    font-size: clamp(2.2rem, 7vw, 3.4rem);
  }

  .armory-header__title-block::after {
    justify-self: start;
  }

  .workspace-pulse__item {
    min-width: 0;
    flex: 1 1 220px;
  }

  .armory-header__actions {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .armory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .armory-export-button {
    justify-self: stretch;
  }

  .hero-copy-block,
  .brand-text {
    justify-items: center;
    text-align: center;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.2rem, 7vw, 3.4rem);
    text-align: center;
  }

  .hero-brand-block {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    padding-bottom: 16px;
  }

  .hero-aside {
    justify-items: stretch;
  }

  .hero-stats {
    width: 100%;
  }

  .hero-export-button {
    justify-self: stretch;
  }

  .home-brand-panel__bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-brand-panel__copy h2 {
    max-width: 16ch;
  }

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

  .home-actions-grid {
    grid-template-columns: 1fr;
  }

  .home-spotlight {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .home-spotlight__copy h2 {
    max-width: none;
  }

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

  .home-spotlight__actions .primary-button,
  .home-spotlight__actions .secondary-button {
    min-height: 34px;
    font-size: 0.8rem;
  }

  .home-spotlight__command-bar {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
  }

  .home-spotlight__quicklinks {
    display: contents;
  }

  .home-spotlight__link {
    min-height: 32px;
  }

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

  .home-operations-grid {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar {
    align-items: stretch;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .home-spotlight {
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .home-spotlight__copy {
    gap: 14px;
    padding: 0;
  }

  .home-spotlight__copy h2 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .home-spotlight__lede {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .home-spotlight__metric {
    min-height: 88px;
    padding: 14px 14px 16px;
    border-radius: 18px;
  }

  .home-spotlight__metric strong {
    font-size: 1.7rem;
  }

  .home-spotlight__actions {
    display: contents;
  }

  .home-spotlight__actions .primary-button,
  .home-spotlight__actions .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .home-spotlight__command-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .home-spotlight__quicklinks {
    display: contents;
  }

  .home-spotlight__link {
    width: 100%;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.76rem;
  }

  .home-spotlight__art-shell,
  .home-spotlight__art {
    min-height: 220px;
  }

  .home-spotlight__art-badge {
    left: 14px;
    right: 14px;
    bottom: 14px;
    justify-content: center;
    text-align: center;
  }

  .ballistics-toolbar {
    align-items: stretch;
  }

  .ballistics-toolbar__selector,
  .ballistics-toolbar__actions {
    min-width: 0;
    width: 100%;
  }

  .ballistics-toolbar__actions .primary-button {
    width: 100%;
  }

  .hero {
    min-height: 0;
    padding: 0;
  }

  .armory-header {
    min-height: 0;
  }

  .armory-header__title-block h1 {
    font-size: clamp(2rem, 8vw, 2.85rem);
  }

  .armory-header__title-block {
    min-height: 0;
  }

  .armory-header__title-block::before {
    inset: -10px 0 auto 0;
    width: 72px;
    height: 2px;
  }

  .workspace-pulse {
    flex-direction: column;
  }

  .armory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .armory-stat-card {
    min-height: 0;
    padding: 16px 14px;
  }

  .armory-header__brand {
    min-height: 156px;
  }

  .armory-header__brand::after {
    inset: 10% 16%;
  }

  .armory-header__brand-mark {
    width: clamp(190px, 42vw, 300px);
    max-width: 58%;
  }

  .armory-header__actions {
    padding: 12px;
  }

  .hero-stage {
    gap: 16px;
  }

  .home-spotlight {
    padding: 20px;
    gap: 16px;
  }

  .home-spotlight__art-shell {
    min-height: 260px;
    padding: 14px;
  }

  .home-spotlight__copy h2 {
    max-width: none;
    font-size: clamp(1.9rem, 7vw, 2.5rem);
  }

  .home-stat-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2rem, 8vw, 2.85rem);
  }

  .hero-logo {
    width: clamp(82px, 24vw, 98px);
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    padding: 0;
  }

  .stat-card {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 16px 14px;
  }

  .home-brand-panel__bar,
  .home-action-card,
  .home-system-card,
  .home-section-head {
    padding: 20px;
  }

  .home-brand-panel__media {
    padding: 16px 16px 0;
  }

  .home-brand-panel__copy h2 {
    font-size: clamp(1.9rem, 7vw, 3rem);
    max-width: none;
  }

  .home-kpi-grid {
    grid-template-columns: 1fr;
  }

  .home-action-card__body,
  .home-section-head {
    grid-template-columns: 1fr;
  }

  .home-system-card__actions .primary-button,
  .home-system-card__actions .secondary-button {
    flex: 1 1 100%;
  }

  .inventory-toolbar {
    padding: 14px;
  }

  .page-size-group,
  .menu-group,
  .menu-toggle-button,
  .export-button {
    width: 100%;
  }

  .menu-toggle-button,
  .export-button {
    justify-content: center;
  }

  .table-wrap {
    padding: 6px;
  }

  table {
    min-width: 720px;
  }

  .detail-modal {
    padding: 16px;
  }

  .detail-modal-card {
    max-height: min(92vh, 920px);
  }
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none !important;
}

.photo-thumb-wrap {
  width: 80px;
  height: 80px;
  padding: 4px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    radial-gradient(circle at top, rgba(214, 180, 122, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(18, 23, 21, 0.96), rgba(9, 12, 11, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 14px 24px rgba(0, 0, 0, 0.18);
  cursor: zoom-in;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.photo-thumb-wrap:hover {
  transform: translateY(-2px);
  border-color: rgba(214, 180, 122, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 30px rgba(16, 22, 16, 0.24);
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.image-preview-card {
  width: min(1200px, 100%);
}

.image-preview-wrap {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 16px;
  border: 1px solid rgba(62, 95, 69, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at top, rgba(214, 180, 122, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(241, 236, 226, 0.9), rgba(229, 220, 207, 0.82));
}

.image-preview-wrap img {
  max-width: 100%;
  max-height: min(72vh, 900px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 22px 36px rgba(27, 25, 20, 0.18);
}

.single-column-grid {
  grid-template-columns: minmax(0, 1fr);
}

.scanner-modal-card {
  width: min(900px, 100%);
}

.scanner-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.scanner-video-shell,
.scanner-panel {
  padding: 16px;
  border: 1px solid rgba(62, 95, 69, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
}

.scanner-video-shell {
  min-height: 320px;
  display: grid;
  place-items: center;
}

.scanner-video-shell video {
  width: 100%;
  max-height: 56vh;
  border-radius: 18px;
  background: rgba(31, 37, 28, 0.92);
  object-fit: cover;
}

.scanner-panel {
  display: grid;
  gap: 14px;
}

.scanner-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.photo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(207, 177, 118, 0.12);
  color: #e5d7bb;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(207, 177, 118, 0.14);
}

.document-link {
  color: #e1c48d;
  font-weight: 700;
  text-decoration: none;
}

.document-link:hover {
  text-decoration: underline;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.detail-modal.hidden {
  display: none;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(7, 9, 8, 0.72), rgba(7, 9, 8, 0.76));
  backdrop-filter: blur(10px);
}

.detail-modal-card {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(90vh, 920px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background: rgba(23, 28, 26, 0.98);
  box-shadow: 0 34px 68px rgba(0, 0, 0, 0.42);
}

.onboarding-modal-card {
  width: min(680px, 100%);
}

.onboarding-modal__head,
.onboarding-modal__footer,
.onboarding-step,
.settings-onboarding {
  display: flex;
  gap: 16px;
}

.onboarding-modal__head {
  align-items: flex-start;
  justify-content: space-between;
}

.onboarding-modal__head h2 {
  margin: 4px 0 8px;
}

.onboarding-modal__head p {
  margin: 0;
  color: var(--text-muted);
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 26px 0 20px;
  padding: 0;
  list-style: none;
}

.onboarding-progress__item {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.onboarding-progress__item.is-active {
  border-color: rgba(215, 182, 123, 0.55);
  background: rgba(215, 182, 123, 0.1);
  color: var(--text-strong);
}

.onboarding-progress__item.is-complete::before {
  content: "✓ ";
  color: var(--accent-strong);
}

.onboarding-step {
  min-height: 178px;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(33, 40, 36, 0.88), rgba(18, 23, 20, 0.92));
}

.onboarding-step h3,
.onboarding-step p {
  margin: 0;
}

.onboarding-step p {
  max-width: 54ch;
  color: var(--text-muted);
  line-height: 1.55;
}

.onboarding-step__note {
  color: var(--accent-strong) !important;
  font-size: 0.9rem;
}

.onboarding-modal__footer {
  justify-content: space-between;
  margin-top: 20px;
}

.settings-onboarding {
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(207, 177, 118, 0.18);
  border-radius: 16px;
  background: rgba(215, 182, 123, 0.06);
}

.settings-onboarding p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.settings-location-directory {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(207, 177, 118, 0.14);
}

.settings-location-directory__list {
  display: grid;
  gap: 8px;
}

.storage-location-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.storage-location-row span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 620px) {
  .onboarding-progress { grid-template-columns: 1fr; }
  .onboarding-modal__head { flex-direction: column; }
  .onboarding-modal__footer { flex-wrap: wrap; }
  .settings-onboarding { align-items: flex-start; flex-direction: column; }
}

.home-maintenance-queue {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(25, 31, 28, 0.94), rgba(13, 17, 15, 0.96));
}

.report-preview {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.report-summary,
.report-empty {
  margin: 0;
  color: var(--text-muted);
}

.report-table-wrap {
  overflow-x: auto;
}

.report-ballistics-group + .report-ballistics-group {
  margin-top: 22px;
}

.report-ballistics-group h4 {
  margin: 0 0 9px;
  font-size: 0.98rem;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(207, 177, 118, 0.12);
  text-align: left;
  vertical-align: top;
}

.report-table th {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.report-table td {
  overflow-wrap: anywhere;
}

@media print {
  body * { visibility: hidden; }
  #reportPreview, #reportPreview * { visibility: visible; }
  #reportPreview { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; box-shadow: none; background: #fff; color: #000; }
  #reportPreview .secondary-button { display: none; }
  #reportPreview .report-table { min-width: 0; font-size: 10pt; }
  #reportPreview .report-table th, #reportPreview .report-table td { border-color: #bbb; color: #000; }
}

.home-maintenance-queue .home-ops-card__head {
  align-items: start;
}

.home-maintenance-queue .home-ops-card__head p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.maintenance-queue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.maintenance-queue-filters label {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.maintenance-queue-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.maintenance-queue-group {
  min-width: 0;
  border: 1px solid rgba(207, 177, 118, 0.12);
  border-radius: 16px;
  background: rgba(7, 10, 9, 0.34);
  overflow: hidden;
}

.maintenance-queue-group h4 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(207, 177, 118, 0.1);
}

.maintenance-queue-group h4 span {
  color: var(--text-muted);
}

.maintenance-queue-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.maintenance-queue-item,
.maintenance-queue-empty {
  padding: 13px 14px;
}

.maintenance-queue-item {
  display: grid;
  gap: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.maintenance-queue-item__copy {
  display: grid;
  gap: 4px;
}

.maintenance-queue-item__copy span,
.maintenance-queue-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.maintenance-queue-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maintenance-queue-item__actions .secondary-button {
  min-height: 36px;
  font-size: 0.84rem;
}

.home-ops-action {
  width: fit-content;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e1c48d;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 980px) {
  .maintenance-queue-groups {
    grid-template-columns: 1fr;
  }
}

.backup-restore-modal-card {
  width: min(680px, 100%);
}

.backup-restore-modal-body {
  gap: 18px;
}

.backup-restore-modal-body > p,
.backup-restore-modal-body h3 {
  margin: 0;
}

.backup-restore-summary,
.backup-restore-counts,
.backup-restore-mode {
  margin: 0;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 16px;
  background: rgba(12, 16, 14, 0.56);
}

.backup-restore-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
  gap: 12px;
}

.backup-restore-summary dt {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.backup-restore-summary dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.backup-restore-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 16px 14px 32px;
}

.backup-restore-mode {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.backup-restore-mode legend {
  padding: 0 4px;
  font-weight: 700;
}

.backup-restore-mode label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.backup-restore-mode input {
  margin-top: 0.28em;
}

.backup-restore-warning {
  padding: 12px 14px;
  border: 1px solid rgba(225, 99, 82, 0.52);
  border-radius: 12px;
  background: rgba(130, 47, 38, 0.28);
  color: #ffe3df;
}

.backup-restore-modal-body kbd {
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font: inherit;
}

@media (max-width: 620px) {
  .backup-restore-summary,
  .backup-restore-counts {
    grid-template-columns: 1fr;
  }
}

.auth-modal__dialog {
  width: min(520px, 100%);
  padding: 24px;
}

.auth-modal__close {
  justify-self: end;
  margin-bottom: 18px;
}

.auth-modal__body {
  display: grid;
  gap: 18px;
}

.auth-form {
  gap: 14px;
}

.auth-form__message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  background: rgba(22, 26, 24, 0.9);
  color: var(--muted);
}

.auth-form__message[data-tone="error"] {
  border-color: rgba(197, 111, 100, 0.35);
  background: rgba(54, 22, 19, 0.65);
  color: #f0c9c3;
}

.auth-form__message[data-tone="success"] {
  border-color: rgba(111, 168, 123, 0.35);
  background: rgba(20, 44, 28, 0.74);
  color: #cfe5d1;
}

.auth-form__actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .auth-experience__hero {
    grid-template-columns: 1fr;
  }

  .auth-experience__brand-panel {
    min-height: auto;
    justify-items: center;
    text-align: center;
  }

  .auth-experience__scenic-stage {
    min-height: 280px;
  }

  .auth-experience__brand-copy {
    justify-items: center;
  }

  .auth-experience__title {
    max-width: none;
  }

  .auth-experience__summary {
    max-width: 34rem;
  }
}

.firearm-detail-modal-card {
  width: min(1280px, 100%);
}

.edit-modal-card {
  width: min(1220px, 100%);
}

.edit-modal-card .form-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.edit-modal-card .card-head {
  margin-bottom: 16px;
}

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

.detail-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-kicker {
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.detail-close-button {
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 700;
}

.detail-modal-body {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 22px;
}

.firearm-detail-modal-card .detail-modal-body {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
}

.firearm-detail-modal-card .detail-info-panel {
  min-width: 0;
}

.firearm-detail-modal-card .table-wrap {
  padding: 8px;
}

.firearm-detail-modal-card table {
  min-width: 640px;
}

.firearm-detail-modal-card thead th,
.firearm-detail-modal-card tbody td {
  white-space: nowrap;
}

.firearm-detail-modal-card .empty-row td,
.firearm-detail-modal-card td:last-child {
  white-space: normal;
}

.firearm-detail-modal-card .detail-section {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .firearm-detail-modal-card .detail-modal-body {
    grid-template-columns: 1fr;
  }

  .firearm-detail-modal-card {
    width: min(1040px, 100%);
  }
}

.detail-photo-panel,
.detail-item,
.detail-notes {
  border: 1px solid rgba(207, 177, 118, 0.08);
  background: rgba(31, 37, 34, 0.72);
}

.detail-photo-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 16px;
  border-radius: 22px;
}

.detail-photo-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 22px;
  overflow: hidden;
}

.detail-photo-panel img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background:
    radial-gradient(circle at top, rgba(214, 180, 122, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(11, 14, 13, 0.98), rgba(20, 24, 22, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(0, 0, 0, 0.18);
}

.detail-photo-panel .detail-brand-logo-image {
  width: auto;
  max-width: min(84%, 320px);
  max-height: 110px;
  border-radius: 0;
  background: transparent;
}

.detail-photo-button:hover img {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 38px rgba(19, 24, 17, 0.2);
}

.detail-brand-panel {
  display: grid;
  place-items: center;
  min-height: 214px;
  padding: 16px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(207, 177, 118, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(10, 13, 12, 0.96), rgba(18, 23, 20, 0.94));
}

.detail-brand-logo-shell {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 182px;
  padding: 26px 28px;
  border: 1px solid rgba(32, 29, 23, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.78), transparent 42%),
    linear-gradient(135deg, rgba(248, 242, 230, 0.99), rgba(221, 211, 193, 0.99));
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  isolation: isolate;
}

.detail-brand-logo-shell::before,
.detail-brand-logo-shell::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.detail-brand-logo-shell::before {
  inset: 12px;
  border-radius: 16px;
  border: 1px solid rgba(93, 74, 45, 0.08);
}

.detail-brand-logo-shell::after {
  left: -4%;
  right: -4%;
  bottom: 10px;
  height: 72px;
  background: linear-gradient(180deg, rgba(176, 147, 96, 0.03), rgba(98, 73, 39, 0.14));
  clip-path: polygon(0 100%, 0 80%, 12% 72%, 21% 50%, 32% 69%, 45% 38%, 58% 61%, 70% 44%, 82% 66%, 100% 76%, 100% 100%);
  opacity: 0.72;
}

.detail-brand-pretitle,
.detail-brand-logo-name,
.detail-brand-fallback,
.detail-brand-logo-image {
  position: relative;
  z-index: 1;
}

.detail-brand-pretitle {
  color: rgba(112, 82, 43, 0.72);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  line-height: 1;
  text-transform: uppercase;
}

.detail-brand-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(84%, 320px);
  max-height: 110px;
  object-fit: contain;
  filter: contrast(1.08) saturate(1.04);
}

.detail-brand-logo-stage {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  width: min(100%, 332px);
  min-height: 128px;
  padding: 18px 24px;
  border-radius: 24px;
  border: 1px solid rgba(120, 93, 56, 0.1);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.7), transparent 54%),
    linear-gradient(180deg, rgba(255, 251, 244, 0.96), rgba(240, 231, 216, 0.94));
  box-shadow:
    0 18px 28px rgba(94, 75, 44, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.detail-brand-logo-stage::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 42px;
  background: linear-gradient(180deg, rgba(154, 124, 79, 0.04), rgba(100, 74, 39, 0.18));
  clip-path: polygon(0 100%, 0 84%, 14% 74%, 28% 48%, 42% 66%, 57% 34%, 71% 62%, 84% 43%, 100% 73%, 100% 100%);
  opacity: 0.4;
}

.detail-brand-logo-stage.hidden {
  display: none;
}

.detail-brand-logo-stage .detail-brand-logo-image {
  max-width: 100%;
  max-height: 94px;
  position: relative;
  z-index: 1;
}

.detail-brand-logo-shell[data-brand="bergara"] .detail-brand-logo-stage {
  width: min(100%, 376px);
  min-height: 144px;
  padding: 14px 18px 10px;
}

.detail-brand-logo-shell[data-brand="bergara"] .detail-brand-logo-stage::before {
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 48px;
  opacity: 0.34;
}

.detail-brand-logo-shell[data-brand="bergara"] .detail-brand-logo-image {
  max-width: min(100%, 156px);
  max-height: 112px;
  transform: scale(1.22);
  transform-origin: center;
  filter: contrast(1.12) saturate(1.06);
  image-rendering: -webkit-optimize-contrast;
}

.detail-brand-logo-name {
  color: rgba(52, 43, 28, 0.82);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.detail-brand-fallback {
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  border-radius: 50%;
  background: rgba(17, 22, 19, 0.96);
  color: var(--accent-strong);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.detail-brand-fallback--word {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(246, 237, 215, 0.94);
  font-size: clamp(1.3rem, 5vw, 2.3rem);
  letter-spacing: 0.12em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.detail-brand-fallback.hidden {
  display: none;
}

.detail-brand-logo-shell--missing {
  background:
    radial-gradient(circle at 50% 10%, rgba(207, 177, 118, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(16, 20, 18, 0.96), rgba(22, 28, 24, 0.94));
}

.detail-brand-logo-shell--missing .detail-brand-pretitle {
  color: rgba(215, 182, 123, 0.72);
}

.detail-brand-logo-shell--missing .detail-brand-wordmark {
  color: rgba(246, 237, 215, 0.94);
}

.detail-brand-logo-shell--missing .detail-brand-rule {
  background: linear-gradient(90deg, transparent, rgba(215, 182, 123, 0.48), transparent);
}

.detail-brand-logo-shell--missing .detail-brand-logo-name {
  color: rgba(238, 224, 194, 0.82);
}

.detail-info-panel {
  display: grid;
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
}

.detail-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-value {
  color: var(--text-strong);
  font-size: 1rem;
}

.detail-section {
  display: grid;
  gap: 12px;
}

.detail-section h3 {
  margin: 0;
  font-size: 1.02rem;
}

.detail-notes {
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
}

.maintenance-workbench {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(28, 34, 31, 0.92), rgba(15, 19, 17, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 229, 0.03),
    0 16px 32px rgba(0, 0, 0, 0.14);
}

.maintenance-workbench__head {
  display: grid;
  gap: 6px;
}

.maintenance-workbench__head h3 {
  margin: 0;
  font-size: 1rem;
}

.maintenance-workbench__head p {
  margin: 0;
  color: var(--muted);
}

.maintenance-workbench__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.maintenance-workbench__grid .field-span-full {
  grid-column: 1 / -1;
}

.maintenance-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  align-items: center;
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.maintenance-page__shell {
  display: grid;
  gap: 24px;
}

.maintenance-page__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 420px);
  gap: 24px;
  align-items: stretch;
}

.maintenance-page__brand-block,
.maintenance-page__art-panel,
.maintenance-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(22, 27, 25, 0.94), rgba(12, 16, 14, 0.97)),
    var(--surface-strong);
  box-shadow: var(--shadow-lg);
}

:root[data-theme="light"] .maintenance-page__brand-block,
:root[data-theme="light"] .maintenance-page__art-panel,
:root[data-theme="light"] .maintenance-card {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(245, 240, 231, 0.98)),
    var(--surface-strong);
}

.maintenance-page__brand-block::before,
.maintenance-page__art-panel::before,
.maintenance-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(215, 182, 123, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(79, 96, 69, 0.2), transparent 30%);
}

.maintenance-page__brand-block {
  padding: 32px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.maintenance-page__eyebrow,
.maintenance-card__kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--accent-strong);
}

.maintenance-page__title,
.maintenance-card__title {
  margin-bottom: 0;
  color: var(--text-strong);
}

.maintenance-page__title {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.maintenance-page__lede,
.maintenance-card__body,
.maintenance-page__footer-copy,
.maintenance-card__list,
.maintenance-card__value,
.maintenance-page__status-copy {
  color: var(--muted);
}

.maintenance-page__lede {
  max-width: 38rem;
  margin-bottom: 0;
  font-size: 1.03rem;
}

.maintenance-page__status-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(215, 182, 123, 0.28);
  background: rgba(215, 182, 123, 0.1);
}

.maintenance-page__status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #d7b67b;
  box-shadow: 0 0 0 8px rgba(215, 182, 123, 0.12);
}

.maintenance-page__art-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 28px;
}

.maintenance-page__art-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 248, 230, 0.08), rgba(92, 111, 77, 0.18)),
    rgba(10, 13, 12, 0.52);
  border: 1px solid rgba(215, 182, 123, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.08);
}

.maintenance-page__art-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  filter: saturate(1.02) contrast(1.02);
}

.maintenance-page__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.maintenance-card {
  padding: 24px;
}

.maintenance-card--primary {
  background:
    linear-gradient(180deg, rgba(31, 41, 36, 0.98), rgba(14, 18, 16, 0.98)),
    var(--surface-strong);
}

:root[data-theme="light"] .maintenance-card--primary {
  background:
    linear-gradient(180deg, rgba(251, 247, 240, 0.98), rgba(241, 235, 224, 0.98)),
    var(--surface-strong);
}

.maintenance-card__title {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.maintenance-card__body {
  margin-bottom: 14px;
}

.maintenance-card__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.maintenance-card__detail-stack {
  display: grid;
  gap: 16px;
}

.maintenance-card__label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.maintenance-card__value {
  display: block;
  color: var(--text);
  line-height: 1.45;
}

.maintenance-page__footer {
  padding: 0 6px;
}

.maintenance-page__footer-copy {
  margin-bottom: 0;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .maintenance-page__hero,
  .maintenance-page__grid {
    grid-template-columns: 1fr;
  }

  .maintenance-page__art-panel {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .maintenance-page {
    width: min(100vw - 20px, 1320px);
    padding: 18px 0 28px;
  }

  .maintenance-page__brand-block,
  .maintenance-page__art-panel,
  .maintenance-card {
    border-radius: 22px;
  }

  .maintenance-page__brand-block,
  .maintenance-card,
  .maintenance-page__art-panel {
    padding: 20px;
  }

  .maintenance-page__title {
    font-size: clamp(2.1rem, 11vw, 3.1rem);
  }

  .maintenance-page__lede {
    font-size: 0.98rem;
  }

  .maintenance-page__status-row {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .maintenance-page__art-frame {
    width: min(100%, 280px);
    border-radius: 24px;
    padding: 12px;
  }

  .maintenance-page__art-image {
    border-radius: 18px;
  }
}

#firearmAccessories,
#firearmMaintenanceLog,
#suppressorAccessories,
#suppressorMaintenanceLog {
  min-height: 104px;
}

#firearmDetailMaintenanceGrid .detail-item {
  background: rgba(255, 248, 230, 0.02);
  border: 1px solid rgba(207, 177, 118, 0.1);
}

#firearmNotes,
#suppressorNotes,
#ammoNotes,
#handloadNotes,
#suppressorStampInfo {
  min-height: 88px;
}

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

@media (max-width: 1200px) {
  .admin-control-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-control-bar__row,
  .admin-section-split {
    grid-template-columns: 1fr;
  }

  .admin-subpage-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .custom-image-grid {
    grid-template-columns: 1fr;
  }

  .custom-section-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    grid-template-columns: 1fr;
  }

  .home-kpi-grid,
  .home-actions-grid {
    grid-template-columns: 1fr;
  }

  .home-system-grid {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    min-height: 0;
  }

  .hero-mark-glow {
    inset: auto 0 -16px auto;
    justify-content: end;
  }

  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 920px) {
  .sidebar-link-count {
    position: absolute;
    top: 7px;
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
    padding: 2px 6px;
    border: 1px solid rgba(207, 177, 118, 0.16);
    border-radius: 999px;
    background: rgba(9, 13, 11, 0.88);
    color: var(--accent-strong);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
  }

  .mobile-inventory-sort {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding-top: 2px;
  }

  .mobile-inventory-sort label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-inventory-sort select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-subpage-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-image-actions,
  .custom-backup-actions {
    flex-direction: column;
  }

  .custom-image-actions .primary-button,
  .custom-image-actions .secondary-button,
  .custom-backup-actions .primary-button,
  .custom-backup-actions .secondary-button {
    width: 100%;
  }

  .maintenance-workbench__grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    top: 8px;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 22px;
    scroll-padding-inline: 12px;
  }

  .tab-button,
  .export-button {
    min-height: 42px;
  }

  .tab-button {
    padding: 10px 14px;
    font-size: 0.95rem;
    scroll-snap-align: start;
  }

  .inventory-card {
    padding: 14px;
  }

  .inventory-toolbar {
    padding: 14px;
    border-radius: 20px;
  }

  .inventory-search {
    min-width: 0;
  }

  .table-wrap {
    padding: 8px;
    border-radius: 24px;
  }

  table {
    border-spacing: 0 8px;
    min-width: 820px;
  }

  thead th {
    top: -8px;
    padding-top: 13px;
    padding-bottom: 14px;
  }

  tbody td {
    padding: 13px 12px;
  }

  .table-main-cell {
    min-width: 150px;
  }

  .brand-logo-shell,
  .brand-mark-fallback {
    width: 66px;
    height: 34px;
    padding-inline: 7px;
  }

  .photo-thumb-wrap {
    width: 72px;
    height: 72px;
  }

  .detail-modal-body,
  .scanner-modal-body,
  .detail-grid,
  .form-grid.two-column,
  .entry-selector-grid,
  .menu-card {
    grid-template-columns: 1fr;
  }

  .detail-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .field-span-full {
    grid-column: auto;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .toggle-stack {
    grid-template-columns: 1fr;
  }

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

  .ammo-summary-metrics {
    grid-template-columns: 1fr;
  }

  .toolbar-filter-cluster {
    width: 100%;
  }

  .toolbar-filter-group {
    min-width: min(180px, 100%);
    flex: 1 1 160px;
  }

  .ammo-toolbar__actions {
    justify-content: flex-start;
  }

  .home-brand-panel__bar {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .admin-control-bar {
    padding: 16px;
    border-radius: 20px;
  }

  .admin-section-card {
    min-height: 0;
    padding: 16px;
  }

  .admin-subpage-field select {
    min-height: 52px;
  }

  .app-shell {
    --container-gutter: 6px;
    width: min(100vw, calc(100vw - (var(--container-gutter) * 2)));
    padding: var(--space-4) var(--container-gutter) 28px;
  }

  .app-shell::after {
    top: 210px;
    width: min(78vw, 420px);
    height: min(78vw, 420px);
    opacity: 0.1;
  }

  .card,
  .detail-modal-card {
    padding: 18px;
    border-radius: 22px;
  }

  .inventory-card {
    padding: 12px;
    border-radius: 24px;
  }

  .hero {
    border-radius: 24px;
    padding: 0;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sidebar-brand {
    justify-content: center;
  }

  .sidebar-brand__logo-tile {
    max-width: 118px;
    min-height: 118px;
  }

  .sidebar-nav {
    gap: 6px;
  }

  .sidebar-utility {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .hero-stage {
    gap: 16px;
  }

  .hero-main {
    padding: 16px 14px 14px;
    border-radius: 22px;
    min-height: 0;
  }

  .armory-header {
    padding: 16px 14px 14px;
    border-radius: 24px;
    gap: 14px;
  }

  .armory-header::before {
    border-radius: 22px;
  }

  .armory-header__title-block h1 {
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }

  .armory-header__brand {
    gap: 10px;
    padding-bottom: 12px;
  }

  .armory-header__title-block {
    min-height: 0;
  }

  .armory-stats {
    grid-template-columns: 1fr;
  }

  .armory-header__brand {
    min-height: 132px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }

  .hero-brand-block {
    gap: 12px;
    padding-bottom: 14px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .home-brand-panel__actions,
  .home-system-card__actions,
  .form-actions,
  .photo-actions,
  .photo-meta,
  .toolbar-actions,
  .row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .row-actions--split .action-group {
    width: 100%;
    padding-right: 0;
  }

  .row-actions--split .action-group--quick::after,
  .row-actions--split .action-group--manage::after {
    display: none;
  }

  .home-brand-panel__primary,
  .home-brand-panel__secondary,
  .home-action-card__button,
  .form-actions .primary-button,
  .form-actions .secondary-button,
  .form-actions .danger-button {
    width: 100%;
    min-width: 0;
  }

  .hero-trust-strip {
    display: grid;
    gap: 8px;
  }

  .hero-trust-strip span {
    justify-content: flex-start;
  }

  .stat-card span,
  .stat-card label {
    justify-self: start;
    text-align: left;
  }

  .photo-upload {
    min-height: 118px;
    padding: 18px 16px;
  }

  .entry-form {
    gap: 14px;
  }

  .form-section,
  .subgrid,
  .photo-section {
    padding: 16px;
  }

  .form-grid,
  .scanner-input-group {
    gap: 12px;
  }

  .entry-form input,
  .entry-form select,
  .entry-form textarea,
  .entry-selector-field select,
  .inventory-search input,
  .menu-panel select {
    min-height: 50px;
  }

  .toggle-card {
    min-height: 0;
  }

  .form-actions,
  .photo-actions,
  .photo-meta,
  .inventory-toolbar,
  .toolbar-actions,
  .row-actions,
  .inventory-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .ammo-inventory-row .table-actions-cell .row-actions,
  .ammo-inventory-row .ammo-row-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .menu-toggle-button,
  .scanner-trigger,
  .form-actions .primary-button,
  .form-actions .secondary-button,
  .form-actions .danger-button {
    width: 100%;
  }

  .pagination-summary {
    min-width: 0;
  }

  .home-brand-panel__bar,
  .home-action-card,
  .home-system-card,
  .home-section-head,
  .home-kpi-card {
    padding: 18px;
    border-radius: 20px;
  }

  .home-brand-panel__copy h2 {
    font-size: clamp(1.72rem, 9vw, 2.45rem);
  }

  .home-spotlight__art-shell {
    min-height: 210px;
  }

  .home-ops-card {
    padding: 18px;
  }

  .status-banner {
    margin-bottom: 14px;
    padding: 12px 14px;
  }

  .table-wrap {
    padding: 6px;
    border-radius: 20px;
  }

  .inventory-card table,
  .inventory-card thead,
  .inventory-card tbody,
  .inventory-card tr,
  .inventory-card th,
  .inventory-card td {
    display: block;
  }

  .inventory-card table {
    min-width: 0;
    border-spacing: 0;
  }

  .inventory-card thead {
    display: none;
  }

  .inventory-card tbody {
    display: grid;
    gap: 10px;
  }

  .inventory-card tbody tr {
    padding: 10px;
    border: 1px solid rgba(207, 177, 118, 0.12);
    border-radius: 18px;
    background: rgba(27, 33, 30, 0.96);
    transform: none !important;
  }

  .inventory-card tbody td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 4px;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  .inventory-card tbody td::before {
    content: attr(data-label);
    color: var(--muted-soft);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .inventory-card .table-actions-cell {
    grid-template-columns: 1fr;
  }

  .inventory-card .table-actions-cell::before {
    margin-bottom: 6px;
  }

  .inventory-card .table-main-cell,
  .inventory-card .table-photo-cell,
  .inventory-card .table-chip-cell,
  .inventory-card .table-notes-cell {
    width: 100%;
  }

  .table-primary-cell.with-brand-mark {
    grid-template-columns: minmax(44px, 104px) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .firearm-inventory-table .table-actions-cell .row-actions {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-left: 0;
  }

  .firearm-inventory-table .row-actions--split .action-group,
  .firearm-inventory-table .row-actions--split .action-group--manage {
    width: auto;
    padding-right: 0;
  }

  .firearm-inventory-table .row-actions--split .action-group--manage::after {
    display: none;
  }

  .ammo-toolbar {
    padding: 16px;
    gap: 14px;
  }

  .ammo-toolbar__main,
  .ammo-toolbar__secondary {
    grid-template-columns: 1fr;
  }

  .ammo-toolbar__actions {
    justify-content: flex-start;
  }

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

  .ammo-inventory-meta {
    grid-template-columns: 1fr;
  }

  .ammo-toolbar__add {
    width: 100%;
  }

    .scanner-input-group {
      grid-template-columns: 1fr;
    }

    .ammo-bar-meta {
      display: grid;
      justify-content: stretch;
  }

  .menu-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
  }

  thead th,
  tbody td {
    padding: 12px 10px;
  }

  .table-primary-cell strong {
    font-size: 0.95rem;
  }

  .table-primary-cell span,
  .table-note-snippet {
    font-size: 0.77rem;
  }

  .brand-logo-shell,
  .brand-mark-fallback {
    width: 58px;
    height: 30px;
    border-radius: 9px;
    padding-inline: 6px;
  }
}
.ballistics-dashboard-card {
  gap: 18px;
}

.ballistics-toolbar {
  align-items: end;
}

.ballistics-toolbar__selector {
  flex: 1;
  min-width: 280px;
}

.ballistics-toolbar__eyebrow {
  margin: 0 0 8px;
  color: #9ea697;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ballistics-toolbar__search-field {
  display: grid;
}

.ballistics-toolbar__search-field select {
  width: 100%;
}

.ballistics-toolbar__actions {
  display: flex;
  justify-content: flex-end;
}

.ballistics-review-section {
  gap: 10px;
}

.ballistics-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ballistics-summary-card {
  min-height: 126px;
}

.ballistics-summary-card__hint {
  color: var(--muted-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ballistics-correlation-card {
  padding: 18px 20px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(25, 31, 28, 0.96), rgba(17, 22, 20, 0.96));
}

.ballistics-correlation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.ballistics-correlation-list li {
  line-height: 1.55;
}

#ballisticsFormCard {
  gap: 16px;
}

#ballisticsFormCard .card-head {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}

#ballisticsFormCard .card-head h2 {
  font-size: 1.38rem;
}

#ballisticsFormCard .card-head p {
  max-width: 58ch;
  font-size: 0.94rem;
}

#ballisticsFormCard .form-section {
  padding: 18px 18px 16px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(214, 180, 122, 0.05), transparent 28%),
    linear-gradient(180deg, rgba(29, 35, 32, 0.94), rgba(19, 24, 22, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 14px 24px rgba(0, 0, 0, 0.12);
}

#ballisticsFormCard .ballistics-form-section--selector {
  padding: 12px 16px 10px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(24, 29, 27, 0.92), rgba(16, 20, 18, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

#ballisticsFormCard .form-section::before {
  height: 48px;
}

#ballisticsFormCard .ballistics-form-section--selector::before {
  display: none;
}

#ballisticsFormCard .form-section-head {
  gap: 6px;
  margin-bottom: 14px;
}

#ballisticsFormCard .form-section-head h3 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

#ballisticsFormCard .form-section-head p {
  max-width: 64ch;
  font-size: 0.9rem;
  line-height: 1.5;
}

#ballisticsFormCard .ballistics-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 14px;
}

#ballisticsFormCard .ballistics-field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #d2d0c7;
}

#ballisticsFormCard .ballistics-field__hint {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  color: rgba(182, 187, 176, 0.76);
}

#ballisticsFormCard .ballistics-field--span-2 {
  grid-column: span 2;
}

#ballisticsFormCard .ballistics-field--span-3 {
  grid-column: span 3;
}

#ballisticsFormCard .ballistics-field--span-4 {
  grid-column: span 4;
}

#ballisticsFormCard .ballistics-field--span-6 {
  grid-column: span 6;
}

#ballisticsFormCard .ballistics-field--wide {
  grid-column: 1 / -1;
}

#ballisticsFormCard .ballistics-field input,
#ballisticsFormCard .ballistics-field select,
#ballisticsFormCard .ballistics-field textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border-color: rgba(207, 177, 118, 0.12);
  background:
    linear-gradient(180deg, rgba(31, 37, 34, 0.98), rgba(22, 27, 25, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 0.94rem;
}

#ballisticsFormCard .ballistics-field textarea {
  min-height: 94px;
}

#ballisticsFormCard .ballistics-selector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

#ballisticsFormCard .ballistics-selector-field {
  gap: 7px;
  max-width: none;
}

#ballisticsFormCard .ballistics-selector-label {
  color: rgba(232, 227, 214, 0.76);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#ballisticsFormCard .ballistics-form-section--selector select {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

#ballisticsFormCard .ballistics-field input::placeholder,
#ballisticsFormCard .ballistics-field textarea::placeholder {
  color: #7e847b;
}

#ballisticsFormCard .ballistics-entry-status {
  margin: -2px 0 2px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.94rem;
}

#ballisticsFormCard .entry-selector-help {
  margin-top: 8px;
  padding-left: 1px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(182, 187, 176, 0.82);
}

#ballisticsFormCard .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 14px 16px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 19, 18, 0.92), rgba(10, 13, 12, 0.98));
  box-shadow:
    0 16px 26px rgba(0, 0, 0, 0.18);
}

#ballisticsFormCard .status-banner {
  margin-bottom: 0;
}

@media (max-width: 1080px) {
  .ballistics-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #ballisticsFormCard .ballistics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #ballisticsFormCard .ballistics-field--span-2,
  #ballisticsFormCard .ballistics-field--span-3,
  #ballisticsFormCard .ballistics-field--span-4 {
    grid-column: span 3;
  }

  #ballisticsFormCard .ballistics-field--span-6 {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .ballistics-summary-grid {
    grid-template-columns: 1fr;
  }

  .ballistics-correlation-card {
    padding: 16px;
  }

  #ballisticsFormCard .ballistics-grid {
    grid-template-columns: 1fr;
  }

  #ballisticsFormCard .ballistics-field--span-2,
  #ballisticsFormCard .ballistics-field--span-3,
  #ballisticsFormCard .ballistics-field--span-4,
  #ballisticsFormCard .ballistics-field--span-6,
  #ballisticsFormCard .ballistics-field--wide {
    grid-column: auto;
  }

  #ballisticsFormCard .form-actions {
    position: static;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

/* Restored topbar layout for Brass Standard header markup */
.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(420px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(214, 180, 122, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(24, 29, 27, 0.98), rgba(14, 18, 17, 0.98));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar__title-group {
  min-width: 0;
}

.topbar__eyebrow {
  margin: 0 0 5px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar__title {
  margin: 0;
  font-size: clamp(1.75rem, 2.3vw, 2.35rem);
  line-height: 1;
  color: var(--text-strong);
}

.topbar__summary {
  margin: 8px 0 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.topbar__actions {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  min-width: 0;
}

.topbar-command {
  position: relative;
  min-width: 0;
}

.topbar-command__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 7px;
}

.topbar-command__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-search {
  min-width: 100%;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 13px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.search-input svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
}

.search-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.search-input input::placeholder {
  color: var(--muted-soft);
}

.topbar-search-results {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background:
    linear-gradient(180deg, rgba(27, 33, 30, 0.985), rgba(16, 20, 18, 0.985));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}

.topbar-search-results.hidden {
  display: none;
}

.topbar-search-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
}

.topbar-search-result:hover,
.topbar-search-result.is-active {
  border-color: rgba(207, 177, 118, 0.2);
  background: rgba(207, 177, 118, 0.1);
}

.topbar-search-result__type,
.topbar-search-result__section {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.topbar-search-result__body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.topbar-search-result__body strong,
.topbar-search-empty strong {
  color: var(--text-strong);
}

.topbar-search-result__body span,
.topbar-search-empty span {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(207, 177, 118, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.search-results-shell {
  display: grid;
  gap: 18px;
}

.search-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.search-results-query {
  display: inline-flex;
  align-items: center;
  max-width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(207, 177, 118, 0.14);
  background: rgba(207, 177, 118, 0.08);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-results-advanced {
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.search-results-advanced summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  color: var(--text-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-results-advanced summary::-webkit-details-marker {
  display: none;
}

.search-results-advanced[open] summary {
  border-bottom: 1px solid rgba(207, 177, 118, 0.08);
}

.search-results-advanced .search-results-toolbar {
  padding: 0 16px 16px;
}

.search-results-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.search-results-stat {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}

.search-results-stat__label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results-stat__value {
  color: var(--text-strong);
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1;
}

.search-results-stat__meta {
  color: var(--muted-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.search-results-list {
  display: grid;
  gap: 14px;
}

.search-results-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px 24px;
  border-radius: 24px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, rgba(23, 29, 27, 0.96), rgba(18, 22, 20, 0.96));
  color: var(--text);
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.16);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.search-results-card:hover,
.search-results-card:focus-visible {
  border-color: rgba(207, 177, 118, 0.24);
  background:
    linear-gradient(180deg, rgba(207, 177, 118, 0.11), rgba(207, 177, 118, 0.04)),
    linear-gradient(180deg, rgba(28, 34, 31, 0.98), rgba(20, 25, 22, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.search-results-card__type,
.search-results-card__section {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.search-results-card__body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.search-results-card__body strong,
.search-results-empty strong {
  color: var(--text-strong);
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  line-height: 1.12;
}

.search-results-card__body span,
.search-results-empty span {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.search-results-empty {
  display: grid;
  gap: 6px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px dashed rgba(207, 177, 118, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.topbar-icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  border-radius: 14px;
  border: 1px solid rgba(207, 177, 118, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.topbar-icon-button svg {
  width: 18px;
  height: 18px;
}

.topbar-icon-button__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #12110d;
  font-size: 0.68rem;
  font-weight: 800;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  width: 178px;
  min-width: 178px;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(207, 177, 118, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 42, 39, 0.94), rgba(29, 34, 32, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 10px rgba(0, 0, 0, 0.08);
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
}

.topbar-profile__avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(207, 177, 118, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  color: var(--text-strong);
  font-weight: 800;
}

.topbar-profile__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topbar-profile__meta strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile__meta span {
  color: var(--muted);
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile-menu {
  flex: 0 1 auto;
}

.topbar-profile-panel {
  width: min(390px, calc(100vw - 40px));
  max-width: min(390px, calc(100vw - 40px));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.topbar-profile-panel__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(207, 177, 118, 0.16), rgba(121, 145, 95, 0.08) 56%, transparent);
}

.topbar-profile-panel__avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  border: 1px solid rgba(207, 177, 118, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-strong);
  font-weight: 800;
}

.topbar-profile-panel__name,
.topbar-profile-panel__role {
  margin: 0;
}

.topbar-profile-panel__name {
  color: var(--text-strong);
  font-weight: 800;
}

.topbar-profile-panel__role,
.topbar-profile-panel__hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.topbar-profile-panel__section {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid rgba(207, 177, 118, 0.1);
}

.topbar-profile-panel__field {
  display: grid;
  gap: 7px;
  color: var(--text-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.topbar-profile-panel__field select {
  min-height: 44px;
}

.topbar-profile-panel__hint {
  margin: -3px 0 0;
}

.topbar-profile-panel__footer {
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(207, 177, 118, 0.1);
}

.topbar-profile-panel__signout {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(210, 113, 96, 0.32);
  border-radius: 12px;
  background: rgba(130, 49, 39, 0.14);
  color: #f1b1a5;
  font-weight: 750;
}

.topbar-profile-panel__heading {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar-profile-panel__form {
  display: grid;
  gap: 12px;
}

.topbar-profile-panel__summary {
  display: grid;
  gap: 8px;
}

.topbar-profile-panel__lede,
.topbar-profile-panel__detail {
  margin: 0;
}

.topbar-profile-panel__lede {
  color: var(--text-strong);
  font-weight: 700;
}

.topbar-profile-panel__detail {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.topbar-profile-panel__actions {
  display: grid;
  gap: 10px;
}

.topbar-profile-panel__form label {
  color: var(--text-strong);
}

.topbar-profile-panel__form .menu-reset-button,
.topbar-profile-panel__actions .menu-reset-button {
  width: 100%;
  justify-self: stretch;
}

:root[data-theme="light"] .topbar-profile-panel__section {
  border-top-color: rgba(166, 127, 57, 0.12);
}

:root[data-theme="light"] .topbar-profile-panel__footer {
  border-top-color: rgba(166, 127, 57, 0.12);
}

:root[data-theme="light"] .topbar-profile-panel__identity {
  background: linear-gradient(135deg, rgba(221, 199, 159, 0.34), rgba(210, 221, 191, 0.2) 56%, transparent);
}

:root[data-theme="light"] .topbar-profile-panel__signout {
  border-color: rgba(171, 82, 66, 0.26);
  background: rgba(178, 87, 69, 0.09);
  color: #974b3d;
}

.topbar-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 16px 18px;
  border: 1px solid rgba(207, 177, 118, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.metric-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card__value {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  color: var(--text-strong);
}

@media (max-width: 920px) {
  .search-results-head {
    flex-direction: column;
    align-items: stretch;
  }

  .search-results-stats {
    grid-template-columns: 1fr;
  }

  .search-results-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar__actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-command {
    min-width: 0;
  }

  .topbar-profile-menu {
    width: auto;
  }

  .topbar-profile {
    width: 178px;
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .topbar-metrics {
    grid-template-columns: 1fr;
  }

  .topbar-profile__meta {
    display: none;
  }

  .topbar-profile-menu {
    width: 44px;
  }

  .topbar-profile {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 4px;
    border-radius: 14px;
  }
}

/* Light theme surface overrides for shared app chrome */
:root[data-theme="light"] .sidebar {
  border-color: rgba(125, 108, 79, 0.12);
  background: linear-gradient(180deg, rgba(249, 247, 242, 0.98), rgba(236, 232, 224, 0.98));
  box-shadow: 0 8px 18px rgba(59, 50, 34, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

:root[data-theme="light"] .sidebar::before {
  background:
    radial-gradient(circle at top, rgba(165, 156, 138, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 16%);
}

:root[data-theme="light"] .sidebar-brand__logo-tile,
:root[data-theme="light"] .auth-panel,
:root[data-theme="light"] .card,
:root[data-theme="light"] .home-spotlight,
:root[data-theme="light"] .home-stat-card,
:root[data-theme="light"] .home-ops-card,
:root[data-theme="light"] .tab-section-head,
:root[data-theme="light"] .topbar,
:root[data-theme="light"] .metric-card {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(251, 249, 245, 0.96), rgba(239, 235, 228, 0.96));
  box-shadow: 0 8px 18px rgba(59, 50, 34, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .sidebar-brand__logo-tile {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 16%),
    linear-gradient(180deg, rgba(243, 239, 232, 0.98), rgba(229, 224, 215, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 20px rgba(59, 50, 34, 0.06);
}

:root[data-theme="light"] .sidebar-link,
:root[data-theme="light"] .search-input,
:root[data-theme="light"] .topbar-search-results,
:root[data-theme="light"] .topbar-icon-button,
:root[data-theme="light"] .home-spotlight__metric,
:root[data-theme="light"] .home-spotlight__link,
:root[data-theme="light"] .home-ops-item,
:root[data-theme="light"] .home-ops-empty,
:root[data-theme="light"] .tab-section-head__media,
:root[data-theme="light"] .sidebar-link-count {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.96), rgba(243, 239, 232, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 3px 10px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .sidebar-link-label {
  color: #433b31;
}

:root[data-theme="light"] .sidebar-nav-heading,
:root[data-theme="light"] .tabs-divider {
  color: rgba(74, 63, 49, 0.56);
}

:root[data-theme="light"] .sidebar-nav-heading-meta {
  color: rgba(74, 63, 49, 0.62);
}

:root[data-theme="light"] .sidebar-link-meta {
  color: rgba(74, 63, 49, 0.66);
}

:root[data-theme="light"] .sidebar-link-icon {
  opacity: 0.84;
}

:root[data-theme="light"] .sidebar-link-count {
  color: #6d614e;
}

:root[data-theme="light"] .sidebar-link:hover,
:root[data-theme="light"] .home-spotlight__link:hover {
  border-color: rgba(125, 108, 79, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 243, 237, 0.96));
}

:root[data-theme="light"] .sidebar-link--utility,
:root[data-theme="light"] .tab-button--utility {
  background:
    linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(243, 239, 232, 0.94)),
    linear-gradient(90deg, rgba(160, 130, 77, 0.04), rgba(160, 130, 77, 0));
}

:root[data-theme="light"] .sidebar-link--admin,
:root[data-theme="light"] .tab-button--admin {
  border-color: rgba(136, 165, 104, 0.24);
  background:
    linear-gradient(180deg, rgba(151, 180, 119, 0.16), rgba(118, 145, 90, 0.05)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
}

:root[data-theme="light"] .sidebar-link.active,
:root[data-theme="light"] .settings-tab.active,
:root[data-theme="light"] .menu-toggle-button.active {
  border-color: rgba(136, 165, 104, 0.28);
  background:
    linear-gradient(180deg, rgba(151, 180, 119, 0.14), rgba(118, 145, 90, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56), 0 4px 10px rgba(59, 50, 34, 0.05);
  color: var(--text-strong);
}

:root[data-theme="light"] .sidebar-link.active::after {
  background: linear-gradient(180deg, rgba(122, 145, 95, 0.9), rgba(184, 154, 100, 0.7));
}

:root[data-theme="light"] .topbar-profile {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(246, 243, 237, 0.96), rgba(236, 232, 225, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 4px 10px rgba(59, 50, 34, 0.05);
}

:root[data-theme="light"] .topbar-profile__avatar {
  border-color: rgba(125, 108, 79, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(239, 232, 220, 0.9));
  color: #2d261d;
}

:root[data-theme="light"] .topbar-profile__meta strong {
  color: #2f271b;
}

:root[data-theme="light"] .status-banner {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(251, 249, 245, 0.96), rgba(239, 235, 228, 0.96));
  color: #625847;
  box-shadow:
    0 5px 12px rgba(59, 50, 34, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

:root[data-theme="light"] .status-banner::before {
  background: #8a806f;
}

:root[data-theme="light"] .status-banner[data-tone="success"] {
  border-color: rgba(111, 168, 123, 0.24);
  background: linear-gradient(180deg, rgba(240, 247, 240, 0.98), rgba(228, 238, 229, 0.96));
  color: #26412c;
}

:root[data-theme="light"] .status-banner[data-tone="success"]::before {
  background: #5f966a;
}

:root[data-theme="light"] .status-banner[data-tone="info"] {
  border-color: rgba(166, 127, 57, 0.18);
  background: linear-gradient(180deg, rgba(249, 246, 236, 0.98), rgba(239, 234, 221, 0.96));
  color: #5a4725;
}

:root[data-theme="light"] .status-banner[data-tone="info"]::before {
  background: #a37a39;
}

:root[data-theme="light"] .hero {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(135deg, #faf8f3 0%, #f1ede6 54%, #e7e1d8 100%);
  box-shadow: 0 10px 24px rgba(59, 50, 34, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

:root[data-theme="light"] .form-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 18%),
    linear-gradient(180deg, rgba(251, 249, 244, 0.98), rgba(239, 235, 228, 0.96));
  border-color: rgba(125, 108, 79, 0.11);
  box-shadow:
    0 10px 22px rgba(59, 50, 34, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

:root[data-theme="light"] .form-card::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 72%),
    linear-gradient(90deg, rgba(181, 172, 153, 0.08), transparent 24%, transparent 76%, rgba(150, 163, 144, 0.06));
}

:root[data-theme="light"] .admin-control-bar {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 18%),
    linear-gradient(180deg, rgba(249, 247, 242, 0.98), rgba(236, 232, 225, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(59, 50, 34, 0.05);
}

:root[data-theme="light"] .admin-section-card {
  border-color: rgba(125, 108, 79, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 18%),
    linear-gradient(180deg, rgba(250, 248, 243, 0.98), rgba(237, 233, 226, 0.96));
  color: #2f271b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 6px 14px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .admin-section-card.active {
  border-color: rgba(168, 142, 89, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(180deg, rgba(248, 244, 235, 0.98), rgba(236, 230, 219, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 20px rgba(59, 50, 34, 0.06);
}

:root[data-theme="light"] .admin-section-card__eyebrow {
  color: #7a6540;
}

:root[data-theme="light"] .admin-section-card__copy {
  color: #655b4d;
}

:root[data-theme="light"] .admin-control-bar__hint {
  color: #615648;
}

:root[data-theme="light"] .admin-subpage-field__label,
:root[data-theme="light"] .customization-card label,
:root[data-theme="light"] .custom-image-card label,
:root[data-theme="light"] .custom-section-row label {
  color: #7a6540;
}

:root[data-theme="light"] .admin-subpage-field select {
  border-color: rgba(125, 108, 79, 0.14);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(243, 239, 232, 0.96));
  color: #2f271b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 3px 8px rgba(59, 50, 34, 0.04);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(125, 108, 79, 0.72) 50%),
    linear-gradient(135deg, rgba(125, 108, 79, 0.72) 50%, transparent 50%);
}

:root[data-theme="light"] .customization-card {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 18%),
    linear-gradient(180deg, rgba(250, 248, 243, 0.98), rgba(237, 233, 226, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(59, 50, 34, 0.05);
}

:root[data-theme="light"] .customization-card .form-section-head p {
  color: #655b4d;
}

:root[data-theme="light"] .customization-card input:not([type="color"]):not([type="checkbox"]),
:root[data-theme="light"] .customization-card select,
:root[data-theme="light"] .customization-card textarea,
:root[data-theme="light"] .custom-image-card input:not([type="file"]),
:root[data-theme="light"] .custom-section-row input[type="text"],
:root[data-theme="light"] .customization-card input[type="color"] {
  border-color: rgba(125, 108, 79, 0.13);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(245, 241, 234, 0.98));
  color: #2f271b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 2px 6px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .customization-card input::placeholder,
:root[data-theme="light"] .customization-card textarea::placeholder,
:root[data-theme="light"] .custom-image-card input::placeholder,
:root[data-theme="light"] .custom-section-row input[type="text"]::placeholder {
  color: #8a7e6d;
}

:root[data-theme="light"] .custom-image-card {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 16%),
    linear-gradient(180deg, rgba(248, 246, 241, 0.96), rgba(236, 232, 225, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 6px 14px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .custom-image-preview-wrap {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(243, 239, 232, 0.96));
}

:root[data-theme="light"] .hero-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 20%),
    linear-gradient(180deg, rgba(250, 246, 238, 0.96), rgba(238, 229, 216, 0.92));
  border-color: rgba(166, 127, 57, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), inset 0 -28px 60px rgba(130, 109, 67, 0.04);
}

:root[data-theme="light"] .tab-section-head::before,
:root[data-theme="light"] .tab-section-head__media::after,
:root[data-theme="light"] .home-spotlight__art-shell::after {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.42), transparent 30%),
    linear-gradient(180deg, transparent 58%, rgba(130, 109, 67, 0.04));
}

:root[data-theme="light"] .home-spotlight {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 18%),
    linear-gradient(135deg, rgba(250, 248, 243, 0.98), rgba(236, 231, 223, 0.96));
}

:root[data-theme="light"] .home-spotlight::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 22%),
    linear-gradient(180deg, transparent, rgba(125, 108, 79, 0.05));
}

:root[data-theme="light"] .home-spotlight__copy h2 {
  color: #2c251b;
}

:root[data-theme="light"] .home-spotlight__lede {
  color: #7a7265;
}

:root[data-theme="light"] .home-spotlight__metric strong,
:root[data-theme="light"] .home-stat-card__value,
:root[data-theme="light"] .home-ops-card__head h3,
:root[data-theme="light"] .tab-section-head__copy h2 {
  color: #2f271b;
}

:root[data-theme="light"] .home-spotlight__metric span,
:root[data-theme="light"] .home-stat-card__label,
:root[data-theme="light"] .topbar-profile__meta span,
:root[data-theme="light"] .topbar-command__label,
:root[data-theme="light"] .search-input svg,
:root[data-theme="light"] .search-input input::placeholder {
  color: #7d7466;
}

:root[data-theme="light"] .topbar__summary {
  color: #655b4d;
}

:root[data-theme="light"] .topbar-search-result,
:root[data-theme="light"] .topbar-search-empty {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(243, 239, 232, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 3px 10px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .topbar-search-result:hover,
:root[data-theme="light"] .topbar-search-result.is-active {
  border-color: rgba(125, 108, 79, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 233, 0.96)),
    linear-gradient(180deg, rgba(184, 154, 100, 0.1), rgba(184, 154, 100, 0.04));
}

:root[data-theme="light"] .topbar-search-result__type,
:root[data-theme="light"] .topbar-search-result__section {
  color: #8a6a39;
}

:root[data-theme="light"] .topbar-search-result__body strong,
:root[data-theme="light"] .topbar-search-empty strong {
  color: #2f271b;
}

:root[data-theme="light"] .topbar-search-result__body span,
:root[data-theme="light"] .topbar-search-empty span {
  color: #655b4d;
}

:root[data-theme="light"] .search-results-query {
  border-color: rgba(125, 108, 79, 0.13);
  background: rgba(184, 154, 100, 0.12);
  color: #8a6a39;
}

:root[data-theme="light"] .search-results-stat {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(243, 239, 232, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 4px 12px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .search-results-stat__label {
  color: #7d7466;
}

:root[data-theme="light"] .search-results-stat__value {
  color: #2f271b;
}

:root[data-theme="light"] .search-results-stat__meta {
  color: #655b4d;
}

:root[data-theme="light"] .search-results-card,
:root[data-theme="light"] .search-results-empty {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(243, 239, 232, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 6px 16px rgba(59, 50, 34, 0.05);
}

:root[data-theme="light"] .search-results-card:hover,
:root[data-theme="light"] .search-results-card:focus-visible {
  border-color: rgba(125, 108, 79, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 233, 0.96)),
    linear-gradient(180deg, rgba(184, 154, 100, 0.1), rgba(184, 154, 100, 0.04));
}

:root[data-theme="light"] .search-results-card__type,
:root[data-theme="light"] .search-results-card__section {
  color: #8a6a39;
}

:root[data-theme="light"] .search-results-card__body strong,
:root[data-theme="light"] .search-results-empty strong {
  color: #2f271b;
}

:root[data-theme="light"] .search-results-card__body span,
:root[data-theme="light"] .search-results-empty span {
  color: #655b4d;
}

:root[data-theme="light"] .home-spotlight__actions .primary-button {
  color: #fffdf9;
  box-shadow:
    0 4px 10px rgba(91, 97, 72, 0.14),
    inset 0 1px 0 rgba(255, 245, 220, 0.14);
}

:root[data-theme="light"] .home-spotlight__actions .secondary-button {
  border-color: rgba(125, 108, 79, 0.12);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(242, 238, 230, 0.96));
  color: #645b4d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 2px 6px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .home-spotlight__actions .secondary-button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 235, 0.96));
}

:root[data-theme="light"] .home-spotlight__link {
  border-color: rgba(125, 108, 79, 0.1);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(242, 238, 230, 0.94));
  color: #6e6558;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 2px 6px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .home-spotlight__link:hover {
  border-color: rgba(125, 108, 79, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 235, 0.96));
  color: #554c40;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 4px 10px rgba(59, 50, 34, 0.05);
}

:root[data-theme="light"] .home-spotlight__art-badge,
:root[data-theme="light"] .topbar-profile-panel__heading,
:root[data-theme="light"] .auth-panel__eyebrow,
:root[data-theme="light"] .topbar__eyebrow {
  color: #7a6540;
}

:root[data-theme="light"] .auth-panel {
  background:
    linear-gradient(180deg, rgba(251, 249, 244, 0.98), rgba(236, 231, 223, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 6px 14px rgba(59, 50, 34, 0.05);
}

:root[data-theme="light"] .auth-panel__name {
  color: #2f271b;
}

:root[data-theme="light"] .auth-panel__meta {
  color: #73695c;
}

:root[data-theme="light"] .home-spotlight__art-shell {
  border-color: rgba(125, 108, 79, 0.12);
  background: linear-gradient(180deg, rgba(88, 88, 84, 0.94), rgba(55, 57, 54, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 8px 18px rgba(59, 50, 34, 0.08);
}

:root[data-theme="light"] .home-spotlight__art-shell::before {
  border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .subpage-nav {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(242, 238, 231, 0.9), rgba(233, 228, 220, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 4px 10px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .subpage-button {
  color: #766b5d;
}

:root[data-theme="light"] .subpage-button:hover {
  color: #2f271b;
  background: rgba(125, 108, 79, 0.08);
}

:root[data-theme="light"] .subpage-button.active {
  color: #2a2319;
  border-color: rgba(168, 142, 89, 0.18);
  background:
    linear-gradient(180deg, rgba(204, 183, 133, 0.82), rgba(178, 156, 114, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 228, 0.5),
    0 3px 8px rgba(92, 74, 39, 0.12);
}

:root[data-theme="light"] .inventory-card {
  background:
    linear-gradient(180deg, rgba(250, 248, 243, 0.98), rgba(238, 233, 225, 0.96));
  box-shadow:
    0 10px 22px rgba(59, 50, 34, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

:root[data-theme="light"] .inventory-toolbar {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 16%),
    linear-gradient(180deg, rgba(239, 235, 228, 0.98), rgba(228, 223, 214, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 6px 14px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .inventory-search input,
:root[data-theme="light"] .page-size-group select,
:root[data-theme="light"] .menu-panel input,
:root[data-theme="light"] .menu-panel select {
  border-color: rgba(125, 108, 79, 0.13);
  background: linear-gradient(180deg, rgba(255, 254, 251, 0.98), rgba(244, 240, 233, 0.98));
  color: #2f271b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 2px 6px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .inventory-search input::placeholder {
  color: #8a7f70;
}

:root[data-theme="light"] .page-size-group {
  border-color: rgba(125, 108, 79, 0.11);
  background: linear-gradient(180deg, rgba(239, 235, 228, 0.98), rgba(229, 224, 215, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 8px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .page-size-group label {
  color: #796f61;
}

:root[data-theme="light"] .menu-toggle-button {
  border-color: rgba(125, 108, 79, 0.12);
  background: linear-gradient(180deg, rgba(241, 237, 230, 0.98), rgba(228, 223, 214, 0.96));
  color: #655b4d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 3px 8px rgba(59, 50, 34, 0.04);
}

:root[data-theme="light"] .menu-toggle-button:hover {
  background: linear-gradient(180deg, rgba(248, 245, 239, 0.98), rgba(234, 229, 221, 0.96));
}

:root[data-theme="light"] .menu-toggle-button.active {
  background: linear-gradient(180deg, rgba(214, 188, 126, 0.9), rgba(188, 159, 100, 0.84));
  color: #2a2319;
}

:root[data-theme="light"] .menu-panel {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(180deg, rgba(252, 250, 246, 0.98), rgba(238, 233, 225, 0.97));
  box-shadow: 0 12px 28px rgba(59, 50, 34, 0.08);
}

:root[data-theme="light"] .menu-panel label {
  color: #6d6456;
}

:root[data-theme="light"] .table-wrap {
  border-color: rgba(125, 108, 79, 0.11);
  background:
    linear-gradient(180deg, rgba(241, 237, 230, 0.98), rgba(230, 225, 216, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 10px 22px rgba(59, 50, 34, 0.05);
  scrollbar-color: rgba(150, 131, 97, 0.7) rgba(112, 99, 76, 0.08);
}

:root[data-theme="light"] .table-wrap::-webkit-scrollbar-track {
  background: rgba(112, 99, 76, 0.08);
}

:root[data-theme="light"] .table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(184, 161, 116, 0.88), rgba(140, 118, 83, 0.74));
  border-color: rgba(244, 240, 233, 0.9);
}

:root[data-theme="light"] thead th {
  background: rgba(227, 222, 212, 0.92);
  color: #7b705f;
}

:root[data-theme="light"] .table-sort-button:hover,
:root[data-theme="light"] .table-sort-button.active {
  background: rgba(125, 108, 79, 0.08);
  color: #2f271b;
}

:root[data-theme="light"] tbody td {
  padding: 13px 12px;
  border-top-color: rgba(255, 255, 255, 0.5);
  border-bottom-color: rgba(125, 108, 79, 0.1);
  background: rgba(250, 248, 243, 0.96);
  color: #3f382e;
}

:root[data-theme="light"] tbody td:first-child,
:root[data-theme="light"] tbody td:last-child {
  padding-left: 16px;
  padding-right: 16px;
  border-left-color: rgba(125, 108, 79, 0.1);
  border-right-color: rgba(125, 108, 79, 0.1);
}

:root[data-theme="light"] .empty-row td {
  background: rgba(245, 242, 236, 0.98) !important;
  border-top-color: rgba(125, 108, 79, 0.14);
  border-bottom-color: rgba(125, 108, 79, 0.14);
  color: #74695b;
}

:root[data-theme="light"] tbody tr:hover td {
  background: rgba(242, 238, 231, 0.98);
}

:root[data-theme="light"] tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(59, 50, 34, 0.06);
}

:root[data-theme="light"] tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 rgba(188, 159, 100, 0.34);
}

:root[data-theme="light"] .table-code,
:root[data-theme="light"] .table-location,
:root[data-theme="light"] .table-text-strong,
:root[data-theme="light"] .table-primary-cell strong {
  color: #322a1f;
}

:root[data-theme="light"] .table-primary-cell span,
:root[data-theme="light"] .table-primary-cell small,
:root[data-theme="light"] .table-note-snippet,
:root[data-theme="light"] .inventory-category-label {
  color: #756b5d;
  font-size: 0.76rem;
}

:root[data-theme="light"] .table-primary-cell {
  gap: 4px;
}

:root[data-theme="light"] .table-primary-cell strong {
  font-size: 0.95rem;
}

:root[data-theme="light"] .table-code {
  color: #8f7443;
}

:root[data-theme="light"] .status-pill,
:root[data-theme="light"] .inventory-photo-state,
:root[data-theme="light"] .inventory-optic-text {
  border-color: rgba(125, 108, 79, 0.1);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  padding: 5px 9px;
  font-size: 0.7rem;
}

:root[data-theme="light"] .inventory-count {
  color: #8f7443;
}

:root[data-theme="light"] .action-button {
  border-color: rgba(125, 108, 79, 0.1);
  background: linear-gradient(180deg, rgba(244, 240, 233, 0.98), rgba(232, 227, 218, 0.96));
  color: #645b4d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 2px 6px rgba(59, 50, 34, 0.04);
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.8rem;
}

:root[data-theme="light"] .action-button:hover {
  background: linear-gradient(180deg, rgba(250, 247, 241, 0.98), rgba(236, 231, 223, 0.96));
  box-shadow: 0 4px 10px rgba(59, 50, 34, 0.06);
}

:root[data-theme="light"] .action-button.edit {
  background: linear-gradient(180deg, rgba(233, 241, 226, 0.98), rgba(221, 232, 214, 0.96));
  color: #587042;
}

:root[data-theme="light"] .action-button.delete {
  background: linear-gradient(180deg, rgba(248, 231, 227, 0.98), rgba(240, 218, 213, 0.96));
  border-color: rgba(197, 111, 100, 0.16);
  color: #b45e53;
}

:root[data-theme="light"] .pagination-summary {
  background: linear-gradient(180deg, rgba(244, 240, 233, 0.98), rgba(232, 227, 218, 0.96));
  color: #6f6557;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 6px rgba(59, 50, 34, 0.04);
}

@media (max-width: 640px) {
  .auth-experience {
    min-height: calc(100svh - 16px);
    align-items: center;
  }

  .auth-experience__form-card {
    gap: 16px;
    padding: 22px 20px;
    border-radius: 24px;
  }

  .auth-card-head {
    display: grid;
    gap: 8px;
  }

  .auth-experience__summary--compact {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  #authLoginFields:not(.hidden),
  #authForgotFields:not(.hidden),
  #authResetFields:not(.hidden) {
    gap: 13px;
  }

  .auth-form__field {
    gap: 6px;
  }

  .auth-form__label {
    font-size: 0.7rem;
  }

  .auth-form input {
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.94rem;
  }

  .auth-form__actions--stacked {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
  }

  .auth-form__actions--stacked .primary-button,
  .auth-form__actions--stacked .secondary-button {
    width: auto;
    min-height: 44px;
    padding: 9px 15px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .auth-form__actions--stacked .secondary-button {
    max-width: none;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .app-shell {
    --container-gutter: 8px;
    padding: 8px var(--container-gutter) 24px;
  }

  .app-shell::after {
    top: 136px;
    width: min(76vw, 280px);
    height: min(76vw, 280px);
    opacity: 0.08;
  }

  .layout-shell {
    display: block;
  }

  .main-shell {
    gap: 10px;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .topbar__eyebrow,
  .topbar-command__meta,
  .topbar-metrics {
    display: none;
  }

  .topbar__summary {
    margin-top: 8px;
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .topbar__title {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
    line-height: 1;
  }

  .topbar__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
  }

  .topbar-command {
    min-width: 0;
  }

  .search-input {
    min-height: 44px;
    padding: 0 12px;
    gap: 8px;
    border-radius: 12px;
  }

  .search-input svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }

  .topbar-search-results {
    top: calc(100% + 8px);
    padding: 8px;
    border-radius: 16px;
  }

  .topbar-profile {
    min-height: 44px;
    padding: 4px;
    border-radius: 14px;
  }

  .topbar-profile__avatar {
    width: 34px;
    height: 34px;
    font-size: 0.84rem;
  }

  .topbar-profile-panel {
    width: min(320px, calc(100vw - 24px));
    max-width: min(320px, calc(100vw - 24px));
  }

  .home-spotlight {
    grid-template-columns: 1fr;
  }

  .home-operations-grid {
    grid-template-columns: 1fr;
  }

  .card-head {
    gap: 8px;
    margin-bottom: 12px;
  }

  .card-head h2 {
    font-size: 1.2rem;
  }

  .card-head p {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .status-banner,
  .auth-inline-banner {
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .status-banner {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 45;
    margin: 0;
    align-items: flex-start;
  }

  .panel-grid,
  .home-shell,
  .home-operations-grid,
  .report-grid {
    gap: 14px;
  }

  .home-spotlight {
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
  }

  .home-spotlight__copy {
    gap: 12px;
  }

  .home-eyebrow {
    margin-bottom: 6px;
    font-size: 0.68rem;
  }

  .home-spotlight__copy h2 {
    font-size: clamp(1.55rem, 7.4vw, 1.95rem);
  }

  .home-spotlight__lede {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .home-spotlight__metrics,
  .home-spotlight__art-shell {
    display: none;
  }

  .home-spotlight__command-bar {
    gap: 10px;
  }

  .home-spotlight__quicklinks {
    gap: 8px;
  }

  .home-spotlight__link {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }

  .home-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-stat-card,
  .home-ops-card,
  .report-card {
    padding: 16px;
    border-radius: 18px;
  }

  .home-stat-card__value {
    font-size: 1.5rem;
  }

  .home-stat-card__hint {
    font-size: 0.78rem;
  }

  .home-ops-card__head h3,
  .report-card h3 {
    font-size: 1.05rem;
  }

  .report-card p,
  .settings-panel__note,
  #firearms .inventory-card .card-head p {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .report-card__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tab-section-head {
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
  }

  .tab-section-head__copy {
    gap: 8px;
  }

  .tab-section-head__copy h2 {
    font-size: clamp(1.55rem, 7vw, 1.9rem);
  }

  .tab-section-head__copy p:last-child,
  .entry-selector-help,
  #record-entry .card-head p,
  #ballisticsFormCard .form-section-head p {
    display: none;
  }

  .tab-section-head__media {
    display: none;
  }

  .section-kicker {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  #firearms > .tab-section-head,
  #reports > .tab-section-head,
  #settings > .tab-section-head {
    display: none;
  }

  #record-entry .entry-form-card > .card-head,
  #record-entry #ballisticsFormCard > .card-head {
    display: none;
  }

  .subpage-nav,
  .settings-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .subpage-nav::-webkit-scrollbar,
  .settings-tabs::-webkit-scrollbar {
    display: none;
  }

  .subpage-button,
  .settings-tab {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.84rem;
  }

  .settings-tabs {
    display: none;
  }

  .settings-tab-select {
    display: grid;
    gap: 6px;
    color: var(--muted-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .settings-tab-select select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid rgba(207, 177, 118, 0.16);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(26, 31, 28, 0.96), rgba(14, 18, 16, 0.96));
    color: var(--text-strong);
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
  }

  .inventory-card {
    padding: 12px;
    border-radius: 20px;
  }

  #firearms .inventory-card[data-firearm-subpage-panel="inventory"] .card-head p {
    display: none;
  }

  #firearms .inventory-card[data-firearm-subpage-panel="inventory"] .card-head {
    display: none;
  }

  #record-entry .entry-selector-field {
    gap: 6px;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  .inventory-toolbar {
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 16px;
  }

  #firearms .inventory-toolbar {
    gap: 10px;
    padding: 10px;
  }

  .toolbar-actions {
    gap: 10px;
  }

  #firearms .toolbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
    align-items: stretch;
  }

  .page-size-group {
    min-height: 42px;
    padding: 6px 10px 6px 12px;
  }

  .page-size-group label {
    font-size: 0.66rem;
  }

  .menu-group,
  .page-size-group {
    width: 100%;
  }

  #firearms .menu-group,
  #firearms .page-size-group {
    width: auto;
  }

  .inventory-card tbody {
    gap: 8px;
  }

  .inventory-card tbody tr {
    padding: 8px;
    border-radius: 16px;
  }

  .inventory-card tbody td {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 2px;
  }

  .table-primary-cell.with-brand-mark {
    grid-template-columns: minmax(38px, 72px) minmax(0, 1fr);
    gap: 8px;
  }

  .inventory-card tbody td[data-label="Manufacturer"] {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .inventory-card tbody td[data-label="Manufacturer"] .table-primary-cell.with-brand-mark {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .inventory-card tbody td[data-label="Manufacturer"] .brand-logo-shell,
  .inventory-card tbody td[data-label="Manufacturer"] .brand-mark-fallback {
    width: 58px;
    height: 34px;
    padding: 4px 6px;
    border-radius: 12px;
  }

  .inventory-card tbody td[data-label="Manufacturer"] .brand-logo-image {
    max-width: 88%;
    max-height: 68%;
  }

  .inventory-card tbody td[data-label="Manufacturer"] .brand-logo-shell[data-brand="bergara"] .brand-logo-image {
    max-width: 34px;
    max-height: 24px;
  }

  .inventory-card tbody td[data-label="Manufacturer"] .brand-logo-shell[data-brand="sierra"] .brand-logo-image,
  .inventory-card tbody td[data-label="Manufacturer"] .brand-logo-shell[data-brand="cci"] .brand-logo-image {
    max-width: 82%;
    max-height: 60%;
  }

  .table-primary-cell strong {
    font-size: 0.9rem;
  }

  .inventory-pagination {
    gap: 8px;
    margin-top: 12px;
  }

  .pagination-summary {
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .entry-workspace-shell,
  .entry-workspace-active,
  .entry-form-card,
  #ballisticsFormCard {
    gap: 12px;
  }

  #record-entry .entry-workspace-shell,
  #record-entry .entry-workspace-active {
    padding: 16px;
  }

  .entry-selector-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .entry-switcher {
    gap: 8px;
  }

  .entry-switcher__button {
    min-width: 108px;
    min-height: 42px;
    font-size: 0.8rem;
  }

  #record-entry .panel-grid {
    gap: 12px;
  }

  #record-entry .form-section,
  #record-entry .subgrid,
  #record-entry .photo-section {
    padding: 14px;
  }

  #record-entry .toggle-stack {
    gap: 10px;
  }

  #record-entry .toggle-card {
    padding: 12px;
  }

  .settings-shell {
    gap: 16px;
    padding: 16px;
    border-radius: 20px;
  }

  .settings-shell .form-grid,
  .settings-panel {
    gap: 12px;
  }

  .settings-shell input,
  .settings-shell select,
  .settings-shell textarea {
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .settings-list {
    gap: 10px;
  }

  .settings-list__item {
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
  }

  .settings-list__item .primary-button,
  .settings-list__item .secondary-button {
    width: 100%;
  }
}
