﻿/* =============================================
   Color palette (groupware-aligned)
   --gw-navy   : #1a3566  (header/primary)
   --gw-navy2  : #142a52  (hover/dark)
   --gw-orange : #f5821f  (accent/warning)
   --gw-bg     : #f4f5f7  (page background)
   ============================================= */

:root {
    --gw-navy: #1a3566;
    --gw-navy2: #142a52;
    --gw-orange: #f5821f;
    --gw-bg: #f2f4f7;
    --md-body-size: 14px;
    --md-h1-size: 24px;
    --md-h2-size: 18px;
    --md-h3-size: 15px;
    --md-h1-weight: 700;
    --md-h2-weight: 700;
    --md-h3-weight: 700;
    --md-strong-size: 14px;
    --md-strong-weight: 700;
    --md-em-size: 14px;
    --md-em-weight: 400;
    --md-ol-size: 14px;
    --md-ol-weight: 400;
    --md-ul-size: 14px;
    --md-ul-weight: 400;
    --md-paragraph-gap: 3px;
}

body {
    background-color: var(--gw-bg);
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #1f2937;
    word-break: keep-all;
    line-height: 1.65;
}

/* ?? Navbar active link ?? */
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 0.35rem;
}

/* ?? Bootstrap primary override ?? */
.btn-primary {
    background-color: var(--gw-navy);
    border-color: var(--gw-navy);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--gw-navy2);
    border-color: var(--gw-navy2);
}

.btn-outline-primary {
    color: var(--gw-navy);
    border-color: var(--gw-navy);
}

.btn-outline-primary:hover {
    background-color: var(--gw-navy);
    border-color: var(--gw-navy);
    color: #fff;
}

