:root {
    --ink: #181915;
    --muted: #777468;
    --paper: #f3efdf;
    --card: #fbfaf5;
    --line: #d8d0b9;
    --accent: #d8ff52;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { color: inherit; }
a { text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 34px 24px 24px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #f9f7ee; z-index: 30; }
.brand-block { display: flex; align-items: center; gap: 12px; margin-bottom: 52px; }
.brand-block div, .sidebar-profile div { display: flex; flex-direction: column; }
.brand-block strong { font-size: 18px; letter-spacing: .08em; }
.brand-block div span, .sidebar-profile div span { color: var(--muted); font-size: 11px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--ink); color: white; border-radius: 50%; font-weight: 800; }
.sidebar-close { display: none; margin-left: auto; border: 0; background: transparent; font-size: 30px; cursor: pointer; }
.nav-list { display: grid; gap: 8px; }
.nav-item { width: 100%; border-radius: 14px; padding: 14px 16px; display: flex; gap: 13px; align-items: center; font-weight: 750; }
.nav-item span { font-size: 10px; color: #9a9689; letter-spacing: .08em; }
.nav-item.active { background: var(--ink); color: white; }
.nav-item.active span { color: var(--accent); }
.nav-item.disabled { opacity: .42; cursor: not-allowed; }
.sidebar-profile { margin-top: auto; padding: 16px 8px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e5dfca; font-size: 12px; font-weight: 800; flex: 0 0 auto; }
.avatar.large { width: 44px; height: 44px; background: var(--ink); color: white; }
.sidebar-profile strong { font-size: 13px; }
.sidebar-profile form { margin-left: auto; }
.logout-button { padding: 4px; border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.workspace { min-width: 0; padding: 52px clamp(28px, 5vw, 84px) 80px; }
.mobile-header { display: none; }
.page-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-end; margin-bottom: 34px; }
.eyebrow { margin: 0 0 12px; color: #6e6b60; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.page-head h1 { margin: 0; font-size: clamp(40px, 5vw, 68px); letter-spacing: -.06em; line-height: .98; }
.page-head p:not(.eyebrow) { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.head-actions, .filters { display: flex; gap: 10px; flex-wrap: wrap; }
.button { min-height: 46px; border-radius: 13px; padding: 0 18px; font-weight: 800; cursor: pointer; }
.button.primary { background: var(--ink); color: white; border: 1px solid var(--ink); }
.button.secondary { background: transparent; border: 1px solid var(--line); }
.link-button { display: inline-flex; align-items: center; justify-content: center; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metrics article { min-height: 154px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); padding: 22px; display: flex; flex-direction: column; }
.metrics span { color: var(--muted); font-size: 13px; }
.metrics strong { margin: 14px 0 auto; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.05em; }
.metrics small { color: #868173; font-size: 11px; }
.metrics .metric-dark { background: var(--ink); color: white; border-color: var(--ink); }
.metrics .metric-dark span, .metrics .metric-dark small { color: #cbc9be; }
.directory-card { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--card); }
.directory-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line); }
.directory-toolbar h2 { margin: 0 0 4px; font-size: 20px; }
.directory-toolbar div > span { color: var(--muted); font-size: 12px; }
.filters input { min-height: 46px; width: min(300px, 40vw); padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; outline: none; }
.filters select { min-height: 46px; padding: 0 36px 0 14px; border: 1px solid var(--line); border-radius: 13px; background: #fffefa; }
.filters input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(24 25 21 / 8%); }
.creator-list { display: grid; }
.creator-row { display: grid; grid-template-columns: minmax(210px, 1.6fr) repeat(3, minmax(100px, 1fr)) auto 40px; gap: 20px; align-items: center; padding: 18px 24px; border-bottom: 1px solid #e5deca; }
.creator-row:last-child { border-bottom: 0; }
.creator-row:hover { background: #f7f4e9; }
.creator-identity { display: flex; align-items: center; gap: 12px; }
.creator-identity div, .creator-meta { display: flex; flex-direction: column; gap: 4px; }
.creator-identity strong { font-size: 15px; }
.creator-identity div span, .creator-meta span { color: var(--muted); font-size: 11px; }
.creator-meta strong { font-size: 13px; }
.status { border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status.active { background: #dff2d6; color: #2e6a24; }
.status.review { background: #ffe7b9; color: #8c500b; }
.status.pending { background: #e0e8f7; color: #365c9a; }
.status.inactive { background: #e6e3da; color: #69665d; }
.status-form select { border: 0; appearance: auto; cursor: pointer; }
.detail-button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.detail-button:hover { background: var(--ink); color: white; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.mobile-overlay { display: none; }
.flash { margin: 0 0 16px; padding: 13px 16px; border: 1px solid; border-radius: 13px; font-size: 13px; font-weight: 700; }
.flash.success { background: #e6f3dc; border-color: #c3deb5; color: #35632d; }
.flash.error { background: #f9e3de; border-color: #e9beb4; color: #8d3829; }
.empty-state { min-height: 220px; display: grid; place-content: center; gap: 7px; text-align: center; }
.empty-state span { color: var(--muted); font-size: 13px; }
.creator-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 30px 90px rgb(0 0 0 / 25%); }
.creator-dialog::backdrop { background: rgb(24 25 21 / 62%); backdrop-filter: blur(3px); }
.creator-form { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 24px; }
.dialog-head h2 { margin: 0; font-size: 28px; }
.dialog-head button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label, .login-card label { display: grid; gap: 7px; }
.form-grid label > span, .login-card label > span { font-size: 12px; font-weight: 800; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea, .login-card input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; outline: none; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .login-card input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(24 25 21 / 8%); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 24px; background: var(--card); padding: 24px; }
.panel h2 { margin: 0; }
.panel-head { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.panel-head a { font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.mini-creator { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid #e5deca; }
.mini-creator div { display: grid; gap: 3px; }
.mini-creator div span { color: var(--muted); font-size: 11px; }
.action-panel { display: flex; flex-direction: column; align-items: flex-start; background: var(--accent); }
.action-panel h2 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.05em; }
.action-panel > p:not(.eyebrow) { color: #4f5148; line-height: 1.65; }
.action-panel .button { margin-top: auto; }
.login-page { min-height: 100vh; background: var(--paper); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-intro { padding: clamp(42px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; background: var(--ink); color: white; }
.login-intro .brand-mark { margin-bottom: auto; color: var(--ink); background: var(--accent); }
.login-intro h1 { margin: 0; font-size: clamp(64px, 10vw, 148px); letter-spacing: -.07em; }
.login-intro > p:last-child { color: #c9c8be; line-height: 1.7; }
.login-card { width: min(480px, calc(100vw - 36px)); margin: auto; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: 26px; background: var(--card); box-shadow: 0 20px 70px rgb(79 69 36 / 10%); }
.login-card h2 { margin: 0; font-size: 36px; letter-spacing: -.04em; }
.login-card > div > p:not(.eyebrow) { color: var(--muted); }
.login-card form { display: grid; gap: 18px; margin-top: 30px; }
.login-card form .button { margin-top: 4px; }
.login-card > small { display: block; margin-top: 22px; color: var(--muted); text-align: center; }

@media (max-width: 1080px) {
    .app-shell { grid-template-columns: 218px 1fr; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .creator-row { grid-template-columns: minmax(190px, 1.7fr) repeat(2, 1fr) auto 40px; }
    .creator-row .creator-meta:nth-of-type(4) { display: none; }
}

@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: min(84vw, 340px); transition: transform .22s ease; box-shadow: 24px 0 70px rgb(0 0 0 / 15%); }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .mobile-overlay { position: fixed; inset: 0; z-index: 20; display: block; background: rgb(24 25 21 / 44%); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
    .mobile-overlay.is-open { opacity: 1; pointer-events: auto; }
    body.menu-open { overflow: hidden; }
    .workspace { padding: 0 18px 48px; }
    .mobile-header { height: 78px; margin: 0 -18px 34px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #f9f7ee; }
    .mobile-header strong { letter-spacing: .08em; }
    .mobile-header button { width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: transparent; font-size: 20px; }
    .page-head { align-items: stretch; flex-direction: column; }
    .page-head h1 { font-size: 48px; }
    .head-actions .button { flex: 1; }
    .metrics { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 5px; }
    .metrics article { min-width: 220px; scroll-snap-align: start; }
    .directory-toolbar { align-items: stretch; flex-direction: column; }
    .filters { display: grid; grid-template-columns: 1fr auto; }
    .filters label { grid-column: 1 / -1; }
    .filters input { width: 100%; }
    .creator-row { grid-template-columns: 1fr auto auto; gap: 10px; padding: 18px; }
    .creator-row .creator-meta { display: none; }
    .creator-identity { min-width: 0; }
    .creator-dialog { border-radius: 18px; }
    .creator-form { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; }
    .dialog-actions .button { flex: 1; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .action-panel { min-height: 330px; }
    .login-shell { display: block; padding: 28px 0; }
    .login-intro { min-height: 300px; padding: 34px; }
    .login-intro .brand-mark { margin-bottom: 52px; }
    .login-intro h1 { font-size: 68px; }
    .login-card { margin-top: -18px; position: relative; }
}
