:root {
  --brand: #0b5c55;
  --brand-dark: #073b37;
  --brand-soft: #e8f2f0;
  --accent: #c2a455;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --text: #1d2927;
  --muted: #687773;
  --line: #dfe6e4;
  --line-strong: #cbd7d4;
  --success: #17725e;
  --warning: #946b16;
  --danger: #a83e35;
  --shadow: 0 10px 28px rgba(20, 45, 41, .07);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.025em; }
button, input, select { font: inherit; }
button, .primary-button, .secondary-button { border: 0; border-radius: 8px; font-weight: 750; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
input, select {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 3px solid rgba(11, 92, 85, .13); border-color: var(--brand); }
label { display: grid; gap: 7px; color: #394744; font-size: 13px; font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.site-header { height: 66px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
.site-header-inner { width: min(1040px, calc(100% - 32px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.product-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.product-brand img { width: 42px; height: 42px; object-fit: contain; }
.product-brand span { display: grid; gap: 1px; }
.product-brand strong { font-size: 16px; letter-spacing: -.02em; }
.product-brand small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.header-link { padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: #45534f; font-size: 12px; font-weight: 700; text-decoration: none; }
.signed-in-user { display: flex; align-items: center; gap: 8px; }
.signed-in-user > span { margin-right: 3px; color: var(--muted); font-size: 11px; }
.signed-in-user form { margin: 0; }
.signed-in-user button.header-link { min-height: 34px; background: #fff; }

.public-main { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 46px 0 64px; }
.compact-public-main { min-height: calc(100vh - 127px); }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { margin: 5px 0 8px; font-size: 30px; }
.page-heading > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.65; }
.kicker { color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.download-panel { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 24px; align-items: start; padding: 28px; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.download-mark { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 34px; font-weight: 800; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading.compact { align-items: start; margin-bottom: 18px; }
.section-heading h2 { margin-top: 4px; font-size: 19px; }
.section-heading p:not(.kicker) { margin-top: 5px; color: var(--muted); font-size: 13px; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-badge.success { background: #dff2ec; color: var(--success); }
.status-badge.neutral { background: #edf1f0; color: #687773; }
.status-badge.warning { background: #fff1d1; color: var(--warning); }
.status-badge.danger { background: #fae6e3; color: var(--danger); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 15px; background: var(--brand); color: #fff; text-decoration: none; }
.primary-button:hover { background: #084b45; }
.download-link { width: fit-content; }
.file-meta { display: grid; gap: 7px; margin: 18px 0 0; font-size: 11px; }
.file-meta > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
.file-meta dt { color: var(--muted); }
.file-meta dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.inline-note { display: inline; margin-left: 10px; color: var(--muted); font-size: 12px; }
.public-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.content-panel { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.function-list, .step-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.function-list li, .step-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 15px 0; border-top: 1px solid #edf1f0; }
.function-list li:first-child, .step-list li:first-child { border-top: 0; padding-top: 0; }
.function-list li:last-child, .step-list li:last-child { padding-bottom: 0; }
.list-icon, .step-list li > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 850; }
.function-list strong, .step-list strong { font-size: 14px; }
.function-list p, .step-list p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.support-note { display: flex; align-items: center; gap: 15px; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #eef2f1; font-size: 12px; }
.support-note code { color: var(--brand); font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer > div { width: min(1040px, calc(100% - 32px)); margin: auto; padding: 22px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(135deg, rgba(28, 42, 34, .96), rgba(23, 122, 66, .9)), #1c2a22;
  -webkit-font-smoothing: antialiased;
}
.auth-card {
  width: min(430px, 100%); padding: 36px; border: 1px solid rgba(255,255,255,.5);
  border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: 0 28px 70px rgba(0,0,0,.25);
}
.login-brand { display: flex; align-items: center; gap: 16px; }
.login-brand img { width: 86px; height: 86px; object-fit: contain; }
.eyebrow { color: #1f9d55; font-size: 13px; font-weight: 900; text-transform: uppercase; }
.login-brand .eyebrow { margin-bottom: 4px; }
.login-brand h1 { color: #2c2925; font-size: 29px; line-height: 1.15; letter-spacing: 0; }
.login-description { margin: 23px 0 20px; color: #6a655e; font-size: 14px; line-height: 1.55; }
.login-form { display: grid; gap: 15px; }
.login-form label { color: #2c2925; font-size: 12px; font-weight: 800; }
.login-form input {
  min-height: 46px; padding: 0 12px; border: 1px solid #e7e4e0; border-radius: 11px;
  color: #2c2925; font-size: 15px;
}
.login-form input:focus { border-color: #1f9d55; box-shadow: 0 0 0 3px rgba(31,157,85,.14); outline: none; }
.login-form button {
  min-height: 48px; margin-top: 3px; border-radius: 11px; background: #1f9d55; color: #fff;
  font-size: 15px; font-weight: 800;
}
.login-form button:hover { background: #177a42; }
.login-error {
  padding: 10px 12px; border: 1px solid rgba(192,86,63,.25); border-radius: 10px;
  background: rgba(192,86,63,.08); color: #c0563f; font-size: 13px; font-weight: 700;
}
.form-stack { display: grid; gap: 15px; }
.form-stack .primary-button { margin-top: 4px; }
.alert { margin-bottom: 18px; padding: 11px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.error-alert { border: 1px solid #edcbc6; background: #fff0ee; color: var(--danger); }
.success-alert { border: 1px solid #bfe2d8; background: #e4f4ef; color: var(--success); }

.admin-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 20px 14px 16px; background: var(--brand-dark); color: #fff; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 3px 8px 22px; color: #fff; text-decoration: none; }
.admin-brand img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 7px 12px rgba(0,0,0,.2)); }
.admin-brand span { display: grid; gap: 2px; }
.admin-brand strong { font-size: 14px; }
.admin-brand small { color: #91aaa5; font-size: 10px; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 9px 11px; border-radius: 8px; color: #b9cbc7; font-size: 13px; font-weight: 700; text-decoration: none; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: #fff; color: var(--brand-dark); }
.admin-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-nav a:first-child svg { fill: currentColor; stroke: none; }
.admin-account { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid rgba(255,255,255,.12); }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e3c86f; color: var(--brand-dark); font-size: 12px; font-weight: 850; }
.admin-account > div:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.admin-account strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account span { overflow: hidden; color: #91aaa5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account button { padding: 6px; background: transparent; color: #91aaa5; font-size: 17px; }
.admin-account button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.admin-workspace { min-width: 0; }
.admin-topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 28px; border-bottom: 1px solid var(--line); background: #fff; }
.admin-topbar h1 { font-size: 20px; }
.admin-topbar p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 11px; border: 1px solid var(--line-strong); background: #fff; color: #3d4b48; font-size: 11px; text-decoration: none; }
.admin-content { display: grid; gap: 18px; max-width: 1500px; margin: auto; padding: 24px 28px 50px; }
.admin-content > .alert { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.metric-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #edf2f1; color: #60716d; font-size: 14px; font-weight: 850; }
.metric-icon.online { background: #dff2ec; }
.metric-icon.online span { width: 10px; height: 10px; border: 3px solid #fff; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 1px #8bc7b7; }
.metric-icon.queue { background: #e9eef8; color: #466397; }
.metric-icon.error { background: #fae6e3; color: var(--danger); }
.metric-icon.clear { background: #e6f3ea; color: var(--success); }
.metric-icon.user { background: #f5eed9; color: #826719; }
.metric-card > div:last-child { display: grid; gap: 2px; }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { font-size: 25px; line-height: 1.1; }
.metric-card strong small { color: #6f7e7a; font-size: 12px; font-weight: 700; }
.metric-card p { color: #87938f; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(20,45,41,.035); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-header h2, .release-admin-panel h2 { margin-top: 4px; font-size: 17px; }
.panel-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th, .data-table td { padding: 11px 9px; border-top: 1px solid #e9eeed; text-align: left; vertical-align: middle; white-space: nowrap; }
.data-table th { padding-top: 8px; color: #778580; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.data-table td strong { font-size: 11px; }
.data-table td small { display: block; max-width: 260px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; }
.data-table .status-badge { min-height: 22px; padding: 3px 7px; font-size: 9px; }
.status-badge i { width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.status-badge.job-queued { background: #e9eef8; color: #466397; }
.status-badge.job-leased { background: #fff1d1; color: var(--warning); }
.status-badge.job-completed { background: #dff2ec; color: var(--success); }
.status-badge.job-failed, .status-badge.job-cancelled { background: #fae6e3; color: var(--danger); }
.table-button { min-height: 27px; padding: 5px 8px; border: 1px solid var(--line-strong); background: #fff; color: #465551; font-size: 9px; }
.danger-button { color: var(--danger); }
.empty-state { padding: 32px !important; color: var(--muted); text-align: center !important; }
.error-text { color: var(--danger) !important; }
.compact-form { gap: 13px; }
.compact-form label > small, .release-form label > small { color: var(--muted); font-size: 9px; font-weight: 500; }
.send-panel .primary-button { width: 100%; }
.release-admin-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr); gap: 34px; align-items: center; }
.release-admin-panel > div > p:not(.kicker) { margin-top: 10px; color: var(--muted); font-size: 11px; }
.release-admin-panel > div > code { display: block; max-width: 640px; margin-top: 9px; overflow-wrap: anywhere; color: #75847f; font-size: 9px; }
.text-link { display: inline-block; margin-top: 12px; color: var(--brand); font-size: 10px; font-weight: 800; }
.release-form { display: grid; grid-template-columns: .65fr 1.35fr; gap: 10px; }
.release-form .primary-button { grid-column: 1 / -1; }

.accounts-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.account-table { min-width: 850px; }
.role-badge { display: inline-flex; padding: 4px 7px; border-radius: 6px; background: #edf1f0; color: #5e6c68; font-size: 9px; font-weight: 800; }
.role-badge.admin { background: #f4edd9; color: #775f1b; }
.account-actions { display: flex; align-items: center; gap: 7px; }
.password-details { position: relative; }
.password-details summary { color: var(--brand); font-size: 9px; font-weight: 800; cursor: pointer; list-style: none; }
.password-details summary::-webkit-details-marker { display: none; }
.inline-password-form { display: grid; width: 260px; gap: 10px; margin-top: 10px; padding: 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f8faf9; }
.inline-password-form p { color: var(--muted); font-size: 9px; line-height: 1.5; white-space: normal; }
.inline-password-form .primary-button { min-height: 34px; }
.create-account-panel { position: sticky; top: 94px; }
.form-help { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.55; }

@media (max-width: 720px) {
  .public-main { padding-top: 32px; }
  .download-panel { grid-template-columns: 1fr; padding: 22px; }
  .download-mark { width: 54px; height: 54px; font-size: 26px; }
  .public-grid { grid-template-columns: 1fr; }
  .inline-note { display: block; margin: 10px 0 0; }
  .support-note, .site-footer > div { align-items: flex-start; flex-direction: column; gap: 7px; }
  .signed-in-user > span { display: none; }
}

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .accounts-layout { grid-template-columns: 1fr; }
  .create-account-panel { position: static; }
}

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; width: 100%; height: auto; padding: 10px 14px; }
  .admin-brand { padding: 0; }
  .admin-brand span { display: none; }
  .admin-nav { display: flex; justify-content: center; }
  .admin-nav a { min-height: 38px; }
  .admin-nav a:last-child { display: none; }
  .admin-account { display: flex; margin: 0; padding: 0; border: 0; }
  .admin-account > div:nth-child(2) { display: none; }
  .account-avatar { width: 31px; height: 31px; }
  .admin-topbar { padding: 13px 18px; }
  .admin-content { padding: 18px 16px 40px; }
  .release-admin-panel { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .auth-card { padding: 26px; }
  .login-brand img { width: 66px; height: 66px; }
  .login-brand h1 { font-size: 24px; }
  .admin-nav a { padding: 8px; }
  .admin-nav a span { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .release-form { grid-template-columns: 1fr; }
  .release-form .primary-button { grid-column: auto; }
  .admin-topbar p { display: none; }
}
