:root {
    --c-primary: #111827;
    /* 검정(다크) */
    --c-secondary: #64748b;
    /* 슬레이트 그레이 */
    --c-accent: #f97316;
    /* 메인 주황색 */
    --c-danger: #ef4444;
    /* 빨강 */
    --c-success: #10b981;
    /* 녹색 */
    --c-orange: #f97316;
    /* 동일한 주황 */
    --c-bg: #f4f7f6;
    /* 밝은 회백색 배경 */
    --c-card-bg: #ffffff;
    --c-text-primary: #1e293b;
    --c-text-secondary: #475569;
    --c-border: #e2e8f0;
    --c-sidebar-bg: #111827;
    /* 사이드바 검정 배경 */
    --c-sidebar-text: #a1a1aa;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --font-main: 'Pretendard', 'Noto Sans KR', 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--c-bg);
    color: var(--c-text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--c-sidebar-bg);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
}

.login-box {
    width: 320px;
    padding: 30px;
    background: var(--c-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* auth-btn 기본 제어는 app.js에서 inline style로 처리하므로 CSS 숨김 제거 */

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--c-sidebar-bg);
    color: var(--c-sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--c-accent);
    color: white;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
}

.logo-text h1 {
    font-size: 18px;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 10px;
    opacity: 0.6;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--c-sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-nav li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-nav li.active a {
    background: var(--c-accent);
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
}

.user-info strong {
    display: block;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.user-info span {
    font-size: 11px;
    opacity: 0.6;
}

.settings-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
}

.settings-btn:hover {
    opacity: 1;
}


/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    height: 60px;
    background: var(--c-card-bg);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--c-bg);
    padding: 8px 16px;
    border-radius: 20px;
    width: 300px;
    transition: width 0.3s;
}

.search-bar:focus-within {
    width: 400px;
    background: white;
    box-shadow: 0 0 0 2px var(--c-accent);
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.search-bar .material-symbols-outlined {
    color: var(--c-text-secondary);
    font-size: 20px;
}


/* View Sections */
.view-section {
    display: none;
    flex: 1;
    overflow-y: auto;
    background: var(--c-bg);
}

.view-section.active {
    display: block;
}

.section-padding {
    padding: 24px;
}


/* Dashboard Grid */
.dashboard-grid {
    display: flex;
    gap: 16px;
    padding: 16px;
    height: 100%;
}

.grid-col-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grid-col-side {
    flex: 1;
}

/* Cards & Widgets */
.card {
    background: var(--c-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
}

.widget {
    display: flex;
    flex-direction: column;
    /* overflow: hidden 제거 - 페이지네이션 버튼이 잘리는 원인이었음 */
    overflow: visible;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--c-border);
}

.widget-header h2 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all,
.add-btn {
    font-size: 13px;
    color: var(--c-text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.view-all:hover {
    color: var(--c-accent);
}

/* Typography Colors */
.text-accent {
    color: var(--c-accent);
}

.text-danger {
    color: var(--c-danger);
}

.text-orange {
    color: var(--c-orange);
}

/* Lists */
.notice-list {
    padding: 8px 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-md);
    transition: 0.2s;
}

.notice-item:hover {
    background: var(--c-bg);
}

.badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.general {
    background: #e0e7ff;
    color: #4338ca;
}

.badge.important {
    background: #fee2e2;
    color: #b91c1c;
}

.badge.site {
    background: #dcfce7;
    color: #15803d;
}

.badge.status-ing {
    background: #dbeafe;
    color: #1e40af;
}

.badge.status-done {
    background: #d1fae5;
    color: #065f46;
}

.badge.status-expired {
    background: #fee2e2;
    color: #b91c1c;
}

.notice-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.notice-date {
    font-size: 12px;
    color: var(--c-text-secondary);
}

/* Error Table */
.table-container {
    padding: 0;
    overflow-x: auto;
}

.error-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

.error-table th {
    background: #f8fafc;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--c-text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.error-table td {
    padding: 8px 16px;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
}

.error-table tr:last-child td {
    border-bottom: none;
}

.error-table tr:hover td {
    background: var(--c-bg);
}

.status-text {
    font-weight: 600;
}

.status-text.recv {
    color: var(--c-danger);
}

.status-text.ing {
    color: var(--c-orange);
}

.status-text.done {
    color: var(--c-success);
}


/* Schedules */
.schedule-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: max-content;
}

.schedule-item {
    display: flex;
    gap: 16px;
    white-space: nowrap;
}

.schedule-date {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: #fffbfa;
    border: 1px solid #ffedd5;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--c-orange);
}

.schedule-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.schedule-title {
    font-weight: 600;
    font-size: 14px;
}

.schedule-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--c-text-secondary);
}


