:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #fbfbfd;
  --text: #202430;
  --muted: #737987;
  --line: #e7e9f0;
  --brand: #ff7d98;
  --brand-strong: #ef5f80;
  --brand-soft: #fff0f4;
  --green: #0f9f6e;
  --green-soft: #e8f7f1;
  --amber: #b98200;
  --amber-soft: #fff5d9;
  --red: #d84b5f;
  --red-soft: #fff0f2;
  --blue: #3378d4;
  --blue-soft: #eef5ff;
  --shadow: 0 18px 45px rgba(29, 36, 58, 0.08);
  color-scheme: light;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  background: var(--bg);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 440px;
}

.login-visual {
  padding: 64px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #ff7d98 0%, #ffb067 58%, #82cfc1 100%);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.login-copy h1 {
  margin: 0 0 18px;
  max-width: 640px;
  font-size: 52px;
  line-height: 1.05;
}

.login-copy p {
  max-width: 620px;
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  opacity: 0.9;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
}

.metric-tile {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.metric-tile strong {
  display: block;
  font-size: 26px;
}

.metric-tile span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.86;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  background: #fff;
}

.login-card {
  width: 100%;
}

.eyebrow {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
}

.login-card h2 {
  margin: 12px 0 8px;
  font-size: 30px;
}

.login-card p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.7;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 13px;
  font-weight: 800;
  color: #3b4050;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--text);
  outline: none;
}

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

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 125, 152, 0.14);
}

.btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn.primary:hover {
  background: var(--brand-strong);
}

.btn.secondary {
  border-color: var(--line);
}

.btn.danger {
  color: var(--red);
  border-color: #f2b7c1;
  background: #fff;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #171b28;
  color: #f7f8fb;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 0 8px;
}

.sidebar-brand strong {
  display: block;
  font-size: 16px;
}

.sidebar-brand span {
  display: block;
  margin-top: 3px;
  color: #a7adbd;
  font-size: 12px;
}

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

.nav button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c5cada;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a7adbd;
  font-size: 12px;
  line-height: 1.6;
}

.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.page {
  padding: 28px;
}

.notice {
  border: 1px solid #ffe1aa;
  background: #fff9e9;
  color: #765001;
  border-radius: 8px;
  padding: 13px 15px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.two-col {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2 {
  margin: 0;
  font-size: 16px;
}

.card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-body {
  padding: 20px;
}

.stat {
  padding: 20px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 9px;
  font-size: 28px;
}

.stat small {
  display: block;
  margin-top: 8px;
  color: var(--green);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.table th {
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.pill.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

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

.toolbar input {
  width: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
}

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

.tabs button {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.tabs button.active {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
}

.dropzone {
  min-height: 220px;
  border: 1px dashed #f3a6b7;
  background: #fff8fa;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.dropzone strong {
  display: block;
  margin-bottom: 8px;
}

.dropzone span {
  color: var(--muted);
  font-size: 13px;
}

.preview-frame {
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: 640px;
  border-radius: 8px;
  background: #111521;
  overflow: hidden;
  position: relative;
}

.preview-frame video,
.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #b8bece;
  text-align: center;
  padding: 24px;
}

.video-list {
  display: grid;
  gap: 12px;
}

.video-row {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.thumb {
  width: 74px;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #eef0f5;
  overflow: hidden;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-row h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.video-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}

.empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
}

.audit-line {
  display: grid;
  grid-template-columns: 160px 1fr 130px;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.audit-line:last-child {
  border-bottom: 0;
}

.muted {
  color: var(--muted);
}

@media (max-width: 980px) {
  body {
    min-width: 0;
  }

  .login-shell,
  .app-shell,
  .two-col,
  .upload-layout,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .page,
  .topbar {
    padding-left: 18px;
    padding-right: 18px;
  }
}
