:root {
  --page: #f6f7f8;
  --white: #fff;
  --ink: #1b1c23;
  --text: #31333f;
  --muted: #9195ab;
  --line: #cbCDD7;
  --orange: #f05000;
  --orange-soft: #ffe3c3;
  --green: #1d9954;
  --green-soft: #c3f5de;
  --shadow: 0 12px 40px rgba(27, 28, 35, .08);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.boot { display: grid; min-height: 100vh; place-items: center; color: var(--muted); }
.shell { min-height: 100vh; padding: 32px 48px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1180px; margin: 0 auto 28px; }
.brand-kicker { color: var(--orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.brand { margin: 4px 0 0; font-size: 21px; letter-spacing: -.04em; }
.account { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.account strong { color: var(--text); }
.content { max-width: 1180px; margin: 0 auto; }
.button { border: 0; border-radius: 8px; padding: 10px 17px; background: var(--orange); color: white; font-size: 13px; font-weight: 700; }
.button:hover { background: #d94800; }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--text); }
.button.ghost { padding: 7px 11px; background: transparent; color: var(--muted); }
.button.small { padding: 6px 11px; font-size: 11px; }
.button.outline { border: 1px solid var(--orange); background: white; color: var(--orange); }
.button[disabled] { cursor: wait; opacity: .6; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar-copy { color: var(--muted); font-size: 12px; }
.card { border-radius: 13px; background: white; box-shadow: 0 1px 5px rgba(27, 28, 35, .06); }
.empty { padding: 80px 20px; text-align: center; }
.empty-mark { display: grid; width: 48px; height: 48px; margin: 0 auto 16px; place-items: center; border-radius: 14px; background: var(--orange-soft); color: var(--orange); font-weight: 900; }
.empty h2 { margin: 0 0 8px; font-size: 17px; }
.empty p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.report-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.report-table th { padding: 11px 14px; background: var(--text); color: rgba(255,255,255,.68); font-size: 10px; text-align: center; }
.report-table th:first-child { border-radius: 12px 0 0; }
.report-table th:last-child { border-radius: 0 12px 0 0; }
.report-table td { padding: 13px 14px; border-bottom: 1px solid var(--page); color: var(--text); font-size: 12px; text-align: center; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table .person { color: var(--ink); font-weight: 800; }
.actions { display: flex; justify-content: flex-end; gap: 6px; }
.grade { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-weight: 900; }
.grade.A, .grade.B { background: var(--green-soft); color: var(--green); }
.grade.C, .grade.D { background: var(--orange-soft); color: var(--orange); }

.login-page { display: grid; min-height: 100vh; grid-template-columns: 1.15fr .85fr; background: var(--white); }
.login-visual { position: relative; display: flex; overflow: hidden; flex-direction: column; justify-content: flex-end; padding: 64px; color: white; background: #202229; }
.login-visual::before { position: absolute; width: 520px; height: 520px; right: -90px; top: -190px; border: 90px solid var(--orange); border-radius: 50%; content: ""; opacity: .9; }
.login-visual::after { position: absolute; width: 220px; height: 220px; left: 15%; top: 15%; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; content: ""; }
.visual-copy { position: relative; z-index: 1; max-width: 520px; }
.visual-copy span { font-size: 12px; font-weight: 800; letter-spacing: .16em; color: #ffb17e; }
.visual-copy h1 { margin: 16px 0 12px; font-size: clamp(38px, 5vw, 66px); line-height: .98; letter-spacing: -.06em; }
.visual-copy p { max-width: 390px; margin: 0; color: rgba(255,255,255,.6); font-size: 14px; line-height: 1.7; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-box { width: min(360px, 100%); }
.login-box h2 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.05em; }
.login-box > p { margin: 0 0 32px; color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.field input, .field select { width: 100%; min-height: 42px; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 11px; outline: none; background: white; color: var(--ink); font-size: 13px; }
.field input:focus, .field select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,80,0,.1); }
.login-form { display: grid; gap: 15px; }
.login-form .button { margin-top: 6px; padding: 13px; }
.error { min-height: 18px; margin: 0; color: #c93820; font-size: 12px; }

.form-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.form-head h2 { margin: 0; font-size: 20px; }
.form-card { margin-bottom: 14px; padding: 22px 24px; }
.section-title { margin: 0 0 17px; padding-bottom: 12px; border-bottom: 1px solid var(--page); font-size: 12px; }
.sub-title { margin: 18px 0 11px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 13px 16px; }
.form-footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 6px; }

.report-shell { min-height: 100vh; padding: 24px; background: #d9d9d9; }
.report-toolbar { display: flex; justify-content: space-between; width: min(794px, 100%); margin: 0 auto 16px; }
.paper { width: min(794px, 100%); min-height: 1123px; margin: 0 auto; padding: 35px 32px 40px; background: var(--page); box-shadow: var(--shadow); }
.paper-header { margin: -35px -32px 0; padding: 35px 32px 19px; background: white; }
.paper-headline { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.paper-kicker { color: var(--muted); font-size: 10px; }
.paper-title { margin-top: 5px; font-size: 25px; font-weight: 800; letter-spacing: -.05em; }
.exam-date { text-align: right; }
.exam-date span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.exam-date strong { font-size: 15px; }
.heavy-rule { height: 4px; margin: 18px 0 12px; background: var(--text); }
.info-strip { display: flex; }
.info { min-width: 0; padding: 4px 10px; border-left: 2px solid var(--text); }
.info span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.info strong { white-space: nowrap; font-size: 11px; }
.paper-section { margin-top: 24px; }
.paper-section > h2 { margin: 0 0 12px; font-size: 16px; }
.paper-section > h2 span { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 500; }
.physical-section > h2 { margin-bottom: 25px; }
.physical-section .measurement-card:first-child .measurement-row { min-height: 31px; }
.strength-section { margin-top: 47px; }
.strength-section .measurement-card { padding: 20px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(160px, 1fr); gap: 14px; }
.physical-measurements, .strength-details { display: grid; gap: 14px; }
.measurement-card, .summary-card { padding: 16px 20px; background: white; }
.measurement-card h3, .summary-card h3 { margin: 0 0 13px; color: var(--muted); font-size: 9px; }
.measurement-card h3 span { margin-left: 3px; font-weight: 500; }
.measurement-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 42px 36px; align-items: center; gap: 8px; min-height: 27px; font-size: 9px; }
.measurement-row > strong { font-size: 9px; }
.measurement-row > span { text-align: right; }
.measurement-row > b { text-align: right; font-size: 16px; }
.measurement-row > b:empty { display: block; }
.measure-track { position: relative; overflow: hidden; height: 5px; border-radius: 5px; background: var(--line); }
.measure-track i { position: absolute; z-index: 1; inset: 0 auto 0 0; display: block; border-radius: inherit; }
.measure-track span { position: absolute; z-index: 2; top: 0; bottom: 0; width: 2px; background: white; }
.measure-track span:nth-of-type(1) { left: 25%; }
.measure-track span:nth-of-type(2) { left: 50%; }
.measure-track span:nth-of-type(3) { left: 75%; }
.measure-track .green { background: var(--green); }
.measure-track .orange { background: var(--orange); }
.summary-card { display: flex; flex-direction: column; justify-content: space-between; }
.score-gauge { position: relative; width: 118px; height: 118px; margin: 7px auto 16px; }
.score-gauge svg { width: 100%; height: 100%; overflow: visible; }
.score-gauge path { fill: none; stroke-width: 12; stroke-linecap: round; }
.score-gauge .gauge-base { stroke: var(--line); }
.score-gauge .gauge-value { stroke: var(--green); }
.score-gauge.orange .gauge-value { stroke: var(--orange); }
.score-gauge > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-gauge strong { display: block; font-size: 25px; }
.score-gauge strong small { color: var(--muted); font-size: 13px; }
.score-gauge span { display: inline-block; margin-top: 3px; border-radius: 10px; padding: 2px 7px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 800; }
.score-gauge.orange span { color: var(--orange); background: var(--orange-soft); }
.summary-card p { margin: 0; color: var(--text); font-size: 10px; line-height: 1.65; }
.grip-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.grip-value span { display: block; color: var(--text); font-size: 8px; }
.grip-value strong { display: block; margin-top: 8px; font-size: 17px; }
.grip-value em { margin-left: 2px; color: var(--muted); font-size: 8px; font-style: normal; }
.grip-standard { width: 100%; border-collapse: collapse; background: white; color: var(--text); font-size: 7px; text-align: center; }
.grip-standard .age-column { width: 33%; }
.grip-standard .relative-column { width: 11%; }
.grip-standard .absolute-column { width: 17%; }
.grip-standard th, .grip-standard td { height: 25px; border: 1px solid #edf0f2; padding: 2px 3px; }
.grip-standard thead th { border-color: white; background: var(--text); color: white; font-weight: 700; }
.grip-standard tbody th { font-weight: 500; }
.grip-standard tbody tr.active { background: #edf0f2; font-weight: 800; }
.grip-standard tbody td.selected { color: var(--orange); background: var(--orange-soft); font-weight: 900; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; border-radius: 9px; padding: 12px 16px; color: white; background: var(--text); box-shadow: var(--shadow); font-size: 12px; }

@media (max-width: 760px) {
  .shell { padding: 22px 16px 48px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 250px; padding: 32px; }
  .login-panel { padding: 42px 24px; }
  .topbar { align-items: flex-start; }
  .account { flex-wrap: wrap; justify-content: flex-end; }
  .paper { min-width: 720px; }
  .report-shell { overflow-x: auto; padding: 12px; }
  .report-toolbar { min-width: 720px; }
}

@media print {
  .report-toolbar { display: none; }
  .report-shell { padding: 0; background: white; }
  .paper { width: 210mm; min-width: 0; margin: 0; box-shadow: none; }
  @page { size: A4; margin: 0; }
}
