:root {
  color-scheme: dark;
  --bg:#0b1220;
  --bg-soft:#0f172a;
  --surface:rgba(255,255,255,.075);
  --surface-strong:rgba(255,255,255,.115);
  --surface-muted:rgba(255,255,255,.045);
  --modal-bg:#111827;
  --modal-bg-muted:#172033;
  --line:rgba(226,232,240,.16);
  --line-strong:rgba(226,232,240,.28);
  --text:#e8edf5;
  --text-strong:#ffffff;
  --muted:#a9b3c7;
  --primary:#3b82f6;
  --primary-hover:#2563eb;
  --danger:#ef4444;
  --success:#10b981;
  --warning:#f59e0b;
  --shadow:0 22px 70px rgba(0,0,0,.38);
  --radius:18px;
  --radius-sm:12px;
  --container:1160px;
  --font:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:#f6f8fc;
  --bg-soft:#eef2ff;
  --surface:#ffffff;
  --surface-strong:#ffffff;
  --surface-muted:#f8fafc;
  --modal-bg:#ffffff;
  --modal-bg-muted:#f8fafc;
  --line:#e3e9f3;
  --line-strong:#cdd8e8;
  --text:#111827;
  --text-strong:#030712;
  --muted:#64748b;
  --shadow:0 22px 70px rgba(15,23,42,.10);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: light;
    --bg:#f6f8fc;
    --bg-soft:#eef2ff;
    --surface:#ffffff;
    --surface-strong:#ffffff;
    --surface-muted:#f8fafc;
    --modal-bg:#ffffff;
    --modal-bg-muted:#f8fafc;
    --line:#e3e9f3;
    --line-strong:#cdd8e8;
    --text:#111827;
    --text-strong:#030712;
    --muted:#64748b;
    --shadow:0 22px 70px rgba(15,23,42,.10);
  }
}

* {
  box-sizing:border-box
}

html {
  min-height:100%
}

body {
  min-height:100%;
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--bg);
  background-image: radial-gradient(900px 520px at 12% -10%, rgba(59,130,246,.26), transparent 62%), radial-gradient(760px 500px at 112% 6%, rgba(16,185,129,.13), transparent 62%), radial-gradient(1000px 700px at 50% 110%, rgba(124,58,237,.15), transparent 60%);
  letter-spacing:.1px;
}

a {
  color:inherit;
  text-decoration:none
}

a:hover {
  text-decoration:none
}

button,input,textarea,select {
  font:inherit
}

button {
  cursor:pointer
}

img {
  max-width:100%;
  display:block
}

code,pre {
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace
}

pre {
  background:#0f172a;
  color:#e5e7eb;
  border:1px solid rgba(255,255,255,.10);
  padding:14px;
  border-radius:14px;
  overflow:auto
}

.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
}

.muted {
  color:var(--muted)
}

.eyebrow {
  color:var(--primary);
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.16em;
  margin-bottom:8px
}

.page {
  width:min(var(--container),calc(100vw - 32px));
  margin:28px auto 56px
}

.app-header {
  width:min(var(--container),calc(100vw - 32px));
  margin:14px auto 0;
  padding:12px;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}

.brand {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:max-content
}

.brand__mark {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--primary),#7c3aed);
  color:#fff;
  font-weight:900;
  box-shadow:0 14px 32px rgba(59,130,246,.25)
}

.brand__text {
  display:grid;
  line-height:1.1
}

.brand__text small {
  color:var(--muted);
  margin-top:3px
}

.nav {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center
}

.nav__link {
  padding:10px 12px;
  border-radius:12px;
  color:var(--muted);
  font-weight:700;
  border:1px solid transparent
}

.nav__link:hover {
  color:var(--text);
  background:var(--surface-muted);
  border-color:var(--line)
}

.theme-control {
  display:inline-flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
  font-size:.88rem;
  font-weight:700;
  color:var(--muted);
}

.theme-control select {
  min-height:40px;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-muted);
  color:var(--text);
  cursor:pointer;
}

.theme-control select:focus-visible {
  outline:2px solid var(--primary);
  outline-offset:2px;
}

.header-actions {
  margin-left:auto;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap
}

.inline-form {
  margin:0
}

.user-badge {
  color:var(--muted);
  font-weight:700;
  font-size:.92rem
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:9px 13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-muted);
  color:var(--text);
  font-weight:800;
  line-height:1;
  transition:.16s ease;
}

.btn:hover {
  background:var(--surface-strong);
  border-color:var(--line-strong);
  transform:translateY(-1px)
}

.btn:active {
  transform:translateY(0)
}

.btn--primary {
  background:var(--primary);
  border-color:transparent;
  color:#fff
}

.btn--primary:hover {
  background:var(--primary-hover);
  border-color:transparent
}

.btn--danger {
  background:var(--danger);
  border-color:transparent;
  color:#fff
}

.btn--danger:hover {
  filter:brightness(1.08);
  border-color:transparent
}

.btn--ghost {
  background:transparent
}

.btn--block {
  width:100%
}

.is-disabled {
  opacity:.48;
  pointer-events:none
}

.card,.tile,.data-row {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.card {
  padding:16px
}

.card__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px
}

.card__head h2 {
  margin:0;
  font-size:1.05rem
}

.hero,.section-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
  /* Align the heading block with the OUTER edges of the page cards.
     Do not offset it to the cards' internal text/padding. */
  padding-inline-start:0;
  margin:22px 0 20px
}

.hero h1,.section-head h1 {
  margin:0 0 8px;
  font-size:clamp(2rem,4vw,3.35rem);
  line-height:1.02;
  color:var(--text-strong);
  /* Compensate the visual left side-bearing of large, bold letters.
     Does not move the eyebrow, description or the heading layout box. */
  transform:translateX(-2px)
}

.section-head h1 {
  font-size:clamp(1.8rem,3vw,2.5rem)
}