/* Shared Board List */
.board-container {
    padding: 8px 16px;
    overflow-x: auto;
}

.board-list {
    list-style: none;
    min-width: max-content;
}

.board-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--c-border);
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    gap: 16px;
}

.board-item:last-child {
    border-bottom: none;
}

.board-item:hover {
    background: var(--c-bg);
    border-radius: var(--radius-md);
}

.board-title {
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.board-meta {
    font-size: 12px;
    color: var(--c-text-secondary);
    display: flex;
    gap: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: calc(100% - 32px);
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--c-border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--c-text-secondary);
}

.close-modal:hover {
    color: var(--c-danger);
}

/* Forms */
#generic-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
    background: var(--c-accent);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    filter: brightness(0.9);
}

/* Loader */
.loader {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Detail View Modal */
.detail-modal {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-modal .modal-header {
    padding: 0 0 12px 0;
}

.detail-meta {
    font-size: 13px;
    color: var(--c-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-content {
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-md);
    white-space: pre-wrap;
    font-size: 14px;
    min-height: 100px;
}

.detail-actions {
    background: white;
    padding: 15px 0 0 0;
    /* 시각적 여백 확보 */
}

/* Site Files (현장자료) */
.upload-container {
    background: white;
    padding: 15px;
    border-radius: var(--radius-md);
    border: 2px dashed #0d6efd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: all 0.2s ease;
}

.upload-container.dragover {
    background-color: #e7f5ff;
    border-color: #339af0;
    transform: scale(1.01);
}

.upload-info {
    font-size: 13px;
    color: var(--c-text-secondary);
    pointer-events: none;
}

.upload-info strong {
    font-size: 14px;
    color: var(--c-text-primary);
}

.upload-btn-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

#file-input-label {
    padding: 8px 16px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-primary);
    transition: 0.2s;
}

#file-input-label:hover {
    background: #e9ecef;
}

#upload-submit-btn {
    padding: 8px 16px;
    background: var(--c-accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

#upload-submit-btn:hover:not(:disabled) {
    filter: brightness(0.9);
}

#upload-submit-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

.file-list-wrapper {
    overflow-x: auto;
    min-height: 200px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.file-table th {
    background: #f8fafc;
    padding: 10px 8px;
    font-weight: 600;
    color: var(--c-text-secondary);
    font-size: 13px;
    border-bottom: 2px solid var(--c-border);
    white-space: nowrap;
}

.file-table th:nth-child(2),
.file-table th:nth-child(3),
.file-table th:nth-child(4) {
    width: 1%;
}

.file-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
    color: var(--c-text-primary);
    white-space: nowrap;
}

.file-table td:first-child {
    width: auto;
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-table tr:hover td {
    background: var(--c-bg);
}

.file-icon {
    margin-right: 6px;
    font-size: 14px;
}

.action-btns {
    display: flex;
    gap: 4px;
}

.view-btn,
.del-btn,
.download-btn {
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: 0.2s;
}

.view-btn {
    background: #e0f2fe;
    color: #0284c7;
}

.view-btn:hover {
    background: #bae6fd;
}

.del-btn {
    background: #fee2e2;
    color: #dc2626;
}

.del-btn:hover {
    background: #fecaca;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image Viewer Modal */
#hp-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    backdrop-filter: blur(4px);
    display: none;
}

#hp-preview-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    height: 95vh;
    background: white;
    border-radius: var(--radius-lg);
    z-index: 2001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--c-border);
}

.preview-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

#hp-preview-close {
    background: none;
    border: none;
    color: var(--c-text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: 0.2s;
}

#hp-preview-close:hover {
    color: var(--c-danger);
}

