:root {
    --sidebar-w: 220px;
    --sidebar-collapsed-w: 64px;
    --header-h: 58px;
    --navy-deep: #162236;
    --navy: #1e2d42;
    --navy-hover: #263a52;
    --primary: #1a56db;
    --primary-hover: #1345c0;
    --page-bg: #f3f6fa;
    --surface: #ffffff;
    --text: #111827;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --line: #dce6f2;
    --table-head: #f6f8fb;
    --radius-input: 6px;
    --radius-card: 10px;
    --shadow-soft: 0 1px 3px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: "Noto Sans KR", "Pretendard", "Segoe UI", sans-serif;
    font-size: 14px;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    background: linear-gradient(180deg, var(--navy-deep), var(--navy));
    color: #b0c8dc;
    transition: width .18s ease, padding .18s ease;
    overflow: hidden;
}

/* 상단: 브랜드 + 토글 버튼 */
.sidebar-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.sidebar-toggle {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    border: 1px solid rgba(176, 200, 220, .18);
    border-radius: var(--radius-input);
    background: transparent;
    color: #9db6cd;
    cursor: pointer;
    transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.sidebar-toggle:hover { background: var(--navy-hover); color: #cfe0ef; border-color: rgba(176,200,220,.32); }
.sidebar-toggle-icon--collapsed { display: none; }
.sidebar.collapsed .sidebar-toggle-icon--expanded { display: none; }
.sidebar.collapsed .sidebar-toggle-icon--collapsed { display: inline; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 50px;
    padding: 4px 10px 18px;
    color: #fff;
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 0;
    border-bottom: 1px solid rgba(176, 200, 220, .12);
}

/* ===== 접힘 상태 (64px, 아이콘만) ===== */
.sidebar.collapsed { width: var(--sidebar-collapsed-w); padding: 18px 8px; }
.app-shell.sidebar-collapsed .app-main { margin-left: var(--sidebar-collapsed-w); }
.sidebar.collapsed .sidebar-top { justify-content: center; }
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .sidebar-footer .user-info { display: none; }
.sidebar.collapsed .sidebar-brand { border: 0; padding: 0; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .nav-link i { margin: 0; }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .sidebar-user .logout-btn { display: none; }
.sidebar.collapsed .sidebar-footer { padding: 12px 0 0; }
.app-main { transition: margin-left .18s ease; }

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 7px 18px rgba(26, 86, 219, .3);
}

.sidebar-brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.sidebar-brand small {
    display: block;
    margin-top: 4px;
    color: #6f8ca5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
}

.sidebar-section-label {
    margin: 22px 11px 9px;
    color: #617d97;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-input);
    color: #a9bed1;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s, color .15s;
}

.sidebar .nav-link i {
    width: 17px;
    font-size: 15px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background: var(--navy-hover);
    color: #fff;
}

.sidebar .nav-link.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 86, 219, .22);
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px 4px 0;
    border-top: 1px solid rgba(176, 200, 220, .12);
}

.sidebar-user {
    display: flex;
    align-items: center;
    min-width: 0;
}

.sidebar-user .logout-btn {
    margin-left: auto;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--sidebar-w);
}

.user-avatar {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e8f1ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.user-info {
    display: grid;
    margin-left: 9px;
    min-width: 0;
    line-height: 1.15;
}

.user-info strong {
    color: #dbe8f3;
    font-size: 12px;
}

.user-info small {
    margin-top: 3px;
    color: #718ca5;
    font-size: 10px;
}

.logout-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-left: 13px;
    border-left: 1px solid rgba(176, 200, 220, .14);
    color: #718ca5;
    text-decoration: none;
}

