/* Breeze Terminal 웹(다운로드·관리자) — 앱 디자인 토큰과 같은 값(앱 docs/design-guidelines.md) */
@font-face { font-family: 'Pretendard'; font-weight: 400; font-display: swap; src: url('/static/fonts/Pretendard-Regular.woff') format('woff'); }
@font-face { font-family: 'Pretendard'; font-weight: 600; font-display: swap; src: url('/static/fonts/Pretendard-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Pretendard'; font-weight: 700; font-display: swap; src: url('/static/fonts/Pretendard-Bold.woff') format('woff'); }
:root { --bg: #FFFFFF; --surface: #F7F7F8; --hover: #F0F1F2; --black: #151515; --body: #595959; --muted: #8A8A8A; --border: #E3E4E5; --primary: #6D52EC; --primary-pressed: #5B3FD9; --primary-surface: #F1EEFD; --primary-text: #4E36C9; --danger: #E5484D; --danger-surface: #FDECEC; --success: #2F9E5B; --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; --mono: 'SF Mono', Menlo, Consolas, monospace; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--black); background: var(--surface); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--black); color: #fff; font-weight: 700; font-size: 15px; position: relative; }
.mark::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--primary); }
.grow { flex: 1; }

h1 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
h2 { font-size: 16px; font-weight: 700; margin: 32px 0 12px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.meta { color: var(--muted); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12px; }

.btn { height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-pressed); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.label { font-size: 13px; font-weight: 600; color: var(--body); }
.input { height: 40px; width: 100%; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); outline: none; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-surface); }
textarea.input { height: 72px; padding: 10px 12px; resize: vertical; }
.email { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.email:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-surface); }
.email input { flex: 1; height: 40px; min-width: 0; padding: 0 12px; border: 0; outline: none; background: transparent; }
.email span { padding: 0 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.alert.ok { background: #E9F7EF; color: var(--success); }
.alert.error { background: var(--danger-surface); color: var(--danger); }

table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.off td { color: var(--muted); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.inline { display: inline; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--hover); color: var(--body); }
.badge.force { background: var(--danger-surface); color: var(--danger); }
.badge.admin { background: var(--primary-surface); color: var(--primary-text); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--success); }
.dot.off { background: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar .input { width: 280px; height: 36px; }

/* 로그인 */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 380px; }
.login .brand { justify-content: center; margin-bottom: 28px; font-size: 18px; }
.login .btn { width: 100%; height: 44px; margin-top: 6px; }

/* 다운로드 */
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dl { display: flex; flex-direction: column; gap: 6px; }
.dl .os { font-size: 18px; font-weight: 700; }
.dl .btn { margin-top: 14px; align-self: flex-start; }
.note { white-space: pre-wrap; color: var(--body); margin-top: 6px; }


/* 다운로드(공개) 페이지 */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 600px at 85% -10%, var(--primary-surface), transparent 60%), var(--surface); }
.land-top { height: 72px; display: flex; align-items: center; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hero { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 80px 24px 48px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 14px; }
.hero-title { font-size: 48px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.hero-sub { font-size: 18px; color: var(--body); margin-bottom: 18px; }
.dl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.dl-btn { position: relative; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--black); transition: transform .12s, box-shadow .12s, border-color .12s, background-color .12s; }
.dl-btn:hover { border-color: var(--primary); box-shadow: 0 6px 18px rgba(109, 82, 236, .16); transform: translateY(-1px); }
.dl-btn.mine { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(109, 82, 236, .32); }
.dl-btn.mine:hover { background: var(--primary-pressed); }
.dl-btn.off { color: var(--muted); background: var(--hover); border-color: transparent; cursor: default; box-shadow: none; transform: none; }
.dl-logo { width: 26px; height: 26px; flex-shrink: 0; fill: currentColor; }
.dl-text { display: flex; flex-direction: column; min-width: 0; }
.dl-name { font-weight: 700; font-size: 15px; }
.dl-sub { font-size: 12px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-arrow { margin-left: auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.dl-btn.off .dl-arrow { display: none; }
.term-art { border-radius: 16px; overflow: hidden; background: #151515; box-shadow: 0 30px 70px rgba(21, 21, 21, .25), 0 0 0 1px rgba(21, 21, 21, .06); transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); }
.term-bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #222226; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.term-bar i:nth-child(2) { background: #FEBC2E; }
.term-bar i:nth-child(3) { background: #28C840; }
.term-tabs { display: flex; gap: 6px; margin-left: 14px; }
.term-tabs span { height: 24px; display: flex; align-items: center; padding: 0 10px; border-radius: 7px; background: rgba(255, 255, 255, .06); color: #A1A1A8; font-size: 12px; font-weight: 600; }
.term-tabs span.on { background: rgba(255, 255, 255, .14); color: #E6E6E6; }
.term-body { padding: 18px 20px 24px; font-family: var(--mono); font-size: 13px; line-height: 1.9; color: #E6E6E6; }
.c-g { color: #5CC98A; } .c-b { color: #6FA8F7; } .c-y { color: #E8B04B; } .c-m { color: #A897F4; } .c-d { color: #6B6B6B; }
.cursor { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: #A897F4; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 8px; } .hero-title { font-size: 36px; } .term-art { transform: none; } }
@media (max-width: 520px) { .dl-row { grid-template-columns: 1fr; } }

.land-foot { display: flex; justify-content: center; padding: 0 0 40px; }
.land-foot .mark { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; opacity: .9; }
.land-foot .mark::after { left: 10px; right: 10px; bottom: 7px; }

/* 관리자: 왼쪽 메뉴 */
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 14px; background: var(--bg); border-right: 1px solid var(--border); }
.side-brand { padding: 0 8px; }
.side-brand small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 10px; color: var(--body); font-weight: 600; }
.side-nav a:hover { background: var(--hover); color: var(--black); }
.side-nav a.on { background: var(--primary-surface); color: var(--primary-text); }
.side-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.side-me { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-me small { color: var(--muted); font-size: 12px; }
.main { min-width: 0; padding: 32px 40px 64px; max-width: 1240px; }
.secret { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--primary); border-radius: 10px; background: var(--primary-surface); font-weight: 600; }
.secret code { font-family: var(--mono); font-size: 18px; letter-spacing: .04em; padding: 4px 10px; border-radius: 6px; background: var(--bg); color: var(--primary-text); user-select: all; }
.add-admin { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.add-admin .field { margin: 0; }
.pw-form { display: flex; gap: 6px; }
.pw-form .input { height: 32px; }
@media (max-width: 860px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .add-admin { grid-template-columns: 1fr; } }

/* 배포 */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.card.deploy { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.deploy .field { margin: 0; }
.deploy-grid { display: grid; grid-template-columns: max-content 200px max-content; justify-content: start; gap: 24px; align-items: end; } /* auto 칸은 남는 폭을 나눠 받아 늘어난다 → 내용 폭(max-content)으로 고정 */
.os-logo { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.os-pick { display: flex; width: fit-content; gap: 6px; padding: 4px; background: var(--hover); border-radius: 12px; }
.os-opt { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 9px; color: var(--body); font-weight: 600; cursor: pointer; }
.os-opt input { display: none; }
.os-opt:hover { color: var(--black); }
.os-opt:has(input:checked) { background: var(--bg); color: var(--black); box-shadow: 0 1px 3px rgba(21, 21, 21, .1); }
.mono-in { font-family: var(--mono); }
.deploy-foot { display: flex; justify-content: flex-end; padding-top: 4px; border-top: 1px solid var(--border); padding-top: 18px; }
.deploy-foot .btn { min-width: 120px; height: 40px; }
.empty { color: var(--muted); text-align: center; padding: 32px; }
.history { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.hist { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.hist:last-child { border-bottom: 0; }
.hist-os { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--hover); color: var(--black); flex-shrink: 0; }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hist-title { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.hist-note { white-space: pre-wrap; color: var(--body); line-height: 1.55; }
.hist-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--muted); font-size: 13px; white-space: nowrap; }
/* 업데이트 방식: 알약 안에서 선택 ↔ 필수가 미끄러진다 */
.pill { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; width: 156px; height: 46px; padding: 4px; border-radius: 999px; background: var(--hover); cursor: pointer; user-select: none; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill-thumb { position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); border-radius: 999px; background: var(--bg); box-shadow: 0 1px 3px rgba(21, 21, 21, .14); transition: transform .2s cubic-bezier(.3, .7, .4, 1), background-color .2s; }
.pill-opt { position: relative; z-index: 1; display: grid; place-items: center; font-weight: 600; color: var(--muted); transition: color .2s; }
.pill-opt.off { color: var(--black); }
.pill input:checked ~ .pill-thumb { transform: translateX(100%); background: var(--danger); }
.pill input:checked ~ .pill-opt.off { color: var(--muted); }
.pill input:checked ~ .pill-opt.on { color: #fff; }
.pill input:focus-visible ~ .pill-thumb { box-shadow: 0 0 0 3px var(--primary-surface); }

/* 파일 칸: 플랫폼별로 종류마다 한 칸 */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.slots[hidden] { display: none; }
.slot { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 92px; padding: 14px; border: 1.5px dashed var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .12s, background-color .12s; }
.slot:hover, .slot.over { border-color: var(--primary); background: var(--primary-surface); }
.slot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slot-head code { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--bg); color: var(--body); }
.slot-file { font-size: 12px; color: var(--muted); word-break: break-all; white-space: pre-line; }
.slot.done { border-style: solid; border-color: var(--success); background: #F1FAF4; }
.slot.done .slot-file { color: var(--black); font-family: var(--mono); }
.slot.bad { border-style: solid; border-color: var(--danger); background: var(--danger-surface); }
.slot.bad .slot-file { color: var(--danger); }
@media (max-width: 860px) { .deploy-grid { grid-template-columns: 1fr; } }