.hero p,.section-head p {
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:1.02rem;
  line-height:1.55
}

.hero__stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px
}

.stat {
  min-width:116px;
  padding:14px;
  border-radius:16px;
  background:var(--surface);
  border:1px solid var(--line);
  text-align:center
}

.stat strong {
  display:block;
  font-size:1.45rem
}

.stat span {
  color:var(--muted);
  font-size:.86rem
}

.tile-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:16px
}

.tile {
  padding:18px;
  transition:.16s ease
}

.tile:hover {
  transform:translateY(-2px);
  border-color:rgba(59,130,246,.45)
}

.tile__icon {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:14px;
  background:rgba(59,130,246,.14);
  color:#8ec5ff;
  font-weight:900;
  margin-bottom:14px
}

.tile h2 {
  margin:0 0 8px;
  font-size:1.18rem
}

.tile p {
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.5
}

.chip-row {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center
}

.chip {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--surface-muted);
  border:1px solid var(--line);
  color:var(--muted);
  font-size:.86rem;
  font-weight:700
}

.chip--accent {
  background:rgba(59,130,246,.16);
  color:#93c5fd;
  border-color:rgba(59,130,246,.25)
}

.toolbar {
  margin-bottom:14px
}

.toolbar__main {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap
}

.search-field {
  flex:1;
  min-width:260px
}

.search-field input,.field input,.field textarea,.field select,.select-field select {
  width:100%;
  min-height:42px;
  border:1px solid var(--line);
  background:var(--surface-muted);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}

.field textarea {
  min-height:100px;
  resize:vertical
}

.search-field input:focus,.field input:focus,.field textarea:focus,.field select:focus,.select-field select:focus {
  border-color:rgba(59,130,246,.60);
  box-shadow:0 0 0 4px rgba(59,130,246,.14)
}

.field {
  display:block;
  margin-top: 10px;
  margin-bottom: 10px;
}

.field__label {
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
  color:var(--muted);
  font-size:.85rem;
  font-weight:800
}

.field__label b {
  color:var(--danger)
}

.field--full {
  grid-column:1/-1
}

.field--inline {
  margin:0;
  min-width:180px;
  flex:1
}

.select-field {
  display:block;
  min-width:150px
}

.form-card {
  display:grid;
  gap:16px
}

.form-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px
}

.form-grid--compact {
  grid-template-columns:repeat(4,1fr)
}

.form-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
  padding-top:8px;
  border-top:1px solid var(--line)
}

.filter-box {
  margin-top:12px
}

.filter-box>summary {
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border:1px dashed var(--line);
  border-radius:14px;
  color:var(--muted);
  font-weight:800
}

.filter-box>summary::-webkit-details-marker {
  display:none
}

.filter-box>div,.filter-box>.check-row {
  margin-top:12px
}

.check-row {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap
}

.checkline {
  display:inline-flex;
  gap:8px;
  align-items:center;
  color:var(--muted);
  font-weight:700;
  margin-top: 5px;
  margin-bottom: 5px
}

.checkline input,.check-card input {
  width:18px;
  height:18px;
  accent-color:var(--primary)
}

.check-row--cards {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr))
}

.check-card {
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--surface-muted);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  font-weight:800;
  color:var(--muted)
}

.list-meta {
  color:var(--muted);
  margin:10px 2px 12px;
  font-weight:700
}

.data-list {
  display:grid;
  gap:10px
}

.data-row {
  display:grid;
  grid-template-columns:130px 1fr 150px;
  gap:14px;
  align-items:center;
  padding:14px
}

.data-row__code {
  font-weight:900;
  font-variant-numeric:tabular-nums;
  color:#93c5fd
}

.data-row__main h2 {
  margin:0 0 5px;
  font-size:1.1rem
}

.data-row__main p {
  margin:0 0 10px;
  color:var(--muted);
  line-height:1.4
}

.data-row__side {
  display:grid;
  gap:10px;
  justify-items:end
}

.metric {
  display:flex;
  gap:6px;
  align-items:baseline
}

.metric strong {
  font-size:1.3rem
}

.metric small {
  color:var(--muted)
}

.pager {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin:18px 0
}

.empty {
  padding:22px;
  text-align:center;
  color:var(--muted)
}

.detail-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 370px;
  gap:16px
}

.detail-main,.detail-side {
  display:grid;
  align-content:start;
  gap:16px
}

.dropzone {
  display:grid;
  place-items:center;
  text-align:center;
  gap:4px;
  min-height:170px;
  border:1px dashed var(--line-strong);
  border-radius:16px;
  background:var(--surface-muted);
  color:var(--muted);
  transition:.16s ease
}

.dropzone:hover {
  border-color:rgba(59,130,246,.55);
  background:rgba(59,130,246,.08)
}

.dropzone strong {
  color:var(--text)
}

.upload-line {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:12px
}

.asset-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
  align-items:start
}

.asset-card {
  padding:0;
  overflow:hidden;
  width:100%;
  align-self:start
}

.asset-card__preview {
  width:100%;
  height:240px;
  min-height:240px;
  max-height:240px;
  overflow:hidden;
  background:#0f172a;
  display:grid;
  place-items:center;
  border-bottom:1px solid var(--line)
}

.asset-card__preview > img {
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center
}

.asset-card__preview--empty::after {
  content:'Нет превью';
  color:#94a3b8
}

.asset-card__body {
  padding:14px
}

.asset-card__body h3 {
  margin:0 0 4px
}

.action-row {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap
}

.kv-list {
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:8px 10px;
  margin:0
}

.kv-list dt {
  color:var(--muted);
  font-weight:700
}

.kv-list dd {
  margin:0;
  word-break:break-word
}

.table-card {
  padding:0;
  overflow:hidden;
  margin-top: 24px;
}

.table-card .card__head {
  padding:16px;
  margin:0;
  border-bottom:1px solid var(--line)
}

.table-wrap {
  overflow:auto
}

