:root {
  color-scheme: light;
  --page: #eef1ed;
  --surface: #fbfbf8;
  --surface-raised: #ffffff;
  --surface-muted: #f1f4ef;
  --ink: #17201b;
  --ink-soft: #4f5d55;
  --muted: #6d7a72;
  --line: rgba(23, 32, 27, 0.12);
  --line-strong: rgba(23, 32, 27, 0.2);
  --green: #246b4b;
  --green-deep: #174b36;
  --mint: #dfeee4;
  --amber: #e7a928;
  --terracotta: #b76144;
  --danger: #b84242;
  --shadow: 0 24px 60px rgba(28, 38, 32, 0.14);
  --shadow-soft: 0 16px 36px rgba(28, 38, 32, 0.1);
  --shadow-card: 0 14px 32px rgba(28, 38, 32, 0.1), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  --shadow-button: 0 12px 24px rgba(23, 75, 54, 0.2);
  --focus: 0 0 0 4px rgba(36, 107, 75, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(36, 107, 75, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(231, 169, 40, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfaf6 0%, var(--page) 48%, #e4ebe4 100%);
  background-size: 42px 42px, auto;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, input):focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 15px 28px rgba(36, 107, 75, 0.24), 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.brand-lockup strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
  line-height: 1.15;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(1040px, 100%);
  min-height: min(680px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.login-hero,
.login-card {
  min-width: 0;
  padding: clamp(22px, 4vw, 44px);
}

.login-hero {
  display: grid;
  align-content: space-between;
  gap: 28px;
  border-right: 1px solid rgba(23, 32, 27, 0.12);
  background:
    linear-gradient(135deg, rgba(36, 107, 75, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(239, 244, 238, 0.94));
}

.login-copy {
  max-width: 580px;
}

.login-copy h1,
.topbar h1,
.dashboard-hero h2,
.section-title h2 {
  margin: 5px 0 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-copy h1 {
  max-width: 620px;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 780;
  overflow-wrap: anywhere;
}

.login-copy p:not(.eyebrow) {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.login-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.login-checks span,
.muted-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  max-width: 100%;
  box-shadow: 0 8px 20px rgba(28, 38, 32, 0.07);
}

.muted-pill--link {
  color: var(--green-deep);
  text-decoration: none;
}

.login-card {
  display: grid;
  align-content: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.login-card__head h2 {
  margin: 4px 0 0;
  font-size: 1.8rem;
  line-height: 1.15;
}

.alert {
  padding: 12px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.alert--info {
  border: 1px solid rgba(36, 107, 75, 0.2);
  background: var(--mint);
  color: var(--green-deep);
}

.alert--error {
  border: 1px solid rgba(184, 66, 66, 0.22);
  background: rgba(184, 66, 66, 0.1);
  color: var(--danger);
}

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

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(23, 32, 27, 0.16);
  border-radius: var(--radius);
  outline: none;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 8px 18px rgba(28, 38, 32, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
  line-height: 1.45;
}

.field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--green-deep) 50%),
    linear-gradient(135deg, var(--green-deep) 50%, transparent 50%),
    linear-gradient(180deg, #fff, var(--surface-muted));
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px, 0 0;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px, 100% 100%;
  padding-right: 36px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(36, 107, 75, 0.45);
  box-shadow: var(--focus), 0 10px 20px rgba(28, 38, 32, 0.08);
}

.primary-action,
.hero-action,
.configurator-link,
.logout-link,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.primary-action {
  width: 100%;
  margin-top: 2px;
  border-color: rgba(23, 75, 54, 0.34);
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: #fff;
  box-shadow: var(--shadow-button);
}

.secondary-action {
  padding: 0 14px;
  border-color: rgba(23, 32, 27, 0.14);
  background: linear-gradient(180deg, #fff, var(--surface-muted));
  color: var(--ink-soft);
}

.primary-action:hover,
.hero-action:hover,
.configurator-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(23, 75, 54, 0.26);
}

.primary-action:active,
.hero-action:active,
.configurator-link:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(23, 75, 54, 0.2);
}

.demo-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--surface-muted));
  box-shadow: var(--shadow-card);
}

.demo-box span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-box strong {
  font-size: 0.94rem;
}

.panel-body {
  overflow: hidden;
}

.app-frame {
  width: min(1600px, 100%);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  gap: 12px;
}

.sidebar,
.content-shell {
  min-height: 0;
  border: 1px solid rgba(23, 32, 27, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 246, 0.94)),
    var(--surface);
}

.sidebar-brand {
  padding: 4px;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding-right: 2px;
}

.nav-link,
.logout-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.94rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.nav-link:hover,
.logout-link:hover {
  border-color: rgba(36, 107, 75, 0.2);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(28, 38, 32, 0.08);
  transform: translateY(-1px);
}

.nav-link.is-active {
  border-color: rgba(36, 107, 75, 0.28);
  background: linear-gradient(180deg, #eef8f1, var(--mint));
  color: var(--green-deep);
  box-shadow: inset 3px 0 0 var(--green), 0 10px 22px rgba(36, 107, 75, 0.12);
}

.nav-submenu {
  display: none;
  gap: 5px;
  padding: 2px 0 8px 42px;
}

.nav-submenu.is-open {
  display: grid;
}

.nav-sublink {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.nav-sublink:hover,
.nav-sublink.is-active {
  border-color: rgba(36, 107, 75, 0.2);
  background: #edf7f1;
  color: var(--green-deep);
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  color: currentColor;
  border-radius: 7px;
  background: rgba(23, 32, 27, 0.05);
}

.nav-icon svg,
.menu-button svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green-deep);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.user-card strong,
.user-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.logout-form {
  margin: 0;
}

.logout-link {
  color: var(--danger);
  background: rgba(184, 66, 66, 0.06);
}

.content-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(23, 32, 27, 0.11);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 251, 248, 0.9));
}