.preview-body {
    flex: 1;
    padding: 0;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* === Side Panel Compact Layout (기본값) === */
/* 사이드 패널에서는 항상 컴팩트 모드 적용 */
.app-container {
    flex-direction: column;
}

.sidebar {
    width: 100% !important;
    flex-direction: row;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 10px 0;
    border: none;
}

.sidebar-header .logo-text {
    display: none;
}

.sidebar-footer {
    display: none;
}

.sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    background: var(--c-sidebar-bg);
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-nav ul {
    flex-direction: row;
    gap: 6px;
}

.sidebar-nav li a {
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.dashboard-grid {
    flex-direction: column;
}

.search-bar {
    width: 100%;
}

.search-bar:focus-within {
    width: 100%;
}

/* Tablet / Medium Screens */
@media screen and (max-width: 1024px) {

    .grid-col-main,
    .grid-col-side {
        width: 100%;
    }
}

/* 넓은 화면 (독립 브라우저 실행 시에만 풀 사이드바 레이아웃 적용) */
@media screen and (min-width: 900px) {
    .app-container {
        flex-direction: row;
    }

    .sidebar {
        width: 240px !important;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        border-bottom: none;
    }

    .sidebar-header {
        padding: 24px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar-header .logo-text {
        display: block;
    }

    .sidebar-nav {
        flex: 1;
        padding: 20px 12px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .sidebar-nav li a {
        padding: 10px 12px;
        font-size: 14px;
        white-space: normal;
    }

    .search-bar {
        width: 300px;
    }

    .search-bar:focus-within {
        width: 400px;
    }
}



/* === Knowledge File Attachment Styles === */

/* 상세 모달 첨부파일 목록 */
.knowledge-file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.knowledge-file-table th {
    background: #f8fafc;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--c-text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--c-border);
    font-size: 12px;
}

.knowledge-file-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
}

.knowledge-file-table tr:last-child td {
    border-bottom: none;
}

.knowledge-file-table tr:hover td {
    background: #f0f9ff;
}

.kf-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--c-text-primary);
    word-break: break-all;
}

.kf-ext {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kf-ext.img {
    background: #dbeafe;
    color: #1d4ed8;
}

.kf-ext.pdf {
    background: #fee2e2;
    color: #dc2626;
}

.kf-ext.doc {
    background: #dbeafe;
    color: #2563eb;
}

.kf-ext.xls {
    background: #d1fae5;
    color: #059669;
}

.kf-ext.etc {
    background: #f1f5f9;
    color: #64748b;
}

.kf-action-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.15s;
    white-space: nowrap;
}

.kf-preview-btn {
    background: #e0f2fe;
    color: #0284c7;
}

.kf-preview-btn:hover {
    background: #bae6fd;
}

.kf-download-btn {
    background: #f0fdf4;
    color: #16a34a;
}

.kf-download-btn:hover {
    background: #dcfce7;
}

.kf-delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.kf-delete-btn:hover {
    background: #fecaca;
}

/* 미리보기 이미지 (인라인) */
.kf-preview-thumb {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    margin-top: 10px;
    border: 1px solid var(--c-border);
    cursor: pointer;
    transition: transform 0.2s;
}

.kf-preview-thumb:hover {
    transform: scale(1.02);
}

/* 폼 내 기존 파일 목록 (수정 시) */
.kf-existing-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 12px;
}

.kf-existing-item .kf-name {
    font-size: 12px;
}

.kf-existing-item .kf-remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
    transition: 0.15s;
}

.kf-existing-item .kf-remove-btn:hover {
    color: #b91c1c;
}

/* === Upload Progress Bar === */
.upload-progress-container {
    margin-top: 10px;
    display: none;
}

.upload-progress-container.active {
    display: block;
}

.upload-progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--c-text-secondary);
}

.upload-progress-item .file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    font-weight: 500;
}

.upload-progress-bar-track {
    flex: 2;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.upload-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #fb923c);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.upload-progress-bar-fill.done {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.upload-progress-bar-fill.error {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.upload-progress-item .progress-text {
    width: 40px;
    text-align: right;
    font-weight: 600;
    font-size: 11px;
}

.upload-progress-item .progress-status {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* 현장자료 다운로드 버튼 */
.download-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: 0.2s;
    background: #f0fdf4;
    color: #16a34a;
}

.download-btn:hover {
    background: #dcfce7;
}