.table {
  width:100%;
  border-collapse:collapse
}

.table th,.table td {
  padding:12px 14px;
  text-align:left;
  border-bottom:1px solid var(--line);
  vertical-align:middle
}

.table th {
  color:var(--muted);
  font-size:.86rem;
  text-transform:uppercase;
  letter-spacing:.05em
}

.table tr:hover td {
  background:var(--surface-muted)
}

.alert {
  padding:12px 14px;
  border-radius:14px;
  margin:12px 0;
  border:1px solid var(--line);
  font-weight:800
}

.alert--danger {
  background:rgba(239,68,68,.14);
  border-color:rgba(239,68,68,.34);
  color:#fecaca
}

.alert--success {
  background:rgba(16,185,129,.14);
  border-color:rgba(16,185,129,.34);
  color:#bbf7d0
}




.auth-shell {
  width: min(980px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;

  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;

  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.auth-shell--visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-card--animated {
  width: 100%;
  max-width: 430px;
  justify-self: end;
  padding: 28px;

  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-card--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.auth-card:hover {
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.auth-tab:hover {
  color: var(--text);
  background: var(--surface);
}

.auth-tab--active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.24);
}

.auth-hint {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.auth-form {
  animation: authFormIn 0.28s ease both;
}

@keyframes authFormIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-form--submitting {
  opacity: 0.72;
  pointer-events: none;
}

.auth-form input {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.auth-form input:focus {
  transform: translateY(-1px);
}

.auth-form input.is-filled {
  border-color: rgba(16, 185, 129, 0.42);
}

.auth-submit {
  position: relative;
  overflow: hidden;
}

.auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.24),
    transparent
  );
  transform: translateX(-120%);
}

.auth-submit:hover::after {
  animation: authButtonShine 0.8s ease;
}

@keyframes authButtonShine {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(120%);
  }
}

.alert {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.alert--visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  font-weight: 900;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.auth-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-form {
  display: none;
  animation: authFormIn 0.28s ease both;
}

.auth-form--active {
  display: grid;
}

.modal {
  position:fixed;
  inset:0;
  z-index:50;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,6,23,.82);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px)
}

.modal.is-open {
  display:flex
}

.modal__box {
  width:min(960px,100%);
  max-height:92vh;
  overflow:auto;
  background:var(--modal-bg);
  border:1px solid var(--line-strong);
  border-radius:20px;
  box-shadow:var(--shadow);
  padding:16px
}

.modal__head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px
}

.modal__head h2 {
  margin:0
}

body.modal-open {
  overflow: hidden;
}

.modal__box--editor {
  width: min(1120px, 100%);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal__head--sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--modal-bg);
}

.modal__head--sticky h2 {
  margin-top: 3px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.modal__close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow: auto;
  background: var(--modal-bg);
}

.modal__section-head {
  margin-bottom: 14px;
}

.modal__section-head h3 {
  margin: 0;
}

.modal__parameters {
  margin-top: 18px;
}

.modal__checks {
  margin-top: 18px;
}

.modal__actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--modal-bg);
}

.modal__box--editor .field input,
.modal__box--editor .field textarea,
.modal__box--editor .field select,
.modal__box--editor .filter-box,
.modal__box--editor .check-card {
  background: var(--modal-bg-muted);
}

.toast {
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:100;
  max-width:min(420px,calc(100vw - 36px));
  padding:12px 14px;
  border-radius:14px;
  background:var(--text);
  color:var(--bg);
  font-weight:900;
  box-shadow:var(--shadow);
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:.18s ease
}

.toast.is-show {
  opacity:1;
  transform:translateY(0)
}

.tabs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px
}

.tab {
  border:1px solid var(--line);
  background:var(--surface-muted);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  font-weight:800
}

.tab.is-active {
  background:var(--primary);
  color:#fff;
  border-color:transparent
}

.tab-panel {
  display:none
}

.tab-panel.is-active {
  display:block
}

.docs-card h2 {
  margin-top:0
}

@media (max-width:980px) {
  .hero,.section-head {
    align-items:flex-start;
    flex-direction:column
  }

  .hero__stats {
    width:100%;
    grid-template-columns:repeat(3,1fr)
  }

  .form-grid,.form-grid--compact {
    grid-template-columns:1fr 1fr
  }

  .detail-grid {
    grid-template-columns:1fr
  }

  .data-row {
    grid-template-columns:110px 1fr
  }

  .data-row__side {
    grid-column:1/-1;
    display:flex;
    justify-content:space-between
  }

}

@media (max-width:680px) {
  .page,.app-header {
    width:min(100vw - 20px, var(--container))
  }

  .app-header {
    align-items:flex-start
  }

  .header-actions {
    width:100%;
    margin-left:0;
    justify-content:space-between
  }

  .nav {
    width:100%
  }

  .nav__link {
    flex:1;
    text-align:center
  }

  .hero__stats {
    grid-template-columns:1fr
  }

  .form-grid,.form-grid--compact {
    grid-template-columns:1fr
  }

  .data-row {
    grid-template-columns:1fr
  }

  .data-row__side {
    justify-items:start
  }

  .auth-shell {
    grid-template-columns:1fr
  }

  .auth-info {
    display:none
  }

  .toolbar__main {
    align-items:stretch
  }

  .search-field,.select-field,.toolbar__main .btn {
    width:100%
  }

  .kv-list {
    grid-template-columns:1fr
  }

  .table th:nth-child(4),.table td:nth-child(4) {
    display:none
  }

}

.status-badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface-muted);
  color:var(--muted);
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.035em;
  text-transform:uppercase;
  white-space:nowrap;
}

.status-badge::before {
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:currentColor;
  box-shadow:0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}

.status-badge--success,
.status-badge--active,
.status-badge--completed,
.status-badge--available {
  color:#6ee7b7;
  background:rgba(16,185,129,.11);
  border-color:rgba(16,185,129,.28);
}