.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--surface-muted));
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(28, 38, 32, 0.08);
}

.menu-button:hover {
  border-color: rgba(36, 107, 75, 0.24);
}

.topbar-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb a {
  color: var(--green-deep);
  text-decoration: none;
}

.breadcrumb-separator {
  color: var(--line-strong);
}

.topbar h1 {
  max-width: 720px;
  margin-top: 4px;
  overflow: hidden;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 790;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.configurator-link,
.hero-action {
  flex: 0 0 auto;
  padding: 0 14px;
  border-color: rgba(23, 75, 54, 0.34);
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: #fff;
  box-shadow: var(--shadow-button);
}

.panel-main {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  scrollbar-gutter: stable;
}

.dashboard-hero,
.panel-card,
.stat-card {
  border: 1px solid rgba(23, 32, 27, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.5vw, 28px);
  background:
    linear-gradient(135deg, rgba(36, 107, 75, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 240, 0.94));
}

.dashboard-hero::before,
.panel-card::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.panel-card,
.stat-card {
  position: relative;
  overflow: hidden;
}

.dashboard-hero h2 {
  max-width: 760px;
  font-size: clamp(1.45rem, 2.6vw, 2.55rem);
}

.dashboard-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

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

.stat-card {
  display: grid;
  gap: 8px;
  padding: 18px 16px 16px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(28, 38, 32, 0.13), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.stat-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 12px;
  margin-top: 12px;
}

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

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

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

.field--full,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form-actions .primary-action {
  width: auto;
  min-width: 190px;
  padding: 0 18px;
}

.form-note {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
  font-size: 0.9rem;
}

.settings-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.settings-option strong {
  display: block;
  margin-bottom: 3px;
}

.settings-option span {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.settings-option label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.dictionary-form {
  gap: 16px;
}

.dictionary-section {
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, rgba(248, 251, 247, 0.9));
  overflow: hidden;
}

.dictionary-section summary {
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.dictionary-section summary::-webkit-details-marker {
  display: none;
}

.dictionary-section summary::after {
  content: "+";
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--green-deep);
  font-size: 1.05rem;
  font-weight: 900;
}

.dictionary-section[open] summary::after {
  content: "-";
}

.dictionary-section summary small {
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.dictionary-fields {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dictionary-field span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dictionary-field small {
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.dictionary-field textarea {
  min-height: 70px;
}

.panel-card {
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
}

.section-title h2 {
  font-size: 1.2rem;
}

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

.request-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(247, 250, 246, 0.92));
  box-shadow: 0 10px 24px rgba(28, 38, 32, 0.07);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.request-row--link {
  color: inherit;
  text-decoration: none;
}

.request-thumb {
  width: 54px;
  height: 54px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.request-row:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 107, 75, 0.22);
  box-shadow: 0 15px 28px rgba(28, 38, 32, 0.1);
}

.login-event-list {
  display: grid;
  gap: 10px;
}

.login-event {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(247, 250, 246, 0.92));
  box-shadow: 0 8px 20px rgba(28, 38, 32, 0.06);
}

.login-event__status {
  justify-self: start;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.login-event__status.is-success {
  border: 1px solid rgba(36, 107, 75, 0.2);
  background: #edf7f1;
  color: var(--green-deep);
}

.login-event__status.is-error {
  border: 1px solid rgba(184, 66, 66, 0.22);
  background: rgba(184, 66, 66, 0.1);
  color: var(--danger);
}

.login-event strong,
.login-event small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-event small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.request-row strong,
.request-row span {
  display: block;
  min-width: 0;
}

.request-row div span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.request-row > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.request-row small {
  min-width: 92px;
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(36, 107, 75, 0.18);
  background: #edf7f1;
  color: var(--green-deep);
  font-weight: 850;
  text-align: center;
}

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

.check-list li {
  position: relative;
  padding: 12px 12px 12px 38px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(247, 250, 246, 0.92));
  color: var(--ink-soft);
  font-weight: 750;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(28, 38, 32, 0.06);
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, var(--green), var(--green-deep));
  box-shadow: 0 6px 14px rgba(36, 107, 75, 0.2);
}

