* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0b0b10; --bg2: #14141d; --card: #1c1c28; --card2: #232332;
  --text: #f3f3f7; --muted: #9a9aa8; --accent: #ff3d6e; --accent2: #ffb84d;
  --green: #3ad17a; --red: #ff5566; --blue: #3a8aff; --line: #2a2a38;
}
html, body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.6;
}
button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ============ LOGIN ============ */
.login-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: radial-gradient(circle at 30% 20%, #2a1a4e 0%, #0b0b10 60%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-box {
  width: 460px; max-width: 100%; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 20px; padding: 40px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.login-brand {
  font-size: 22px; font-weight: 800; margin-bottom: 24px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.login-brand span { font-weight: 400; opacity: 0.85; }
.login-box h1 { font-size: 28px; margin-bottom: 6px; }
.login-box > p { color: var(--muted); margin-bottom: 24px; }
.login-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.ltab { flex: 1; background: transparent; border: none; padding: 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-size: 14px; }
.ltab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.login-body input, .login-body select {
  width: 100%; background: var(--card); border: 1px solid var(--line); padding: 13px;
  border-radius: 10px; color: var(--text); font-size: 14px; margin-bottom: 10px;
}
.login-body input:focus, .login-body select:focus { outline: none; border-color: var(--accent); }
.btn-primary.full { width: 100%; padding: 14px; font-size: 15px; }
.legal { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.login-note { margin-top: 16px; padding: 10px; background: rgba(255,184,77,0.1); border-radius: 8px; font-size: 12px; color: var(--accent2); text-align: center; }
.login-stats { display: flex; gap: 16px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.login-stats > div { flex: 1; text-align: center; }
.login-stats strong { display: block; font-size: 20px; font-weight: 800; color: var(--accent2); }
.login-stats span { font-size: 11px; color: var(--muted); }

/* ============ DASHBOARD LAYOUT ============ */
.dashboard { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--bg2); border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sb-brand {
  font-size: 18px; font-weight: 800; padding: 4px 8px 16px;
  border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.sb-brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sb-brand em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-left: 22px; }
.sb-org {
  display: flex; gap: 10px; align-items: center;
  padding: 12px; background: var(--card); border-radius: 10px; margin-bottom: 16px;
}
.sb-org-logo { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, #1a0f2e, #8b3a8a); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sb-org-name { font-weight: 700; font-size: 13px; }
.sb-org-tier { font-size: 10px; color: var(--green); }
.sb-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sb-nav a {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px;
  border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.sb-nav a:hover { background: var(--card); color: var(--text); }
.sb-nav a.active { background: var(--accent); color: white; font-weight: 600; }
.sb-nav a.primary { background: linear-gradient(90deg, rgba(255,61,110,0.15), rgba(255,184,77,0.1)); color: var(--accent2); border: 1px dashed rgba(255,184,77,0.3); margin: 6px 0; }
.sb-nav a.primary:hover { background: linear-gradient(90deg, rgba(255,61,110,0.25), rgba(255,184,77,0.18)); }
.sb-nav a span:first-child { width: 22px; text-align: center; font-size: 14px; }
.sb-foot { padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.sb-foot a { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.sb-foot a:hover { color: var(--text); }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 28px; background: rgba(11,11,16,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.tb-left { flex: 1; max-width: 480px; }
.search {
  width: 100%; background: var(--card); border: 1px solid var(--line); color: var(--text);
  padding: 9px 14px; border-radius: 8px; font-size: 13px;
}
.tb-right { display: flex; align-items: center; gap: 10px; position: relative; }
.select-mini { background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 7px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.icon-btn { background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; position: relative; }
.icon-btn .dot { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.profile-wrap { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none; cursor: pointer; }
.profile-menu {
  position: absolute; top: 46px; right: 0; width: 240px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6); z-index: 60;
}
.profile-menu .pm-head { padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.profile-menu .pm-head strong { display: block; font-size: 14px; }
.profile-menu .pm-head span { font-size: 12px; color: var(--muted); }
.profile-menu a { display: block; padding: 8px 10px; font-size: 13px; border-radius: 6px; cursor: pointer; }
.profile-menu a:hover { background: var(--card); }
.profile-menu hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }

.notif-drawer { position: fixed; top: 60px; right: 28px; width: 320px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; z-index: 60; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.notif-drawer h4 { margin-bottom: 12px; font-size: 14px; }
.notif-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.notif-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; background: var(--card); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.notif-dot.ok { background: var(--green); }
.notif-dot.warn { background: var(--red); }
.notif-dot.info { background: var(--blue); }
.notif-row p { font-size: 13px; }
.notif-row span { font-size: 11px; color: var(--muted); }

.page { padding: 28px; min-height: calc(100vh - 60px); }

/* ============ COMMON PAGE ============ */
.page-head { margin-bottom: 24px; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.btn-primary { background: linear-gradient(90deg, var(--accent), #ff6a8a); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,61,110,0.4); }
.btn-primary.small { padding: 7px 14px; font-size: 12px; }
.btn-primary.big { padding: 14px 32px; font-size: 16px; }
.btn-secondary { background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); padding: 9px 18px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn-outline:hover { border-color: var(--accent); }
.like-btn { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.like-btn:hover { border-color: var(--accent); color: var(--text); }
.like-btn.ok { color: var(--green); border-color: rgba(58,209,122,0.4); }
.like-btn.no { color: var(--red); border-color: rgba(255,85,102,0.4); }

/* ============ KPI ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi { background: var(--card); padding: 20px; border-radius: 14px; display: flex; gap: 14px; align-items: center; }
.kpi-icon { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,61,110,0.15), rgba(255,184,77,0.1)); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.kpi-body { flex: 1; }
.kpi-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi-value { font-size: 22px; font-weight: 800; }
.delta { font-size: 11px; margin-top: 4px; display: inline-block; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.neutral { color: var(--muted); }
.delta em { color: var(--muted); font-style: normal; }

/* ============ CARDS ============ */
.card { background: var(--card); border-radius: 14px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--line); }
.card.no-pad { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head.row { gap: 12px; }
.dash-grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 20px; }

/* ============ CHARTS ============ */
.chart-wrap { position: relative; height: 200px; }
.line-chart { width: 100%; height: 100%; }
.chart-x { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted); }
.chart-x span { flex: 1; text-align: center; }
.bar-chart { display: flex; gap: 6px; align-items: flex-end; height: 220px; padding: 10px 0; }
.bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bc-bar { width: 100%; background: linear-gradient(180deg, var(--accent), #ff8a6e); border-radius: 6px 6px 0 0; min-height: 4px; transition: 0.3s; cursor: pointer; }
.bc-bar:hover { background: linear-gradient(180deg, var(--accent2), var(--accent)); }
.bc-col span { font-size: 10px; color: var(--muted); }

.hbar-list { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: 130px 1fr 130px; gap: 12px; align-items: center; font-size: 13px; }
.hbar-label { color: var(--text); }
.hbar-label.small { width: 50px; }
.hbar-track { height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 5px; transition: 0.6s ease; }
.hbar-val { text-align: right; color: var(--muted); font-size: 12px; }
.hbar-val em { font-style: normal; color: var(--accent2); margin-left: 6px; font-weight: 700; }

.hour-chart { display: flex; gap: 4px; align-items: flex-end; height: 140px; padding: 0 4px; }
.hc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.hc-bar { width: 100%; background: linear-gradient(180deg, var(--blue), #6aaaff); border-radius: 4px 4px 0 0; min-height: 2px; }
.hc-col span { font-size: 9px; color: var(--muted); }

.donut-wrap { display: flex; align-items: center; gap: 30px; padding: 10px 0; }
.donut { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.donut-legend > div { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.pink { background: var(--accent); }
.dot.blue { background: var(--blue); }
.dot.gray { background: #777; }
.dot.green { background: var(--green); }
.dot.orange { background: var(--accent2); }
.donut-legend strong { color: var(--text); margin-left: auto; }

.device-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dev-card { background: var(--bg2); padding: 16px; border-radius: 10px; }
.dev-icon { font-size: 28px; margin-bottom: 6px; }
.dev-pct { font-size: 22px; font-weight: 800; color: var(--accent2); }
.dev-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.dev-bar { height: 4px; background: var(--card); border-radius: 2px; overflow: hidden; }
.dev-bar div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* ============ TABLES ============ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.data-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg2); }
.data-table td.r, .data-table th.r { text-align: right; }
.data-table.compact th, .data-table.compact td { padding: 8px 12px; }
.data-table tbody tr:hover { background: var(--bg2); }
.empty-row { text-align: center; color: var(--muted); padding: 40px !important; }
.muted { color: var(--muted); }

/* ============ STATUS / FILTER ============ */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status-badge.published { background: rgba(58,209,122,0.15); color: var(--green); }
.status-badge.review { background: rgba(255,184,77,0.15); color: var(--accent2); }
.status-badge.rejected { background: rgba(255,85,102,0.15); color: var(--red); }
.status-badge.draft { background: rgba(154,154,168,0.15); color: var(--muted); }
.reason { color: var(--red); font-size: 11px; margin-top: 4px; }

.filter-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.ftab { background: var(--card); border: 1px solid var(--line); color: var(--muted); padding: 8px 16px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.ftab:hover { border-color: var(--accent); color: var(--text); }
.ftab.active { background: var(--accent); border-color: var(--accent); color: white; }
.ftab em { font-style: normal; opacity: 0.7; margin-left: 6px; font-size: 11px; }

.ct-cell { display: flex; gap: 12px; align-items: center; }
.ct-thumb { width: 60px; height: 36px; border-radius: 6px; flex-shrink: 0; }
.ct-title { font-weight: 600; font-size: 13px; }
.ct-sub { font-size: 11px; color: var(--muted); }

.ct-detail-hero { width: 100%; aspect-ratio: 16/9; border-radius: 12px; margin-bottom: 16px; }
.ct-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.ct-detail-stats > div { background: var(--bg2); padding: 14px; border-radius: 10px; text-align: center; }
.ct-detail-stats span { font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; }
.ct-detail-stats strong { font-size: 18px; color: var(--accent2); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ TOP LIST / RANK ============ */
.top-list { display: flex; flex-direction: column; gap: 10px; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; }
.top-row:hover { background: var(--bg2); }
.rank-num { font-size: 24px; font-weight: 900; width: 30px; text-align: center; color: var(--muted); }
.rank-num.gold { color: var(--accent2); }
.top-thumb { width: 50px; height: 70px; border-radius: 6px; }
.top-info { flex: 1; }
.top-title { font-weight: 700; font-size: 13px; }
.top-meta { color: var(--muted); font-size: 11px; margin-top: 2px; }

.announce-list { display: flex; flex-direction: column; gap: 10px; }
.announce-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 8px; background: var(--bg2); }
.announce-row strong { font-size: 12px; }
.announce-row p { font-size: 13px; margin-top: 2px; }
.announce-row .dot { margin-top: 8px; }

/* ============ MARKETING / SOCIAL ============ */
.link-code { background: var(--bg2); padding: 4px 10px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent2); }
.social-stats { display: flex; flex-direction: column; gap: 10px; }
.ss-row { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--bg2); border-radius: 10px; }
.ss-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: 16px; }
.ss-icon.fb { background: #1877f2; }
.ss-icon.x { background: #000; }
.ss-icon.ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.ss-icon.kakao { background: #fee500; color: #3c1e1e; }
.ss-row strong { font-size: 13px; display: block; }
.ss-row span { font-size: 12px; color: var(--muted); }

/* ============ PAYOUTS ============ */
.payout-hero { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.ph-card { background: var(--card); padding: 24px; border-radius: 14px; border: 1px solid var(--line); }
.ph-card.main { background: linear-gradient(135deg, #2a1a4e 0%, #5a2a7e 100%); position: relative; overflow: hidden; border: none; }
.ph-card.main::before { content: ''; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(255,184,77,0.3), transparent 70%); }
.ph-lbl { font-size: 12px; color: var(--muted); margin-bottom: 8px; position: relative; }
.ph-card.main .ph-lbl { color: rgba(255,255,255,0.85); }
.ph-val { font-size: 36px; font-weight: 900; color: var(--accent2); margin-bottom: 12px; position: relative; }
.ph-val.small { font-size: 22px; }
.ph-sub { font-size: 11px; color: var(--muted); position: relative; }
.bank-info { display: flex; flex-direction: column; gap: 10px; }
.bank-row { display: flex; justify-content: space-between; padding: 10px 12px; background: var(--bg2); border-radius: 8px; font-size: 13px; }
.bank-row span { color: var(--muted); }

/* ============ BRAND ============ */
.brand-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card { background: var(--bg2); padding: 20px; border-radius: 12px; }
.form-card h3 { font-size: 14px; margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.form-row label { color: var(--muted); font-size: 13px; }
.form-row input, .form-row select, .form-row textarea {
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 13px; font-family: inherit;
}
.form-row textarea { resize: vertical; min-height: 80px; }
.color-row { display: flex; gap: 8px; }
.color-chip { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.color-chip.selected { border-color: white; box-shadow: 0 0 0 2px var(--accent); }

.brand-preview { background: var(--bg); border-radius: 12px; overflow: hidden; }
.bp-cover { aspect-ratio: 16/7; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; }
.bp-logo { width: 50px; height: 50px; border-radius: 12px; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 12px; }
.bp-name { font-size: 22px; font-weight: 800; }
.bp-tag { font-size: 13px; color: rgba(255,255,255,0.85); }
.bp-stats { display: flex; padding: 16px; gap: 8px; border-bottom: 1px solid var(--line); }
.bp-stats > div { flex: 1; text-align: center; }
.bp-stats strong { display: block; font-size: 18px; font-weight: 800; color: var(--accent2); }
.bp-stats span { font-size: 11px; color: var(--muted); }
.bp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 16px; }
.bp-thumb { aspect-ratio: 2/3; border-radius: 8px; padding: 12px; display: flex; align-items: flex-end; }
.bp-thumb span { font-size: 12px; font-weight: 700; }

/* ============ SETTINGS ============ */
.set-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.api-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card); border-radius: 8px; margin-bottom: 8px; }
.api-row > div:first-child { flex: 1; }
.api-row strong { font-size: 13px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: none; }
.tr-t { font-weight: 600; font-size: 14px; }
.tr-d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--line); border-radius: 24px; transition: 0.2s; }
.slider:before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ============ MODAL ============ */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.8); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--bg2); border-radius: 16px; padding: 32px; position: relative; max-width: 720px; width: 100%; max-height: 92vh; overflow-y: auto; border: 1px solid var(--line); animation: pop 0.25s ease; }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close { position: absolute; top: 14px; right: 18px; background: transparent; color: var(--muted); border: none; font-size: 26px; cursor: pointer; z-index: 10; }
.close:hover { color: white; }

/* ============ UPLOAD WIZARD ============ */
.upload-modal { max-width: 760px; }
.up-stepper { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.up-step { flex: 1; min-width: 100px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--card); border-radius: 8px; color: var(--muted); font-size: 12px; }
.up-step i { width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 11px; flex-shrink: 0; }
.up-step.active { background: linear-gradient(90deg, rgba(255,61,110,0.2), rgba(255,184,77,0.1)); color: var(--text); border: 1px solid rgba(255,61,110,0.3); }
.up-step.active i { background: var(--accent); color: white; }
.up-step.done i { background: var(--green); color: white; }
.up-body h2 { font-size: 20px; margin-bottom: 16px; }

.up-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.up-label em { font-style: normal; font-weight: 400; color: var(--accent2); margin-left: 6px; font-size: 11px; }
.upload-box {
  border: 2px dashed var(--line); border-radius: 10px; padding: 32px;
  text-align: center; cursor: pointer; transition: 0.2s; color: var(--muted); font-size: 13px;
}
.upload-box:hover { border-color: var(--accent); color: var(--text); }
.upload-box.small { padding: 16px; font-size: 12px; }
.upload-box.mini { padding: 8px 12px; font-size: 12px; display: inline-block; }
.upload-box.filled { border-style: solid; border-color: var(--green); color: var(--green); background: rgba(58,209,122,0.05); }
.up-progress { display: none; margin-top: 8px; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.up-progress.show { display: flex; }
.up-progress-fill { flex: 1; height: 4px; background: var(--bg); border-radius: 2px; position: relative; overflow: hidden; }
.up-progress-fill::after { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 65%; background: linear-gradient(90deg, var(--accent), var(--accent2)); animation: prog 2s ease infinite; }
@keyframes prog { 0% { width: 10%; } 50% { width: 70%; } 100% { width: 10%; } }

.check-row { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.chk input[type="checkbox"] { margin-top: 4px; accent-color: var(--accent); }
.chk strong { font-size: 13px; display: block; }
.chk span { color: var(--muted); font-size: 12px; }
.chk.small { padding: 8px 12px; }
.chk.small span { color: var(--text); font-size: 12px; }

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-row { display: flex; gap: 10px; align-items: center; background: var(--card); padding: 8px 12px; border-radius: 8px; font-size: 12px; }
.pp-row span { flex: 1; color: var(--muted); }
.pp-row input { width: 100px; background: var(--bg); border: 1px solid var(--line); color: var(--text); padding: 6px 10px; border-radius: 6px; font-size: 12px; text-align: right; }

.region-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.review-summary-card { font-size: 13px; }
.rs-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rs-row:last-child { border-bottom: none; }
.rs-row span { color: var(--muted); }

.agree-row { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.up-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.ai-suggest { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: linear-gradient(90deg, rgba(255,184,77,0.1), rgba(255,61,110,0.05)); border: 1px dashed rgba(255,184,77,0.3); border-radius: 10px; margin-top: 14px; font-size: 13px; }

.up-success { text-align: center; padding: 30px 20px; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.up-success h2 { margin-bottom: 8px; }
.up-success p { color: var(--muted); margin-bottom: 24px; }

/* ============ DETAIL MODAL ============ */
.detail-modal { max-width: 600px; }
.detail-modal h2 { margin-bottom: 6px; }

/* ============ TOAST ============ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 22px;
  border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 300;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.toast.hidden { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .brand-layout { grid-template-columns: 1fr; }
  .payout-hero { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .region-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .sidebar { width: 64px; padding: 16px 8px; }
  .sb-brand, .sb-org > div, .sb-nav a span:last-child, .sb-foot a span:last-child { display: none; }
  .sb-org { justify-content: center; }
  .sb-nav a, .sb-foot a { justify-content: center; }
  .kpi-grid { grid-template-columns: 1fr; }
  .device-grid { grid-template-columns: 1fr; }
}