:root {
  color-scheme: light;
  --page: #f4f6fa;
  --sidebar: #08111f;
  --sidebar-2: #0d1b2d;
  --active: #132844;
  --surface: #ffffff;
  --line: #edf0f5;
  --line-2: #dfe5ee;
  --text: #1f2937;
  --muted: #8a94a6;
  --blue: #1677ff;
  --green: #52c41a;
  --gold: #faad14;
  --red: #ff4d4f;
  --shadow: 0 12px 32px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

body.sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.35);
  outline-offset: 2px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #d7e2ef;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 10px 20px;
}

.brand {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: #fff;
}

.brand span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #1677ff;
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 20px;
}

.brand small {
  color: #7f94b0;
  font-size: 11px;
}

nav {
  display: grid;
  gap: 3px;
}

nav button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #b6c4d7;
  cursor: pointer;
  text-align: left;
}

.nav-leaf,
.nav-parent {
  height: 40px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 650;
  transition: background 140ms ease, color 140ms ease;
}

.nav-leaf span,
.nav-parent span {
  display: grid;
  place-items: center;
  color: #7f94b0;
  font-size: 13px;
}

.nav-section {
  margin: 18px 10px 7px;
  color: #61748f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-child {
  position: relative;
  height: 36px;
  display: none;
  border-radius: 8px;
  color: #91a2ba;
  padding: 0 12px 0 48px;
  font-size: 13px;
}

.nav-child::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38506e;
  transform: translateY(-50%);
}

.nav-parent i {
  color: #607796;
  font-style: normal;
  transition: transform 140ms ease;
}

.nav-group.open .nav-child {
  display: block;
}

.nav-group.open .nav-parent i {
  transform: rotate(180deg);
}

nav button:hover,
nav button.active {
  background: var(--active);
  color: #fff;
}

nav button:hover span,
nav button.active span {
  color: #fff;
}

.nav-child.active::before {
  background: #1677ff;
}

body.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

body.sidebar-collapsed .brand div,
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .nav-parent i,
body.sidebar-collapsed .nav-child {
  display: none;
}

body.sidebar-collapsed .nav-leaf,
body.sidebar-collapsed .nav-parent {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

body.sidebar-collapsed .nav-leaf,
body.sidebar-collapsed .nav-parent {
  font-size: 0;
}

body.sidebar-collapsed .nav-leaf span,
body.sidebar-collapsed .nav-parent span {
  font-size: 14px;
}

body.sidebar-collapsed nav {
  gap: 8px;
}

main {
  min-width: 0;
}

.auth-screen {
  grid-template-columns: 1fr;
}

.auth-screen .sidebar,
.auth-screen .topbar {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 22px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #eef1f6;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-left strong,
.topbar-left span {
  display: block;
}

.topbar-left strong {
  color: #111827;
  font-size: 14px;
  line-height: 18px;
}

.topbar-left span {
  color: #8a94a6;
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  cursor: pointer;
}

.icon-button:hover {
  background: #f3f5f9;
}

.admin-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0c9a0;
  color: #5f3418;
  font-weight: 800;
}

.admin-profile {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #edf1f7;
  border-radius: 999px;
  background: #fff;
  padding: 0 12px 0 4px;
}

.content {
  padding: 24px;
}

.page-card {
  min-height: calc(100vh - 100px);
  padding: 24px;
  border: 1px solid #edf1f7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.04);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 420px;
  align-items: center;
  gap: 44px;
  padding: clamp(32px, 5vw, 70px);
  background: #f3f6fb;
}

.login-stage {
  min-height: 590px;
  display: flex;
  align-items: center;
}

.login-mark,
.login-card-head {
  display: flex;
  align-items: center;
}

.login-mark {
  gap: 12px;
  color: #fff;
}

.login-mark span,
.login-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #1677ff;
  color: #fff;
  font-weight: 900;
}

.login-preview {
  width: min(760px, 100%);
  min-height: 500px;
  display: grid;
  grid-template-columns: 168px 1fr;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(16, 24, 40, 0.14);
}

.login-preview aside {
  display: grid;
  align-content: start;
  gap: 14px;
  background: #07111f;
  padding: 22px 18px;
}

