:root {
  color-scheme: light;
  --navy: #132f4c;
  --navy-2: #1d4265;
  --blue: #246bfd;
  --blue-soft: #eaf1ff;
  --ink: #152333;
  --muted: #6c7a89;
  --line: #e4eaf0;
  --surface: #ffffff;
  --background: #f3f6f9;
  --green: #14804a;
  --green-soft: #e7f6ed;
  --amber: #a15c00;
  --amber-soft: #fff4df;
  --red: #c43d4b;
  --purple: #6941c6;
  --shadow: 0 14px 40px rgba(19, 47, 76, .08);
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--navy); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: white; background: var(--blue); font-family: Arial, sans-serif; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }

.login-shell { min-height: 100vh; min-height: 100svh; position: relative; overflow: auto; padding: clamp(24px, 5vh, 56px) 24px; display: grid; place-items: center; background-color: #edf3f8; background-image: linear-gradient(rgba(82,111,138,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(82,111,138,.045) 1px, transparent 1px), radial-gradient(circle at 78% 8%, rgba(36,107,253,.17), transparent 35%), radial-gradient(circle at 12% 92%, rgba(19,47,76,.09), transparent 30%); background-size: 32px 32px, 32px 32px, auto, auto; }
.login-shell::before, .login-shell::after { content: ""; position: fixed; pointer-events: none; border-radius: 50%; border: 1px solid rgba(36,107,253,.08); }
.login-shell::before { width: 460px; height: 460px; top: -310px; right: -90px; box-shadow: 0 0 0 76px rgba(36,107,253,.025); }
.login-shell::after { width: 260px; height: 260px; left: -170px; bottom: -165px; }
.login-panel { width: min(100%, 960px); position: relative; z-index: 1; display: grid; place-items: center; }
.login-card { width: 100%; overflow: hidden; border: 1px solid #d8e2ea; border-radius: 24px; background: rgba(255,255,255,.985); box-shadow: 0 30px 90px rgba(16,41,63,.15); }
.login-portal-header { min-height: 78px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.login-brand { flex: 0 0 auto; }
.login-brand .brand-mark { width: 43px; height: 43px; border-radius: 13px; font-size: 20px; box-shadow: 0 8px 20px rgba(36,107,253,.2), inset 0 0 0 1px rgba(255,255,255,.16); }
.login-brand > span:last-child { display: grid; gap: 2px; }
.login-brand strong { font-size: 20px; line-height: 1.1; }
.login-brand small { color: #8a99a7; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.login-system-name { padding: 8px 11px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #dbe5ee; border-radius: 20px; color: #617589; background: #f7f9fb; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.login-system-name i, .login-portal-footer i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #27a466; box-shadow: 0 0 0 4px rgba(39,164,102,.11); }
.login-portal-body { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); }
.login-primary { padding: 42px 52px 38px; }
.login-heading { text-align: left; }
.login-heading .eyebrow { margin-bottom: 8px; font-size: 9px; }
.login-card h2 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.login-primary > .muted { margin: 10px 0 27px; font-size: 13px; }
.login-card label { display: block; margin: 18px 0 8px; color: #344455; font-size: 13px; font-weight: 700; }
.input-wrap { height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 15px; border: 1px solid #d7dfe7; border-radius: 12px; transition: .2s; }
.input-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,253,.11); }
.input-wrap > span { color: #9ba8b5; font-size: 10px; }
.input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.icon-button { padding: 7px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; }
.icon-button:hover { background: #edf2f6; }
.form-error { min-height: 20px; margin: 10px 0 2px; color: var(--red); font-size: 13px; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: 11px; color: white; background: var(--blue); font-weight: 800; box-shadow: 0 7px 18px rgba(36,107,253,.2); transition: .18s; }
.primary-button:hover { background: #1356dd; transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.primary-button--large { width: 100%; min-height: 54px; margin-top: 8px; }
.secondary-button { min-height: 44px; padding: 0 18px; border: 1px solid #d7e0e7; border-radius: 10px; color: #536474; background: #fff; font-weight: 800; }
.secondary-button:hover { color: var(--navy); border-color: #bcc9d3; background: #f6f9fb; }
.login-help-button { width: 100%; margin-top: 11px; padding: 8px; border: 0; color: #617487; background: transparent; font-size: 12px; font-weight: 700; }
.login-help-button:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.quick-login { padding: 42px 34px 34px; border-left: 1px solid var(--line); background: linear-gradient(155deg, #f8fafc, #f1f5f8); }
.quick-login-heading { margin-bottom: 19px; display: flex; align-items: center; gap: 11px; }
.quick-login-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 17px; font-weight: 900; }
.quick-login-heading strong, .quick-login-heading p { display: block; }
.quick-login-heading strong { color: #30475c; font-size: 13px; }
.quick-login-heading p { margin: 4px 0 0; color: #82909d; font-size: 10px; }
.chip-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.chip-list button { min-width: 0; min-height: 62px; padding: 9px 10px; position: relative; display: grid; grid-template-columns: 30px minmax(0,1fr) 14px; align-items: center; gap: 8px; border: 1px solid #dce4eb; border-radius: 12px; color: #435365; background: rgba(255,255,255,.92); text-align: left; transition: border-color .17s, background .17s, box-shadow .17s, transform .17s; }
.chip-list button:hover { border-color: #8db1f7; color: #245ca8; background: #fff; box-shadow: 0 7px 18px rgba(35,75,112,.07); transform: translateY(-1px); }
.chip-list button.is-selected { border-color: var(--blue); color: #245ca8; background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(36,107,253,.08); }
.chip-list button > span:nth-child(2) { min-width: 0; }
.chip-list button strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.chip-list button i { color: var(--blue); font-size: 10px; font-style: normal; opacity: 0; }
.chip-list button.is-selected i { opacity: 1; }
.account-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #4d667d; background: #edf2f6; font-size: 10px; font-weight: 900; }
.chip-list button.is-selected .account-avatar { color: white; background: var(--blue); }
.login-scope-note { margin-top: 17px; padding: 12px; display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; border: 1px solid #dfe8e4; border-radius: 11px; color: #466354; background: rgba(237,248,241,.82); }
.login-scope-note > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: #dff1e6; font-size: 10px; font-weight: 900; }
.login-scope-note strong { display: block; font-size: 9px; }
.login-scope-note p { margin: 3px 0 0; color: #71887b; font-size: 8px; line-height: 1.45; }
.login-portal-footer { min-height: 48px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #7c8b98; background: #fbfcfd; }
.login-portal-footer span { display: flex; align-items: center; gap: 9px; font-size: 9px; font-weight: 800; }
.login-portal-footer small { font-size: 8px; letter-spacing: .04em; }
.login-card.login-card--compact { width: min(100%, 520px); }
.login-card.login-card--compact .login-portal-body { grid-template-columns: 1fr; }

.app-shell { min-height: 100vh; }
.app-main { min-height: calc(100vh - 60px); }
.topbar { position: sticky; z-index: 40; top: 0; min-height: 60px; padding: 0 clamp(18px, 2.5vw, 36px); display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); box-shadow: 0 3px 14px rgba(19,47,76,.035); backdrop-filter: blur(12px); }
.topbar-leading { min-width: 0; display: flex; align-items: center; gap: 24px; }
.topbar-leading .brand { flex: 0 0 auto; }
.topbar-scope { min-width: 0; padding-left: 24px; display: grid; gap: 3px; border-left: 1px solid var(--line); }
.topbar-label { color: var(--muted); font-size: 11px; }
.topbar-scope strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.protection-mode { margin-right: 5px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px #e6f6ee; }
.top-action { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; color: #58697a; background: transparent; font-size: 11px; font-weight: 800; white-space: nowrap; }
.top-action:hover, .top-action.is-active { color: var(--navy); border-color: #d9e2e9; background: #f2f6f9; }
.top-action--primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 6px 14px rgba(36,107,253,.17); }
.top-action--primary:hover, .top-action--primary.is-active { color: #fff; border-color: #1659df; background: #1659df; }
.topbar-user-box { margin-left: 7px; padding-left: 15px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; border-left: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #244d70, #173853); font-size: 12px; font-weight: 800; }
.topbar-user-box strong, .topbar-user-box small { display: block; white-space: nowrap; }
.topbar-user-box strong { color: #334455; font-size: 11px; }
.topbar-user-box small { margin-top: 2px; color: #8b98a4; font-size: 9px; }
.logout-button { min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; color: #788795; background: transparent; font-size: 10px; font-weight: 700; }
.logout-button:hover { color: var(--red); background: #fff1f3; }
.page-content { max-width: 1540px; margin: auto; padding: 17px clamp(16px, 2.2vw, 32px) 32px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.page-heading h1 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.page-heading > div > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.period-control { display: flex; align-items: center; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 3px 10px rgba(19,47,76,.035); }
.period-field { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 8px; border-left: 1px solid var(--line); }
.period-field:first-child { border-left: 0; }
.period-field span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.period-field input, .period-field select { min-width: 128px; border: 0; outline: 0; color: var(--navy); font-weight: 800; background: transparent; }
.period-field--mode select { min-width: 58px; }
.period-action { min-height: 32px; padding: 0 11px; border: 1px solid #cbd8e3; border-radius: 8px; color: #1f4f86; background: #eef5ff; font-size: 10px; font-weight: 850; white-space: nowrap; }
.period-action:hover { border-color: #9ab9e8; background: #e4efff; }

.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.summary-card { --summary-accent: var(--navy); min-height: 114px; padding: 10px 14px 11px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface); box-shadow: 0 4px 15px rgba(19,47,76,.035); text-align: left; transition: border-color .18s, box-shadow .18s, transform .18s; }
.summary-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--summary-accent); opacity: .85; }
.summary-card:hover { border-color: color-mix(in srgb, var(--summary-accent) 32%, var(--line)); box-shadow: 0 12px 28px rgba(19,47,76,.09); transform: translateY(-2px); }
.summary-card--completed { --summary-accent: var(--blue); }
.summary-card--needed { --summary-accent: #dc8c18; }
.summary-card--improved { --summary-accent: var(--green); }
.summary-card--kpi { --summary-accent: var(--purple); }
.summary-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-open { color: #718495; font-size: 10px; font-weight: 750; }
.summary-label { display: block; margin: 4px 0 0; color: #526779; font-size: 13px; font-weight: 800; line-height: 1.25; }
.summary-card strong { display: flex; align-items: baseline; gap: 4px; font-size: 32px; line-height: 1; letter-spacing: -.045em; }
.summary-card strong em { color: #6f8190; font-size: 12px; font-style: normal; font-weight: 700; letter-spacing: 0; }
.summary-card small { display: block; margin-top: 2px; color: #7e8e9c; font-size: 10.5px; line-height: 1.2; }
.summary-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--navy); background: #edf2f6; font-size: 13px; font-weight: 900; }
.summary-icon--blue { color: var(--blue); background: var(--blue-soft); }
.summary-icon--amber { color: var(--amber); background: var(--amber-soft); }
.summary-icon--green { color: var(--green); background: var(--green-soft); }
.summary-icon--purple { color: var(--purple); background: #f1ebff; }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
.dashboard-layout > * { min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 7px 22px rgba(19,47,76,.04); }
.panel-heading { padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { border: 0; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; }
.filter-bar { padding: 9px 12px; display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(115px, .7fr)); gap: 7px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.filter-bar input, .filter-bar select { width: 100%; height: 38px; border: 1px solid #dce3e9; border-radius: 8px; outline: none; color: #425263; background: #fff; font-size: 11px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(36,107,253,.09); }
.filter-bar select { padding: 0 10px; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field span { position: absolute; left: 12px; color: #91a0ad; }
.search-field input { padding: 0 12px 0 34px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; color: #7b8996; background: #f8fafc; font-size: 10px; font-weight: 800; text-align: left; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid #edf1f4; color: #405160; font-size: 11px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .16s; }
tbody tr:hover { background: #f8fbff; }
.org-cell strong { display: block; max-width: 230px; overflow: hidden; color: #1c2e40; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.org-cell span { display: block; max-width: 260px; margin-top: 4px; overflow: hidden; color: #8a98a5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.result-score { color: #203346; font-weight: 800; }
.result-grade { display: block; margin-top: 3px; color: #8997a4; font-size: 9px; }
.status-badge { display: inline-flex; min-height: 22px; padding: 0 8px; align-items: center; border-radius: 20px; color: #4c5c6b; background: #edf1f4; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-badge--success { color: var(--green); background: var(--green-soft); }
.status-badge--warning { color: var(--amber); background: var(--amber-soft); }
.status-badge--danger { color: var(--red); background: #fdecef; }
.status-badge--info { color: #1d5bc4; background: var(--blue-soft); }
.feedback-cell { max-width: 220px; }
.feedback-text { display: block; margin-top: 5px; overflow: hidden; color: #7b8996; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.feedback-text.is-improved { color: #789486; text-decoration: line-through; }
.row-detail { width: 32px; height: 32px; border: 0; border-radius: 8px; color: #6f7e8c; background: #f0f4f7; }
.row-detail:hover { color: white; background: var(--blue); }
.empty-state { padding: 58px 20px; text-align: center; }
.empty-state > span { font-size: 30px; color: #a8b4bf; }
.empty-state h3 { margin: 12px 0 6px; font-size: 14px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 11px; }
.mobile-results { display: none; }

.insight-panel { position: sticky; top: 72px; }
.insight-panel > h3 { margin: 17px 20px 10px; font-size: 11px; }
.progress-block { padding: 15px 16px; }
.progress-copy { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: var(--muted); font-size: 11px; }
.progress-copy strong { color: var(--navy); font-size: 20px; }
progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 10px; background: #e9eef2; accent-color: var(--blue); }
progress::-webkit-progress-bar { border-radius: 10px; background: #e9eef2; }
progress::-webkit-progress-value { border-radius: 10px; background: linear-gradient(90deg, var(--blue), #56a0ff); }
.insight-divider { height: 1px; margin: 0 16px; background: var(--line); }
.breakdown-list, .team-list { padding: 0 16px 14px; display: grid; gap: 8px; }
.breakdown-row, .team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #576675; font-size: 10px; }
.breakdown-row span:first-child { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #a9b4bd; }
.legend-dot--needed { background: #efa83a; }
.legend-dot--done { background: #2eae6e; }
.legend-dot--partial { background: #3478d4; }
.team-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row strong { color: #25394c; }

.upload-layout { display: grid; grid-template-columns: minmax(380px, .85fr) minmax(420px, 1.15fr); gap: 18px; align-items: start; }
.upload-card, .preview-card { padding: 24px; }
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 14px; font-weight: 800; }
.step-label span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--navy); font-size: 10px; }
.dropzone { min-height: 260px; padding: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed #b8c5d0; border-radius: 13px; background: #f9fbfd; text-align: center; transition: .18s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--blue); background: #f3f7ff; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.upload-symbol { width: 48px; height: 48px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-size: 24px; }
.dropzone strong { font-size: 14px; }
.dropzone p { margin: 9px 0 14px; color: var(--muted); font-size: 11px; }
.dropzone > span:last-of-type { color: #9ba7b2; font-size: 9px; }
.file-selection { margin: 14px 0; padding: 12px; border-radius: 9px; color: #405160; background: #f2f6f9; font-size: 11px; word-break: break-all; }
.upload-card > .primary-button, .preview-card > .primary-button { width: 100%; margin-top: 16px; }
.preview-title { padding-bottom: 17px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.preview-title strong { font-size: 13px; }
.preview-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.preview-stats { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.preview-stats div { padding: 13px; border-radius: 9px; background: #f5f8fa; }
.preview-stats span, .preview-stats strong { display: block; }
.preview-stats span { color: var(--muted); font-size: 9px; }
.preview-stats strong { margin-top: 5px; font-size: 18px; }
.preview-card h3 { margin: 17px 0 10px; font-size: 11px; }
.month-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.month-tag { padding: 6px 9px; border-radius: 7px; color: #476078; background: #edf3f7; font-size: 9px; }
.month-tag.has-existing { color: var(--amber); background: var(--amber-soft); }
.replace-notice { margin-top: 18px; padding: 13px 14px; display: grid; grid-template-columns: auto 1fr; gap: 11px; border: 1px solid #cfdcf0; border-radius: 11px; color: #34506b; background: #f4f8ff; }
.replace-notice > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--blue); background: #e2ecff; font-size: 16px; }
.replace-notice strong { font-size: 11px; }
.replace-notice p { margin: 5px 0 0; color: #667c91; font-size: 9px; line-height: 1.6; }

.account-layout { display: grid; gap: 14px; }
.account-safe-note, .access-total { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 20px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.account-safe-note { color: #245ca8; background: var(--blue-soft); }
.access-total { color: var(--green); background: var(--green-soft); }
.account-list { padding: 8px 12px 12px; display: grid; gap: 6px; }
.account-row { min-height: 66px; padding: 10px 12px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 132px 132px 76px 92px; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 10px; background: #fff; }
.account-row:hover { border-color: #e0e8ef; background: #f8fbfd; }
.account-row-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #244d70; font-size: 11px; font-weight: 900; }
.account-row-main, .account-row-main strong, .account-row-main small, .account-row-meta small, .account-row-meta time { display: block; min-width: 0; }
.account-row-main strong { overflow: hidden; color: #21364a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.account-row-main small { margin-top: 5px; overflow: hidden; color: #7d8c99; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-row-meta { display: grid; gap: 4px; }
.account-row-meta small { color: #8a98a5; font-size: 9px; font-weight: 800; }
.account-row-meta time { color: #40566a; font-size: 10px; white-space: nowrap; }
.account-row-status { justify-self: start; }
.account-reset-button { min-height: 34px; padding: 0 11px; border: 1px solid #f0c5ca; border-radius: 9px; color: #a53844; background: #fff4f5; font-size: 10px; font-weight: 850; white-space: nowrap; }
.account-reset-button:hover { border-color: #e49ca5; background: #ffecef; }
.account-reset-button:disabled { cursor: not-allowed; opacity: .55; }
.access-panel .panel-heading { align-items: center; }
.access-log-list--embedded { max-height: none; padding: 8px 12px 12px; }
.access-log-list--embedded .access-account { border: 1px solid transparent; border-bottom: 1px solid #edf1f4; border-radius: 10px; }
.access-log-list--embedded .access-account:hover { border-color: #e0e8ef; }

.detail-dialog { width: min(520px, 100%); max-width: none; height: 100vh; max-height: 100vh; margin: 0 0 0 auto; padding: 0; border: 0; color: var(--ink); background: white; box-shadow: -20px 0 60px rgba(16,41,63,.16); }
.detail-dialog[open] { animation: slide-in .2s ease-out; }
.detail-dialog::backdrop { background: rgba(10,28,43,.28); backdrop-filter: blur(2px); }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.detail-dialog.detail-dialog--summary { width: min(620px, calc(100% - 64px)); height: auto; max-height: min(78vh, 700px); margin: auto; overflow: hidden; border-radius: 18px; box-shadow: 0 30px 90px rgba(16,41,63,.28); }
.detail-dialog.detail-dialog--summary[open] { animation: pop-in .18s ease-out; }
.detail-dialog.detail-dialog--summary::backdrop { background: rgba(10,28,43,.18); backdrop-filter: blur(1px); }
.detail-dialog.detail-dialog--summary .drawer-content { max-height: calc(min(78vh, 700px) - 87px); overflow-y: auto; }
.drawer-header { padding: 25px 27px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-size: 20px; }
.drawer-header .icon-button { width: 35px; height: 35px; font-size: 23px; }
.drawer-content { padding: 26px; }
.detail-path { margin: 0 0 22px; padding: 13px; border-radius: 9px; color: #4a6074; background: #f3f7fa; font-size: 11px; line-height: 1.6; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-item { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.detail-item span, .detail-item strong { display: block; }
.detail-item span { color: var(--muted); font-size: 9px; }
.detail-item strong { margin-top: 6px; font-size: 13px; }
.detail-section { margin-top: 25px; }
.detail-section h3 { margin: 0 0 9px; font-size: 12px; }
.detail-section p { margin: 0; padding: 15px; border-radius: 10px; color: #435567; background: #f7f9fb; font-size: 11px; line-height: 1.8; white-space: pre-wrap; }
.detail-section p.is-improved { color: #668477; text-decoration: line-through; }
.improved-line { color: #668477; text-decoration: line-through; }

.summary-dialog { width: min(780px, calc(100% - 32px)); max-width: none; max-height: min(82vh, 760px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 26px 80px rgba(16,41,63,.22); }
.summary-dialog[open] { animation: pop-in .18s ease-out; }
.summary-dialog::backdrop { background: rgba(10,28,43,.34); backdrop-filter: blur(3px); }
@keyframes pop-in { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.summary-dialog-header { padding: 23px 25px 19px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fff; }
.summary-dialog-header .eyebrow { margin-bottom: 7px; font-size: 9px; }
.summary-dialog-header .icon-button { width: 35px; height: 35px; flex: 0 0 auto; font-size: 22px; }
.summary-dialog-title { display: flex; align-items: center; gap: 10px; }
.summary-dialog-title h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.summary-dialog-title span { padding: 5px 9px; border-radius: 20px; color: #245ca8; background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.summary-dialog-header > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.summary-target-list { max-height: calc(min(82vh, 760px) - 112px); padding: 8px 12px 14px; overflow-y: auto; }
.summary-target-row { width: 100%; min-height: 74px; padding: 12px 13px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 24px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #edf1f4; color: inherit; background: transparent; text-align: left; transition: background .16s; }
.summary-target-row:last-child { border-bottom: 0; }
.summary-target-row:hover { border-radius: 10px; background: #f6f9fc; }
.summary-target-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #567086; background: #edf3f7; font-size: 9px; font-weight: 800; }
.summary-target-main { min-width: 0; }
.summary-target-main strong, .summary-target-main small { display: block; }
.summary-target-main strong { overflow: hidden; color: #21364a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.summary-target-main small { margin-top: 5px; overflow: hidden; color: #7d8c99; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.summary-target-meta { display: grid; justify-items: end; gap: 6px; }
.summary-target-meta time { color: #7d8c99; font-size: 10px; }
.summary-result-badge { padding: 5px 8px; border-radius: 20px; color: #40566a; background: #edf2f6; font-size: 10px; font-weight: 800; white-space: nowrap; }
.summary-result-badge.has-violation { color: var(--amber); background: var(--amber-soft); }
.summary-target-arrow { color: #9aa7b2; font-size: 17px; }
.summary-empty { padding: 62px 20px; text-align: center; }
.summary-empty span { width: 42px; height: 42px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 50%; color: #8d9aa6; background: #eff3f6; }
.summary-empty strong { display: block; font-size: 13px; }
.summary-empty p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }

.access-dialog { width: min(940px, calc(100% - 32px)); max-width: none; max-height: min(84vh, 780px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 26px 80px rgba(16,41,63,.22); }
.access-dialog[open] { animation: pop-in .18s ease-out; }
.access-dialog::backdrop { background: rgba(10,28,43,.34); backdrop-filter: blur(3px); }
.access-dialog-header { padding: 23px 25px 19px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fff; }
.access-dialog-header .eyebrow { margin-bottom: 7px; font-size: 9px; }
.access-dialog-header .icon-button { width: 35px; height: 35px; flex: 0 0 auto; font-size: 22px; }
.access-dialog-title { display: flex; align-items: center; gap: 10px; }
.access-dialog-title h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.access-dialog-title span { padding: 5px 9px; border-radius: 20px; color: #245ca8; background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.access-dialog-header > div > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.access-log-list { max-height: calc(min(84vh, 780px) - 112px); padding: 10px 12px 14px; overflow-y: auto; }
.access-account { border-bottom: 1px solid #edf1f4; }
.access-account:last-child { border-bottom: 0; }
.access-account-summary { width: 100%; min-height: 72px; padding: 11px 13px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 86px 150px 74px; align-items: center; gap: 12px; border: 0; color: inherit; background: transparent; text-align: left; transition: background .16s; }
.access-account-summary:hover, .access-account-summary[aria-expanded="true"] { border-radius: 10px; background: #f6f9fc; }
.access-account-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: #244d70; font-size: 11px; font-weight: 900; }
.access-account-main, .access-account-main strong, .access-account-main small, .access-account-latest small, .access-account-latest time { display: block; min-width: 0; }
.access-account-main strong { overflow: hidden; color: #21364a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.access-account-main small { margin-top: 5px; overflow: hidden; color: #7d8c99; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.access-account-count { display: flex; align-items: baseline; justify-content: flex-end; gap: 4px; color: var(--navy); }
.access-account-count strong { font-size: 24px; letter-spacing: -.03em; }
.access-account-count small { color: #7d8c99; font-size: 10px; font-weight: 800; }
.access-account-latest { display: grid; justify-items: end; gap: 4px; }
.access-account-latest small { color: #8a98a5; font-size: 9px; font-weight: 800; }
.access-account-latest time { color: #40566a; font-size: 10px; white-space: nowrap; }
.access-account-more { justify-self: end; padding: 6px 8px; border-radius: 8px; color: #245ca8; background: var(--blue-soft); font-size: 10px; font-weight: 850; white-space: nowrap; }
.access-account-summary[aria-expanded="true"] .access-account-more { color: #3f5163; background: #e9eef2; }
.access-detail { margin: 0 13px 13px 61px; overflow: hidden; border: 1px solid #e4eaf0; border-radius: 10px; background: #fbfcfd; }
.access-detail-row { min-height: 38px; padding: 8px 10px; display: grid; grid-template-columns: 32px 150px 110px minmax(0, 1fr); align-items: center; gap: 10px; border-top: 1px solid #eef2f5; color: #516374; font-size: 10px; }
.access-detail-row:first-child { border-top: 0; }
.access-detail-row > span { width: 25px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #6b7f91; background: #edf3f7; font-size: 8px; font-weight: 900; }
.access-detail-row time { color: #263c51; font-weight: 800; white-space: nowrap; }
.access-detail-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-detail-empty { padding: 14px; color: var(--muted); font-size: 10px; }

.auth-dialog { width: min(440px, calc(100% - 24px)); max-width: none; padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 28px 80px rgba(16,41,63,.24); }
.auth-dialog[open] { animation: pop-in .18s ease-out; }
.auth-dialog::backdrop { background: rgba(10,28,43,.42); backdrop-filter: blur(4px); }
.auth-dialog form { margin: 0; }
.auth-dialog-header { padding: 22px 24px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.auth-dialog-header .eyebrow { margin-bottom: 7px; font-size: 9px; }
.auth-dialog-header h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.auth-dialog-header p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.auth-dialog-header .icon-button { width: 34px; height: 34px; flex: 0 0 auto; font-size: 22px; }
.auth-dialog-body { padding: 19px 24px 7px; }
.auth-dialog-body label { display: block; margin: 12px 0 7px; color: #3c4e5f; font-size: 11px; font-weight: 800; }
.auth-dialog-body > input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #d7e0e7; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; }
.auth-dialog-body > input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,253,.1); }
.auth-help { margin: 9px 0 0; color: #7c8b98; font-size: 9px; line-height: 1.55; }
.auth-status { min-height: 0; margin: 12px 0 0; color: var(--green); font-size: 10px; line-height: 1.5; }
.auth-dialog .form-error { margin-bottom: 0; }
.auth-dialog-footer { padding: 14px 24px 22px; display: flex; justify-content: flex-end; gap: 9px; }
.auth-dialog-footer .primary-button { min-width: 130px; }
.auth-dialog-footer--split { justify-content: space-between; }
.required-account { margin-bottom: 14px; padding: 11px 12px; display: flex; align-items: center; gap: 10px; border-radius: 11px; background: #f3f7fa; }
.required-account strong, .required-account small { display: block; }
.required-account strong { color: #30485e; font-size: 11px; }
.required-account small { margin-top: 3px; color: #8795a1; font-size: 9px; }

.loading-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; color: #fff; background: rgba(13,34,52,.82); backdrop-filter: blur(4px); }
.loading-overlay strong { margin-top: 17px; }
.loading-overlay p { margin: 7px 0 0; color: #bdd0df; font-size: 11px; }
.spinner { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.2); border-top-color: #70a5ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 120; right: 24px; bottom: 24px; max-width: 390px; padding: 13px 17px; border-radius: 10px; color: white; background: #173853; box-shadow: var(--shadow); font-size: 11px; transform: translateY(80px); opacity: 0; transition: .2s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { background: #9e3441; }

:focus-visible { outline: 3px solid rgba(36,107,253,.35); outline-offset: 2px; }

@media (max-width: 1180px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .insight-panel { position: static; display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: start; }
  .insight-panel .panel-heading { grid-column: 1 / -1; }
  .insight-divider { width: 1px; height: 100%; margin: 0; }
  .upload-layout { grid-template-columns: 1fr; }
  .account-row { grid-template-columns: 36px minmax(0, 1fr) 118px 118px 76px 92px; gap: 9px; }
}

@media (max-width: 840px) {
  .summary-open { font-size: 0; }
  .summary-open span { font-size: 11px; }
  .topbar { min-height: 0; padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .topbar-leading { flex: 1 1 auto; }
  .topbar-actions { width: 100%; padding-top: 9px; border-top: 1px solid var(--line); }
  .protection-mode { margin-right: auto; }
  .page-content { padding: 14px 20px 26px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .insight-panel { display: block; }
  .insight-panel .insight-divider { width: auto; height: 1px; margin: 0 20px; }
  .account-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .account-row-meta { grid-column: 2 / 3; grid-template-columns: auto auto; }
  .account-row-meta { grid-column: 2 / 4; }
  .account-row-status { justify-self: end; }
  .account-reset-button { grid-column: 2 / 4; width: 100%; }
}

@media (max-width: 760px) {
  .login-panel { width: min(100%, 500px); }
  .login-portal-body { grid-template-columns: 1fr; }
  .login-primary { padding: 34px 38px 31px; }
  .quick-login { padding: 30px 38px; border-top: 1px solid var(--line); border-left: 0; }
  .login-portal-header { padding: 0 28px; }
  .login-portal-footer { padding: 0 28px; }
}

@media (max-width: 620px) {
  .topbar-leading { gap: 12px; }
  .topbar-leading .brand > span:last-child { display: none; }
  .topbar-scope { padding-left: 12px; }
  .protection-mode { display: none; }
  .topbar-actions { justify-content: flex-start; overflow-x: auto; }
  .topbar-user-box { margin-left: auto; padding-left: 8px; }
  .topbar-user-box > div { display: none; }
  .logout-button { padding: 0 5px; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .period-control { align-self: stretch; flex-wrap: wrap; }
  .period-field { flex: 1 1 150px; }
  .period-field input, .period-field select { width: 100%; min-width: 0; }
  .period-field--mode { flex-basis: 100px; }
  .period-action { flex: 1 1 100%; }
  .account-list { padding: 8px; }
  .account-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; }
  .account-row-meta { grid-column: 2 / 4; grid-template-columns: auto auto; }
  .account-row-status { grid-column: 3; grid-row: 1; }
  .account-reset-button { grid-column: 2 / 4; width: 100%; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .summary-card { min-height: 94px; padding: 9px 10px; }
  .summary-card small { display: none; }
  .summary-label { margin-top: 4px; font-size: 12px; }
  .summary-card strong { font-size: 28px; }
  .summary-card strong em { font-size: 10px; }
  .summary-icon { width: 25px; height: 25px; }
  .summary-open { font-size: 0; }
  .summary-open span { font-size: 10px; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .table-wrap { display: none; }
  .mobile-results { padding: 10px; display: grid; gap: 9px; }
  .mobile-result { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; }
  .mobile-result-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
  .mobile-result strong { font-size: 13px; }
  .mobile-result-path { margin: 5px 0 13px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-result-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; color: #4f6070; font-size: 10px; }
  .preview-stats { grid-template-columns: 1fr 1fr; }
  .upload-card, .preview-card { padding: 18px; }
  .dropzone { min-height: 220px; padding: 24px; }
  .detail-dialog { width: 100%; }
  .detail-dialog.detail-dialog--summary { width: calc(100% - 20px); height: auto; max-height: 88vh; margin: auto; border-radius: 15px; }
  .detail-dialog.detail-dialog--summary .drawer-content { max-height: calc(88vh - 84px); padding: 20px; }
  .summary-dialog { width: calc(100% - 20px); max-height: 88vh; border-radius: 15px; }
  .summary-dialog-header { padding: 20px; }
  .summary-target-list { max-height: calc(88vh - 108px); padding: 6px 8px 12px; }
  .summary-target-row { grid-template-columns: 31px minmax(0, 1fr) 20px; gap: 9px; }
  .summary-target-meta { grid-column: 2 / 3; justify-items: start; grid-template-columns: auto auto; }
  .summary-target-arrow { grid-column: 3; grid-row: 1 / 3; }
  .access-dialog { width: calc(100% - 20px); max-height: 88vh; border-radius: 15px; }
  .access-dialog-header { padding: 20px; }
  .access-log-list { max-height: calc(88vh - 108px); padding: 6px 8px 12px; }
  .access-account-summary { grid-template-columns: 32px minmax(0, 1fr) 64px; gap: 9px; }
  .access-account-latest { grid-column: 2; grid-row: 2; justify-items: start; grid-template-columns: auto auto; }
  .access-account-more { grid-column: 3; grid-row: 2; font-size: 0; }
  .access-account-more::after { content: "보기"; font-size: 10px; }
  .access-detail { margin-left: 10px; }
  .access-detail-row { grid-template-columns: 30px minmax(130px, 1fr); }
  .access-detail-row small { grid-column: 2; }
  .auth-dialog-footer { flex-direction: column-reverse; }
  .auth-dialog-footer > button { width: 100%; }
  .login-shell { padding: 12px; place-items: start center; }
  .login-card { border-radius: 18px; }
  .login-portal-header { min-height: 68px; padding: 0 20px; }
  .login-system-name { display: none; }
  .login-primary { padding: 27px 20px 23px; }
  .login-primary > .muted { margin-bottom: 22px; }
  .quick-login { padding: 25px 20px; }
  .login-portal-footer { min-height: 44px; padding: 0 20px; }
  .login-portal-footer small { display: none; }
}