.library-hero,
.library-section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 27, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.library-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(18px, 2.5vw, 28px);
  background:
    linear-gradient(135deg, rgba(36, 107, 75, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 240, 0.94));
}

.library-hero::before,
.library-section::before,
.library-category-card::before,
.asset-card__label::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.library-hero h2 {
  max-width: 760px;
  margin: 5px 0 0;
  font-size: clamp(1.45rem, 2.6vw, 2.55rem);
  line-height: 1.12;
}

.library-hero p:not(.eyebrow) {
  max-width: 740px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.library-limit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(36, 107, 75, 0.2);
  border-radius: 999px;
  background: #edf7f1;
  color: var(--green-deep);
  font-size: 0.84rem;
  font-weight: 850;
  white-space: nowrap;
}

.panel-alert {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.45;
  box-shadow: var(--shadow-card);
}

.panel-alert--success {
  border: 1px solid rgba(36, 107, 75, 0.22);
  background: #edf7f1;
  color: var(--green-deep);
}

.panel-alert--error {
  border: 1px solid rgba(184, 66, 66, 0.22);
  background: rgba(184, 66, 66, 0.1);
  color: var(--danger);
}

.library-category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.library-category-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 18px 14px 14px;
  border: 1px solid rgba(23, 32, 27, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.library-category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 107, 75, 0.22);
  box-shadow: 0 20px 38px rgba(28, 38, 32, 0.13), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.library-category-card.is-active {
  border-color: rgba(36, 107, 75, 0.28);
  background: linear-gradient(180deg, #eef8f1, #fff);
  box-shadow: inset 0 0 0 1px rgba(36, 107, 75, 0.12), var(--shadow-card);
}

.library-category-card span,
.library-category-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.library-category-card strong {
  font-size: 2rem;
  line-height: 1;
}

.library-section {
  margin-top: 12px;
  padding: 18px;
}

.library-section__copy {
  margin: -3px 0 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.asset-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.asset-card__label {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  min-height: 252px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(247, 250, 246, 0.94));
  box-shadow: 0 10px 24px rgba(28, 38, 32, 0.07);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.asset-card__label:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 107, 75, 0.26);
  box-shadow: 0 18px 34px rgba(28, 38, 32, 0.12);
}