.login-preview aside i {
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.login-preview aside i:nth-of-type(1) {
  margin-top: 28px;
  background: rgba(22, 119, 255, 0.24);
}

.login-workbench {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  background: #f7f9fc;
}

.login-workbench header {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6ebf2;
}

.login-workbench header small,
.login-kpis span,
.login-table-preview span {
  display: block;
  color: #8a94a6;
  font-size: 12px;
}

.login-workbench header strong {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 22px;
}

.login-workbench header > span {
  border-radius: 999px;
  background: #e8f3ff;
  color: #1677ff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
}

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

.login-kpis div {
  min-height: 110px;
  display: grid;
  align-content: end;
  gap: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.login-kpis strong {
  color: #111827;
  font-size: 24px;
  line-height: 28px;
}

.login-table-preview {
  display: grid;
  gap: 10px;
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.login-table-preview div {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr 74px 110px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #edf1f7;
}

.login-table-preview div:last-child {
  border-bottom: 0;
}

.login-table-preview strong {
  color: #1f2937;
  font-size: 14px;
}

.login-table-preview em {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1677ff 64%, #edf2f7 64%);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  justify-self: center;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.1);
  padding: 32px;
  animation: login-in 260ms ease-out both;
}

.login-card-head {
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf1f7;
}

.login-card-head strong,
.login-card-head span {
  display: block;
}

.login-card-head strong {
  color: #111827;
  font-size: 22px;
  line-height: 26px;
}

.login-card-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.login-card label,
.account-form label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 650;
}

.login-card input,
.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}

.account-form input,
.account-form select {
  height: 40px;
  padding: 0 10px;
}

.account-form textarea {
  min-height: 78px;
  resize: vertical;
  padding: 10px;
  font: inherit;
}

.login-card input {
  height: 46px;
  border-radius: 9px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-card input:hover,
.login-card input:focus {
  border-color: rgba(22, 119, 255, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.08);
}

.login-submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border-radius: 9px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.2);
}

.form-message {
  border-radius: 8px;
  background: #fff1f0;
  color: #cf1322;
  padding: 10px 12px;
}

.login-hint {
  color: var(--muted);
  font-size: 12px;
}

@keyframes login-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  line-height: 30px;
  letter-spacing: 0;
}

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

.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.danger {
  border-color: #ffd2d2;
  color: #cf1322;
  background: #fff7f7;
}

.btn.compact {
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
}

.btn.icon-only {
  width: 28px;
  padding: 0;
  font-weight: 700;
}

.btn.ghost {
  background: #fff;
}

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

.stat {
  min-height: 100px;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.stat span {
  display: block;
  color: #9299a8;
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
}

.stat small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stat.blue strong {
  color: var(--blue);
}

.stat.gold strong {
  color: var(--gold);
}

.stat.green strong {
  color: var(--green);
}

.stat.red strong {
  color: var(--red);
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 18px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 22px 14px;
}

.filters select,
.filters input {
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: #6b7280;
}

.filters input {
  width: min(360px, 100%);
}

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

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th {
  color: #343b48;
  font-size: 13px;
  font-weight: 650;
  background: #fff;
}

td {
  color: #2f3744;
}

td .muted {
  color: var(--muted);
  font-size: 12px;
}

tbody tr:hover {
  background: #fafcff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf7e8;
  color: #389e0d;
  font-size: 12px;
}

.tag.review,
.tag.pending,
.tag.queued,
.tag.mock {
  background: #fff7e6;
  color: #d48806;
}

.tag.failed,
.tag.inactive,
.tag.disabled,
.tag.banned {
  background: #fff1f0;
  color: #cf1322;
}

.empty-state {
  height: 150px;
  display: grid;
  place-items: center;
  color: #9ca3af;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.ops-panel {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.ops-panel h2,
.drawer h2,
.modal h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 17px;
  line-height: 24px;
}

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

.funnel div {
  min-height: 100px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-radius: 12px;
  background: #f7f9fc;
  padding: 14px;
}

.funnel span,
.todo span,
.detail-grid dt,
.mini-list span {
  color: var(--muted);
  font-size: 12px;
}

.funnel strong {
  color: #111827;
  font-size: 26px;
  font-weight: 600;
}

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

.todo {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
}

.todo:hover {
  border-color: var(--blue);
  background: #f7fbff;
}

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

.sort-input {
  width: 70px;
  height: 30px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 0 8px;
}

.thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f2f4f8;
  object-fit: cover;
  color: var(--muted);
  font-size: 12px;
}

.resource-board {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.resource-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 20px 22px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #7b8798;
  font-size: 12px;
  font-weight: 700;
}

.resource-hero h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  line-height: 28px;
}

.resource-hero p {
  max-width: 560px;
  margin: 10px 0 0;
  color: #667085;
  line-height: 22px;
}

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

