:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #233730;
  background: #f5f6f2;
  font-synthesis: none;
  --bg: #f5f6f2;
  --panel: #fff;
  --text: #233730;
  --muted: #7d8982;
  --line: #e6eae4;
  --accent: #226b53;
  --soft: #edf4ed;
  --danger: #b64e4a;
  --sidebar: #173e33;
  --shadow: 0 12px 48px #193d3214;
  --safe-top: 0px;
  --safe-bottom: 0px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #6ab897;
  outline-offset: 3px;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 15px;
}
small {
  font-size: 12px;
}
svg.icon {
  width: 19px;
  height: 19px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
button .icon {
  width: 17px;
  height: 17px;
}
button,
.button {
  border: 0;
  background: none;
  border-radius: 8px;
}
.button,
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}
.btn:hover,
.button:hover {
  background: var(--soft);
  text-decoration: none;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.primary:hover {
  background: #19563f;
  border-color: #19563f;
}
.danger {
  color: var(--danger);
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.small {
  padding: 7px 10px;
  min-height: 33px;
  font-size: 12px;
}
.icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 8px;
}
.icon-btn:hover {
  background: var(--soft);
}
.muted {
  color: var(--muted);
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  background: var(--sidebar);
  color: #c8d7cb;
  display: flex;
  flex-direction: column;
  padding: 30px 18px;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f5f7ec;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.7px;
  padding: 0 10px;
  margin-bottom: 8px;
}
.brand img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  border-radius: 50%;
}
.brand-note {
  font-size: 10px;
  letter-spacing: 1.9px;
  text-transform: uppercase;
  color: #88ab96;
  padding: 0 10px;
  margin: 0 0 40px 45px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #80a38d;
  margin: 22px 12px 9px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #bdcfc1;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
  min-height: 44px;
}
.nav-item:hover {
  background: #ffffff08;
  text-decoration: none;
}
.nav-item.active {
  background: #e3edbe;
  color: #244933;
  font-weight: 600;
}
.nav-count {
  margin-left: auto;
  font-size: 10px;
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 1px 5px;
  opacity: 0.65;
}
.sidebar {
  overflow-y: auto;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 30px;
}
.sidebar-status {
  margin: 0 10px 22px;
  padding-top: 18px;
  border-top: 1px solid #ffffff16;
  font-size: 11px;
  color: #92b19e;
  display: flex;
  gap: 7px;
  align-items: center;
}
.dot {
  width: 6px;
  height: 6px;
  background: #91bd78;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ffffff16;
  padding: 16px 8px 0;
}
.avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #e1ebc5;
  color: #305538;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.profile-name {
  font-size: 12px;
  color: #edf2e8;
  max-width: 125px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile small {
  display: block;
  color: #88a993;
  margin-top: 3px;
  font-size: 10px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  background: var(--panel);
  gap: 12px;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.breadcrumbs strong {
  font-weight: 500;
  color: var(--text);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.top-actions .separator {
  height: 22px;
  width: 1px;
  background: var(--line);
  margin: 0 6px;
}
.mobile-menu {
  display: none;
}
.main {
  padding: 32px 38px 60px;
  max-width: 1600px;
  margin: auto;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}
.page-title p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 9px;
  line-height: 1.5;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.stat-top .icon {
  width: 17px;
  height: 17px;
}
.stat-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 18px 0 8px;
}
.stat-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-meta strong {
  color: var(--accent);
  font-weight: 500;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(275px, 1fr);
  gap: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 17px;
}
.panel-head small {
  color: var(--muted);
  margin-top: 5px;
  display: block;
  font-size: 11px;
}
.panel-body {
  padding: 0 22px 22px;
}
.stack {
  display: grid;
  gap: 20px;
  align-content: start;
}
.schedule-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.schedule-row:last-child {
  border-bottom: 0;
}
.schedule-time {
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  padding: 9px;
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}
.schedule-text {
  flex: 1;
  min-width: 0;
}
.schedule-text strong {
  font-size: 12px;
  font-weight: 550;
}
.schedule-text small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: var(--muted);
}
.segment {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.5px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 4px 6px;
  border-radius: 5px;
  display: inline-flex;
}
.note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 17px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.note strong {
  color: var(--text);
  font-weight: 550;
}
.panel .note {
  margin: 0 22px 22px;
}
.quick-card {
  display: flex;
  gap: 15px;
  align-items: center;
  background: #e8eecf;
  border: 1px solid #d8e2ba;
  border-radius: 12px;
  padding: 21px;
  color: #344b2c;
}
.quick-card > .icon {
  width: 30px;
  height: 30px;
}
.quick-card h3 {
  margin-bottom: 6px;
}
.quick-card p {
  font-size: 12px;
  line-height: 1.6;
}
.quick-card .btn {
  margin-top: 13px;
  background: #f8faed;
  border-color: #cdd9b5;
  color: #3b5330;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  flex-wrap: wrap;
}
.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px;
  background: var(--panel);
  gap: 3px;
}
.tabs button {
  padding: 7px 13px;
  font-size: 12px;
  min-height: 33px;
  color: var(--muted);
}
.tabs button.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 600;
}
.search-input {
  position: relative;
}
.search-input .icon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.search-input input {
  width: 235px;
  padding: 10px 12px 10px 35px;
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
.selection-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 15px;
  margin-bottom: 16px;
  font-size: 12px;
}
.selection-bar span {
  flex: 1;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 500;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  white-space: nowrap;
}
td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: color-mix(in srgb, var(--soft) 40%, transparent);
}
td:last-child {
  text-align: right;
}
td.title-cell {
  min-width: 160px;
  max-width: 320px;
}
.cell-title {
  font-size: 12px;
  font-weight: 550;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 290px;
}
.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  white-space: nowrap;
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
}
.badge {
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1;
  border-radius: 5px;
  white-space: nowrap;
  background: var(--soft);
  color: var(--muted);
}
.badge.green {
  color: #417448;
  background: #edf3e9;
}
.badge.amber {
  color: #a17a26;
  background: #fbf4dd;
}
.badge.blue {
  color: #428192;
  background: #eaf4f5;
}
.badge.red {
  color: #b45550;
  background: #faeae7;
}
.badge.grey {
  background: var(--bg);
  color: var(--muted);
}
.check-cell {
  width: 35px;
  padding-right: 0;
}
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  cursor: pointer;
  vertical-align: middle;
}
.empty {
  padding: 58px 24px;
  text-align: center;
  max-width: 470px;
  margin: auto;
}
.empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 14px;
  margin: 0 auto 17px;
  color: var(--accent);
}
.empty-icon .icon {
  width: 24px;
  height: 24px;
}
.empty h3 {
  font-size: 16px;
  margin-bottom: 9px;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.entity-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.entity-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 19px;
}
.entity-icon {
  background: var(--soft);
  color: var(--accent);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.entity-card h3 {
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.entity-card .subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.entity-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 8px;
  margin: 23px 0;
  font-size: 11px;
}
.entity-card dt {
  color: var(--muted);
}
.entity-card dd {
  margin: 0;
  text-align: right;
}
.entity-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: auto;
  gap: 5px;
}
.entity-card .note {
  margin: 0 0 20px;
  font-size: 11px;
}
.text-error {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
}
.error-banner {
  padding: 12px 16px;
  background: #faeae7;
  color: #9a433e;
  border: 1px solid #efd0ca;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 18px;
}
.error-banner:empty {
  display: none;
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  margin-top: 24px;
}
.mobile-nav {
  display: none;
}
.mobile-shade {
  display: none;
}
.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  width: min(570px, calc(100vw - 30px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
dialog::backdrop {
  background: #122a266b;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 19px;
}
.dialog-body {
  padding: 24px;
  display: grid;
  gap: 18px;
}
.dialog-foot {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 550;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 13px;
  min-height: 43px;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.field small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.checkbox-field span {
  flex: 1;
}
.checkbox-field small {
  color: var(--muted);
  font-size: 10px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 18px;
  min-width: 0;
}
legend {
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 10px;
}
.form-error:empty {
  display: none;
}
.form-error {
  margin: 0 24px 20px;
  padding: 12px;
  border-radius: 7px;
  background: #faeae7;
  color: #a44f49;
  font-size: 12px;
  line-height: 1.6;
}
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.detail-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-value {
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.dialog-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: #173e33;
  color: #eef4e8;
  padding: 13px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 12px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  max-width: calc(100vw - 40px);
  text-align: center;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%);
}
.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-art {
  position: relative;
  background: #173e33;
  color: #f3f5e8;
  padding: 55px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-art .brand {
  padding: 0;
  margin: 0;
}
.login-art-main {
  padding: 60px 0;
  max-width: 480px;
  position: relative;
  z-index: 1;
}
.login-art-main h1 {
  font-size: 55px;
  line-height: 1.1;
  letter-spacing: -2.5px;
  font-weight: 550;
}
.login-art-main p {
  font-size: 15px;
  color: #abc3b3;
  line-height: 1.8;
  margin-top: 25px;
  max-width: 355px;
}
.login-foot {
  font-size: 11px;
  color: #7eaa91;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.film-block {
  display: grid;
  grid-template-columns: repeat(3, 68px);
  gap: 8px;
  transform: rotate(-14deg);
  position: absolute;
  right: -45px;
  bottom: 110px;
  opacity: 0.13;
}
.film-block span {
  height: 100px;
  border: 1px solid #d9edb4;
  border-radius: 11px;
  background: #c9df9e;
}
.film-block span:nth-child(2n) {
  transform: translateY(35px);
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  background: var(--bg);
}
.login-box {
  width: 100%;
  max-width: 360px;
}
.login-box .entity-icon {
  margin-bottom: 25px;
  width: 48px;
  height: 48px;
}
.login-box h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
}
.login-box > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 15px 0 27px;
}
.login-box > .btn {
  width: 100%;
  min-height: 48px;
  font-size: 13px;
}
.login-box .note {
  margin-top: 20px;
}
.login-box .login-copy {
  font-size: 11px;
  margin-top: 23px;
  color: var(--muted);
  line-height: 1.8;
}
.login-error {
  margin: 18px 0;
  font-size: 12px;
  color: var(--danger);
  line-height: 1.7;
}
.login-mark {
  display: none;
}
[hidden] {
  display: none !important;
}
[data-theme="dark"] {
  --bg: #151719;
  --panel: #1d2024;
  --text: #e7e9ed;
  --muted: #8d959f;
  --line: #30353c;
  --accent: #bec9d5;
  --soft: #272d34;
  --sidebar: #191c20;
  --shadow: 0 16px 60px #0006;
  color: var(--text);
  background: var(--bg);
}
[data-theme="dark"] .primary {
  background: #c6d0db;
  color: #18202a;
  border-color: #c6d0db;
}
[data-theme="dark"] .primary:hover {
  background: #e1e6ec;
  border-color: #e1e6ec;
}
[data-theme="dark"] .nav-item {
  color: #a6aeb9;
}
[data-theme="dark"] .nav-item.active {
  background: #323a44;
  color: #f0f3f6;
}
[data-theme="dark"] .nav-label {
  color: #727d8b;
}
[data-theme="dark"] .brand {
  color: #eef0f4;
}
[data-theme="dark"] .brand-note {
  color: #788492;
}
[data-theme="dark"] .sidebar-status {
  color: #8c98a6;
  border-top-color: #31373f;
}
[data-theme="dark"] .profile {
  border-top-color: #31373f;
}
[data-theme="dark"] .profile-name {
  color: #d8dce3;
}
[data-theme="dark"] .profile small {
  color: #818c9a;
}
[data-theme="dark"] .avatar {
  background: #363f4c;
  color: #dce3ed;
}
[data-theme="dark"] .quick-card {
  background: #252b33;
  border-color: #363e48;
  color: #d9dfe7;
}
[data-theme="dark"] .quick-card .btn {
  background: #343d48;
  border-color: #485361;
  color: #e3e8ef;
}
[data-theme="dark"] .badge.green {
  background: #25382f;
  color: #9dbdab;
}
[data-theme="dark"] .badge.amber {
  background: #3b3528;
  color: #c9b78b;
}
[data-theme="dark"] .badge.blue {
  background: #293644;
  color: #9db5d0;
}
[data-theme="dark"] .badge.red,
[data-theme="dark"] .form-error,
[data-theme="dark"] .error-banner {
  background: #3e2b2d;
  color: #dbacac;
  border-color: #59393c;
}
[data-theme="dark"] .login-art {
  background: #191d22;
  color: #e5e9ee;
}
[data-theme="dark"] .login-art-main p {
  color: #949eab;
}
[data-theme="dark"] .login-foot {
  color: #8693a2;
}
[data-theme="dark"] .film-block span {
  border-color: #b9c6d5;
  background: #9baec3;
}
[data-theme="dark"] #toast {
  background: #d0d8e2;
  color: #1d2630;
}
[data-theme="dark"] .dot {
  background: #9cae9f;
}
@media (min-width: 1550px) {
  .main {
    padding-top: 40px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 2fr) 360px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    width: 200px;
    padding: 26px 12px;
  }
  .brand {
    font-size: 16px;
  }
  .brand-note {
    font-size: 8px;
    margin-left: 46px;
  }
  .main {
    padding: 28px 25px 50px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-grid > .stack {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  th,
  td {
    padding-left: 15px;
    padding-right: 15px;
  }
  .breadcrumbs > span:first-child {
    display: none;
  }
  .login-art {
    padding: 40px;
  }
  .login-art-main h1 {
    font-size: 45px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
    padding-top: var(--safe-top);
  }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    padding-top: calc(25px + var(--safe-top));
    width: 250px;
    bottom: 0;
  }
  .menu-open .sidebar {
    transform: translateX(0);
  }
  .menu-open .mobile-shade {
    display: block;
    position: fixed;
    inset: 0;
    background: #0e26165c;
    z-index: 29;
  }
  .workspace {
    min-width: 0;
  }
  .topbar {
    height: 66px;
    padding: 0 18px;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .breadcrumbs {
    font-size: 12px;
    gap: 7px;
    margin-right: auto;
  }
  .breadcrumbs > span {
    display: none;
  }
  .top-actions {
    gap: 4px;
  }
  .top-actions > .btn {
    display: none;
  }
  .top-actions .separator {
    display: none;
  }
  .top-actions > .muted {
    display: none;
  }
  .main {
    padding: 25px 18px calc(100px + var(--safe-bottom));
  }
  .page-title {
    align-items: flex-start;
    margin-bottom: 22px;
  }
  .page-title h1 {
    font-size: 26px;
  }
  .page-title p {
    font-size: 12px;
    max-width: 290px;
    margin-top: 7px;
  }
  .page-title > .btn {
    font-size: 0;
    min-width: 40px;
    width: 40px;
    padding: 10px;
  }
  .page-title > .btn .icon {
    width: 18px;
    height: 18px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin-bottom: 20px;
  }
  .stat {
    padding: 16px;
    border-radius: 10px;
  }
  .stat-top {
    font-size: 11px;
  }
  .stat-value {
    font-size: 28px;
    margin: 13px 0 8px;
  }
  .stat-meta {
    font-size: 10px;
  }
  .dashboard-grid {
    gap: 18px;
  }
  .dashboard-grid > .stack {
    grid-template-columns: 1fr;
  }
  .panel-head {
    padding: 18px;
  }
  .panel-body {
    padding: 0 18px 18px;
  }
  .panel .note {
    margin: 0 18px 18px;
  }
  .panel-head h2 {
    font-size: 15px;
  }
  .panel-head > .btn {
    font-size: 11px;
  }
  .toolbar {
    gap: 12px;
    align-items: stretch;
  }
  .toolbar-left,
  .toolbar-right {
    gap: 8px;
  }
  .toolbar-right {
    flex: 1;
    justify-content: flex-end;
  }
  .search-input {
    flex: 1;
  }
  .search-input input {
    width: 100%;
    min-width: 130px;
  }
  .tabs button {
    padding: 7px 11px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .entity-card {
    padding: 20px;
  }
  .entity-card dl {
    margin: 19px 0;
  }
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 8px 9px calc(8px + var(--safe-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 25;
  }
  .mobile-nav button {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    padding: 5px 1px;
    font-size: 9px;
    color: var(--muted);
    min-height: 43px;
  }
  .mobile-nav button.active {
    color: var(--accent);
    background: var(--soft);
  }
  .mobile-nav .icon {
    width: 19px;
    height: 19px;
  }
  .footer-meta {
    font-size: 9px;
    gap: 12px;
  }
  .table-wrap {
    overflow: visible;
  }
  table,
  thead,
  tbody {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
    gap: 8px 10px;
    position: relative;
  }
  tbody tr:last-child {
    border-bottom: 0;
  }
  td {
    border: 0;
    padding: 0;
    min-width: 0;
    font-size: 11px;
  }
  td.title-cell {
    max-width: none;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }
  .cell-title {
    max-width: 100%;
    font-size: 12px;
  }
  .cell-sub {
    max-width: 100%;
    font-size: 10px;
  }
  td[data-label]:not(.title-cell):not(.row-control)::before {
    content: attr(data-label) " · ";
    color: var(--muted);
    font-size: 10px;
  }
  td:last-child {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }
  .row-actions {
    flex-direction: column;
    gap: 4px;
  }
  .row-actions .icon-btn {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
  }
  .row-actions .btn {
    min-height: 34px;
  }
  .check-cell {
    position: absolute;
    left: 17px;
    top: 18px;
    width: 18px;
  }
  .has-check tbody tr {
    padding-left: 46px;
  }
  .check-cell input {
    margin: 0;
  }
  .selection-bar {
    flex-wrap: wrap;
    padding: 12px;
    font-size: 11px;
    gap: 7px;
  }
  .selection-bar > span {
    flex-basis: 100%;
  }
  .selection-bar .btn {
    flex: 1;
    font-size: 11px;
  }
  .empty {
    padding: 38px 22px;
  }
  .empty h3 {
    font-size: 15px;
  }
  .empty p {
    font-size: 12px;
  }
  .login-page {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
  }
  .login-art {
    padding: 25px 25px 30px;
    min-height: 230px;
  }
  .login-art .brand {
    font-size: 16px;
  }
  .login-art-main {
    padding: 30px 0 0;
    max-width: 350px;
  }
  .login-art-main h1 {
    font-size: 32px;
    letter-spacing: -1px;
    line-height: 1.13;
  }
  .login-art-main p {
    font-size: 12px;
    margin-top: 15px;
    line-height: 1.7;
    max-width: 290px;
  }
  .login-foot {
    display: none;
  }
  .film-block {
    bottom: 15px;
    right: -55px;
    opacity: 0.08;
  }
  .login-form {
    flex: 1;
    padding: 35px 26px 42px;
    align-items: flex-start;
  }
  .login-box {
    max-width: 420px;
  }
  .login-box h2 {
    font-size: 25px;
  }
  .login-box .entity-icon {
    display: none;
  }
  .login-box > p {
    margin: 12px 0 22px;
  }
  .login-box .note {
    font-size: 11px;
  }
  dialog {
    max-height: calc(100dvh - 25px - var(--safe-top) - var(--safe-bottom));
    width: calc(100vw - 24px);
    border-radius: 13px;
  }
  .dialog-head {
    padding: 18px 20px;
  }
  .dialog-head h2 {
    font-size: 18px;
  }
  .dialog-body {
    padding: 20px;
    gap: 17px;
  }
  .dialog-foot {
    padding: 16px 20px;
  }
  .form-error {
    margin: 0 20px 18px;
  }
  .details {
    gap: 17px;
  }
  .detail-value {
    font-size: 12px;
  }
  #toast {
    bottom: calc(88px + var(--safe-bottom));
    font-size: 11px;
    width: max-content;
  }
  .btn,
  .button {
    min-height: 42px;
  }
  .field-row {
    gap: 11px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .field small {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

[data-theme="dark"] {
  --accent: #aec7de;
}
[data-theme="dark"] .primary {
  background: #bed0e0;
  border-color: #bed0e0;
  color: #15212d;
}
[data-theme="dark"] .primary:hover {
  background: #d3e1ed;
  border-color: #d3e1ed;
}
[data-theme="dark"] .menu-open .mobile-shade {
  background: #080a0d88;
}
[data-theme="dark"] dialog::backdrop {
  background: #06080bb3;
}
.shell {
  padding-top: var(--safe-top);
}
.login-page {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.sidebar-close {
  display: none;
}
@media (max-width: 760px) {
  .sidebar {
    visibility: hidden;
  }
  .menu-open .sidebar {
    visibility: visible;
  }
  .sidebar-close {
    display: inline-flex;
    position: absolute;
    right: 8px;
    top: calc(22px + var(--safe-top));
    min-width: 30px;
    min-height: 30px;
  }
}

.storage-meter {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--border, #34373d);
  border-radius: 12px;
  background: #202226;
  color: #c9cbd0;
}
.storage-meter > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 6px;
}
.storage-meter span {
  font-size: 12px;
  line-height: 1.6;
}
.storage-meter meter {
  width: 140px;
  height: 12px;
  accent-color: #74b9e8;
}
.storage-meter meter::-webkit-meter-bar {
  background: #363940;
  border: 0;
}
.storage-meter meter::-webkit-meter-optimum-value {
  background: #74b9e8;
}
.storage-warning {
  background: #321e23;
  border-color: #a64b57;
  color: #ffb4be;
}
.storage-warning meter::-webkit-meter-optimum-value {
  background: #ed667b;
}
.storage-warning meter {
  accent-color: #ed667b;
}
.library-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 24px 0;
}
.run-source {
  padding: 0 24px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 760px) {
  .storage-meter {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
  }
  .storage-meter > div {
    flex-basis: 100%;
  }
  .storage-meter meter {
    flex: 1;
  }
  .panel-head {
    flex-wrap: wrap;
    gap: 12px;
  }
}