.asset-card__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(23, 32, 27, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(23, 32, 27, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(23, 32, 27, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(23, 32, 27, 0.04) 75%),
    #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.asset-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.asset-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.asset-card__body strong,
.asset-card__body small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card__body small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.asset-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 75, 54, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--green), var(--green-deep));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: 0 10px 20px rgba(23, 75, 54, 0.18);
}

.asset-card__price {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.asset-card__price label {
  display: grid;
  gap: 6px;
}

.asset-card__price span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 900;
}

.asset-card__price-note {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
}

.asset-card__price input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.asset-card__price input:focus {
  outline: none;
  border-color: rgba(36, 107, 75, 0.45);
  box-shadow: var(--focus);
}

.asset-card__price-button {
  min-height: 34px;
  border: 1px solid rgba(36, 107, 75, 0.26);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--green-deep);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.asset-card__price-button:hover {
  background: #fff;
}

.asset-card__secondary {
  min-height: 38px;
  border: 1px solid rgba(231, 169, 40, 0.38);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f3bd3e, var(--amber));
  color: #241909;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(231, 169, 40, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.asset-card__secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(231, 169, 40, 0.26);
}

.asset-card__default-summary {
  min-height: 34px;
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.asset-card__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.asset-card.is-uploading .asset-card__label {
  pointer-events: none;
  opacity: 0.72;
}

.asset-card.is-uploading .asset-card__action {
  background: linear-gradient(180deg, var(--amber), #c28314);
}

.asset-card.is-uploading .asset-card__action::after {
  content: "...";
}

.empty-state {
  padding: 16px;
  border: 1px dashed rgba(23, 32, 27, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.design-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.design-request-card {
  overflow: hidden;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(247, 250, 246, 0.94));
  box-shadow: 0 10px 24px rgba(28, 38, 32, 0.07);
}

.design-request-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  background: var(--surface-muted);
}

.design-request-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.design-request-card__body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.design-request-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.design-request-card__top strong {
  font-size: 1rem;
}

.design-request-card__top span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(36, 107, 75, 0.18);
  border-radius: 999px;
  background: #edf7f1;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 900;
}

.inline-status-form {
  flex: 0 0 auto;
}

.inline-status-form select {
  min-height: 34px;
  padding: 0 32px 0 10px;
  border: 1px solid rgba(36, 107, 75, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 50%, var(--green-deep) 50%),
    linear-gradient(135deg, var(--green-deep) 50%, transparent 50%),
    #edf7f1;
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px, 0 0;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 900;
  appearance: none;
  cursor: pointer;
}

.design-request-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.request-summary-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.request-summary-chips span,
.request-summary-chips strong {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(36, 107, 75, 0.14);
  border-radius: var(--radius);
  background: rgba(237, 247, 241, 0.72);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.request-summary-chips strong {
  background: var(--green-deep);
  color: #fff;
}

.table-card {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.panel-table th,
.panel-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(23, 32, 27, 0.08);
  text-align: left;
  vertical-align: top;
}

.panel-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.panel-table td strong,
.panel-table td small {
  display: block;
}

.panel-table td small {
  margin-top: 4px;
  color: var(--ink-soft);
  max-width: 440px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-list {
  display: grid;
  gap: 9px;
}

.backup-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.backup-stat {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid rgba(36, 107, 75, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(237, 247, 241, 0.84));
}

.backup-stat strong {
  color: var(--green-deep);
  font-size: 1.15rem;
  line-height: 1.1;
}

.backup-stat span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  text-decoration: none;
}

.backup-row--rich {
  align-items: stretch;
  padding: 14px;
}

.backup-row__main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.backup-row__main strong,
.backup-row__main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-row__main small {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.backup-row__action,
.backup-row span:not(.backup-row__main) {
  color: var(--green-deep);
  font-weight: 900;
}

.backup-row__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.detail-list--design {
  padding-top: 10px;
  border-top: 1px solid rgba(23, 32, 27, 0.1);
}

.detail-list div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.detail-list__full {
  grid-column: 1 / -1;
}

.detail-list dt,
.detail-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-list dd {
  margin-top: 3px;
  font-weight: 800;
}

.panel-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 27, 0.42);
}

.panel-modal__dialog {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(36, 107, 75, 0.1), transparent 32%),
    var(--surface-raised);
  box-shadow: 0 32px 80px rgba(13, 20, 16, 0.28);
}