.resource-summary div {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.resource-summary span {
  color: #8a94a6;
  font-size: 12px;
}

.resource-summary strong {
  color: #111827;
  font-size: 24px;
  line-height: 28px;
}

.resource-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-right: 20px;
}

.resource-toolbar .filters {
  padding: 16px 20px;
}

.resource-count {
  color: #667085;
  white-space: nowrap;
}

.resource-count strong {
  color: #111827;
}

.resource-list {
  display: grid;
}

.resource-item {
  min-height: 124px;
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) 276px;
  gap: 18px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.resource-item:first-child {
  border-top: 0;
}

.resource-item:hover {
  background: #fafcff;
}

.resource-media {
  position: relative;
  width: 152px;
  height: 92px;
  border: 0;
  border-radius: 12px;
  background: #f2f4f8;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.resource-order {
  position: absolute;
  left: 8px;
  top: 8px;
  min-width: 34px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.resource-main {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.resource-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.resource-title strong {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-subtitle {
  color: #344054;
  font-weight: 600;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.resource-meta span {
  height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f6fa;
  color: #5f6b7a;
  padding: 0 9px;
  font-size: 12px;
}

.resource-id {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-ops {
  display: grid;
  gap: 8px;
  justify-self: stretch;
  align-self: stretch;
  border-left: 1px solid #edf1f7;
  padding-left: 18px;
}

.resource-ops label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.ops-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ops-row > span {
  color: #667085;
  font-size: 12px;
}

.ops-status {
  border-bottom: 1px solid #edf1f7;
  padding-bottom: 8px;
}

.ops-sort {
  min-height: 40px;
}

.ops-sort label {
  flex: 1;
}

.move-buttons,
.ops-secondary {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ops-secondary {
  justify-content: flex-end;
}

.account-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.account-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}

.account-form h2 {
  margin: 0;
  font-size: 17px;
}

.permission-grid {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.permission-grid input {
  width: auto;
  height: auto;
}

.perm-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin: 0 5px 5px 0;
  border-radius: 999px;
  background: #f3f6fa;
  color: #5f6b7a;
  padding: 0 9px;
  font-size: 12px;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(460px, 100vw);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid var(--line-2);
  background: #fff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.14);
  padding: 22px;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.drawer-head p {
  margin: 0;
}

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

.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fafcff;
}

.detail-grid dd {
  margin: 5px 0 0;
  color: #111827;
}

.drawer h3 {
  margin: 18px 0 10px;
  font-size: 14px;
}

.mini-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.mini-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.45);
  padding: 24px;
}

.modal {
  width: min(820px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.variant-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 0;
  padding: 0;
}

.variant-form .btn {
  grid-column: 1 / -1;
}

.variant-config-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.variant-config-section h3 {
  margin: 0;
  font-size: 14px;
}

.variant-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.variant-brand-grid .wide {
  grid-column: 1 / -1;
}

.variant-config-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.variant-config-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(220px, 1fr) 120px;
  gap: 8px;
  align-items: center;
}

.resource-config-list .variant-config-row {
  grid-template-columns: minmax(180px, 1.3fr) 110px 90px 90px;
}

.variant-config-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-stage {
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
  margin-bottom: 16px;
}

.preview-stage video,
.preview-stage img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .login-stage {
    min-height: 0;
  }

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

  .overview-grid,
  .funnel,
  .resource-hero {
    grid-template-columns: 1fr 1fr;
  }

  .resource-item {
    grid-template-columns: 128px minmax(0, 1fr);
  }

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

  .resource-media {
    width: 128px;
    height: 84px;
  }

  .resource-ops {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #edf1f7;
    padding: 14px 0 0;
  }
}

@media (max-width: 760px) {
  body {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding: 18px;
  }

  .login-stage {
    display: none;
  }

  .login-card {
    padding: 24px;
    border-radius: 18px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .content {
    padding: 14px;
  }

  .page-card {
    padding: 16px;
  }

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

  .overview-grid,
  .funnel,
  .detail-grid,
  .resource-hero,
  .resource-summary {
    grid-template-columns: 1fr;
  }

  .resource-item {
    grid-template-columns: 1fr;
  }

  .resource-media {
    width: 100%;
    height: 190px;
  }

  .resource-ops {
    grid-template-columns: 1fr;
  }

  .ops-row,
  .ops-secondary {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-row > .btn,
  .ops-secondary .btn {
    width: 100%;
  }

  .move-buttons {
    width: 100%;
  }

  .move-buttons .btn {
    flex: 1;
  }

  .filters,
  .page-head,
  .resource-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-toolbar {
    padding-right: 0;
  }
}