/* ?? Cards ?? */
.card {
    border-radius: 0.5rem;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.card-hover {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* ?? Table ?? */
.table-hover tbody tr:hover {
    background-color: #eef1f8;
}

/* ?? Stat cards on dashboard ?? */
.stat-orange {
    background: #e8f0fe !important;
    color: #1a3566 !important;
}

.stat-navy {
    background: #eef2ff !important;
    color: #1a3566 !important;
}

/* ?? Pinned row ?? */
.pinned-row {
    background-color: #fff3cd !important;
}

/* ?? Search highlight ?? */
mark.search-highlight {
    background-color: #fff176;
    color: inherit;
    padding: 0.1em 0.15em;
    border-radius: 3px;
    font-weight: inherit;
}

mark {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/* 문서 헤더 인라인 첨부파일 링크 (제목 옆에 표시) */
.header-attachment-link {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    background: #eef2ff;
    color: #1e40af;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    font-weight: 500;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.header-attachment-link:hover {
    background: #c7d2fe;
    color: #1e3a8a;
    border-color: #a5b4fc;
}
.header-attachment-link .text-muted { color: #6366f1 !important; }

/* (주)대광건영 회사 로고 — 사이드바 / 상단 글로벌 헤더 공용 */
.sidebar-company-logo {
    height: 32px;
    width: auto;
    margin-right: 10px;
    flex-shrink: 0;
}
.global-top-company-logo {
    height: 28px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

/* 개발(Standby) 슬롯 식별 배너 — 운영 환경에서는 표시되지 않음 */
.dev-banner {
    background: repeating-linear-gradient(45deg, #ffc107, #ffc107 12px, #ffe082 12px, #ffe082 24px);
    color: #4a3a00;
    text-align: center;
    padding: 6px 12px;
    font-weight: 700;
    border-bottom: 2px solid #ff9800;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1080;
}

/* 목차 클릭 시 대상 헤딩 일시 하이라이트 */
.toc-target-flash {
    animation: tocFlash 1.8s ease-out;
    border-radius: 4px;
}
@keyframes tocFlash {
    0%   { background-color: #fff3a8; box-shadow: 0 0 0 6px #fff3a8; }
    60%  { background-color: #fff7c2; box-shadow: 0 0 0 6px #fff7c2; }
    100% { background-color: transparent; box-shadow: 0 0 0 6px transparent; }
}

/* ?? Markdown content ?? */
.markdown-content {
    line-height: 1.65;
    color: #212529;
    font-size: var(--md-body-size);
}

/* 제목 크기/간격 고정 (대/중/소제목) */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    margin-top: 0.95rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.2rem;
    color: #212529;
}

.markdown-content h1 {
    font-size: var(--md-h1-size);
}

/* 대제목 */
.markdown-content h2 {
    font-size: var(--md-h2-size);
}

/* 중제목 */
.markdown-content h3 {
    font-size: var(--md-h3-size);
}

/* 소제목 */

/* 빈 줄(문단 분리)로 인한 과도한 간격 축소 */
.markdown-content p {
    margin-top: 0;
    margin-bottom: var(--md-paragraph-gap);
}

.markdown-content p+p {
    margin-top: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin-top: 0.2rem;
    margin-bottom: 0.45rem;
    padding-left: 1.75rem;     /* 숫자/불릿 마커가 화면 안에 표시되도록 좌측 여백 확보 */
    list-style-position: outside;
}

.markdown-content ol { list-style-type: decimal; }
.markdown-content ol ol { list-style-type: lower-alpha; }
.markdown-content ol ol ol { list-style-type: lower-roman; }
.markdown-content ul { list-style-type: disc; }

.markdown-content li {
    margin: 0.08rem 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.markdown-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #212529;
}

.markdown-content table th,
.markdown-content table td {
    vertical-align: middle;
}

.markdown-content table td {
    white-space: normal;
    word-break: break-word;
}

.markdown-content code {
    background-color: #f4f5f7;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #d63384;
    font-size: 0.875em;
}

.markdown-content pre {
    background-color: #f4f5f7;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    overflow-x: auto;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
}

/* 편집 화면 미리보기 글자/간격 커스텀 */
.markdown-content.editor-font-controlled {
    font-size: var(--md-body-size, 14px);
}

.markdown-content.editor-font-controlled h1 {
    font-size: var(--md-h1-size, 24px);
    font-weight: var(--md-h1-weight, 700);
}

.markdown-content.editor-font-controlled h2 {
    font-size: var(--md-h2-size, 18px);
    font-weight: var(--md-h2-weight, 700);
}

.markdown-content.editor-font-controlled h3 {
    font-size: var(--md-h3-size, 15px);
    font-weight: var(--md-h3-weight, 700);
}

.markdown-content.editor-font-controlled p {
    margin-bottom: var(--md-paragraph-gap, 3px);
}

.markdown-content.editor-font-controlled strong,
.markdown-content.editor-font-controlled b {
    font-size: var(--md-strong-size, var(--md-body-size, 14px));
    font-weight: var(--md-strong-weight, 700);
}

.markdown-content.editor-font-controlled em,
.markdown-content.editor-font-controlled i {
    font-size: var(--md-em-size, var(--md-body-size, 14px));
    font-weight: var(--md-em-weight, 400);
    font-style: italic;
}

.markdown-content.editor-font-controlled ol > li {
    font-size: var(--md-ol-size, var(--md-body-size, 14px));
    font-weight: var(--md-ol-weight, 400);
}

.markdown-content.editor-font-controlled ul > li {
    font-size: var(--md-ul-size, var(--md-body-size, 14px));
    font-weight: var(--md-ul-weight, 400);
}

/* 편집/미리보기 동시 보기 */
.md-split-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 460px;
    background: #fff;
}

.md-split-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.md-split-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.md-editor-textarea {
    flex: 1;
    resize: vertical;
    min-height: 380px;
}

.md-live-preview {
    flex: 1;
    overflow: auto;
}

@media (max-width: 992px) {
    .md-split-editor {
        grid-template-columns: 1fr;
    }

    .md-split-preview {
        border-left: 0 !important;
        border-top: 1px solid #e5e7eb;
    }
}

/* ?? Info card (detail page sidebar) ?? */
.info-card {
    background-color: #f4f5f7;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    flex-shrink: 0;
}

.version-current {
    font-weight: 600;
    color: #1a3566;
}

/* ?? Badge color overrides ?? */
.badge.bg-success {
    background-color: #2e7d32 !important;
}

/* ?? Alert info (search result bar) ?? */
.alert-info {
    background-color: #e8edf6;
    border-color: #b8c8e8;
    color: var(--gw-navy);
}

/* ?? Breadcrumb ?? */
.breadcrumb-item a {
    color: var(--gw-navy);
}

.breadcrumb-item a:hover {
    color: var(--gw-navy2);
}

/* ?? Footer ?? */
footer {
    border-top: 1px solid #dee2e6 !important;
}


/* ==============================================
   SIDEBAR LAYOUT
   ============================================== */

.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ?? Sidebar ?? */
.sidebar {
    width: 220px;
    min-width: 220px;
    background-color: var(--gw-navy);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    overflow-y: auto;
    transition: transform 0.2s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 56px 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-icon {
    font-size: 1.5rem;
    color: #7ea8f8;
}

.sidebar-logo-text {
    font-size: 1rem;
    color: #fff;
    letter-spacing: 0.02em;
}

.sidebar-logo-text strong {
    color: #fff;
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 18px 6px;
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}

.sidebar-link i {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 12px 8px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 6px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.sidebar-logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ?? Main wrapper (right of sidebar) ?? */
.main-wrapper {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.2s ease;
}

/* 임시: 좌측 메뉴 숨김 (원복은 _Layout.cshtml 플래그 false) */
body.sidebar-temp-hidden .sidebar {
    display: none !important;
}

body.sidebar-temp-hidden .main-wrapper {
    margin-left: 0 !important;
}

/* 임시 상단 메뉴 레이아웃 (좌측 메뉴 숨김 상태용) */
.global-top-nav {
    position: sticky;
    top: 0;
    z-index: 250;
    background: var(--gw-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.global-top-nav-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 8px 20px;
}

.global-top-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.global-top-brand i {
    color: #7ea8f8;
    font-size: 1.1rem;
}

.global-top-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: thin;
}

.global-top-link {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.global-top-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.global-top-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
}

.global-top-admin-btn {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    background: transparent !important;
}

.global-top-admin-wrap {
    flex-shrink: 0;
}

.global-top-admin-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.global-top-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.global-top-user-name {
    font-size: 0.82rem;
    font-weight: 700;
}

.global-top-user-dept {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.7);
}

.global-top-logout {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
}

.sidebar-toggle-btn {
    position: absolute;
    top: 10px;
    left: 14px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #7ea8f8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 340;
    transition: background 0.15s ease, color 0.15s ease;
    display: inline-flex;
    font-size: 1.32rem;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #a8c4ff;
}

body.sidebar-collapsed .sidebar {
    transform: none;
    width: 72px;
    min-width: 72px;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: 72px;
}

body.sidebar-collapsed .sidebar-toggle-btn {
    left: 13px;
    right: auto;
    top: 8px;
    color: #6f95e3;
}

body.sidebar-collapsed .sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #8fb1f3;
}

body.sidebar-collapsed .sidebar-logo {
    justify-content: center;
    padding: 56px 8px 14px;
}

body.sidebar-collapsed .sidebar-logo-text,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-user-text {
    display: none;
}

body.sidebar-collapsed .sidebar-nav {
    padding: 0 6px;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    gap: 0;
    padding: 10px 8px;
}

body.sidebar-collapsed .sidebar-link span {
    display: none;
}

body.sidebar-collapsed .sidebar-link-row {
    margin: 2px 0;
}

body.sidebar-collapsed .sidebar-link-main {
    justify-content: center;
    padding: 10px 8px;
}

body.sidebar-collapsed .sidebar-link-main i {
    margin-right: 0 !important;
}

body.sidebar-collapsed .sidebar-link-main span {
    display: none;
}

body.sidebar-collapsed .sidebar-chevron-btn,
body.sidebar-collapsed .sidebar-nav-group .collapse {
    display: none !important;
}

body.sidebar-collapsed .sidebar-footer {
    padding: 8px 6px 12px;
}

body.sidebar-collapsed .sidebar-user-info {
    justify-content: center;
    padding: 8px;
}

body.sidebar-collapsed .sidebar-logout-btn {
    justify-content: center;
    gap: 0;
    padding: 10px 8px;
}

body.sidebar-collapsed .sidebar-logout-btn span {
    display: none;
}

/* ?? Top header ?? */
.top-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.sidebar-temp-hidden .top-header {
    top: 56px;
}

body.sidebar-collapsed .top-header {
    padding-left: 24px;
}

.top-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 460px;
}

.top-search-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.top-search-form {
    position: relative;
    flex: 1;
}

.top-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
}

.top-search-input {
    width: 100%;
    padding: 8px 44px 8px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.top-search-input:focus {
    border-color: var(--gw-navy);
    box-shadow: 0 0 0 3px rgba(26, 53, 102, 0.1);
    background: #fff;
}

.top-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gw-navy);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.top-search-btn:hover {
    background: var(--gw-navy2);
}

/* ===== 사이드바 사용자 정보 ===== */
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-user-text {
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-dept {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 페이지 헤더 + 필터 한 줄 배치 ===== */
.page-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
}

.page-header-title {
    font-size: 1.15rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.page-content {
    flex: 1;
}

@media (max-width: 992px) {
    .global-top-nav-inner {
        padding: 8px 12px;
    }

    .global-top-user-name,
    .global-top-user-dept {
        display: none;
    }

    .global-top-logout span {
        display: none;
    }
}

/* ===== 목차(TOC) ===== */
/* 기본 (전체 페이지 사이드바) */
#toc-panel {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 8px;
    margin-bottom: 10px;
}

.toc-panel-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    padding: 0 4px 6px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

#doc-toc {
    display: flex;
    flex-direction: column;
}

.toc-item {
    display: block;
    font-size: 0.73rem;
    color: #6b7280;
    text-decoration: none;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s;
}

.toc-item:hover {
    background: #e8f0fe;
    color: #1e40af;
    text-decoration: none;
}

.toc-item.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
    border-left: 2px solid #3b82f6;
    padding-left: 4px;
}

.toc-lv1 {
    font-weight: 600;
    color: #1f2937;
}

.toc-lv2 {}

.toc-lv3 {
    opacity: 0.85;
}

.toc-lv4 {
    opacity: 0.75;
    font-size: 0.68rem;
}

/* split-left ??紐⑹감 ??援щ텇??+ ?⑥씪 而щ읆 */
.split-left #toc-panel {
    border: none;
    border-top: 2px solid #e5e7eb;
    border-radius: 0;
    background: #f8f9fa;
    margin: 0;
    padding: 10px 10px 14px;
}

.split-left #doc-toc {
    flex-direction: column;
}

/* ===== 문서 내 검색 ===== */
.doc-search-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.doc-search-bar-page {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.doc-search-bar input {
    flex: 1;
    font-size: 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 8px;
    outline: none;
}

.doc-search-bar input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.doc-search-count {
    font-size: 0.72rem;
    color: #6b7280;
    white-space: nowrap;
    min-width: 46px;
    text-align: center;
}

.doc-search-btn {
    border: none;
    background: none;
    color: #6b7280;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.doc-search-btn:hover {
    background: #f3f4f6;
    color: #111;
}

mark.doc-match {
    background: #fef08a;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

mark.doc-match-current {
    background: #f97316;
    color: #fff;
}


/* ==============================================
   DASHBOARD COMPONENTS
   ============================================== */

/* ?? Stat cards ?? */
.dash-stat-card {
    position: relative;
    border-radius: 10px;
    padding: 20px 22px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    border: 1px solid #e5e7eb;
}

.dash-stat-navy {
    background: #fff;
    border-left: 4px solid #1a3566;
    color: #1f2937;
}

.dash-stat-teal {
    background: #fff;
    border-left: 4px solid #0e7490;
    color: #1f2937;
}

.dash-stat-orange {
    background: #fff;
    border-left: 4px solid #d97706;
    color: #1f2937;
}

.dash-stat-label {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
}

.dash-stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
    color: #111827;
}

.dash-stat-unit {
    font-size: 1rem;
    font-weight: 400;
    color: #374151;
}

.dash-stat-icon {
    position: absolute;
    right: 16px;
    bottom: 10px;
    font-size: 2.8rem;
    opacity: 0.08;
    color: #1f2937;
}

/* ?? Dashboard table ?? */
.dash-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dash-table td {
    font-size: 0.875rem;
    vertical-align: middle;
    color: #374151;
}

/* ?? Category badges in table ?? */
.cat-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cat-badge-hr {
    background: #e8edf6;
    color: #1a3566;
}

.cat-badge-finance {
    background: #dbeafe;
    color: #1d4ed8;
}

.cat-badge-admin {
    background: #ede9fe;
    color: #6d28d9;
}

.cat-badge-notice {
    background: #dcfce7;
    color: #15803d;
}

.cat-badge-legal {
    background: #fef9c3;
    color: #854d0e;
}

.cat-badge-default {
    background: #f3f4f6;
    color: #374151;
}

/* ?? MAIN HIGHLIGHTS card ?? */
.dash-highlight-card {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dash-highlight-card.dash-highlight-empty {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
}

.dash-highlight-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #4338ca;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.dash-highlight-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e1b4b;
    line-height: 1.55;
    margin-bottom: 8px;
}

.dash-highlight-preview {
    font-size: 0.78rem;
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 14px;
}

.dash-highlight-btn {
    display: inline-flex;
    align-items: center;
    background: #4338ca;
    color: #fff;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.dash-highlight-btn:hover {
    background: #3730a3;
    color: #fff;
}

/* ?? Favorites list ?? */
.dash-favorites-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.dash-favorites-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.dash-favorites-item:last-child {
    border-bottom: none;
}

.dash-favorites-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    min-width: 22px;
    padding-top: 1px;
}

.dash-favorites-info {
    flex: 1;
}

/* ===== 사이드바 서브메뉴 ===== */
.sidebar-nav-group {
    margin-bottom: 2px;
}

.sidebar-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-chevron.rotated {
    transform: rotate(-180deg);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 6px 16px 6px 36px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 6px;
    margin: 1px 8px;
    transition: background 0.15s, color 0.15s;
}

.sidebar-sublink:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-sublink.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
}

