:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --line: #dce3ec;
  --primary: #155eef;
  --primary-dark: #0b4bd4;
  --success: #087a55;
  --success-bg: #e9f8f1;
  --warning: #9a6700;
  --warning-bg: #fff7db;
  --danger: #b42318;
  --danger-bg: #fff0ee;
  --shadow: 0 12px 35px rgba(31, 42, 68, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: 1320px; margin: 0 auto; min-height: 68px; padding: 10px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { color: var(--text); font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 8px; flex: 1; }
.nav-links a { color: #344054; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 650; }
.nav-links a:hover { background: #eef4ff; text-decoration: none; color: var(--primary); }
.user-menu { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.user-menu a, .link-button { color: var(--muted); font-size: 13px; }
.link-button { padding: 0; border: 0; background: transparent; }
.inline-form { display: inline; margin: 0; }

.page-shell { max-width: 1320px; margin: 0 auto; padding: 34px 24px 60px; }
.site-footer { max-width: 1320px; margin: 0 auto; padding: 22px 24px 38px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 20px; }

h1, h2, h3 { margin-top: 0; line-height: 1.25; letter-spacing: -.025em; }
h1 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 10px; }
h2 { font-size: 21px; margin-bottom: 8px; }
p { margin-top: 0; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; color: var(--muted); }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px;
}
.narrow-card { max-width: 660px; margin: 30px auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading p { margin-bottom: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.section-heading p { margin-bottom: 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px;
  font-weight: 750; font-size: 14px; text-decoration: none; transition: .15s ease;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button-primary { background: var(--primary); color: white; }
.button-primary:hover { background: var(--primary-dark); }
.button-secondary { background: white; border-color: var(--line); color: #344054; }
.button-danger { background: var(--danger); color: white; }
.button-danger-outline { background: white; border-color: #f5b7b1; color: var(--danger); }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.button-full { width: 100%; }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.button-row-end { justify-content: flex-end; }

.stack-form { display: grid; gap: 17px; }
label > span, .field-label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 6px; color: #344054; }
input[type="text"], input[type="password"], input[type="email"], input[type="search"], input[type="date"], input[type="month"], input[type="datetime-local"], input[type="number"], textarea, select {
  width: 100%; border: 1px solid #cbd5e1; background: white; color: var(--text);
  border-radius: 9px; padding: 10px 12px; outline: none; transition: .15s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,94,239,.12); }
textarea { resize: vertical; }
.stack-label { display: block; margin-top: 20px; }
.form-grid { display: grid; gap: 18px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.flash-stack { display: grid; gap: 8px; margin-bottom: 20px; }
.flash { padding: 12px 15px; border-radius: 9px; border: 1px solid var(--line); background: white; font-size: 14px; }
.flash-success { color: var(--success); border-color: #a6e2cb; background: var(--success-bg); }
.flash-error { color: var(--danger); border-color: #f2b8b5; background: var(--danger-bg); }
.flash-info { color: #175cd3; border-color: #b2ccff; background: #eff4ff; }

.notice { border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); }
.notice-warning { background: var(--warning-bg); border-color: #f4d579; color: #714b00; }
.notice-danger { background: var(--danger-bg); border-color: #f2b8b5; color: var(--danger); }

.auth-layout { min-height: 68vh; display: grid; grid-template-columns: minmax(320px, 500px) minmax(300px, 1fr); gap: 30px; align-items: stretch; max-width: 1050px; margin: 20px auto; }
.auth-card, .auth-info { border-radius: 20px; padding: 42px; }
.auth-card { background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-info { color: white; background: linear-gradient(145deg, #123a9c, #155eef 60%, #2e90fa); display: flex; flex-direction: column; justify-content: center; }
.auth-info h2 { font-size: 28px; }
.check-list { list-style: none; padding: 0; margin: 15px 0 0; display: grid; gap: 15px; }
.check-list li::before { content: "✓"; display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 10px; border-radius: 50%; background: rgba(255,255,255,.18); font-weight: 900; }

.status-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border-radius: var(--radius); padding: 22px; margin-bottom: 20px; border: 1px solid; }
.status-complete { color: #075b40; background: var(--success-bg); border-color: #a6e2cb; }
.status-pending { color: #714b00; background: var(--warning-bg); border-color: #f4d579; }
.status-banner p { margin: 4px 0 0; font-size: 13px; }
.status-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.7); font-size: 22px; font-weight: 900; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #475467; background: var(--surface-soft); font-size: 12px; text-align: left; font-weight: 800; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
.align-right { text-align: right; }
.empty-cell { text-align: center; color: var(--muted); padding: 35px; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #475467; font-weight: 800; font-size: 11px; white-space: nowrap; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

.identity-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.identity-grid > div { padding-right: 18px; border-right: 1px solid var(--line); }
.identity-grid > div:last-child { border-right: 0; }
.check-items { display: grid; gap: 15px; }
.check-item { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 0; }
.check-item legend { width: 100%; font-weight: 800; padding: 0; }
.item-number { display: inline-grid; place-items: center; width: 27px; height: 27px; margin-right: 9px; border-radius: 8px; background: #eef4ff; color: var(--primary); font-size: 12px; }
.item-help { color: var(--muted); font-size: 12px; margin: 8px 0 13px 36px; }
.radio-group { display: flex; gap: 9px; margin-bottom: 12px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { display: inline-flex; min-width: 82px; justify-content: center; padding: 8px 13px; border: 1px solid #cbd5e1; border-radius: 9px; color: #475467; font-size: 13px; font-weight: 750; cursor: pointer; }
.radio-card input:checked + span { border-color: var(--primary); color: var(--primary); background: #eef4ff; box-shadow: inset 0 0 0 1px var(--primary); }
.radio-good input:checked + span { border-color: var(--success); color: var(--success); background: var(--success-bg); box-shadow: inset 0 0 0 1px var(--success); }
.radio-bad input:checked + span { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); box-shadow: inset 0 0 0 1px var(--danger); }
.comment-label { display: block; }
.signature-card { border-top: 4px solid var(--primary); }
.signature-statement { background: #f5f8ff; border-left: 4px solid var(--primary); padding: 15px 17px; margin-bottom: 18px; font-weight: 700; }
.consent-box { display: flex; gap: 10px; align-items: flex-start; padding: 14px; margin: 20px 0; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.consent-box span { margin: 0; font-weight: 600; }
.consent-box input { margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-grid.two-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card span, .stat-card small { display: block; color: var(--muted); }
.stat-card strong { display: block; font-size: 32px; margin: 6px 0; }
.stat-good { border-top: 4px solid var(--success); }
.stat-warn { border-top: 4px solid #eaaa08; }
.stat-bad { border-top: 4px solid var(--danger); }
.filter-card { padding: 16px 20px; }
.date-filter { display: flex; align-items: end; gap: 10px; }
.date-filter label { max-width: 220px; }
.two-panel-layout { display: grid; grid-template-columns: minmax(270px, 350px) 1fr; gap: 20px; align-items: start; }
.panel-wide { min-width: 0; }
.compact-form { display: flex; gap: 6px; min-width: 270px; }
.compact-form input { min-width: 160px; padding: 7px 9px; }
.name-form { min-width: 220px; }
.name-form input { min-width: 130px; }
.inline-action-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.danger-zone { border-color: #f2b8b5; }
details pre { max-width: 400px; white-space: pre-wrap; word-break: break-all; background: #f8fafc; padding: 10px; border-radius: 8px; }

.evidence-paper { max-width: 1050px; margin: 0 auto; background: white; border: 1px solid #cfd7e3; box-shadow: var(--shadow); padding: 34px; }
.paper-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #172033; padding-bottom: 18px; margin-bottom: 22px; }
.paper-header h1 { font-size: 30px; margin-bottom: 0; }
.paper-org { color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.meta-table th { width: 14%; background: #f3f5f8; color: #344054; }
.meta-table td { width: 36%; }
.paper-section { margin-top: 26px; }
.paper-section h2 { font-size: 17px; padding-left: 10px; border-left: 4px solid #172033; }
.evidence-table th:nth-child(1) { width: 7%; }
.evidence-table th:nth-child(3) { width: 11%; }
.evidence-table th:nth-child(4) { width: 30%; }
.notes-box { min-height: 75px; white-space: pre-wrap; border: 1px solid var(--line); padding: 14px; background: #fbfcfe; }
.signed-block { margin-top: 28px; padding: 20px; border: 2px solid #172033; }
.signature-text { text-align: center; font-weight: 800; font-size: 16px; margin-bottom: 18px; }
.signature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.signature-grid span { display: block; color: var(--muted); font-size: 11px; }
.paper-footer { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 12px; text-align: center; color: var(--muted); font-size: 10px; }
.error-card { text-align: center; }
.error-symbol { margin: 0 auto 18px; width: 60px; height: 60px; border-radius: 50%; background: var(--danger-bg); color: var(--danger); display: grid; place-items: center; font-size: 30px; font-weight: 900; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; }
  .user-menu { margin-left: auto; }
  .auth-layout, .two-panel-layout { grid-template-columns: 1fr; }
  .auth-info { display: none; }
  .identity-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-columns { grid-template-columns: 1fr; }
  .page-heading { flex-direction: column; }
  .signature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page-shell { padding: 22px 14px 40px; }
  .card, .auth-card { padding: 18px; }
  .identity-grid, .stat-grid, .stat-grid.two-stats { grid-template-columns: 1fr; }
  .identity-grid > div { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
  .radio-group { flex-wrap: wrap; }
  .status-banner { grid-template-columns: auto 1fr; }
  .status-banner .button { grid-column: 1 / -1; }
  .inline-action-form { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; color: black; font-size: 10pt; }
  .no-print, .site-header, .site-footer { display: none !important; }
  .page-shell { max-width: none; padding: 0; }
  .evidence-paper { max-width: none; margin: 0; border: 0; box-shadow: none; padding: 0; }
  .paper-header h1 { font-size: 20pt; }
  table { font-size: 8.5pt; }
  th, td { padding: 6px; }
  .badge { border: 1px solid #777; background: white !important; color: black !important; }
  .hash-block, .notes-box { background: white; }
  .paper-section, .signed-block, .hash-block { break-inside: avoid; }
  a { color: black; text-decoration: none; }
}

/* 아이티룩스 양식 확장 */
input[type="email"], input[type="month"] {
  width: 100%; border: 1px solid #cbd5e1; background: white; color: var(--text);
  border-radius: 9px; padding: 10px 12px; outline: none; transition: .15s ease;
}
input[type="email"]:focus, input[type="month"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,94,239,.12); }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand span { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.brand strong { font-size: 15px; }
.org-mark { display: inline-flex; align-items: center; padding: 7px 11px; margin-bottom: 22px; border-radius: 9px; background: #172033; color: white; font-weight: 900; letter-spacing: .04em; }
.auth-divider { position: relative; margin: 22px 0 16px; text-align: center; color: var(--muted); font-size: 12px; }
.auth-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.auth-divider span { position: relative; background: white; padding: 0 10px; }
.auth-note { margin: 12px 0 0; text-align: center; }
.auth-info-badge { align-self: flex-start; padding: 7px 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 12px; font-weight: 800; margin-bottom: 20px; }
.notice-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.domain-notice { padding: 13px 15px; margin-bottom: 18px; border: 1px solid #b2ccff; border-radius: 10px; background: #f5f8ff; color: #1849a9; text-align: center; }
.registration-card { max-width: 780px; }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.module-card { min-height: 325px; display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.module-card h2 { margin-bottom: 0; }
.module-card p { color: var(--muted); }
.module-card small { margin-top: auto; }
.module-card .button { margin-top: 4px; }
.module-complete { border-top: 4px solid var(--success); }
.module-pending { border-top: 4px solid #eaaa08; }
.module-kicker { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.module-status { display: flex; gap: 7px; flex-wrap: wrap; }

.form-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.form-table-head, .form-table-row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, .9fr); align-items: center; }
.form-table-head { padding: 11px 18px; background: var(--surface-soft); color: #475467; font-size: 12px; font-weight: 900; }
.form-table-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 18px; margin: 0; }
.form-table-row legend { display: contents; }
.form-table-row legend strong { display: block; }
.form-table-row legend small { display: block; margin-top: 3px; }
.form-table-row .radio-group { margin: 0; justify-content: flex-start; }
.compact-radios .radio-card span { min-width: 72px; }

.monthly-entry-table { display: grid; gap: 12px; }
.monthly-entry-row { border: 1px solid var(--line); border-radius: 12px; padding: 17px; margin: 0; }
.monthly-entry-row legend { display: flex; align-items: flex-start; gap: 2px; width: 100%; padding: 0; font-weight: 750; line-height: 1.5; }
.monthly-entry-row legend .item-number { flex: 0 0 27px; margin-top: -2px; }
.monthly-entry-controls { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin: 13px 0 0 36px; }
.monthly-entry-controls .radio-group { margin: 0; }

.admin-filter-grid { display: grid; grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) auto; gap: 12px; align-items: end; }
.admin-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.admin-module-card { min-height: 310px; display: flex; flex-direction: column; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-module-card .button { margin-top: auto; }
.module-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.module-heading h2 { margin-bottom: 0; }
.summary-list { display: grid; grid-template-columns: 76px 1fr; gap: 9px 12px; margin: 18px 0; font-size: 13px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 700; }
.warning-text { color: var(--warning); }
.empty-message { margin: 35px 0; color: var(--muted); text-align: center; }
.progress-number { display: flex; align-items: baseline; gap: 8px; margin: 28px 0 8px; }
.progress-number strong { font-size: 38px; }
.progress-number span { color: var(--muted); }
.progress-bar { height: 9px; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }

.user-admin-layout { grid-template-columns: minmax(280px, 340px) minmax(800px, 1fr); }
.user-table { min-width: 1180px; }
.pending-user-row { background: #fffaf0; }
.profile-form { display: grid; grid-template-columns: 130px 110px auto; gap: 6px; min-width: 370px; }
.profile-form input { padding: 7px 8px; }
.compact-buttons { gap: 5px; flex-wrap: nowrap; }

/* 첨부 양식형 출력 */
.report-page .page-shell, .document-page .page-shell { max-width: 1580px; }
.source-form { position: relative; margin: 0 auto 22px; background: white; color: #111; border: 1px solid #c8c8c8; box-shadow: 0 12px 38px rgba(16,24,40,.10); padding: 28px 30px 22px; font-family: "Malgun Gothic", "Noto Sans KR", sans-serif; }
.source-form-landscape { max-width: 1480px; }
.source-form-portrait { max-width: 900px; }
.source-form h1 { margin: 0 0 24px; text-align: center; font-size: 27px; text-decoration: underline; text-underline-offset: 5px; letter-spacing: .04em; }
.source-form-org { position: absolute; top: 20px; left: 30px; font-size: 12px; font-weight: 800; color: #333; }
.source-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; line-height: 1.35; }
.source-grid th, .source-grid td { border: 1px solid #222; padding: 6px 5px; text-align: center; vertical-align: middle; background: white; color: #111; word-break: keep-all; overflow-wrap: anywhere; }
.source-grid th { font-weight: 800; }
.source-grid tbody tr:hover { background: transparent; }
.source-grid small { color: #222; font-size: .82em; }
.source-grid .left-cell { text-align: left; white-space: pre-wrap; }
.daily-source-grid th:nth-child(1) { width: 8%; }
.daily-source-grid th:nth-child(2), .daily-source-grid th:nth-child(3), .daily-source-grid th:nth-child(4) { width: 9%; }
.daily-source-grid th:nth-child(5) { width: 11%; }
.daily-source-grid th:nth-child(8) { width: 9%; }
.daily-source-grid th:nth-child(9) { width: 9%; }
.daily-source-grid th:nth-child(10) { width: 18%; }
.daily-source-grid tbody td { height: 42px; font-size: 13px; }
.form-notes { margin: 16px 0 0; padding-left: 24px; font-size: 12px; line-height: 1.6; }
.electronic-signature { display: inline-block; font-weight: 900; white-space: normal; }
.electronic-signature::after { content: "\A(전자서명)"; white-space: pre; display: block; font-size: .65em; font-weight: 500; color: #444; line-height: 1.15; }
.compact-signature { font-size: .92em; }
.electronic-footer { margin-top: 13px; padding-top: 8px; border-top: 1px solid #aaa; color: #555; font-size: 9px; text-align: right; }
.invalid-watermark { position: absolute; inset: 40% 0 auto; z-index: 2; transform: rotate(-18deg); color: rgba(180,0,0,.18); font-size: 120px; font-weight: 900; text-align: center; pointer-events: none; }
.integrity-card { max-width: 1050px; margin-left: auto; margin-right: auto; }
.hash-list { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 11px; }
.hash-list dt { font-weight: 800; }
.hash-list dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }

.pc-source-grid { font-size: 10px; }
.pc-source-grid th, .pc-source-grid td { padding: 5px 3px; }
.pc-source-grid th:nth-child(1) { width: 3.5%; }
.pc-source-grid th:nth-child(2) { width: 5.5%; }
.pc-source-grid th:nth-child(3) { width: 6%; }
.pc-source-grid th:nth-child(4) { width: 7%; }
.pc-source-grid th:nth-child(5) { width: 7.5%; }
.pc-source-grid th:nth-child(6) { width: 8%; }
.pc-source-grid th:nth-child(7) { width: 7%; }
.pc-source-grid th:nth-child(8) { width: 6.5%; }
.pc-source-grid th:nth-child(9) { width: 6.5%; }
.pc-source-grid th:nth-child(10) { width: 7.5%; }
.pc-source-grid th:nth-child(11) { width: 8.5%; }
.pc-source-grid th:nth-child(12) { width: 5.5%; }
.pc-source-grid th:nth-child(13) { width: 7%; }
.pc-source-grid th:nth-child(14) { width: 10%; }
.pc-source-grid tbody td { height: 43px; }
.pc-source-grid .manager-row td, .pc-source-grid .manager-row th { height: 42px; }
.pc-source-grid .blank-row td { height: 38px; }
.pc-single-form { max-width: 1500px; }

.monthly-title-row { position: relative; min-height: 122px; display: flex; align-items: flex-start; justify-content: center; }
.monthly-title-row h1 { margin-top: 15px; }
.approval-box { position: absolute; right: 0; top: 0; width: 265px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.approval-box th, .approval-box td { border: 1px solid #222; padding: 5px; text-align: center; height: 48px; background: white; color: #111; }
.approval-box th:first-child { width: 35px; }
.monthly-source-grid th:nth-child(1) { width: 8%; }
.monthly-source-grid th:nth-child(2) { width: 68%; }
.monthly-source-grid th:nth-child(3) { width: 10%; }
.monthly-source-grid th:nth-child(4) { width: 14%; }
.monthly-source-grid td { font-size: 11px; padding: 7px 6px; }
.monthly-source-grid td:nth-child(2) { line-height: 1.45; }
.result-mark { font-size: 17px !important; font-weight: 800; }
.monthly-general-note { margin-top: 10px; border: 1px solid #222; padding: 8px; font-size: 11px; white-space: pre-wrap; }

@media (max-width: 1100px) {
  .module-grid, .admin-module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 0; }
  .admin-module-card { min-height: 0; }
  .user-admin-layout { grid-template-columns: 1fr; }
  .form-table-head, .form-table-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 720px) {
  .admin-filter-grid { grid-template-columns: 1fr; }
  .monthly-entry-controls { grid-template-columns: 1fr; margin-left: 0; }
  .source-form { padding: 22px 16px 18px; overflow-x: auto; }
  .source-grid { min-width: 1000px; }
  .monthly-source-grid { min-width: 720px; }
  .monthly-title-row { min-width: 720px; }
}

@media print {
  @page portrait { size: A4 portrait; margin: 9mm; }
  @page landscape { size: A4 landscape; margin: 7mm; }
  body { background: white; color: black; }
  .source-form-landscape { page: landscape; }
  .source-form-portrait { page: portrait; }
  .page-shell { max-width: none !important; padding: 0 !important; }
  .source-form { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; overflow: visible; }
  .source-form-org { top: 0; left: 0; }
  .source-form h1 { font-size: 16pt; margin-bottom: 5mm; }
  .source-grid { min-width: 0 !important; }
  .electronic-footer { font-size: 6.5pt; margin-top: 2mm; padding-top: 1.5mm; }
  .form-notes { font-size: 7.5pt; margin-top: 3mm; line-height: 1.45; }
  .daily-source-grid { font-size: 7.4pt; }
  .daily-source-grid th, .daily-source-grid td { padding: 1.3mm 1mm; }
  .daily-source-grid tbody td { height: 6.6mm; font-size: 7.8pt; }
  .pc-source-grid { font-size: 6.4pt; line-height: 1.2; }
  .pc-source-grid th, .pc-source-grid td { padding: .9mm .6mm; }
  .pc-source-grid tbody td { height: 7.7mm; }
  .pc-source-grid .blank-row td { height: 7mm; }
  .pc-source-grid .manager-row td, .pc-source-grid .manager-row th { height: 7.7mm; }
  .electronic-signature::after { font-size: .58em; }
  .monthly-title-row { min-height: 31mm; }
  .monthly-title-row h1 { font-size: 15pt; margin-top: 4mm; }
  .approval-box { width: 61mm; font-size: 7.2pt; }
  .approval-box th, .approval-box td { height: 13mm; padding: 1mm; }
  .monthly-source-grid { font-size: 7.2pt; }
  .monthly-source-grid th, .monthly-source-grid td { padding: 1.2mm 1mm; }
  .monthly-source-grid td { font-size: 7.2pt; line-height: 1.25; }
  .monthly-source-grid td:nth-child(2) { line-height: 1.3; }
  .result-mark { font-size: 10pt !important; }
  .monthly-general-note { font-size: 7pt; padding: 1.5mm; margin-top: 2mm; }
  .monthly-source-form .electronic-footer { margin-top: 1.5mm; }
}

/* 월간 일일점검 출력은 첨부 양식처럼 1장에 맞춥니다. */
@media print {
  .report-page .compact-signature::after { display: none; }
  .daily-report-page .source-form h1 { font-size: 15pt; margin-bottom: 3mm; }
  .daily-report-page .daily-source-grid { font-size: 7pt; line-height: 1.08; }
  .daily-report-page .daily-source-grid th { padding: .8mm .7mm; line-height: 1.12; }
  .daily-report-page .daily-source-grid td { padding: .45mm .65mm; }
  .daily-report-page .daily-source-grid tbody td { height: 5.4mm; font-size: 7.2pt; line-height: 1.05; }
  .daily-report-page .form-notes { font-size: 6.8pt; margin-top: 1.7mm; line-height: 1.3; }
  .daily-report-page .electronic-footer { margin-top: 1mm; padding-top: 1mm; font-size: 6pt; }
}

/* 보안 역할 표시 */
.badge-role { margin-left: 6px; background: #eef4ff; color: var(--primary); vertical-align: middle; }
.role-notice { background: #eef4ff; border-color: #b2ccff; color: #1849a9; }
.button-disabled { opacity: .65; cursor: default; pointer-events: none; }
.role-assignment-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)) auto; gap: 14px; align-items: end; }
.role-current { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.role-current > span { display: inline-flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 13px; }

@media (max-width: 900px) {
  .role-assignment-grid { grid-template-columns: 1fr; }
}

/* 숨김 필드는 브라우저 및 PDF 렌더러에서 항상 표시하지 않습니다. */
input[type="hidden"] { display: none !important; }

/* 월간 점검 제목과 결재함이 겹치지 않도록 별도 열로 배치합니다. */
.monthly-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 20px;
  align-items: start;
  justify-content: initial;
}
.monthly-title-row h1 { min-width: 0; margin: 15px 0 0; text-align: center; }
.approval-box { position: static; justify-self: end; }

@media print {
  .monthly-title-row { grid-template-columns: minmax(0, 1fr) 61mm; gap: 4mm; }
  .monthly-title-row h1 { margin-top: 4mm; }
  .approval-box { width: 61mm; }
}

/* 시간 입력 */
input[type="time"] {
  width: 100%; border: 1px solid #cbd5e1; background: white; color: var(--text);
  border-radius: 9px; padding: 10px 12px; outline: none; transition: .15s ease;
}
input[type="time"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,94,239,.12); }

/* v5 기록 정보 관리 */
.records-filter { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.records-filter label { min-width: 210px; }
.records-filter .filter-grow { flex: 1 1 320px; }
.wide-table-wrap { overflow-x: auto; }
.records-table { min-width: 1450px; }
.records-table td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.metadata-editor-card { max-width: 1050px; margin-left: auto; margin-right: auto; }
.metadata-action-row { justify-content: flex-end; flex-wrap: wrap; }
.plain-record-json { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
@media (max-width: 760px) {
  .records-filter { display: grid; grid-template-columns: 1fr; }
  .records-filter label, .records-filter .filter-grow { min-width: 0; width: 100%; }
  .metadata-action-row { align-items: stretch; }
  .metadata-action-row .button { width: 100%; }
}
