/* 사장님 포털 — same look as the mockup: white cards on a soft grey ground, one green accent */
:root {
  --ink: #16181B; --sub: #5B6168; --muted: #6B7178; --line: #E6E8EA; --line2: #EEF0F1;
  --ground: #F5F6F4; --card: #FFFFFF; --chip: #EEF0F1;
  --accent: #0B6E5B; --accent-soft: #E3F1EC; --warn: #B54708; --warn-soft: #FDF0E6;
  --font: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); -webkit-text-size-adjust: 100%; }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--ground); position: relative; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 5; height: 60px; padding: 0 12px 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.top h1 { margin: 0; font-size: 17px; font-weight: 600; flex: 1; }
.shop { display: flex; align-items: center; gap: 10px; }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.shop b { display: block; font-size: 15px; }
.shop small { display: block; font-size: 11px; color: var(--sub); }
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
main { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.flash { margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.pad { padding: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.label { font-size: 13px; font-weight: 600; color: var(--sub); margin: 0; }
.small { font-size: 12px; color: var(--sub); line-height: 1.5; }
.hello span { font-size: 13px; color: var(--sub); }
.hello h2 { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.row-link { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 60px; color: var(--ink); border-top: 1px solid var(--line2); }
.row-link:first-of-type { border-top: 0; }
.row-link .ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.row-link b { display: block; font-size: 15px; }
.row-link span { display: block; font-size: 12px; color: var(--sub); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: 12px; color: var(--sub); }
.stat b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 14px; font-weight: 500; }
.good { color: var(--accent); } .bad { color: var(--warn); }
.dark { background: var(--ink); color: #fff; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dark .eyebrow { font-size: 12px; color: #B8BEC4; }
.dark b { font-size: 17px; line-height: 1.4; }
.dark p { margin: 0; font-size: 13px; color: #D5D9DD; }
.btn { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; width: 100%; }
.btn.green { background: var(--accent); }
.btn.light { background: var(--card); color: var(--ink); border: 1px solid #D5D9DD; }
.btn.white { background: #fff; color: var(--ink); width: auto; align-self: flex-start; }
.btn.sm { min-height: 40px; font-size: 13px; width: auto; padding: 0 14px; border-radius: 10px; }
.btn[disabled] { background: var(--muted); cursor: not-allowed; }
.actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--chip); color: #3D434A; white-space: nowrap; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.post { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.post .head { display: flex; gap: 12px; }
.thumb { width: 96px; height: 120px; object-fit: cover; border-radius: 8px; background: var(--chip); flex: none; }
.post h3 { margin: 4px 0; font-size: 15px; line-height: 1.35; }
.cap { font-size: 12px; color: var(--sub); line-height: 1.5; white-space: pre-line; max-height: 5.8em; overflow: hidden; }
.slides { display: flex; gap: 6px; overflow-x: auto; }
.slides img { width: 72px; height: 90px; object-fit: cover; border-radius: 6px; flex: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid #D5D9DD; background: var(--card); color: #3D434A; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; cursor: pointer; }
.chip[aria-current="true"], .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.bubble { background: #F1F3F2; border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.6; white-space: pre-line; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line2); }
.person:first-child { border-top: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #3D434A; flex: none; }
.person b { display: block; font-size: 14px; }
.person span { display: block; font-size: 12px; color: var(--sub); }
.sticky-cta { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 12px 16px; background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.sticky-cta .small { text-align: center; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { min-height: 60px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.day small { font-size: 11px; } .day b { font-size: 16px; }
.day i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.day.has i { background: var(--accent); }
.day.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.day.on i { background: #fff; }
.item { display: flex; gap: 12px; align-items: center; padding: 10px; }
.item img, .item video { width: 56px; height: 70px; border-radius: 8px; object-fit: cover; background: var(--chip); flex: none; }
.item div { flex: 1; min-width: 0; }
.item small { display: block; font-size: 12px; color: var(--sub); }
.item b { display: block; font-size: 14px; }
.empty { border: 1px dashed #C9CED3; border-radius: 14px; padding: 18px; text-align: center; font-size: 13px; color: var(--sub); }
.bars { height: 140px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; align-items: end; border-bottom: 1px solid #D5D9DD; }
.bars div { background: #C9D3CF; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars div.last { background: var(--accent); }
.bar-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; font-size: 10px; color: var(--sub); text-align: center; }
.seg { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span { flex: 1; color: #3D434A; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font-size: 11px; color: var(--sub); font-weight: 500; text-align: right; padding: 4px 0; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { text-align: right; padding: 6px 0; font-variant-numeric: tabular-nums; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slot { height: 220px; border-radius: 14px; border: 1px dashed #9AA1A8; background: var(--card); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--sub); font-size: 13px; cursor: pointer; }
.slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .tag { position: absolute; left: 10px; top: 10px; z-index: 1; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.slot .tag.light { background: #fff; color: var(--ink); border: 1px solid #D5D9DD; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.check b { display: block; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field select { min-height: 46px; border-radius: 10px; border: 1px solid #D5D9DD; padding: 0 12px; background: #fff; font-size: 15px; }
nav.tabs { position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; bottom: 0; z-index: 6; height: calc(76px + env(safe-area-inset-bottom)); padding: 6px 8px calc(18px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; }
nav.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 24px; max-width: 420px; margin: 0 auto; }
.login h1 { margin: 0; font-size: 26px; }
.kakao-btn { background: #FEE500; color: #191600; }
@media (prefers-reduced-motion: no-preference) { .btn, .chip { transition: background .15s; } }
.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main[style*="max-width:none"] { max-width: none; }
textarea { width: 100%; }
.mark-img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); object-fit: cover; background: #fff; }

/* ── production line ─────────────────────────────── */
.tabs a{position:relative}
.badge{position:absolute;top:2px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:#D92D20;color:#fff;font-size:11px;font-style:normal;font-weight:700;line-height:17px;text-align:center}
.gate{display:flex;gap:4px;margin:2px 0 0}
.gate i{flex:1;height:4px;border-radius:2px;background:var(--line)}
.gate i.done{background:var(--accent)}
.gate i.now{background:#F79009}
.review .note{font-size:13.5px;color:var(--sub);white-space:pre-line;margin:0}
.review .media{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.review .media img,.review .media video{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:8px;background:#F2F4F5;display:block}
.review .media.one{grid-template-columns:1fr}
.review .media.one img,.review .media.one video{aspect-ratio:auto;max-height:460px;object-fit:contain}
.review .proposal{border-left:3px solid var(--accent);padding:2px 0 2px 12px}
.feedback{background:#FFF6ED;border-radius:10px;padding:10px 12px;font-size:13px;color:#93370D}
.hist{font-size:12px;color:var(--muted);margin:0;padding:0;list-style:none}
.hist li{padding:2px 0}
.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.three .btn{padding-left:0;padding-right:0}
.btn.warn{background:#FFF6ED;color:#B54708}
.meter{height:8px;border-radius:4px;background:var(--line);overflow:hidden}
.meter b{display:block;height:100%;background:var(--accent)}

/* ── Instagram grid ──────────────────────────────── */
.switch{display:grid;grid-template-columns:1fr 1fr;background:var(--chip);border-radius:12px;padding:3px}
.switch a{text-align:center;padding:9px 0;border-radius:10px;color:var(--sub);font-size:14px;font-weight:600}
.switch a[aria-selected="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.ig-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;margin:0 -16px}
.ig-tile{position:relative;aspect-ratio:3/4;background:#ECEEEF;overflow:hidden;display:block}
.ig-tile img,.ig-tile video{width:100%;height:100%;object-fit:cover;display:block}
.ig-tile.planned::after{content:"";position:absolute;inset:0;border:3px solid var(--accent);pointer-events:none}
.ig-tile.planned.pending::after{border-color:#F79009;border-style:dashed}
.ig-badge{position:absolute;left:4px;right:4px;bottom:4px;background:rgba(17,17,17,.78);color:#fff;font-size:10.5px;font-weight:600;border-radius:6px;padding:3px 5px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ig-kind{position:absolute;top:5px;right:6px;color:#fff;font-size:13px;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.ig-avatar{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:none}
.ig-ring{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:20px;color:#fff;background:linear-gradient(45deg,#F58529,#DD2A7B,#8134AF)}
