/* 页作 · 清透产品风 */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --bg: #eef2f7;
  --bg-2: #e7edf5;
  --paper: #ffffff;
  --ink: #1a2332;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --accent-2: #2563eb;
  --danger: #e11d48;
  --shadow: 0 10px 30px rgba(26, 35, 50, 0.06);
  --radius: 18px;
  --font: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.studio {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(15, 118, 110, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(37, 99, 235, 0.07), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.studio-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

/* Login */
body.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(700px 360px at 20% 10%, rgba(15, 118, 110, 0.12), transparent 60%),
    radial-gradient(600px 320px at 90% 80%, rgba(37, 99, 235, 0.1), transparent 55%),
    #eef2f7;
}

.login-stage {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--paper);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(26, 35, 50, 0.12);
  animation: fadeUp 0.55s ease both;
}

.login-brand {
  padding: 48px 40px;
  background:
    linear-gradient(155deg, #0b3d3a 0%, #0f766e 48%, #1d4ed8 120%);
  color: #fff;
  position: relative;
}

.login-brand .mega {
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.login-brand .mega span {
  display: block;
  opacity: 0.9;
  font-size: 0.55em;
  font-weight: 600;
  margin-top: 10px;
  letter-spacing: 0.08em;
}
.login-brand .sub {
  margin-top: 20px;
  max-width: 300px;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
}
.login-brand .stamp {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  display: grid;
  place-items: center;
  font-size: 11px;
  text-align: center;
  line-height: 1.3;
  color: rgba(255,255,255,0.85);
  transform: rotate(-12deg);
}

.login-panel { padding: 44px 36px; }
.login-panel h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.login-panel .hint-line {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.btn-login {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.3);
}

.login-error {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  color: var(--danger);
  font-size: 13px;
}
.login-default {
  margin-top: 22px;
  padding: 14px;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.login-default strong { color: var(--accent); }

/* Top nav */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 12px 14px 12px 16px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s ease both;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-lockup .mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0f766e, #14b8a6);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}
.brand-lockup .word {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-lockup .word small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.nav-links a, .nav-links button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links button:hover,
.nav-links a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.dash-hero {
  padding: 32px 30px;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.95), rgba(255,255,255,0.78)),
    linear-gradient(135deg, #ccfbf1, #dbeafe);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  animation: fadeUp 0.5s 0.05s ease both;
}
.dash-hero .eyebrow {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.dash-hero h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
  max-width: 14ch;
}
.dash-hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.dash-hero p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 520px;
}

.toolbar-brutal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--paper);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(26, 35, 50, 0.03);
  animation: fadeUp 0.5s 0.08s ease both;
}
.stats-brutal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.stats-brutal strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}
.btn-ghost {
  background: #f1f5f9;
  color: var(--ink);
}
.btn-danger {
  background: #fff1f2;
  color: var(--danger);
}
.btn-sm { padding: 7px 12px; font-size: 12px; }

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.page-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(26, 35, 50, 0.03);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.45s ease both;
}
.page-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.page-card .page-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2px 0 8px;
}
.page-card .page-date {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}
.page-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-actions .btn-edit { background: var(--accent); color: #fff; }
.page-actions .btn-preview { background: #eff6ff; color: var(--accent-2); }
.page-actions .btn-export { background: #ecfdf5; color: var(--accent); }
.page-actions .btn-copy { background: #f8fafc; color: var(--muted); border: 1px solid var(--line); }
.page-actions .btn-delete { background: #fff1f2; color: var(--danger); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 72px 24px;
  background: rgba(255,255,255,0.7);
  border: 1px dashed var(--line);
  border-radius: 24px;
}
.empty-icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 22px;
}
.empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; font-size: 14px; }

.media-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.media-head h1 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.media-head h1 span { color: var(--accent); }
.media-head p {
  color: var(--muted);
  max-width: 480px;
  font-size: 14px;
  line-height: 1.6;
}
.media-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.media-folders {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  position: sticky;
  top: 12px;
}
.folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}
.folder-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.folder-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.folder-item:hover { background: #f8fafc; color: var(--ink); }
.folder-item.active {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}
.folder-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-count {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}
.folder-ops {
  display: none;
  gap: 4px;
}
.folder-item:hover .folder-ops,
.folder-item.active .folder-ops { display: inline-flex; }
.linkish {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  font-family: inherit;
}
.linkish.danger { color: #e11d48; }
.folder-tip {
  margin: 12px 2px 2px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}
.media-main { min-width: 0; }
.media-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.media-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(26, 35, 50, 0.03);
  animation: fadeUp 0.4s ease both;
}
.media-card .thumb {
  aspect-ratio: 1;
  background: #f1f5f9;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.media-card:hover .thumb img { transform: scale(1.04); }
.media-card .meta { padding: 12px; }
.media-card .name {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  margin-bottom: 0;
  min-height: 2.2em;
}
.folder-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.media-card .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.media-empty {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255,255,255,0.6);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.4);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.show { display: flex; }
.modal-sheet {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}
.modal-sheet h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
}
.modal-sheet .hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: #94a3b8;
}
.modal-sheet select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 16px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 860px) {
  .media-layout { grid-template-columns: 1fr; }
  .media-folders { position: static; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .login-stage { grid-template-columns: 1fr; }
  .login-brand { min-height: 220px; }
  .topnav { flex-direction: column; align-items: stretch; }
}