/* 상세 모달 첨부파일 삭제 버튼 (관리자용) */
.kf-delete-file-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.15s;
    white-space: nowrap;
    background: #fee2e2;
    color: #dc2626;
}

.kf-delete-file-btn:hover {
    background: #fecaca;
}

/* ============================================
   올림고정 (Pinned Memo) 전용 스타일
   ============================================ */

/* 테이블 상태 배지 */
.badge.pinned-up {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge.pinned-down {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge.pinned-away {
    background: #faf5ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.badge.pinned-release {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge.pinned-wait {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* 상세 모달 내부 레이아웃 */
.pinned-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.pin-view-box {
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: #fff;
    min-height: 41px;
    word-break: break-all;
    display: flex;
    align-items: center;
}

.pin-view-box.multiline {
    align-items: flex-start;
    white-space: pre-wrap;
    min-height: 60px;
}

/* 상태 확인 섹션 */
.pin-status-section {
    background: #f8fafc;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pin-status-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 10px;
}

/* 상태 헤더 행 */
.pin-status-header {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 2px solid #cbd5e1;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

/* 상태 데이터 행 */
.pin-status-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.15s;
}

.pin-status-row:last-child {
    border-bottom: none;
}

.pin-status-row:hover {
    background: #f1f5f9;
}

/* 칼럼 너비 통일 */
.pin-status-label {
    width: 90px;
    min-width: 90px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}



.pin-status-value {
    width: 48px;
    min-width: 48px;
    text-align: center;
}

.pin-status-handler {
    width: 70px;
    min-width: 70px;
    font-size: 13px;
    color: #334155;
    text-align: center;
}

.pin-status-time {
    flex: 1;
    font-size: 13px;
    color: #475569;
}

/* ==========================================
   통합 검색 결과 뷰 콤팩트 스타일 (Compact Search Results)
   목적: 검색 결과를 최대한 많이 볼 수 있도록 간격을 최소화
   ========================================== */

/* 전체 검색 뷰의 여백(패딩) 줄이기 */
#view-search.section-padding {
    padding: 12px 16px;
}

/* 뷰 헤더(검색 결과 타이틀) 하단 간격 조정 */
#view-search .view-header {
    margin-bottom: 12px;
}

/* 검색결과 위젯(카드) 간의 간격(gap) 줄이기 */
#search-results-container {
    gap: 12px !important;
    padding: 0 !important;
    /* dashboard-grid의 height:100%를 해제하여 검색 결과가 자연스럽게 확장되도록 함 */
    height: auto !important;
}

/* 검색 결과 내부 위젯은 overflow를 visible로 유지하여 내용이 잘리지 않게 함 */
#view-search .widget {
    overflow: visible !important;
}

/* 검색 결과 내부 board-container / table-container는 높이 제한 해제 */
#view-search .board-container,
#view-search .table-container {
    overflow-y: visible !important;
    max-height: none !important;
}

/* 검색결과 내부 카드(위젯) 헤더 패딩 및 글자 크기 축소 */
#view-search .widget-header {
    padding: 8px 12px;
}

#view-search .widget-header h2 {
    font-size: 14px;
}

/* 게시판 목록 아이템 패딩 줄이기 (공지사항, 지식창고 등) */
#view-search .board-item {
    padding: 6px 12px;
    gap: 8px;
}

#view-search .board-title {
    font-size: 14px;
}

#view-search .board-meta {
    font-size: 14px;
}

/* 테이블(장애현황, 올림고정) 셀 패딩 줄이고 글자 크기 축소 */
#view-search .error-table th,
#view-search .error-table td {
    padding: 6px 10px;
    font-size: 14px;
}

/* 일정 목록 컨테이너 및 아이템 간격/패딩 줄이기 */
#view-search .schedule-list {
    padding: 8px !important;
    gap: 6px;
}

#view-search .schedule-item {
    gap: 10px;
    padding: 4px 0;
}

/* 일정 아이콘 날짜 박스 크기 축소 */
#view-search .schedule-date {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

#view-search .schedule-title {
    font-size: 14px;
}

#view-search .schedule-time {
    font-size: 14px;
}

/* 검색결과 내부 게시판 컨테이너(리스트 영역) 패딩 최소화 */
#view-search .board-container {
    padding: 4px;
}

