:root {
  --ink: #07142f;
  --muted: #647184;
  --line: #e5eaf2;
  --soft: #f7f9fc;
  --brand: #061f63;
  --brand-2: #5a28d6;
  --orange: #ff6b00;
  --warn: #f59e0b;
  --danger: #dc2626;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 18px 55px rgba(7, 20, 47, 0.1);
  --shadow-soft: 0 10px 26px rgba(7, 20, 47, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f9fc;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
}

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

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, #061744, var(--brand) 56%, var(--brand-2));
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 38px rgba(7, 20, 47, 0.18);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mark {
  width: 94px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--white);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5px;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 21px;
  line-height: 1.1;
}

.brand p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 34px;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 18px;
}

.sidebar,
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.sidebar {
  padding: 10px;
  align-self: start;
  position: sticky;
  top: 86px;
}

.nav-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 10px 12px;
  font-weight: 800;
}

.nav-btn.active {
  background: linear-gradient(135deg, #eef3ff, #f5f0ff);
  color: var(--brand);
}

.content {
  display: grid;
  gap: 18px;
}

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

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

.two.tight {
  gap: 8px;
  align-items: end;
}

.card {
  padding: 18px;
}

.card h2,
.card h3,
.metric strong {
  margin: 0;
}

.card h2 {
  font-size: 21px;
}

.card h3 {
  font-size: 16px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

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

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

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

.item {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.media-item {
  align-content: start;
}

.media-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--soft);
  border: 1px solid var(--line);
}

.check-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.item-title {
  font-weight: 900;
  font-size: 15px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: var(--radius);
  padding: 5px 9px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.pill.good {
  background: #eef3ff;
  color: var(--brand);
}

.pill.warn {
  background: #fffbeb;
  color: #92400e;
}

.pill.danger {
  background: #fef2f2;
  color: var(--danger);
}

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

.actions.compact {
  justify-content: flex-end;
  max-width: 420px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.btn {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  padding: 9px 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(6, 31, 99, 0.14);
}

.btn.secondary {
  background: #eef3fb;
  color: var(--ink);
  box-shadow: none;
}

.btn.danger {
  background: #fef2f2;
  color: var(--danger);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.text-btn {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 6px 0;
  text-align: left;
  font-weight: 900;
}

.support-link {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

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

.field label {
  font-size: 12px;
  font-weight: 900;
  color: #344054;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  padding: 10px 11px;
  color: var(--ink);
  background: var(--white);
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input[type="file"],
.file-input {
  min-height: 0;
  padding: 6px;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
}

.field input[type="file"]::file-selector-button,
.file-input::file-selector-button {
  min-height: 34px;
  margin-right: 8px;
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #eef3ff;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.access-editor {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.password-toggle {
  min-width: 64px;
  text-align: center;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(7, 20, 47, 0.9), rgba(6, 31, 99, 0.8), rgba(90, 40, 214, 0.5)),
    url("https://images.unsplash.com/photo-1556745757-8d76bdb6984b?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
}

.login {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.22);
}

.login-hero {
  padding: 28px;
  background: linear-gradient(135deg, #061744, #0b3bb3 58%, var(--brand-2));
  color: var(--white);
  display: grid;
  align-content: space-between;
  min-height: 520px;
}

.login-hero .mark {
  width: 270px;
  height: 104px;
  padding: 8px;
  margin-bottom: 18px;
}

.login-hero h1 {
  font-size: 42px;
  margin: 0 0 10px;
}

.login-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  line-height: 1.5;
}

.login-panel {
  padding: 28px;
  display: grid;
  align-content: center;
  gap: 18px;
}

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

.notice {
  border: 1px solid #d7def0;
  background: #f7f9fc;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.empty {
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.table-like {
  display: grid;
  gap: 8px;
}

.split-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

@media (max-width: 860px) {
  .layout,
  .login {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-btn {
    white-space: nowrap;
    text-align: center;
    flex: 0 0 auto;
  }

  .grid,
  .two {
    grid-template-columns: 1fr;
  }

  .topbar-inner,
  .layout {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .split-actions,
  .password-control {
    grid-template-columns: 1fr;
  }

  .mark {
    width: 90px;
    height: 54px;
  }

  .login-hero {
    min-height: 300px;
  }

  .login-hero .mark {
    width: 220px;
    max-width: 100%;
    height: 86px;
  }
}