.logout-btn:hover { color: #dc2626; }

.content-area {
    padding: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.page-header h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.page-header p {
    color: var(--text-muted) !important;
    font-size: 12px;
}

.metric-card, .filter-card, .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.metric-card {
    position: relative;
    min-height: 112px;
    padding: 19px 20px;
    overflow: hidden;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -28px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(26, 86, 219, .05);
}

.metric-label {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.metric-value {
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}

.filter-card {
    padding: 16px;
}

.card-header {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.form-label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.form-control, .form-select {
    min-height: 36px;
    border-color: #cbd5e1;
    border-radius: var(--radius-input);
    font-size: 13px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, .13);
}

/* ══════════════════════════════════════════════════════════════════
   버튼 — AM(Linxis) 디자인 시스템 이식 (.btn 전역 오버라이드)
   부트스트랩 색상 클래스를 AM 5계층으로 매핑. 마크업 수정 불필요.
   Primary 저장/확정 · Secondary 보조 · Neutral 닫기/취소 · Warning 임시저장 · Danger 삭제
══════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
    border-radius: var(--radius-input);
    transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
    white-space: nowrap;
}
.btn i, .btn .bi { font-size: 13px; flex-shrink: 0; }
.btn:active { box-shadow: inset 0 1px 3px rgba(15,23,42,.14) !important; }
.btn:focus, .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(26,86,219,.18); }
.btn:disabled, .btn.disabled, .btn[disabled] { opacity: .48; box-shadow: none !important; }

/* 크기 */
.btn-sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.btn-sm i, .btn-sm .bi { font-size: 12px; }
.btn-lg { min-height: 40px; padding: 0 20px; font-size: 14px; font-weight: 700; }

/* Primary — 저장/확정 */
.btn-primary { background-color: #1a56db; color: #fff; border-color: #1345c0; }
.btn-primary:hover { background-color: #1345c0; border-color: #1035a8; color: #fff; box-shadow: 0 3px 10px rgba(26,86,219,.28); }

/* Secondary — 보조 실행 */
.btn-secondary { background-color: #edf2f8; color: #1e3a5f; border-color: #c4d2e2; }
.btn-secondary:hover { background-color: #dde8f4; border-color: #a8bdd4; color: #1e3a5f; box-shadow: 0 2px 6px rgba(30,58,95,.10); }

/* Neutral — 닫기/취소/보조 조회 (부트스트랩 outline-secondary·secondary 계열 매핑) */
.btn-outline-secondary,
.btn-outline-primary {
    background-color: #f4f6f9; color: #4b5563; border-color: #d1d8e3;
}
.btn-outline-secondary:hover,
.btn-outline-primary:hover {
    background-color: #e8edf4; border-color: #b0bdd0; color: #1e3a5f;
}
/* outline-primary 는 살짝 파란 강조 유지 */
.btn-outline-primary { color: #1e3a5f; }
.btn-outline-primary:hover { color: #1a56db; }

/* Warning — 임시저장/복구 */
.btn-warning { background-color: #d97706; color: #fff; border-color: #b45309; }
.btn-warning:hover { background-color: #b45309; border-color: #92400e; color: #fff; box-shadow: 0 3px 10px rgba(180,83,9,.28); }

/* Danger — 삭제/불용 */
.btn-danger { background-color: #dc2626; color: #fff; border-color: #b91c1c; }
.btn-danger:hover { background-color: #b91c1c; border-color: #991b1b; color: #fff; box-shadow: 0 3px 10px rgba(185,28,28,.28); }
.btn-outline-danger { background-color: #fff; color: #b91c1c; border-color: #f0b4b4; }
.btn-outline-danger:hover { background-color: #fdeaea; border-color: #e08a8a; color: #991b1b; }

/* Success — 확정(점검완료) */
.btn-success { background-color: #0b9a67; color: #fff; border-color: #0a865b; }
.btn-success:hover { background-color: #088f5e; border-color: #077a50; color: #fff; box-shadow: 0 3px 10px rgba(11,154,103,.25); }

.excel-table {
    margin: 0;
}

.excel-table thead th {
    padding: 11px 12px;
    background: var(--table-head);
    border-bottom: 1px solid #d4deeb;
    color: #1f2f46;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.excel-table td {
    padding: 10px 12px;
    border-color: #edf2f7;
    color: #243247;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.excel-table tbody tr:nth-child(even) td { background: #fafbfd; }
.excel-table tbody tr:hover td { background: #edf3fb; }

.policy-expectation-form {
    display: grid;
    grid-template-columns: 82px 100px auto;
    gap: 5px;
    min-width: 250px;
}

.policy-expectation-form .form-control,
.policy-expectation-form .btn {
    min-height: 30px;
    height: 30px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 11px;
}

.upload-help {
    color: var(--text-muted);
    font-size: 11px;
}

.os-month-table td,
.os-month-table th {
    text-align: center;
}

.os-month-table td:first-child,
.os-month-table th:first-child {
    text-align: left;
}

.selected-month-row td {
    background: #eaf2ff !important;
}

.os-month-modal .modal-header {
    border-bottom-color: #edf2f7;
}

.month-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.month-result-grid > div {
    min-height: 76px;
    padding: 14px;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
    background: #f8fafc;
}

.month-result-grid span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.month-result-grid strong {
    display: block;
    margin-top: 7px;
    color: #1f2f46;
    font-size: 22px;
    line-height: 1;
}

.upload-modal-form .form-control {
    min-height: 42px;
}

.os-account-table .form-select,
.os-account-table .form-control {
    min-width: 118px;
}

.os-account-table .os-review-text {
    min-width: 220px;
    height: 32px;
    resize: vertical;
}

/* 업로드 모달 3종 탭 */
.upload-tabs .nav-link {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.upload-tabs .nav-link.active {
    color: var(--primary, #2563eb);
}
.os-paste-input {
    min-height: 130px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    resize: vertical;
}
.os-preview-scroll {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
}
.os-preview-table th,
.os-preview-table td,
.os-manual-table th,
.os-manual-table td {
    font-size: 11px;
    padding: 5px 8px;
    vertical-align: middle;
}
.os-manual-table .form-control {
    min-height: 30px !important;
    font-size: 12px;
}

/* 상세 점검 목록: 단일 폼 일괄 저장 */
.os-detail-form .os-account-table tbody tr:hover td {
    background: #edf3fb;
}
/* ===== 2단계 상세 모달: 고정 높이, 내부 테이블만 스크롤 ===== */
.os-detail-modal {
    height: 90vh;
    display: flex;
    flex-direction: column;
}
.os-detail-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.os-detail-body .os-summary-strip { margin-bottom: 0; flex: 0 0 auto; }
.os-step {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.os-step.d-none { display: none !important; }
.os-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.os-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
}
/* 스크롤 시 헤더 고정 */
.os-detail-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}
.os-detail-footer {
    flex: 0 0 auto;
    gap: 8px;
    flex-wrap: nowrap;
}
.os-detail-footer #osFooter1.d-flex,
.os-detail-footer #osFooter2.d-flex { display: flex !important; }

/* 상세 모달: 넓게 (툴바 한 줄 수용) */
.os-detail-dialog { max-width: min(1560px, 96vw); }

/* 통합 툴바 (검색 + 일괄적용 한 줄) */
.os-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
    overflow-x: auto;
}
.os-toolbar .os-tb-group { flex-shrink: 0; }
.os-toolbar .os-tb-group { display: flex; align-items: center; gap: 6px; }
.os-toolbar .os-tb-sep { width: 1px; align-self: stretch; background: #dfe6ef; margin: 2px 2px; }
.os-toolbar .os-tb-search { width: 190px; }
.os-toolbar .os-tb-status { width: 88px; }
.os-toolbar .os-tb-review { width: 170px; }
.os-toolbar .os-tb-label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
/* '미작성만' 필터 태그 (토글) */
.os-filter-tag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #6b7280;
    background: #fff;
    border: 1px solid #d1d8e3;
    border-radius: 999px;
    cursor: pointer;
    transition: background .13s ease, color .13s ease, border-color .13s ease;
}
.os-filter-tag:hover { background: #f4f6f9; color: #1e3a5f; }
.os-filter-tag.is-active {
    background: #fff7e6;
    color: #b45309;
    border-color: #e0b062;
}

/* 정렬 가능한 헤더 */
.os-account-table thead th.os-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.os-account-table thead th.os-sortable:hover { color: var(--primary); }
.os-account-table thead th.os-sortable .os-sort-ico {
    font-size: 10px;
    opacity: .35;
    margin-left: 3px;
}
.os-account-table thead th.os-sort-asc .os-sort-ico,
.os-account-table thead th.os-sort-desc .os-sort-ico { opacity: 1; color: var(--primary); }
/* 선택 건수: 자릿수가 늘어도 라벨 폭이 흔들리지 않게 고정 */
.os-toolbar .os-sel-count { display: inline-block; min-width: 2.4em; text-align: right; margin-left: 2px; }
.os-toolbar select.form-select-sm { width: auto; min-width: 92px; }

/* 단계 칩 */
.os-step-chip {
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
    background: #eaf2ff;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
}
/* 최종확정 안내 + 텍스트 */
.os-confirm-intro {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: #f0f7ff;
    border: 1px solid #d5e6fb;
    border-radius: var(--radius-input);
}
.os-confirm-intro > i { font-size: 22px; color: #2563eb; }
.os-confirm-text { min-height: 160px; resize: vertical; }

/* 완료월: 한 화면 (검토의견 위, 계정목록 아코디언 아래) */
.os-detail-body.os-completed { justify-content: flex-start; }
.os-completed #osStep2 { order: 1; flex: 0 0 auto; }
.os-completed #osStep1 { order: 2; flex: 0 0 auto; min-height: 0; }
.os-completed #osStep1 .os-table-wrap { flex: 0 0 auto; }
.os-completed .os-detail-scroll { max-height: 40vh; }
/* 계정목록 아코디언 토글 버튼 */
.os-acct-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
    font-size: 13px;
    font-weight: 600;
    color: #243247;
}
.os-acct-toggle:hover { background: #eef3f9; }
.os-acct-toggle .os-acct-caret { transition: transform .2s; }
.os-acct-toggle:not(.collapsed) .os-acct-caret { transform: rotate(180deg); }
/* 점검중: 아코디언 wrapper 없이 목록이 영역을 채움 */
.os-acct-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
/* 완료월: 아코디언(.collapse)일 때 상단 여백만 */
.os-acct-body.collapse.show, .os-acct-body.collapsing { margin-top: 8px; }
.os-modal-filter,
.os-modal-bulk {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
    padding: 12px;
    margin-left: 0;
    margin-right: 0;
}
.os-month-modal .modal-header .btn-close {
    margin: 0;
}
.os-modal-review .monthly-review-text {
    min-height: 90px;
}

/* 신규/삭제 계정 강조 */
.month-result-grid > div.stat-new {
    border-color: #b6d4fe;
    background: #eaf2ff;
}
.month-result-grid > div.stat-deleted {
    border-color: #f1c2c7;
    background: #fdecee;
}
/* 변동/미사용일자: 배지색 없이 담백하게 (배경 강조 제거, 글자색만) */
/* 점검완료(읽기전용): 체크박스·삭제 컬럼 숨김, 검토내용 텍스트 표시 */
.os-account-table.os-readonly .os-col-check { display: none; }
.os-account-table.os-readonly thead th:last-child,
.os-account-table.os-readonly tbody td:last-child { display: none; }
.os-account-table .os-review-ro { color: #243247; white-space: normal; }
.os-account-table .os-result-action { color: #b8860b; font-weight: 600; }

.os-change { font-size: 12px; font-weight: 600; }
.os-change-new { color: #2563eb; }
.os-change-del { color: #dc3545; }
.os-change-keep { color: #97a3b4; }
.os-days-danger { color: #dc3545; font-weight: 700; }
/* 선택 일괄적용 직후 플래시 */
.os-account-table tbody tr.os-row-applied td {
    transition: background .2s;
    background: #fff6d6 !important;
}
/* 선택 체크박스 컬럼 */
.os-account-table .os-col-check {
    width: 34px;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}
/* 모든 셀 세로 가운데 정렬 (행 높이 통일) */
.os-account-table tbody td { vertical-align: middle; }
/* 행별 저장/삭제 버튼 — td 는 일반 셀(flex 아님), 버튼만 inline-flex 로 정렬 */
.os-account-table .os-row-actions { white-space: nowrap; }
.os-account-table .os-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
}
.os-account-table .os-row-actions .btn + .btn { margin-left: 4px; }
.os-account-table .os-row-actions .btn i { font-size: 12px; line-height: 1; }
/* 저장 버튼: 평소 투명(행과 어우러짐), 버튼 hover 시에만 파란 강조 */
.os-account-table .os-save-row {
    background: transparent;
    color: #64748b;
    border-color: transparent;
}
.os-account-table .os-save-row:hover {
    background: #dce8f6;
    color: #1a56db;
    border-color: #94b8e0;
    box-shadow: none;
}
/* 삭제 버튼: 평소 투명, 버튼 hover 시에만 빨강 */
.os-account-table .os-delete-row {
    background: transparent;
    color: #94a3b8;
    border-color: transparent;
}
.os-account-table .os-delete-row:hover {
    background: #fdeaea;
    color: #b91c1c;
    border-color: #f0b4b4;
    box-shadow: none;
}
/* 변경된 행 표시 (저장 안 됨) — 왼쪽 얇은 앰버 바 */
.os-account-table tbody tr.os-row-dirty td:first-child { box-shadow: inset 3px 0 0 #d97706; }

/* 상태: 변경됨 → 저장 버튼 활성화 (파란 채움) */
.os-account-table tr.os-row-dirty .os-save-row {
    background: #1a56db;
    color: #fff;
    border-color: #1345c0;
}
.os-account-table tr.os-row-dirty .os-save-row:hover {
    background: #1345c0;
    color: #fff;
    border-color: #1035a8;
}
/* 상태: 저장됨 → 입력창 회색 처리 (편집 완료 표시) */
.os-account-table tr.os-row-saved .os-usage,
.os-account-table tr.os-row-saved .os-result,
.os-account-table tr.os-row-saved .os-review {
    background: #f1f3f5;
    color: #8a94a3;
    border-color: #e2e6ea;
}
/* 클릭(포커스) 시 다시 활성화 (회색 해제) */
.os-account-table tr.os-row-saved .os-usage:focus,
.os-account-table tr.os-row-saved .os-result:focus,
.os-account-table tr.os-row-saved .os-review:focus {
    background: #fff;
    color: var(--text);
    border-color: #86b7fe;
}

/* 검토/조치내용: 일자형 입력 (넓게) */
.os-account-table .os-review {
    min-width: 240px;
}
.os-account-table .os-usage,
.os-account-table .os-result {
    min-width: 108px;
}

/* 요약: 한 줄 컴팩트 스트립 */
.os-summary-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-input);
}
.os-summary-strip .ss-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.os-summary-strip .ss-item b {
    font-size: 17px;
    font-weight: 700;
    color: #1f2f46;
    line-height: 1;
}
.os-summary-strip .ss-item em { font-style: normal; font-weight: 600; }
.os-summary-strip .ss-sep {
    width: 1px;
    height: 20px;
    background: #dfe6ef;
}
.os-summary-strip .ss-done b { color: #198754; }
.os-summary-strip .ss-pending b { color: #dc7609; }
.os-summary-strip .ss-new b { color: #2563eb; }
.os-summary-strip .ss-deleted b { color: #dc3545; }
.os-summary-strip .ss-action b { color: #b8860b; }
.os-summary-strip .ss-muted { opacity: .5; }

/* 신규/삭제인데 사유 미입력 → 테두리로만 은은하게 표시 */
.os-account-table .reason-required {
    border-color: #e0b062;
}
.os-account-table .reason-required::placeholder {
    color: #b58a4a;
}

/* 진행률 바 (요약 스트립 내) */
.os-progress {
    width: 120px;
    height: 7px;
    background: #e6ecf3;
    border-radius: 999px;
    overflow: hidden;
}
.os-progress-bar {
    height: 100%;
    width: 0;
    background: #198754;
    border-radius: 999px;
    transition: width .25s ease;
}

.monthly-review-text {
    min-height: 118px;
    resize: vertical;
}

.annual-summary-table th,
.annual-summary-table td {
    text-align: center;
}

.annual-summary-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    color: #243247;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge {
    border-radius: 999px;
    font-size: 10px;
    padding: 5px 9px;
}

.pagination .page-link {
    color: #475569;
    font-size: 12px;
}

.pagination .active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
    gap: 16px;
}

.settings-card .card-header { min-height: 62px; }
.settings-card .card-header strong,
.settings-card .card-header small,
.settings-switch strong,
.settings-switch small { display: block; }

.settings-card .card-header small {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
}

.settings-card .card-body { padding: 20px; }

.settings-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 62px;
    padding: 10px 2px;
    border-top: 1px solid #edf2f7;
}

.settings-switch strong {
    color: #334155;
    font-size: 12px;
}

.settings-switch small {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
}

.settings-switch .form-check-input {
    width: 38px;
    height: 21px;
    flex: 0 0 auto;
}

.settings-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: #fff;
}

.settings-actions > span {
    color: var(--text-muted);
    font-size: 10px;
}

.settings-actions > div {
    display: flex;
    gap: 8px;
}

/* Login */
.login-body {
    min-height: 100vh;
    overflow: hidden;
    background: #f8fafc;
}

.login-wrap {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.login-hero {
    position: relative;
    flex: 1;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    padding: 52px;
    overflow: hidden;
    background: linear-gradient(155deg, #162236 0%, #1e2d42 58%, #19283b 100%);
}

.login-brand, .mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.login-brand {
    position: absolute;
    z-index: 2;
    top: 34px;
    left: 48px;
    color: #fff;
    letter-spacing: .14em;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(176, 200, 220, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(176, 200, 220, .045) 1px, transparent 1px);
    background-size: 48px 48px;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
}

.hero-glow-one {
    width: 420px;
    height: 420px;
    top: -100px;
    right: -80px;
    background: rgba(26, 86, 219, .28);
}

.hero-glow-two {
    width: 280px;
    height: 280px;
    left: -60px;
    bottom: 70px;
    background: rgba(126, 179, 232, .1);
}

.login-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 540px;
}

.hero-eyebrow, .login-kicker {
    color: #6aadee;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
}

.login-hero-copy h1 {
    margin: 16px 0;
    color: #fff;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.04em;
}

.login-hero-copy h1 em {
    color: #7eb3e8;
    font-style: normal;
}

.login-hero-copy p {
    max-width: 500px;
    color: rgba(176, 200, 220, .72);
    font-size: 13px;
    line-height: 1.8;
}

.hero-tags {
    display: flex;
    gap: 7px;
    margin-top: 22px;
}

.hero-tags span {
    padding: 4px 11px;
    border: 1px solid rgba(176, 200, 220, .18);
    border-radius: 999px;
    background: rgba(176, 200, 220, .05);
    color: rgba(176, 200, 220, .65);
    font-size: 10px;
    font-weight: 600;
}

.login-panel {
    width: 430px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
}

.login-panel-inner {
    width: 100%;
    max-width: 340px;
}

.mobile-brand { display: none; }

.login-panel h2 {
    margin: 12px 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.login-description {
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.login-field {
    margin-bottom: 17px;
}

.login-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
}

.input-wrap > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 13px;
    color: #94a3b8;
    transform: translateY(-50%);
}

.input-wrap .form-control {
    height: 43px;
    padding-left: 39px;
    background: #fff;
}

.login-submit {
    width: 100%;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    background: var(--primary);
    color: #fff;
}

.login-submit:hover {
    background: var(--primary-hover);
    color: #fff;
}

.login-security {
    margin: 23px 0 0;
    color: #94a3b8;
    font-size: 10px;
    text-align: center;
}

.login-alert {
    padding: 10px 12px;
    border-radius: var(--radius-input);
    font-size: 11px;
}

@media (max-width: 991px) {
    :root { --sidebar-w: 100%; }

    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        padding: 10px 14px;
    }

    .sidebar-brand {
        min-height: 44px;
        padding: 0 4px 10px;
    }

    .sidebar-section-label, .sidebar-footer { display: none; }

    .sidebar-nav {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
        overflow-x: auto;
    }

    .app-main { margin-left: 0; }
    .content-area { padding: 18px 14px; }
    .settings-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .login-hero { display: none; }
    .login-panel { width: 100%; padding: 32px 24px; border: 0; }
    .mobile-brand { display: flex; margin-bottom: 42px; color: var(--navy); letter-spacing: .12em; }
    .page-header { align-items: stretch; flex-direction: column; }
    .settings-actions { align-items: stretch; flex-direction: column; }
    .settings-actions > div { display: grid; }
}