/* ==========================================
   대시보드 위젯 고정 공간 할당 (글 3개 기준)
   목적: 각 메뉴당 글 3개 공간을 무조건 할당하여 페이지 이동 시 레이아웃 흔들림 방지
   ========================================== */

/* 1. 공지사항 리스트 (3개 기준 최소 높이 할당) */
#view-dashboard .notice-list {
    min-height: 160px;
    overflow-y: hidden;
    /* 세로 스크롤 제거 */
    overflow-x: auto;
    /* 가로 스크롤 유지 */
}

/* 2. 장애 현황 및 올림 고정 테이블 (헤더 + 3개 기준 최소 높이 할당) */
#view-dashboard .table-container {
    min-height: 180px;
    overflow-y: hidden;
    overflow-x: auto;
}

/* 3. 일정 리스트 (2개 기준 최소 높이 할당) */
#view-dashboard .schedule-list {
    min-height: 165px;
    overflow-y: hidden;
    overflow-x: auto;
}

/* 대시보드 전용: 세로 스크롤 제거, 가로 스크롤 유지 */
/* 검색 결과(#view-search)에서는 위에서 별도로 overflow: visible 처리함 */
#view-dashboard .board-container,
#view-dashboard .table-container {
    overflow-y: hidden !important;
    overflow-x: auto;
}

/* --- Extracted Inline Styles --- */
.extracted-style-1 {
    justify-content: center;
    margin-bottom: 20px;
}

.extracted-style-2 {
    width: 100%;
    margin-top: 10px;
}

.extracted-style-3 {
    display: none;
    text-align: center;
    padding: 20px;
}

.extracted-style-4 {
    border-color: #ccc;
    border-top-color: #f97316;
    margin-bottom: 15px;
    display: inline-block;
}

.extracted-style-5 {
    color: #64748b;
    font-size: 14px;
}

.extracted-style-6 {
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
    display: none;
}

.extracted-style-7 {
    display: none;
}

.extracted-style-8 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.extracted-style-9 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.extracted-style-10 {
    cursor: pointer;
}

.extracted-style-11 {
    flex-direction: column;
    gap: 12px;
}

