@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");
:root {
  --bg: #eef2f6; --card: #fff; --ink: #18223a; --muted: #64708a; --line: #e2e7ef;
  --brand: #14213d; --brand-2: #e3f5f3; --teal: #13a89e; --teal-ink: #0d7d75; --gold: #d9b25f;
  --ok: #1d8a52; --warn: #b45309; --bad: #c2412d;
  --shadow: 0 1px 2px rgba(20,33,61,.05), 0 6px 18px rgba(20,33,61,.06);
  font-family: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55; word-break: keep-all; -webkit-font-smoothing: antialiased; }
p, h1, h2, .notice, .muted { text-wrap: pretty; }
a { color: var(--teal-ink); }
header.top { background: linear-gradient(120deg, #0b1630, var(--brand) 60%, #1f3a6b); color: #fff; padding: 10px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 12px rgba(11,22,48,.25); }
header.top .logo { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
header.top .logo img { height: 26px; width: auto; }
header.top .logo b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
header.top .logo b span { color: #8fe3da; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
header.top nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 99px; opacity: .8; font-size: 14px; font-weight: 600; }
header.top nav a.on, header.top nav a:hover { background: rgba(255,255,255,.14); opacity: 1; }
header.top nav a.on { box-shadow: inset 0 -2px 0 var(--teal); }
header.top .who { margin-left: auto; font-size: 13px; opacity: .9; }
header.top button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 99px; padding: 5px 14px; font-size: 13px; }
main { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
h1 { font-size: 22px; margin: 4px 0 14px; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 16px; margin: 0 0 12px; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 200px; }
input, select, textarea, button { font: inherit; }
input, select, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; min-width: 0; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px var(--brand-2); }
textarea { width: 100%; min-height: 160px; resize: vertical; }
button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 15px; cursor: pointer; color: var(--ink); font-weight: 600; }
button:hover { border-color: #c9d1de; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
.muted { color: var(--muted); font-size: 13px; }
.notice { padding: 10px 12px; border-radius: 8px; background: var(--brand-2); font-size: 14px; margin-bottom: 12px; }
.notice.warn { background: #fff7e6; color: #7c4a03; }
.notice.bad { background: #fdecec; color: var(--bad); }
.notice.ok { background: #e9f7ee; color: var(--ok); }
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; white-space: nowrap; }
th { background: #fafbfc; position: sticky; top: 0; font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover { background: #f1f8f7; }
.tag { display: inline-block; background: var(--brand-2); color: var(--teal-ink); border-radius: 4px; padding: 1px 6px; font-size: 12px; margin: 1px 2px 1px 0; }
.tag.gray { background: #eef0f3; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
label.f + input, label.f + select { width: 100%; }
.drawer { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 10; overflow-y: auto; }
.drawer.open { display: flex; }
.drawer .card { width: 100%; max-width: 520px; }
.list-box { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.list-box label { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.list-box label:last-child { border-bottom: 0; }
.phone-preview { background: #eef1f5; border-radius: 14px; padding: 14px; white-space: pre-wrap; font-size: 14px; min-height: 80px; }
.login { max-width: 380px; margin: 8vh auto; }
.login-hero { text-align: center; margin-bottom: 18px; }
.login-hero img { height: 56px; margin-bottom: 10px; }
.login-hero h1 { margin: 0; font-size: 24px; }
.login-hero h1 span { color: var(--teal); }
.login-hero p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.login input { width: 100%; margin-bottom: 10px; }
.login button { width: 100%; }
.menu a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: var(--muted); font-size: 14px; margin-bottom: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--teal); transition: transform .1s; }
.menu a:hover { transform: translateY(-1px); }
.menu a b { display: block; color: var(--brand); font-size: 16px; margin-bottom: 2px; }
/* ---- 성적관리 추가 ---- */
header.top .logo b span { color: #f3d58e; }
.login-hero h1 span { color: #b8892c; }
.menu a { border-left-color: var(--gold); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border-radius: 99px; padding: 7px 16px; }
.tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
table.input td { padding: 4px 4px; }
table.input input { width: 72px; padding: 6px 8px; text-align: right; }
table.input input.memo { width: 160px; text-align: left; }
table.input tr.saved td { background: #f2faf5; }
table.input tr.err td { background: #fdf1ef; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.stat { background: #f7f9fc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; color: var(--brand); }
.stat span { font-size: 12px; color: var(--muted); }
.pill { display: inline-block; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 600; }
.pill.등록 { background: #e3f4ea; color: var(--ok); }
.pill.대기 { background: #fff3d6; color: var(--warn); }
.pill.미등록 { background: #eef0f3; color: var(--muted); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 11px; fill: var(--muted); font-family: inherit; }
.search-results { max-height: 300px; overflow-y: auto; }
.search-results button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 9px 10px; font-weight: 500; }
.search-results button:hover { background: #f6f8fb; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.field-grid label.f + * { width: 100%; }
.drawer .card { max-width: 620px; }
textarea.short { min-height: 90px; }
.grid2.side { grid-template-columns: 300px 1fr; }
@media (max-width: 860px) { .grid2.side { grid-template-columns: 1fr; } }
