:root {
  color-scheme: light;
  --ink: #152b26;
  --ink-soft: #53645f;
  --paper: #f3f0e8;
  --card: #fffdf8;
  --line: #d8d5ca;
  --accent: #ef6a45;
  --accent-dark: #c64b2d;
  --mint: #d5e9df;
  --warning: #fff0bf;
  --danger: #9f2f26;
  --shadow: 0 18px 45px rgba(21, 43, 38, 0.1);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background:
  radial-gradient(circle at 100% 0, rgba(239, 106, 69, .11), transparent 32rem),
  radial-gradient(circle at 0 100%, rgba(77, 145, 115, .12), transparent 34rem), var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 900; letter-spacing: -.06em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(36px, 7vw, 72px); line-height: 1.02; letter-spacing: -.075em; }
h2 { margin-bottom: 16px; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.05em; }
h3 { margin-bottom: 8px; font-size: 17px; letter-spacing: -.025em; }
.muted { color: var(--ink-soft); }
.fine { font-size: 13px; line-height: 1.55; color: var(--ink-soft); }

.hero { min-height: 66vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 48px; align-items: center; }
.hero-copy p { max-width: 640px; font-size: 19px; line-height: 1.7; color: var(--ink-soft); }
.hero-copy > p:not(.eyebrow) { word-break: keep-all; }
.hero-mark { position: relative; width: min(340px, 100%); aspect-ratio: 1; justify-self: end; border-radius: 50%; background: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; }
.hero-clock { position: relative; width: 58%; aspect-ratio: 1; border: 18px solid var(--paper); border-radius: 50%; }
.clock-hand { position: absolute; left: 50%; bottom: 50%; width: 16px; border-radius: 999px; transform-origin: 50% 100%; }
.clock-minute { height: 38%; background: var(--paper); transform: translateX(-50%); }
.clock-hour { height: 30%; background: var(--accent); transform: translateX(-50%) rotate(120deg); }
.clock-pin { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; border: 4px solid var(--ink); border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.choice { padding: 20px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,248,.8); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.choice:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.choice strong { display: block; margin-bottom: 5px; font-size: 18px; }

.btn { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-weight: 800; }
.btn:hover { border-color: var(--ink); }
.btn-primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-accent { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn-danger { color: var(--danger); }
.btn-small { min-height: 36px; padding: 7px 11px; border-radius: 10px; font-size: 13px; }

.dashboard-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.dashboard-head h1 { margin: 0; font-size: clamp(34px, 6vw, 58px); }
.date-chip { white-space: nowrap; padding: 9px 13px; border-radius: 999px; background: var(--mint); font-weight: 800; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { grid-column: span 12; padding: 24px; border: 1px solid rgba(21,43,38,.11); border-radius: 26px; background: rgba(255,253,248,.92); box-shadow: 0 7px 24px rgba(21,43,38,.055); }
.card-7 { grid-column: span 7; }
.card-5 { grid-column: span 5; }
.card-4 { grid-column: span 4; }
.card-8 { grid-column: span 8; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }

.punch-zone { min-height: 390px; display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); color: #fff; overflow: hidden; position: relative; }
.punch-zone::after { content: ""; position: absolute; width: 280px; height: 280px; border: 58px solid rgba(255,255,255,.06); border-radius: 50%; right: -100px; bottom: -110px; }
.state-label { color: #b7d7c8; font-weight: 800; }
.state-time { margin: 8px 0 0; font-size: 14px; color: #c8d4d0; }
.punch-button { position: relative; z-index: 1; width: min(230px, 68vw); aspect-ratio: 1; align-self: center; border: 0; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 16px 38px rgba(239,106,69,.32); font-size: 34px; font-weight: 950; letter-spacing: -.06em; transition: transform .15s, background .2s; }
.punch-button:hover { transform: scale(1.025); }
.punch-button:active { transform: scale(.975); }
.punch-button[data-state="on"] { background: #f4c65d; color: var(--ink); }
.punch-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.money { margin: 12px 0 6px; font-size: clamp(38px, 6vw, 58px); font-weight: 950; letter-spacing: -.065em; }
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.metric { padding: 16px; border-radius: 18px; background: var(--paper); }
.metric span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.metric strong { font-size: 19px; }
.warning { padding: 13px 15px; border-radius: 14px; background: var(--warning); color: #5f4d14; font-size: 13px; line-height: 1.55; }

.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 850; }
.field input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); outline: 0; }
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21,43,38,.1); }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.login-card { width: min(460px, 100%); margin: 8vh auto; }
.pin-input { font-size: 28px; letter-spacing: .28em; text-align: center; font-weight: 900; }

.employee-list { display: grid; gap: 10px; }
.employee-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) repeat(2, minmax(110px, .75fr)) auto; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.employee-row:last-child { border-bottom: 0; }
.employee-row .amount { font-weight: 900; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; background: var(--mint); font-size: 12px; font-weight: 850; }
.badge-warn { background: var(--warning); }
.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; color: var(--ink-soft); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
select.btn { width: 100%; text-align: left; }

.credential-box { margin-top: 18px; padding: 18px; border-radius: 18px; background: var(--paper); word-break: break-all; }
.credential-box img { display: block; width: min(240px, 100%); margin: 0 auto 16px; border-radius: 14px; background: #fff; padding: 10px; }
.credential-line { margin: 8px 0; font-size: 13px; }
.day-list { display: grid; gap: 8px; }
.day-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.day-row:last-child { border-bottom: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); padding: 14px 17px; border-radius: 15px; background: var(--ink); color: #fff; box-shadow: var(--shadow); text-align: center; font-weight: 750; }
.toast[data-tone="error"] { background: var(--danger); }
.offline { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.offline .card { max-width: 500px; }
.success-mark { width: 74px; height: 74px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); font-size: 34px; font-weight: 950; }

@media (max-width: 760px) {
  .shell { width: min(100% - 22px, 680px); padding-top: 14px; }
  .topbar { margin-bottom: 18px; }
  .hero { grid-template-columns: 1fr; gap: 18px; min-height: auto; padding: 12px 0 30px; }
  .hero-mark { width: 132px; justify-self: start; order: -1; }
  .hero-clock { border-width: 10px; }
  .clock-hand { width: 9px; }
  .clock-pin { width: 13px; height: 13px; border-width: 3px; }
  .choice-grid { grid-template-columns: 1fr; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .card-7, .card-5, .card-4, .card-8 { grid-column: span 12; }
  .punch-zone { min-height: 420px; }
  .employee-row { grid-template-columns: 1fr auto; }
  .employee-row > :nth-child(2), .employee-row > :nth-child(3) { grid-column: span 1; }
  .employee-row > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .metric-row { grid-template-columns: 1fr; }
  .card { padding: 19px; border-radius: 22px; }
  .punch-button { width: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