.status-badge--warning,
.status-badge--pending,
.status-badge--paused,
.status-badge--pausing,
.status-badge--waiting,
.status-badge--created,
.status-badge--checking {
  color:#fcd34d;
  background:rgba(245,158,11,.11);
  border-color:rgba(245,158,11,.28);
}

.status-badge--danger,
.status-badge--failed,
.status-badge--cancelled,
.status-badge--cancelling,
.status-badge--deleted,
.status-badge--disabled {
  color:#fca5a5;
  background:rgba(239,68,68,.11);
  border-color:rgba(239,68,68,.28);
}

.status-badge--info,
.status-badge--uploading,
.status-badge--editor,
.status-badge--admin,
.status-badge--superadmin,
.status-badge--viewer {
  color:#93c5fd;
  background:rgba(59,130,246,.12);
  border-color:rgba(59,130,246,.28);
}

.toast-stack {
  position:fixed;
  top:18px;
  right:18px;
  z-index:250;
  width:min(420px,calc(100vw - 36px));
  display:grid;
  gap:10px;
  pointer-events:none;
}

.toast {
  position:relative;
  right:auto;
  bottom:auto;
  max-width:none;
  min-height:52px;
  display:grid;
  grid-template-columns:10px 1fr auto;
  align-items:center;
  gap:11px;
  padding:12px 12px 12px 14px;
  border:1px solid var(--line-strong);
  border-radius:15px;
  background:var(--modal-bg);
  color:var(--text);
  box-shadow:var(--shadow);
  opacity:0;
  transform:translateY(-10px) scale(.98);
  pointer-events:auto;
  transition:opacity .18s ease,transform .18s ease;
}

.toast.is-show {
  opacity:1;
  transform:translateY(0) scale(1);
}

.toast__dot {
  width:9px;
  height:9px;
  border-radius:50%;
  background:#93c5fd;
  box-shadow:0 0 0 4px rgba(59,130,246,.13);
}

.toast--success .toast__dot {
  background:#34d399;
  box-shadow:0 0 0 4px rgba(16,185,129,.13);
}

.toast--warning .toast__dot {
  background:#fbbf24;
  box-shadow:0 0 0 4px rgba(245,158,11,.13);
}

.toast--danger .toast__dot {
  background:#f87171;
  box-shadow:0 0 0 4px rgba(239,68,68,.13);
}

.toast__text {
  font-weight:800;
  line-height:1.35;
}

.toast__close {
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  font-size:1.25rem;
}

.toast__close:hover {
  color:var(--text);
  background:var(--surface-muted);
}

.icon-btn {
  width:32px;
  height:32px;
  display:inline-grid;
  place-items:center;
  padding:0;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--surface-muted);
  color:var(--muted);
  font-weight:900;
}

.icon-btn:hover {
  color:var(--text);
  border-color:var(--line-strong);
  background:var(--surface-strong);
}

.data-row__code-wrap {
  display:flex;
  align-items:center;
  gap:7px;
  align-self:start;
}

.summary-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0 0 16px;
}

.summary-card {
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface-muted);
}

.summary-card span {
  display:block;
  margin-bottom:5px;
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.summary-card strong {
  display:block;
  color:var(--text-strong);
  font-size:1.12rem;
  overflow-wrap:anywhere;
}

.asset-card__meta {
  display:grid;
  gap:7px;
  margin:10px 0 14px;
}

.asset-card__meta-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:.86rem;
}

.asset-card__meta-row strong {
  color:var(--text);
  text-align:right;
  overflow-wrap:anywhere;
}

.upload-item__transfer {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:5px;
  color:var(--muted);
  font-size:.82rem;
  font-weight:800;
}

.upload-item__transfer span {
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 7px;
  border-radius:8px;
  background:rgba(255,255,255,.035);
}

.dirty-indicator {
  display:none;
  align-items:center;
  gap:7px;
  color:#fcd34d;
  font-size:.84rem;
  font-weight:800;
}

.dirty-indicator.is-visible {
  display:inline-flex;
}

.dirty-indicator::before {
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#f59e0b;
}

.list-meta {
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:8px 2px 12px;
  color:var(--muted);
  font-size:.9rem;
}

.empty {
  display:grid;
  gap:6px;
  justify-items:center;
  text-align:center;
}

.empty strong {
  color:var(--text-strong);
  font-size:1.05rem;
}

.settings-kpis {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}

.settings-kpi {
  padding:12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:var(--surface-muted);
}

.settings-kpi span {
  display:block;
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
}

.settings-kpi strong {
  display:block;
  margin-top:4px;
  font-size:1.08rem;
}

.disk-ring--warning {
  --ring-color:var(--warning);
}

.disk-ring--danger {
  --ring-color:var(--danger);
}

.disk-ring {
  background:conic-gradient(
    var(--ring-color,var(--primary)) calc(var(--fill) * 1%),
    var(--surface-muted) 0
  ) !important;
}