/* ===== 사이드바 부모 메뉴 (링크 + 아이콘 분리) ===== */
.sidebar-link-row {
    display: flex;
    align-items: center;
    border-radius: 8px;
    margin: 2px 8px;
    transition: background 0.15s;
}

.sidebar-link-row:hover,
.sidebar-link-row.active {
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-link-main {
    flex: 1;
    padding: 10px 8px 10px 12px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.sidebar-link-main:hover {
    color: #fff;
}

.sidebar-link-row.active .sidebar-link-main {
    color: #fff;
    font-weight: 600;
}

.sidebar-chevron-btn {
    background: none;
    border: none;
    padding: 10px 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    line-height: 1;
}

.sidebar-chevron-btn:hover {
    color: #fff;
}

/* ===== 통합 검색 필터 바 ===== */
.filter-bar {
    padding: 14px 16px 10px;
    background: #fff;
}

.filter-bar-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    min-width: 110px;
}

.filter-item-narrow {
    min-width: 20px;
    flex: 0 0 auto;
}

.filter-item-wide {
    flex: 1 1 160px;
}

.filter-item-btns {
    flex: 0 0 auto;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
    white-space: nowrap;
}

.filter-sep {
    font-size: 0.9rem;
    color: #9ca3af;
    padding-bottom: 6px;
    line-height: 30px;
}

/* ===== 스플릿 패널 partial 입력 스크롤 레이아웃 ===== */
/* split-right > split-content > partial-detail 높이 체인 */
#split-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.partial-detail {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.partial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
}

.partial-scroll-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.partial-col-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    min-width: 0;
}

.partial-col-sidebar {
    width: 240px;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 14px;
    border-left: 1px solid #dee2e6;
    background: #fff;
}

/* Permission-locked sidebar menu items */
.disabled-menu { opacity: 0.55; }
.disabled-menu:hover { text-decoration: line-through; }