.panel-modal__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(23, 32, 27, 0.11);
}

.panel-modal__head h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.panel-modal__close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

.model-default-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

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

.model-default-ranges {
  display: grid;
  gap: 12px;
}

.default-editor {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(28, 38, 32, 0.07);
}

.default-editor__stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(36, 107, 75, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, #faf8f2, #eef1ed);
  background-size: 28px 28px, auto;
}

.default-editor__door {
  position: relative;
  width: min(210px, 74%);
  aspect-ratio: 0.58 / 1;
  overflow: hidden;
  border: 14px solid rgba(23, 32, 27, 0.72);
  border-radius: 6px;
  background: #d6d8d3;
  box-shadow: 0 24px 36px rgba(23, 32, 27, 0.22);
}

.default-editor__texture,
.default-editor__model,
.default-editor__handle,
.default-editor__lock,
.default-editor__peephole {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.default-editor__texture {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.default-editor__model,
.default-editor__handle,
.default-editor__lock,
.default-editor__peephole {
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}

.default-editor__model {
  z-index: 2;
  pointer-events: none;
}

.default-editor__handle {
  z-index: 4;
  cursor: grab;
  touch-action: none;
  transform-origin: center center;
}

.default-editor__handle.is-dragging,
.default-editor__lock.is-dragging {
  cursor: grabbing;
}

.default-editor__lock {
  z-index: 3;
  cursor: grab;
  touch-action: none;
  transform-origin: center center;
}

.default-editor__peephole {
  z-index: 6;
  pointer-events: none;
}

.default-editor__meta {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, rgba(247, 250, 246, 0.92));
}

.default-editor__meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.15rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-range {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(23, 32, 27, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.panel-range span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.panel-range output {
  color: var(--green-deep);
  font-weight: 900;
}

.panel-range input {
  width: 100%;
  accent-color: var(--green);
}

.panel-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

body.modal-open {
  overflow: hidden;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(23, 32, 27, 0.32);
}

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .library-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-hero {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-copy h1 {
    font-size: clamp(1.85rem, 7.4vw, 2.55rem);
    line-height: 1.14;
    max-width: 420px;
  }

  .app-frame {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .sidebar {
    position: fixed;
    inset: 10px auto 10px 10px;
    z-index: 40;
    width: min(310px, calc(100vw - 20px));
    transform: translateX(calc(-100% - 18px));
    transition: transform 0.2s ease;
  }

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

  .menu-button {
    display: grid;
  }

  .content-shell {
    min-width: 0;
  }

  .settings-form--wide,
  .settings-option {
    grid-template-columns: 1fr;
  }

  .settings-option label {
    white-space: normal;
  }

  .dictionary-fields {
    grid-template-columns: 1fr;
  }

  .backup-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .login-body {
    display: block;
    padding: 10px;
  }

  .login-shell {
    width: 100%;
    border-radius: var(--radius);
  }

  .login-hero,
  .login-card {
    padding: 18px;
  }

  .login-copy h1 {
    font-size: clamp(1.75rem, 7.2vw, 2.35rem);
    max-width: 310px;
  }

  .login-checks {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-frame {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .panel-body {
    overflow: auto;
  }

  .content-shell {
    min-height: calc(100vh - 20px);
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar h1 {
    white-space: normal;
  }

  .configurator-link {
    width: 100%;
  }

  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .library-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-action {
    width: 100%;
  }

  .library-limit {
    width: 100%;
  }

  .stat-grid,
  .request-row,
  .library-category-grid {
    grid-template-columns: 1fr;
  }

  .design-request-grid,
  .detail-list,
  .request-summary-chips {
    grid-template-columns: 1fr;
  }

  .model-default-grid,
  .panel-modal__actions,
  .default-editor {
    grid-template-columns: 1fr;
  }

  .default-editor__stage {
    min-height: 320px;
  }

  .request-row > span,
  .request-row small {
    justify-self: start;
  }
}
