:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --text: #202733;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #155eef;
  --soft: #eff4ff;
  --dark: #111827;
  --ok: #067647;
  --warn: #b54708;
  --shadow: 0 12px 28px rgba(17, 24, 39, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: var(--bg); }
.login-panel { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 12px; }
.login-panel h1 { margin: 0; font-size: 24px; }
.login-panel p { margin: 0 0 4px; color: var(--muted); line-height: 1.55; }
.app { min-height: 100vh; display: grid; grid-template-columns: 282px 1fr; }
aside { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--dark); color: #f9fafb; padding: 22px; }
aside h1 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; }
aside p { margin: 0 0 20px; color: #cbd5e1; font-size: 13px; line-height: 1.55; }
nav { display: grid; gap: 7px; margin-bottom: 18px; }
nav button { min-height: 42px; border-radius: 8px; background: transparent; color: #dbe4ef; text-align: left; padding: 0 12px; }
nav button.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 650; }
.side-card { border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.06); padding: 14px; display: grid; gap: 8px; }
.side-card span { color: #cbd5e1; font-size: 13px; }
.side-card strong { font-size: 24px; }
main { padding: 22px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.topbar h2 { margin: 0 0 6px; font-size: 25px; line-height: 1.2; }
.topbar p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.btn { min-height: 38px; padding: 0 13px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--text); white-space: nowrap; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 650; }
.btn.dark { background: #1f2937; border-color: #1f2937; color: #fff; }
.btn.ok { background: #ecfdf3; border-color: #abefc6; color: var(--ok); }
.grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { padding: 16px 17px 13px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-head span { color: var(--muted); font-size: 13px; }
.panel-body { padding: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
input, textarea, select { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: #fff; color: var(--text); outline: none; }
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.list { display: grid; gap: 12px; }
.card, .task, .asset, .log { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.card { padding: 14px; display: grid; gap: 9px; }
.card h4 { margin: 0; font-size: 15px; }
.card p { margin: 0; color: #475467; font-size: 13px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tag, .status { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 8px; background: #f2f4f7; color: #475467; font-size: 12px; }
.tag.warn { background: #fff7ed; color: var(--warn); }
.status.approved { background: #ecfdf3; color: var(--ok); }
.status.running { background: #eff8ff; color: #175cd3; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.asset { overflow: hidden; min-width: 0; }
.thumb { height: 112px; background: #edf1f7; display: grid; place-items: center; color: #64748b; font-size: 13px; overflow: hidden; text-align: center; padding: 8px; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-info { padding: 10px; display: grid; gap: 7px; }
.asset-title { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-zone { border: 1px dashed #a8b3c5; border-radius: 8px; background: #fbfcfe; padding: 18px; display: grid; gap: 12px; justify-items: start; }
.ratio-row { display: grid; grid-template-columns: 110px 1fr 52px; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 10px; }
.bar { height: 9px; border-radius: 999px; overflow: hidden; background: #edf2f7; }
.bar span { display: block; height: 100%; background: var(--primary); }
.day { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; margin-bottom: 12px; }
.day summary { padding: 14px 15px; display: flex; justify-content: space-between; cursor: pointer; list-style: none; font-weight: 700; }
.task-list { display: grid; gap: 12px; padding: 0 14px 14px; border-top: 1px solid var(--line); }
.task { padding: 13px; margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; }
.task h4 { margin: 0 0 8px; font-size: 15px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.source-box { border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: #fbfcfe; color: #475467; font-size: 12px; line-height: 1.5; margin-bottom: 9px; }
.media-preview { height: 108px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px; overflow: hidden; margin-bottom: 8px; }
.media-preview.single, .media-preview.video { grid-template-columns: 1fr; }
.media-preview img, .media-preview video, .media-fallback { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; background: #eef2f7; }
.media-fallback { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; padding: 8px; }
.log { padding: 11px; color: #4b5563; font-size: 13px; line-height: 1.5; }
.log b { display: block; color: var(--text); margin-bottom: 4px; }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; color: var(--muted); text-align: center; line-height: 1.6; }
.hidden { display: none; }
.toast { position: fixed; right: 18px; bottom: 18px; padding: 11px 13px; background: #111827; color: #fff; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 160ms ease, transform 160ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1080px) { .app { grid-template-columns: 1fr; } aside { position: static; height: auto; } .grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { main, aside { padding: 16px; } .topbar { flex-direction: column; } .actions { justify-content: flex-start; } .asset-grid, .form-grid { grid-template-columns: 1fr; } .task { grid-template-columns: 1fr; } }