@media (max-width:900px) {
  .summary-grid,
  .settings-kpis {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:560px) {
  .summary-grid,
  .settings-kpis {
    grid-template-columns:1fr;
  }

  .toast-stack {
    top:10px;
    right:10px;
    width:calc(100vw - 20px);
  }
}

.header-user {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:4px 8px 4px 5px;
  border:1px solid transparent;
  border-radius:13px;
  color:var(--text);
}

.header-user:hover {
  background:var(--surface-muted);
  border-color:var(--line);
}

.header-user__avatar,
.admin-user-avatar {
  display:grid;
  place-items:center;
  flex:0 0 auto;
  width:34px;
  height:34px;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,var(--primary),#7c3aed);
  font-weight:900;
  box-shadow:0 8px 20px rgba(59,130,246,.18);
}

.header-user__text {
  display:grid;
  min-width:0;
  line-height:1.12;
}

.header-user__text strong,
.header-user__text small {
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.header-user__text strong {
  font-size:.88rem;
}

.header-user__text small {
  margin-top:3px;
  color:var(--muted);
  font-size:.72rem;
}

.admin-pending-card,
.admin-create-card,
.admin-users-card {
  margin-top:24px;
}

.admin-pending-table {
  table-layout:fixed;
}

.admin-pending-table th:nth-child(1) { width:31%; }
.admin-pending-table th:nth-child(2) { width:22%; }
.admin-pending-table th:nth-child(3) { width:23%; }
.admin-pending-table th:nth-child(4) { width:24%; }

.admin-user-identity--compact {
  display:flex;
  align-items:center;
  gap:10px;
}

.admin-user-identity--compact > span:last-child {
  display:grid;
  gap:3px;
  min-width:0;
}

.admin-user-identity--compact strong,
.admin-user-identity--compact small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.admin-user-identity--compact small {
  color:var(--muted);
  font-size:.8rem;
}

.admin-empty-state {
  display:grid;
  justify-items:center;
  gap:6px;
  padding:28px 16px;
  text-align:center;
  color:var(--muted);
}

.admin-empty-state strong {
  color:var(--text-strong);
  font-size:1rem;
}

.admin-create-card .card__head {
  margin-bottom:4px;
}

.admin-create-card .card__head p {
  margin:5px 0 0;
}

.admin-create-grid {
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(190px,1.2fr) minmax(210px,1.25fr) minmax(145px,.7fr) auto;
  gap:12px;
  align-items:end;
}

.admin-create-grid .field {
  min-width:0;
  margin:0;
}

.admin-create-actions {
  display:flex;
  align-items:flex-end;
  min-height:42px;
}

.admin-create-actions .btn {
  min-height:42px;
  white-space:nowrap;
}

.password-control {
  position:relative;
  display:block;
}

.password-control input {
  padding-right:88px !important;
}

.password-control__toggle {
  position:absolute;
  top:50%;
  right:7px;
  min-height:30px;
  padding:5px 8px;
  transform:translateY(-50%);
  border:0;
  border-radius:8px;
  color:var(--muted);
  background:transparent;
  font-size:.78rem;
  font-weight:800;
}

.password-control__toggle:hover {
  color:var(--text);
  background:var(--surface-strong);
}

.admin-users-card {
  padding:0;
  overflow:visible;
}

.admin-users-card__head {
  margin:0;
  padding:16px;
  border-bottom:1px solid var(--line);
}

.admin-users-card__head h2,
.admin-users-card__head p {
  margin:0;
}

.admin-users-card__head p {
  margin-top:5px;
}

.presence-legend {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
}

.presence-legend span {
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.presence-dot {
  display:inline-block;
  flex:0 0 auto;
  width:10px;
  height:10px;
  border-radius:50%;
  background:#64748b;
  box-shadow:0 0 0 4px rgba(100,116,139,.12);
}

.presence-dot--online {
  background:#22c55e;
  box-shadow:0 0 0 4px rgba(34,197,94,.14),0 0 12px rgba(34,197,94,.45);
}

.presence-dot--recent {
  background:#f59e0b;
  box-shadow:0 0 0 4px rgba(245,158,11,.14);
}

.presence-dot--offline,
.presence-dot--never {
  background:#64748b;
  box-shadow:0 0 0 4px rgba(100,116,139,.12);
}

.admin-users-list {
  display:grid;
}

.admin-user-card {
  position:relative;
  display:grid;
  grid-template-columns:minmax(240px,1.45fr) minmax(180px,.8fr) minmax(155px,.7fr) auto;
  gap:18px;
  align-items:center;
  min-width:0;
  padding:16px;
  border-bottom:1px solid var(--line);
  background:transparent;
  transition:background .16s ease;
}

.admin-user-card:last-child {
  border-bottom:0;
}

.admin-user-card:hover {
  background:var(--surface-muted);
}

.admin-user-primary {
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
}

.admin-user-primary > .presence-dot {
  width:9px;
  height:9px;
}

.admin-user-identity {
  display:grid;
  gap:2px;
  min-width:0;
}

.admin-user-identity strong,
.admin-user-identity span,
.admin-user-identity small {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.admin-user-identity strong {
  color:var(--text-strong);
  font-size:.98rem;
}

.admin-user-identity span {
  color:var(--muted);
  font-size:.86rem;
}

.admin-user-identity small {
  color:var(--muted);
  opacity:.78;
  font-size:.73rem;
}

.admin-user-state {
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
}

.admin-user-activity {
  display:grid;
  gap:3px;
  min-width:0;
}

.admin-user-activity__label,
.admin-user-activity small {
  color:var(--muted);
  font-size:.73rem;
  font-weight:700;
}

.admin-user-activity time,
.admin-user-activity strong {
  color:var(--text);
  font-size:.9rem;
  font-weight:900;
  white-space:nowrap;
}

.admin-user-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.action-menu {
  position:relative;
}

.action-menu > summary {
  list-style:none;
}

.action-menu > summary::-webkit-details-marker {
  display:none;
}

.action-menu__trigger {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid var(--line);
  border-radius:12px;
  color:var(--text);
  background:var(--surface-muted);
  font-size:1.35rem;
  font-weight:900;
  cursor:pointer;
  user-select:none;
}

.action-menu__trigger:hover,
.action-menu[open] .action-menu__trigger {
  border-color:var(--line-strong);
  background:var(--surface-strong);
}

.action-menu__panel {
  position:absolute;
  top:calc(100% + 7px);
  right:0;
  z-index:30;
  display:grid;
  min-width:220px;
  padding:7px;
  border:1px solid var(--line-strong);
  border-radius:13px;
  background:var(--modal-bg);
  box-shadow:var(--shadow);
}

.action-menu__panel button,
.action-menu__hint {
  width:100%;
  padding:10px;
  border:0;
  border-radius:9px;
  text-align:left;
  color:var(--text);
  background:transparent;
  font-size:.86rem;
  font-weight:800;
}

.action-menu__panel button:hover {
  background:var(--surface-muted);
}

.action-menu__panel .action-menu__danger {
  color:#fca5a5;
}

.action-menu__panel .action-menu__danger:hover {
  background:rgba(239,68,68,.12);
}

.action-menu__hint {
  color:var(--muted);
  font-size:.76rem;
  line-height:1.35;
}

.admin-user-modal {
  width:min(700px,100%);
}

.admin-edit-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.admin-edit-grid .field {
  margin:0;
}

.admin-edit-grid .field__label small {
  color:var(--muted);
  font-weight:700;
}

@media (max-width:1050px) {
  .admin-create-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .admin-create-actions {
    grid-column:1/-1;
  }

  .admin-user-card {
    grid-template-columns:minmax(220px,1.4fr) minmax(170px,.8fr) auto;
  }

  .admin-user-activity {
    grid-column:2;
    grid-row:2;
  }

  .admin-user-actions {
    grid-column:3;
    grid-row:1 / span 2;
  }
}

@media (max-width:760px) {
  .header-user__text {
    display:none;
  }

  .admin-pending-table {
    min-width:720px;
    table-layout:auto;
  }

  .admin-users-card__head {
    align-items:flex-start;
    flex-direction:column;
  }

  .presence-legend {
    justify-content:flex-start;
  }

  .admin-user-card {
    grid-template-columns:1fr auto;
    gap:12px;
  }

  .admin-user-state,
  .admin-user-activity {
    grid-column:1;
  }

  .admin-user-activity {
    grid-row:auto;
  }

  .admin-user-actions {
    grid-column:2;
    grid-row:1 / span 3;
    align-self:center;
  }
}

@media (max-width:560px) {
  .admin-create-grid,
  .admin-edit-grid {
    grid-template-columns:1fr;
  }

  .admin-create-actions,
  .admin-create-actions .btn {
    width:100%;
  }

  .admin-user-card {
    grid-template-columns:1fr;
  }

  .admin-user-actions {
    grid-column:1;
    grid-row:auto;
    justify-content:flex-start;
  }

  .admin-user-actions > .btn {
    flex:1;
  }

  .action-menu__panel {
    right:auto;
    left:0;
  }
}

.hologram-list {
  display:grid;
  gap:14px;
}

.hologram-card {
  position:relative;
  display:grid;
  gap:18px;
  padding:20px 22px 18px 26px;
  border:1px solid var(--line);
  border-radius:19px;
  background:
    radial-gradient(circle at 100% 0,rgba(59,130,246,.08),transparent 30%),
    var(--surface);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}

.hologram-card::before {
  content:"";
  position:absolute;
  top:18px;
  bottom:18px;
  left:0;
  width:4px;
  border-radius:0 6px 6px 0;
  background:linear-gradient(180deg,#60a5fa,#6366f1);
  box-shadow:0 0 18px rgba(59,130,246,.35);
}

.hologram-card:hover {
  transform:translateY(-1px);
  border-color:var(--line-strong);
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}

.hologram-card:focus-visible {
  outline:2px solid rgba(96,165,250,.78);
  outline-offset:3px;
  border-color:rgba(96,165,250,.62);
}

.hologram-card__header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:start;
}

.hologram-card__identity {
  min-width:0;
}

.hologram-card__overline {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:9px;
}

.hologram-card__id {
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.04em;
}

.icon-btn--compact {
  width:28px;
  height:28px;
  border-radius:9px;
  font-size:.82rem;
}

.hologram-card__title-row {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

.hologram-card h2 {
  min-width:0;
  margin:0;
  overflow:hidden;
  color:var(--text-strong);
  font-size:clamp(1.18rem,1.8vw,1.48rem);
  line-height:1.24;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hologram-card__copy-name {
  flex:0 0 auto;
}

.hologram-card__description {
  display:-webkit-box;
  max-width:850px;
  margin:7px 0 0;
  overflow:hidden;
  color:var(--muted);
  line-height:1.48;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

.hologram-card__stats {
  display:grid;
  grid-template-columns:repeat(2,minmax(118px,1fr));
  gap:9px;
  min-width:270px;
}

.hologram-stat {
  display:grid;
  align-content:center;
  min-height:72px;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.035);
}

.hologram-stat strong {
  color:var(--text-strong);
  font-size:1.25rem;
  font-variant-numeric:tabular-nums;
  line-height:1.15;
}

.hologram-stat span {
  margin-top:4px;
  color:var(--muted);
  font-size:.76rem;
  font-weight:800;
}

.hologram-card__params {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;
  margin:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--line);
}

.hologram-param {
  min-width:0;
  padding:12px 14px;
  background:var(--surface-muted);
}

.hologram-param dt {
  margin:0 0 5px;
  color:var(--muted);
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.hologram-param dd {
  margin:0;
  overflow:hidden;
  color:var(--text);
  font-size:.9rem;
  font-weight:800;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hologram-param dd time,
.hologram-param dd span {
  color:inherit;
}

.hologram-card__footer {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding-top:2px;
}

.hologram-completeness {
  display:grid;
  gap:8px;
  min-width:0;
}

.hologram-completeness__label {
  color:var(--muted);
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.hologram-completeness__items {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.data-presence {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:28px;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background:rgba(255,255,255,.025);
  font-size:.75rem;
  font-weight:900;
}

.data-presence__dot {
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:#64748b;
  box-shadow:0 0 0 3px rgba(100,116,139,.13);
}

.data-presence.is-present {
  border-color:rgba(52,211,153,.28);
  color:#a7f3d0;
  background:rgba(16,185,129,.09);
}

.data-presence.is-present .data-presence__dot {
  background:#34d399;
  box-shadow:0 0 0 3px rgba(52,211,153,.14);
}

.data-presence.is-missing {
  opacity:.72;
}

.hologram-card__actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
}

.hologram-card__creator {
  max-width:190px;
  overflow:hidden;
  color:var(--muted);
  font-size:.78rem;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hologram-card__open-hint {
  color:#bfdbfe;
  font-size:.82rem;
  font-weight:900;
  white-space:nowrap;
  transition:transform .16s ease,color .16s ease;
}

.hologram-card:hover .hologram-card__open-hint {
  color:#dbeafe;
  transform:translateX(2px);
}

.hologram-card button,
.hologram-card input,
.hologram-card label,
.hologram-card form {
  cursor:auto;
}

.hologram-card button,
.hologram-card input,
.hologram-card label {
  cursor:pointer;
}

.hologram-card__menu .action-menu__panel {
  min-width:205px;
}

.hologram-card__menu form {
  margin:0;
}

@media (max-width:900px) {
  .hologram-card__header {
    grid-template-columns:1fr;
  }

  .hologram-card__stats {
    width:100%;
    min-width:0;
  }

  .hologram-card__params {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .hologram-card__footer {
    align-items:flex-start;
    flex-direction:column;
  }

  .hologram-card__actions {
    width:100%;
    justify-content:flex-start;
  }
}

@media (max-width:590px) {
  .hologram-card {
    gap:14px;
    padding:17px 15px 16px 20px;
    border-radius:16px;
  }

  .hologram-card::before {
    top:14px;
    bottom:14px;
  }

  .hologram-card__stats,
  .hologram-card__params {
    grid-template-columns:1fr;
  }

  .hologram-stat {
    min-height:62px;
  }

  .hologram-card__actions .btn {
    flex:1;
  }

  .hologram-card__creator {
    width:100%;
    max-width:none;
  }
}

.toolbar--filters {
  padding:16px;
}

.filter-primary {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}

.filter-primary .search-field {
  min-width:0;
  margin:0;
}

.filter-primary .search-field input {
  min-height:44px;
}

.filter-primary__submit { white-space:nowrap; }

.filter-toolbar-row {
  display:flex;
  gap:14px;
  align-items:end;
  flex-wrap:wrap;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.filter-toolbar-field {
  display:grid;
  gap:6px;
  min-width:0;
  color:var(--muted);
  font-weight:750;
  font-size:.8rem;
}

.filter-toolbar-field select {
  min-height:39px;
  min-width:210px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface-muted);
  color:var(--text);
  font:inherit;
  font-size:.9rem;
}

.filter-toolbar-field--page-size select { min-width:160px; }

.filter-box--compact {
  margin-top:12px;
}

.filter-box--compact > summary {
  min-height:50px;
  justify-content:flex-start;
  position:relative;
  padding:13px 46px 13px 15px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:14px;
  background:rgba(255,255,255,.045);
  color:var(--text);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}

.filter-box--compact > summary:hover {
  border-color:rgba(96,165,250,.48);
  background:rgba(59,130,246,.10);
  box-shadow:0 0 0 3px rgba(59,130,246,.08),inset 0 1px 0 rgba(255,255,255,.06);
}

.filter-box--compact > summary:focus-visible {
  outline:2px solid rgba(96,165,250,.78);
  outline-offset:3px;
}

.filter-box--compact[open] > summary {
  border-color:rgba(96,165,250,.56);
  background:rgba(59,130,246,.14);
  box-shadow:0 0 0 3px rgba(59,130,246,.08),inset 3px 0 0 #60a5fa;
}

.filter-box--compact > summary::after {
  content:'⌄';
  position:absolute;
  right:15px;
  top:50%;
  color:#bfdbfe;
  font-size:1.25rem;
  font-weight:900;
  line-height:1;
  transform:translateY(-55%);
  transition:transform .16s ease,color .16s ease;
}

.filter-box--compact[open] > summary::after {
  color:#fff;
  transform:translateY(-40%) rotate(180deg);
}

.filter-summary__main {
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--text);
}

.filter-summary__hint {
  margin-left:auto;
  padding-right:12px;
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
}

.filter-count {
  display:inline-grid;
  place-items:center;
  min-width:23px;
  height:23px;
  padding:0 7px;
  border:1px solid rgba(59,130,246,.35);
  border-radius:999px;
  background:rgba(59,130,246,.17);
  color:var(--text);
  font-size:.74rem;
  font-weight:900;
}

.filter-count--muted {
  min-width:21px;
  height:21px;
  background:var(--surface-muted);
  border-color:var(--line);
  color:var(--muted);
}

.compact-filter-content {
  display:grid;
  gap:12px;
  margin-top:12px;
}

.compact-filter-section {
  padding:2px 0;
}

.compact-filter-section--divider {
  border-top:1px solid var(--line);
  padding-top:14px;
}

.compact-filter-heading {
  margin:0 0 12px;
  color:var(--text);
  font-size:.9rem;
  font-weight:800;
}

.compact-filter-grid {
  display:grid;
  gap:12px;
}

.compact-filter-grid--main {
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.compact-filter-grid--technical {
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.field--compact-filter,
.range-field {
  min-width:0;
  margin:0;
}

.field--compact-filter input,
.field--compact-filter select,
.range-control input {
  width:100%;
  min-width:0;
  min-height:39px;
  border:1px solid var(--line);
  background:var(--surface-muted);
  color:var(--text);
  border-radius:11px;
  padding:8px 10px;
  outline:none;
}

.field--compact-filter input:focus,
.field--compact-filter select:focus,
.range-control input:focus {
  border-color:rgba(59,130,246,.60);
  box-shadow:0 0 0 3px rgba(59,130,246,.12);
}

.range-control {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:7px;
  align-items:center;
}

.range-control__separator {
  color:var(--muted);
  font-weight:900;
}

.filter-toggle-row {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.filter-toggle {
  position:relative;
  display:inline-flex;
  cursor:pointer;
}

.filter-toggle input {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.filter-toggle span {
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:7px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-muted);
  color:var(--muted);
  font-size:.8rem;
  font-weight:850;
  transition:.16s ease;
}

.filter-toggle span::before {
  content:'';
  width:7px;
  height:7px;
  margin-right:7px;
  border-radius:50%;
  background:#64748b;
  box-shadow:0 0 0 3px rgba(100,116,139,.13);
}

.filter-toggle input:checked + span {
  border-color:rgba(59,130,246,.40);
  background:rgba(59,130,246,.15);
  color:var(--text);
}

.filter-toggle input:checked + span::before {
  background:#60a5fa;
  box-shadow:0 0 0 3px rgba(96,165,250,.15);
}

.filter-toggle input:focus-visible + span {
  outline:2px solid rgba(96,165,250,.70);
  outline-offset:2px;
}

.hologram-card__actions > form {
  margin:0;
}

@media (max-width:1120px) {
  .compact-filter-grid--main { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:780px) {
  .compact-filter-grid--technical { grid-template-columns:1fr; }
  .filter-summary__hint { display:none; }
}

@media (max-width:560px) {
  .toolbar--filters { padding:12px; }
  .filter-primary, .compact-filter-grid--main { grid-template-columns:1fr; }
  .filter-primary__submit { width:100%; }
  .filter-toolbar-row { display:grid; grid-template-columns:1fr; }
  .filter-toolbar-field select { width:100%; min-width:0; }
  .range-control--dates { grid-template-columns:1fr; }
  .range-control--dates .range-control__separator { display:none; }
  .filter-toggle-row { display:grid; grid-template-columns:1fr; }
  .filter-toggle span { justify-content:center; width:100%; }
}

.active-filters {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:12px 0 14px;
}

.active-filters__title {
  color:var(--muted);
  font-size:.83rem;
  font-weight:750;
}

.active-filter-chip {
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:32px;
  padding:5px 9px 5px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-muted);
  color:var(--text);
  font-size:.8rem;
  font-weight:750;
  text-decoration:none;
  max-width:100%;
}

.active-filter-chip:hover,
.active-filter-chip:focus-visible {
  border-color:var(--accent, #60a5fa);
  color:var(--text);
}

.active-filter-chip span:first-child { overflow-wrap:anywhere; }
.active-filter-chip__close { font-size:1.15rem; line-height:1; color:var(--muted); }
.active-filters__clear { font-size:.83rem; color:var(--muted); font-weight:750; }

.filter-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding-top:4px;
}

.hologram-bulk-actions[hidden] {
  display:none !important;
}

.hologram-bulk-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:24px;
  row-gap:12px;
  width:100%;
  margin:4px 0 30px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  transition:border-color .16s ease,background .16s ease;
}

.hologram-bulk-actions.has-selection {
  border-color:rgba(248,113,113,.35);
  background:rgba(127,29,29,.12);
}

.hologram-bulk-actions__summary {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  flex-wrap:wrap;
  color:var(--text);
  font-size:.9rem;
  font-weight:800;
}

.hologram-bulk-actions__count strong {
  color:var(--text-strong);
  font-variant-numeric:tabular-nums;
}

.hologram-bulk-actions [hidden] {
  display:none !important;
}

.hologram-bulk-actions__buttons {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}

.hologram-card__select {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:4px 9px;
  border:1px solid var(--line);
  border-radius:10px;
  color:var(--muted);
  background:rgba(255,255,255,.025);
  cursor:pointer;
  font-size:.75rem;
  font-weight:900;
  user-select:none;
  transition:border-color .16s ease,background .16s ease,color .16s ease;
}

.hologram-card__select:hover {
  border-color:var(--line-strong);
  color:var(--text);
  background:rgba(255,255,255,.05);
}

.hologram-card__select input {
  width:16px;
  height:16px;
  margin:0;
  accent-color:#3b82f6;
  cursor:pointer;
}

.hologram-card__select:has(input:checked) {
  border-color:rgba(96,165,250,.55);
  color:#bfdbfe;
  background:rgba(59,130,246,.14);
}

.hologram-card.is-selected {
  border-color:rgba(96,165,250,.62);
  background:
    radial-gradient(circle at 100% 0,rgba(59,130,246,.15),transparent 34%),
    var(--surface);
  box-shadow:0 14px 34px rgba(37,99,235,.15);
}

.hologram-card.is-selected::before {
  background:linear-gradient(180deg,#93c5fd,#3b82f6);
  box-shadow:0 0 20px rgba(59,130,246,.55);
}

@media (max-width:590px) {
  .hologram-bulk-actions {
    grid-template-columns:1fr;
    align-items:stretch;
    margin-bottom:24px;
  }

  .hologram-bulk-actions__buttons {
    width:100%;
    justify-content:flex-start;
  }

  .hologram-bulk-actions__buttons .btn {
    flex:1;
  }
}

/* Header stays compact on wide screens; on narrow screens navigation occupies its own row. */
.app-header {
  display:grid;
  grid-template-columns:max-content minmax(0,1fr) max-content;
  gap:12px;
  align-items:center;
}
.app-header .nav {
  min-width:0;
  flex-wrap:nowrap;
  gap:2px;
  justify-content:center;
}
.app-header .nav__link { white-space:nowrap; padding:9px 10px; }
.app-header .header-actions {
  margin-left:0;
  justify-self:end;
  width:auto;
  flex-wrap:nowrap;
  white-space:nowrap;
}
@media (max-width:1120px) {
  .app-header { grid-template-columns:minmax(0,1fr) auto; }
  .app-header .brand { grid-column:1; grid-row:1; }
  .app-header .header-actions { grid-column:2; grid-row:1; }
  .app-header .nav {
    grid-column:1/-1;
    grid-row:2;
    width:100%;
    justify-content:flex-start;
    overflow-x:auto;
  }
  .app-header .nav__link { flex:0 0 auto; }
}
@media (max-width:540px) {
  .app-header .header-actions > .status-badge { display:none; }
}