.extracted-style-12 {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

.extracted-style-13 {
    width: 100%;
}

.extracted-style-14 {
    padding: 15px;
}

.extracted-style-15 {
    color: var(--c-accent) !important;
}

.extracted-style-16 {
    margin-bottom: 24px;
}

.extracted-style-17 {
    color: var(--c-text-secondary);
}

.extracted-style-18 {
    margin-bottom: 24px;
}

.extracted-style-19 {
    margin-bottom: 24px;
}

.extracted-style-20 {
    padding: 10px;
}

.extracted-style-21 {
    padding: 10px;
}

.extracted-style-22 {
    margin-bottom: 24px;
}

.extracted-style-23 {
    margin-bottom: 24px;
    padding: 20px;
}

.extracted-style-24 {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin-bottom: 10px;
}

.extracted-style-25 {
    width: 80px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

.extracted-style-26 {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

.extracted-style-27 {
    padding: 10px 20px;
}

.extracted-style-28 {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.extracted-style-29 {
    display: none
}

.extracted-style-30 {
    font-size: 13px;
    align-self: center;
    margin-right: 10px;
}

.extracted-style-31 {
    padding: 0;
}

.extracted-style-32 {
    display: none;
}

.extracted-style-33 {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.extracted-style-34 {
    width: 16px;
    height: 16px;
    min-width: auto;
    margin: 0;
    padding: 0;
}

.extracted-style-35 {
    margin: 0;
    cursor: pointer;
}

.extracted-style-36 {
    display: none;
}

.extracted-style-37 {
    display: none;
}

.extracted-style-38 {
    display: none;
}

.extracted-style-39 {
    display: flex;
    gap: 8px;
}

.extracted-style-40 {
    width: 80px;
    background: #f8fafc;
    color: #64748b;
}

.extracted-style-41 {
    flex: 1;
}

.extracted-style-42 {
    display: flex;
    gap: 16px;
}

.extracted-style-43 {
    display: none;
    flex: 1;
}

.extracted-style-44 {
    background: #f8fafc;
    color: #64748b;
}

.extracted-style-45 {
    display: none;
    flex: 1;
}

.extracted-style-46 {
    background: #f8fafc;
    color: #64748b;
}

.extracted-style-47 {
    display: none;
    flex: 1;
}

.extracted-style-48 {
    background: #f8fafc;
    color: #64748b;
}

.extracted-style-49 {
    display: none;
}

.extracted-style-50 {
    display: none;
}

.extracted-style-51 {
    display: none;
}

.extracted-style-52 {
    display: flex;
    gap: 16px;
}

.extracted-style-53 {
    display: none;
    flex: 1;
}

.extracted-style-54 {
    display: none;
    flex: 1;
}

.extracted-style-55 {
    display: flex;
    gap: 16px;
}

.extracted-style-56 {
    display: none;
    flex: 1;
}

.extracted-style-57 {
    display: none;
    flex: 1;
}

.extracted-style-58 {
    display: none;
}

.extracted-style-59 {
    margin-bottom: 8px;
}

.extracted-style-60 {
    margin-top: 8px;
}

.extracted-style-61 {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 0px;
}

.extracted-style-62 {
    display: flex;
    gap: 10px;
}

.extracted-style-63 {
    flex: 1;
}

.extracted-style-64 {
    flex: 1;
}

.extracted-style-65 {
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-top: 5px;
}

.extracted-style-66 {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.extracted-style-67 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.extracted-style-68 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.extracted-style-69 {
    width: 60px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.extracted-style-70 {
    width: 60px;
    padding: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.extracted-style-71 {
    width: 70px;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-72 {
    flex: 1;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-73 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.extracted-style-74 {
    width: 60px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.extracted-style-75 {
    width: 60px;
    padding: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.extracted-style-76 {
    width: 70px;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-77 {
    flex: 1;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-78 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.extracted-style-79 {
    width: 60px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.extracted-style-80 {
    width: 60px;
    padding: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.extracted-style-81 {
    width: 70px;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-82 {
    flex: 1;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-83 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.extracted-style-84 {
    width: 60px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.extracted-style-85 {
    width: 60px;
    padding: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.extracted-style-86 {
    width: 70px;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-87 {
    flex: 1;
    padding: 6px;
    box-sizing: border-box;
}

.extracted-style-88 {
    margin-top: 15px;
}

.extracted-style-89 {
    width: 100%;
}

.extracted-style-90 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
}

.extracted-style-91 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.extracted-style-92 {
    font-weight: 600;
    color: var(--c-text-primary);
}

.extracted-style-93 {
    display: flex;
    gap: 8px;
}

.extracted-style-94 {
    background: #f37b25;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
}

.extracted-style-95 {
    background: #ef4444;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
}

.extracted-style-96 {
    background: #64748b;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
    display: none;
}

.extracted-style-97 {
    background: #10b981;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
    display: none;
}

.extracted-style-98 {
    max-height: 400px;
    overflow-y: auto;
}

.extracted-style-99 {
    display: none;
    margin-top: 20px;
}

.extracted-style-100 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.extracted-style-101 {
    font-size: 18px;
    color: var(--c-accent);
}

.extracted-style-102 {
    font-size: 14px;
}

.extracted-style-103 {
    text-align: center;
}

.extracted-style-104 {
    color: white;
    margin-top: 10px;
    font-weight: 600;
}

.extracted-style-105 {
    max-width: 400px;
    width: 90%;
}

.extracted-style-106 {
    padding: 20px;
}

.extracted-style-107 {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.extracted-style-108 {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.extracted-style-109 {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    font-size: 14px;
}

.extracted-style-110 {
    z-index: 2000;
}

.extracted-style-111 {
    max-width: 320px;
    width: 90%;
    border-radius: 12px;
    padding: 0;
}

.extracted-style-112 {
    padding: 24px;
    text-align: center;
}

.extracted-style-113 {
    margin-bottom: 16px;
}

.extracted-style-114 {
    font-size: 48px;
    color: var(--c-accent);
}

.extracted-style-115 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--c-text-primary);
}

.extracted-style-116 {
    margin: 0;
    font-size: 14px;
    color: var(--c-text-secondary);
    line-height: 1.5;
}

.extracted-style-117 {
    display: flex;
    border-top: 1px solid #e2e8f0;
}

.extracted-style-118 {
    flex: 1;
    background: transparent;
    border: none;
    border-right: 1px solid #e2e8f0;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.extracted-style-119 {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-accent);
    cursor: pointer;
}