/* ==========================================================================
   (주)제로서 건설 인트라넷 시스템 디자인 시스템 (PC & Mobile 최적화)
   ========================================================================== */

:root {
    --bg-base: #0B0F19;
    --bg-surface: #111827;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #F59E0B;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --brand-amber: #F59E0B;
    --brand-amber-light: #FCD34D;
    --brand-blue: #0EA5E9;
    --brand-cyan: #06B6D4;
    --brand-green: #10B981;
    --brand-purple: #8B5CF6;
    --brand-red: #EF4444;

    --sidebar-width: 260px;
    --header-height: 68px;
    --mobile-nav-height: 64px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow-amber: 0 0 20px rgba(245, 158, 11, 0.15);
    --shadow-glow-blue: 0 0 20px rgba(14, 165, 233, 0.15);

    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --font-heading: 'Outfit', 'Pretendard', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.clickable {
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}

.clickable:active {
    transform: scale(0.97);
}

/* ==========================================================================
   글로벌 레이아웃 & 상단 헤더
   ========================================================================== */

#app-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#global-header {
    height: var(--header-height);
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-symbol {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(14, 165, 233, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #FFFFFF, var(--brand-amber-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.system-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.header-center {
    display: flex;
    align-items: center;
}

.live-clock-badge {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--brand-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--brand-green);
    animation: pulse 2s infinite;
}

.network-badge {
    color: var(--brand-cyan);
    font-weight: 500;
    border-left: 1px solid var(--border-color);
    padding-left: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-quick-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--brand-amber), #D97706);
    color: #111827;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
}

.user-pill:hover {
    border-color: var(--brand-amber);
    background: rgba(30, 41, 59, 0.8);
}

.avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.user-dept {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* ==========================================================================
   글로벌 현장 퀵 필터 바 (Sticky Filter Bar)
   ========================================================================== */

#global-filter-bar {
    background: rgba(17, 24, 39, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    overflow-x: auto;
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    -webkit-overflow-scrolling: touch;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-chips-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: rgba(51, 65, 85, 0.8);
    color: var(--text-primary);
}

.filter-chip.active {
    background: rgba(245, 158, 11, 0.18);
    border-color: var(--brand-amber);
    color: var(--brand-amber);
    font-weight: 700;
}

/* ==========================================================================
   사이드바 및 콘텐츠 레이아웃
   ========================================================================== */

#main-layout {
    display: flex;
    flex: 1;
}

#sidebar-nav {
    width: var(--sidebar-width);
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-left: 12px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(245, 158, 11, 0.12);
    color: var(--brand-amber);
    font-weight: 600;
    border-left: 3px solid var(--brand-amber);
}

.badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--brand-amber-light);
}

.server-status-box {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.78rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-success { color: var(--brand-green); }
.text-amber { color: var(--brand-amber); }

/* ==========================================================================
   콘텐츠 섹션 공통
   ========================================================================== */

#content-container {
    flex: 1;
    padding: 28px 32px;
    max-width: 1400px;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.content-section.active {
    display: block;
}

.section-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-hero h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.section-hero p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

/* ==========================================================================
   버튼 시스템
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-amber), #D97706);
    color: #111827;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: rgba(51, 65, 85, 0.7);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 0.9);
}

.btn-text {
    background: none;
    border: none;
    color: var(--brand-blue);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-text:hover {
    text-decoration: underline;
}

/* ==========================================================================
   KPI 그리드 & 원형 링 차트
   ========================================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    gap: 18px;
    align-items: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
}

.card-glow-amber:hover { border-color: rgba(245, 158, 11, 0.4); box-shadow: var(--shadow-glow-amber); }
.card-glow-blue:hover { border-color: rgba(14, 165, 233, 0.4); box-shadow: var(--shadow-glow-blue); }

.kpi-icon {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.kpi-meta {
    flex: 1;
}

.kpi-title {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: #FFFFFF;
}

.kpi-unit {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-desc {
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

/* 원형 링 차트 스타일 */
.kpi-ring-card {
    gap: 16px;
}

.ring-chart-box {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 1s ease-out;
}

.ring-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--brand-cyan);
}

/* ==========================================================================
   2열 대시보드 패널
   ========================================================================== */

.dashboard-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.site-progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.site-item-card {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: background 0.2s;
}

.site-item-card:hover {
    background: rgba(30, 41, 59, 0.6);
}

.site-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.site-name-tag {
    font-size: 0.95rem;
    font-weight: 700;
}

.site-status-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(245, 158, 11, 0.15);
    color: var(--brand-amber);
    font-weight: 600;
}

.site-meta-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.site-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-amber), var(--brand-blue));
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
}

.progress-val-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 42px;
    text-align: right;
}

.daily-feed-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feed-item {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.feed-site-title {
    font-weight: 700;
    color: var(--brand-cyan);
}

.feed-date {
    color: var(--text-muted);
}

.feed-content {
    font-size: 0.86rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.feed-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   현장 카드 그리드 (Sites)
   ========================================================================== */

.sites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.site-full-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.site-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.82rem;
    background: rgba(17, 24, 39, 0.5);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.site-info-grid dt { color: var(--text-secondary); }
.site-info-grid dd { font-weight: 600; text-align: right; }

/* ==========================================================================
   데이터 테이블 공통 (PC용)
   ========================================================================== */

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.data-table th {
    padding: 14px 16px;
    background: rgba(17, 24, 39, 0.7);
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   모바일 전용 최적화 카드 뷰 (Mobile Card View)
   ========================================================================== */

.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block;
}

.mobile-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-mobile-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s;
}

.report-mobile-card:active {
    transform: scale(0.99);
}

.m-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

.m-card-site {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-amber);
    display: flex;
    align-items: center;
    gap: 6px;
}

.m-card-weather-badge {
    font-size: 0.76rem;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: rgba(14, 165, 233, 0.15);
    color: var(--brand-cyan);
    font-weight: 600;
}

.m-card-date-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.m-card-body {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m-body-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--brand-amber-light);
    text-transform: uppercase;
}

.m-body-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
}

.m-sub-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.m-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding-top: 4px;
}

.m-manpower-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--brand-green);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.material-mobile-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.m-mat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.m-mat-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-amber);
}

.m-mat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(15, 23, 42, 0.5);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.82rem;
}

.m-mat-grid dt { color: var(--text-muted); }
.m-mat-grid dd { color: var(--text-primary); font-weight: 600; text-align: right; }

.m-mat-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.m-mat-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px;
    font-size: 0.82rem;
}

/* ==========================================================================
   현장 시공 사진첩 갤러리 그리드 & 라이트박스
   ========================================================================== */

.photos-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.photo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.photo-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-amber);
}

.photo-thumb {
    width: 100%;
    height: 200px;
    background-color: #1E293B;
    background-size: cover;
    background-position: center;
    position: relative;
}

.photo-meta-box {
    padding: 16px;
}

.photo-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.photo-caption {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.photo-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* 라이트박스 전체화면 뷰어 */
.lightbox-content {
    position: relative;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalIn 0.25s ease-out;
}

.lightbox-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    align-self: flex-end;
}

.btn-lightbox-tool {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #F8FAFC;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lightbox-tool:hover {
    background: #0284C7;
    border-color: #38BDF8;
}

.btn-lightbox-close {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lightbox-close:hover {
    background: #EF4444;
    color: #FFF;
}

.btn-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    font-size: 2.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    user-select: none;
    padding-bottom: 4px;
}

.btn-lightbox-nav.prev {
    left: 12px;
}

.btn-lightbox-nav.next {
    right: 12px;
}

.btn-lightbox-nav:hover {
    background: #0284C7;
    border-color: #38BDF8;
    color: #FFFFFF;
}

.btn-lightbox-nav:active {
    transform: translateY(-50%) scale(0.92);
}

.lightbox-img-wrap {
    width: 100%;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #000;
    touch-action: none;
    position: relative;
    user-select: none;
    cursor: grab;
}

.lightbox-img-wrap.panning {
    cursor: grabbing;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    transform-origin: center center;
    pointer-events: auto;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.lightbox-img-wrap img.animating {
    transition: transform 0.24s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.24s ease !important;
}

.lightbox-img-wrap img.instant {
    transition: none !important;
}

.lightbox-caption-box {
    width: 100%;
    background: rgba(17, 24, 39, 0.9);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    border: 1px solid var(--border-color);
}

.lightbox-caption-box h4 {
    font-size: 1.1rem;
    color: var(--brand-amber);
    margin-bottom: 4px;
}

.lightbox-caption-box p {
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.lightbox-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================================
   도면 및 기술 자료실 그리드
   ========================================================================== */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.doc-icon {
    font-size: 2.2rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.doc-info {
    flex: 1;
}

.doc-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.doc-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   전자결재 카드 리스트 & 전자 서명 캔버스
   ========================================================================== */

.approvals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.approval-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
}

.appr-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.appr-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.appr-content {
    font-size: 0.86rem;
    color: var(--text-primary);
    max-width: 700px;
}

.appr-actions {
    display: flex;
    gap: 10px;
}

.btn-approve {
    background: var(--brand-green);
    color: #FFF;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.btn-reject {
    background: rgba(239, 68, 68, 0.2);
    color: var(--brand-red);
    border: 1px solid var(--brand-red);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* 터치 전자 서명 캔버스 */
.signature-canvas-wrap {
    position: relative;
    background: #FFF;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-focus);
    overflow: hidden;
    margin-top: 8px;
    touch-action: none;
}

#signature-canvas {
    display: block;
    width: 100%;
    height: 180px;
    background: #FFFFFF;
    cursor: crosshair;
}

.btn-clear-sig {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(17, 24, 39, 0.7);
    color: #FFF;
    border: none;
    font-size: 0.76rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* ==========================================================================
   공지사항 리스트
   ========================================================================== */

.notices-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notice-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-card);
}

.notice-card.important {
    border-left: 4px solid var(--brand-red);
}

.notice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.notice-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.15);
    color: var(--brand-red);
    font-weight: 700;
}

.notice-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.notice-body {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

/* ==========================================================================
   모달 시스템 & 인증/프로필 전용 스타일
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: #1E293B;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: modalIn 0.25s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(17, 24, 39, 0.95);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

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

.modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--brand-amber);
}

.input-row {
    display: flex;
    gap: 8px;
}

.file-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.4);
}

.upload-tip {
    display: block;
    font-size: 0.82rem;
    color: var(--brand-amber-light);
    margin-top: 6px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(17, 24, 39, 0.95);
    flex-shrink: 0;
}

.auth-tabs {
    display: flex;
    gap: 6px;
}

.auth-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.auth-tab-btn.active {
    color: var(--brand-amber);
    background: rgba(245, 158, 11, 0.12);
}

.quick-login-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 12px;
}

.quick-title {
    display: block;
    font-size: 0.78rem;
    color: var(--brand-cyan);
    font-weight: 600;
    margin-bottom: 8px;
}

.quick-btns {
    display: flex;
    gap: 8px;
}

.btn-quick-user {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-quick-user:hover {
    border-color: var(--brand-amber);
    color: var(--brand-amber);
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.avatar-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
    color: #FFF;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.prof-meta {
    flex: 1;
}

.prof-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.prof-name-row h4 {
    font-size: 1.15rem;
    font-weight: 700;
}

.prof-sub {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.prof-id {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-footer-split {
    justify-content: space-between;
}

/* ==========================================================================
   모바일 하단 탭바 (Mobile Only)
   ========================================================================== */

#mobile-tab-bar {
    display: none;
}

/* ==========================================================================
   반응형 미디어 쿼리 (Mobile & Tablet 최적화)
   ========================================================================== */

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-2col {
        grid-template-columns: 1fr;
    }
    .sites-grid {
        grid-template-columns: 1fr;
    }
    .photos-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }

    #sidebar-nav {
        display: none;
    }

    #sidebar-nav.mobile-open {
        display: flex !important;
        position: fixed;
        top: var(--header-height);
        left: 0;
        bottom: var(--mobile-nav-height);
        width: 260px;
        z-index: 1500;
        background: #111827;
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.8);
        border-right: 1px solid var(--border-color);
        animation: fadeIn 0.2s ease-out;
    }

    #global-header {
        height: var(--header-height);
        padding: 0 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .brand-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
    }

    .logo-symbol {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        padding: 4px;
    }

    .logo-symbol svg {
        width: 22px;
        height: 22px;
    }

    .logo-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .company-name {
        font-size: 1.02rem;
        line-height: 1.2;
        letter-spacing: 0.2px;
        margin: 0;
        padding: 0;
        display: block;
    }

    .system-sub {
        font-size: 0.68rem;
        line-height: 1.2;
        margin-top: 1px;
        color: #94A3B8;
        display: block;
    }

    .header-center {
        display: none;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .btn-noti-bell {
        width: 36px;
        height: 36px;
    }

    .btn-quick-action {
        padding: 8px 10px;
    }

    .btn-quick-action span {
        display: none;
    }

    .user-pill {
        padding: 2px;
        background: transparent;
        border: none;
    }

    .user-info {
        display: none;
    }

    #global-filter-bar {
        padding: 6px 12px;
    }

    #content-container {
        padding: 16px 16px calc(var(--mobile-nav-height) + 24px) 16px;
    }

    .section-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-actions .btn {
        justify-content: center;
        font-size: 0.82rem;
        padding: 10px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-card {
        padding: 16px;
    }

    .photos-gallery-grid {
        grid-template-columns: 1fr;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .approval-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .appr-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        height: auto !important;
        border-radius: 20px 20px 0 0 !important;
        border-bottom: none !important;
        animation: slideUp 0.25s ease-out !important;
    }

    .modal-header {
        padding: 14px 18px !important;
    }

    .modal-body-scroll {
        padding: 14px 18px !important;
    }

    .modal-footer {
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom)) 18px !important;
        display: grid !important;
        grid-template-columns: 1fr 2fr !important;
        gap: 10px !important;
    }

    .profile-footer-split {
        grid-template-columns: 1fr 1.5fr !important;
    }

    .modal-footer .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
    }

    #mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-nav-height);
        background: rgba(17, 24, 39, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 999;
    }

    .tab-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 0.7rem;
        font-weight: 500;
        cursor: pointer;
        padding: 6px 12px;
        min-width: 58px;
    }

    .tab-btn.active {
        color: var(--brand-amber);
        font-weight: 700;
    }
}

/* ==========================================================================
   애니메이션 키프레임
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ==========================================================================
   글로벌 현장 원터치 퀵 필터 칩 바 스타일
   ========================================================================== */

.site-filter-bar-wrapper {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.site-filter-bar-wrapper::-webkit-scrollbar {
    height: 4px;
}

.site-filter-bar-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.site-filter-chips {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.filter-chip:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    color: #FFF;
}

.filter-chip.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
    border-color: var(--brand-amber);
    color: #FBBF24;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.filter-chip.active::before {
    content: "●";
    font-size: 0.65rem;
    color: #FBBF24;
}

/* ==========================================================================
   원형 SVG 링 프로그레스 차트 카드
   ========================================================================== */

.kpi-ring-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ring-chart-box {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-text {
    position: absolute;
    font-size: 0.92rem;
    font-weight: 800;
    color: #38BDF8;
    letter-spacing: -0.5px;
}

/* ==========================================================================
   고화질 시공 사진 라이트박스 뷰어 모달
   ========================================================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

.lightbox-image-wrap {
    width: 100%;
    max-height: 65vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    user-select: none;
}

.lightbox-meta {
    padding: 18px 24px;
    background: #1E293B;
    border-top: 1px solid var(--border-color);
}

.lightbox-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.lightbox-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #F8FAFC;
}

.lightbox-date {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-left: auto;
}

#lightbox-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.lightbox-actions {
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   전자결재 모바일 터치 서명 패드 모달
   ========================================================================== */

.modal-signature-box {
    max-width: 520px;
}

.signature-doc-info {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

.signature-doc-info .doc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.signature-doc-info .doc-row:last-child {
    margin-bottom: 0;
}

.signature-doc-info .label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.signature-doc-info .val {
    font-weight: 600;
    color: #FFF;
}

.signature-guide-text {
    font-size: 0.82rem;
    color: var(--brand-amber-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.signature-canvas-container {
    position: relative;
    width: 100%;
    height: 180px;
    background: #FFFFFF;
    border-radius: var(--radius-sm);
    border: 2px dashed rgba(245, 158, 11, 0.4);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    touch-action: none;
}

#signature-pad {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.signature-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #94A3B8;
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
    transition: opacity 0.2s;
}

.signature-placeholder.hidden {
    opacity: 0;
}

.signature-modal-footer {
    display: flex;
    justify-content: space-between;
}

/* ==========================================================================
   실시간 현장 긴급 안전 특보 배너 스타일
   ========================================================================== */

.safety-alert-banner {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.25));
    border-bottom: 1px solid rgba(239, 68, 68, 0.4);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 900;
    transition: all 0.3s;
}

.safety-alert-banner.dismissed {
    display: none;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-icon {
    font-size: 1.1rem;
    animation: pulse 1.2s infinite;
}

.alert-badge {
    background: #EF4444;
    color: #FFF;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.alert-text {
    font-size: 0.85rem;
    color: #FDE047;
    font-weight: 500;
}

.alert-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.alert-close-btn:hover {
    color: #FFF;
}

/* ==========================================================================
   섹션 상단 액션 버튼 그룹 & 실시간 검색 툴바
   ========================================================================== */

.section-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-toolbar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    flex: 1;
    min-width: 220px;
    color: var(--text-secondary);
}

.search-input-wrap input {
    background: transparent;
    border: none;
    color: #FFF;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
}

.date-filter-btns {
    display: flex;
    gap: 6px;
}

.btn-date-filter {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-date-filter.active {
    background: var(--brand-amber);
    color: #111827;
    font-weight: 700;
    border-color: var(--brand-amber);
}

/* ==========================================================================
   A4 감리 보고서 인쇄 전용 스타일 (Print Media Query)
   ========================================================================== */

@media print {
    body {
        background: #FFF !important;
        color: #000 !important;
        font-size: 10pt;
    }

    #global-header,
    #safety-alert-bar,
    #global-filter-bar,
    #sidebar-nav,
    #mobile-tab-bar,
    .section-actions-group,
    .filter-toolbar-card,
    .modal-overlay,
    .lightbox-overlay,
    .btn {
        display: none !important;
    }

    #content-container {
        padding: 0 !important;
        margin: 0 !important;
    }

    .content-section {
        display: none !important;
    }

    #sec-reports {
        display: block !important;
    }

    .section-hero {
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .section-hero h2 {
        color: #000 !important;
        font-size: 18pt !important;
    }

    .section-hero p {
        color: #555 !important;
    }

    .data-table {
        border-collapse: collapse;
        width: 100% !important;
        border: 1px solid #333 !important;
    }

    .data-table th, .data-table td {
        border: 1px solid #666 !important;
        color: #000 !important;
        padding: 8px !important;
        background: #FFF !important;
    }

    .data-table th {
        background: #EEE !important;
        font-weight: bold !important;
    }
}

/* ==========================================================================
   관리자 포털 서브탭 & 서브뷰 스타일
   ========================================================================== */

.admin-subtabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.admin-subtab-btn {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-subtab-btn.active {
    background: var(--brand-amber);
    color: #111827;
    border-color: var(--brand-amber);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.admin-subview {
    animation: fadeIn 0.25s ease-out;
}

/* ==========================================================================
   공종별 사진 카테고리 태그 칩 바
   ========================================================================== */

.photo-category-filter-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.photo-tag-chip {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.photo-tag-chip.active {
    background: rgba(14, 165, 233, 0.2);
    border-color: #38BDF8;
    color: #38BDF8;
    font-weight: 700;
}

/* ==========================================================================
   통합 알림 센터 (Notification Popover & Bell)
   ========================================================================== */

.noti-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.btn-noti-bell {
    position: relative;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-noti-bell:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: #38BDF8;
    color: #38BDF8;
}

.noti-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #EF4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    border-radius: 9px;
    padding: 0 4px;
    text-align: center;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
    animation: pulse 1.8s infinite;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 330px;
    max-width: 90vw;
    background: #0F172A;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    z-index: 1050;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.noti-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.95);
}

.noti-popover-header h4 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #F8FAFC;
}

.noti-popover-list {
    max-height: 360px;
    overflow-y: auto;
}

.noti-item {
    display: flex;
    gap: 12px;
    padding: 11px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s ease;
}

.noti-item:hover {
    background: rgba(30, 41, 59, 0.6);
}

.noti-item.unread {
    background: rgba(14, 165, 233, 0.08);
    border-left: 3px solid #38BDF8;
}

.noti-item-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.noti-item-content {
    flex: 1;
    min-width: 0;
}

.noti-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #F8FAFC;
    margin-bottom: 2px;
}

.noti-item-message {
    font-size: 0.75rem;
    color: #94A3B8;
    line-height: 1.35;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.noti-item-time {
    font-size: 0.68rem;
    color: #64748B;
}

.noti-empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748B;
    font-size: 0.8rem;
}

/* ==========================================================================
   실시간 사내 메신저 (Chat UI)
   ========================================================================== */

.chat-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: calc(100vh - 200px);
    min-height: 520px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chat-channels-pane {
    background: rgba(11, 15, 25, 0.9);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.chat-pane-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-pane-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #F8FAFC;
    font-weight: 700;
}

.ws-status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ws-status-badge.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.chat-channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.chat-channel-item:hover {
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-primary);
}

.chat-channel-item.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38BDF8;
}

.channel-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden !important;
    line-height: 1 !important;
    flex-shrink: 0;
    letter-spacing: -0.3px;
    box-sizing: border-box;
}

.channel-avatar.monitor-avatar {
    font-size: 0.68rem !important;
    letter-spacing: -0.5px !important;
}

.channel-info {
    flex: 1;
    min-width: 0;
}

.channel-title {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-sub {
    font-size: 0.72rem;
    color: #64748B;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-room-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: rgba(15, 23, 42, 0.7);
    overflow: hidden;
}

.chat-room-header {
    flex-shrink: 0;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-room-title-box h4 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #F8FAFC;
}

.chat-active-desc {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 2px;
    display: block;
}

.chat-messages-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-loading-notice {
    text-align: center;
    padding: 30px;
    color: #64748B;
    font-size: 0.85rem;
}

.chat-msg-row {
    display: flex;
    gap: 10px;
    max-width: 78%;
}

.chat-msg-row.mine {
    margin-left: auto;
    flex-direction: row-reverse;
}

.chat-msg-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #38BDF8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-msg-bubble-wrap {
    display: flex;
    flex-direction: column;
}

.chat-msg-row.mine .chat-msg-bubble-wrap {
    align-items: flex-end;
}

.chat-msg-sender-info {
    font-size: 0.73rem;
    color: #94A3B8;
    margin-bottom: 4px;
}

.chat-msg-sender-info.sender-right {
    text-align: right;
    color: #38BDF8;
    font-weight: 600;
}

.chat-msg-avatar.avatar-right {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
    background: #1E293B;
    color: #E2E8F0;
    border: 1px solid var(--border-color);
}

.chat-msg-row.mine .chat-msg-bubble {
    background: #0284C7;
    color: #FFFFFF;
    border-color: #38BDF8;
    border-top-right-radius: 2px;
}

.chat-msg-time {
    font-size: 0.68rem;
    color: #64748B;
    margin-top: 4px;
    padding: 0 2px;
}

/* 카카오톡 스타일 사진 묶어보내기 그리드 레이아웃 */
.chat-photo-grid {
    display: grid;
    gap: 4px;
    margin-top: 6px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 260px;
}

.chat-photo-grid.grid-1 {
    grid-template-columns: 1fr;
}

.chat-photo-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.chat-photo-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.chat-photo-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
}

.chat-photo-grid.grid-many {
    grid-template-columns: repeat(3, 1fr);
}

.chat-photo-grid .chat-grid-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-photo-grid .chat-grid-img:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

.chat-msg-image {
    max-width: 240px;
    max-height: 240px;
    border-radius: 8px;
    margin-top: 6px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
    flex-shrink: 0;
    padding: 12px 16px;
    background: rgba(11, 15, 25, 0.95);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-chat-media {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

.btn-chat-media:hover {
    background: rgba(51, 65, 85, 0.9);
}

#chat-message-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: #F8FAFC;
    font-size: 0.88rem;
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

#chat-message-input:focus {
    border-color: #38BDF8;
}

.btn-chat-send {
    background: #0284C7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    height: 38px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-chat-send:hover {
    background: #0369A1;
}

/* ==========================================================================
   직원 주소록 (사원 목록) & 1:1 대화방 스타일
   ========================================================================== */

.chat-subtab-bar {
    display: flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.8);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chat-subtab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-subtab-btn.active {
    background: #0284C7;
    color: #FFFFFF;
}

.channel-group-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
}

.dm-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dm-empty-hint {
    padding: 14px 10px;
    font-size: 0.75rem;
    color: #64748B;
    line-height: 1.4;
    text-align: center;
}

.employee-search-bar {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

#input-employee-search {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: #F8FAFC;
    font-size: 0.82rem;
    outline: none;
}

#input-employee-search:focus {
    border-color: #38BDF8;
}

.employee-list-scroll {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.employee-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.employee-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.4);
}

.employee-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.employee-card-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284C7, #0EA5E9);
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.employee-card-info {
    flex: 1;
    min-width: 0;
}

.employee-card-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.employee-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #F8FAFC;
}

.employee-card-rank {
    font-size: 0.72rem;
    padding: 2px 6px;
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border-radius: 4px;
    font-weight: 600;
}

.employee-card-dept {
    font-size: 0.74rem;
    color: #94A3B8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-start-dm {
    background: #0284C7;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.btn-start-dm:hover {
    background: #0369A1;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-chat-back {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    color: #38BDF8;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 768px) {
    #sec-chat.active {
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: var(--mobile-nav-height) !important;
        height: auto !important;
        z-index: 100 !important;
        background: #0B0F19 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #sec-chat.active .chat-container {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        overflow: hidden !important;
    }
    
    .chat-channels-pane {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        background: #0F172A !important;
    }

    .chat-channels-pane.mobile-hidden {
        display: none !important;
    }

    .chat-subview {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .chat-room-pane {
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        background: #0B0F19 !important;
    }

    .chat-room-pane.mobile-hidden {
        display: none !important;
    }

    .chat-room-header {
        flex-shrink: 0 !important;
        background: #111827 !important;
        border-bottom: 1px solid var(--border-color) !important;
        padding: 12px 14px !important;
        z-index: 10 !important;
    }

    .chat-messages-area {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 14px 14px !important;
        background: #0B0F19 !important;
    }

    .chat-input-wrapper {
        flex-shrink: 0 !important;
        background: #111827 !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 8px 12px !important;
        z-index: 10 !important;
    }

    .chat-msg-row {
        max-width: 90%;
    }
}

/* ==========================================================================
   보안 인증 게이트웨이 화면 (비로그인 전용)
   ========================================================================== */

.auth-gateway-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 30px 16px;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.7) 0%, rgba(11, 15, 25, 0.95) 100%);
}

.auth-gateway-card {
    width: 100%;
    max-width: 480px;
    background: #111827;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(245, 158, 11, 0.15);
    animation: fadeIn 0.3s ease-out;
}

.gateway-header {
    text-align: center;
    margin-bottom: 24px;
}

.gateway-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gateway-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #F8FAFC;
    margin-bottom: 8px;
}

.gateway-header p {
    font-size: 0.82rem;
    color: #94A3B8;
    line-height: 1.5;
    margin: 0;
}

.auth-gateway-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

.gateway-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gateway-tab-btn.active {
    background: #0284C7;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.gateway-form input,
.gateway-form select {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 14px;
    color: #F8FAFC;
    font-size: 0.9rem;
    margin-top: 6px;
    outline: none;
}

.gateway-form input:focus,
.gateway-form select:focus {
    border-color: #38BDF8;
}

.btn-block {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100%;
}

.btn-lg {
    padding: 12px;
    font-size: 0.95rem;
}

/* 헤더 로그인 버튼 최적화 */
.user-pill.not-logged-in {
    background: #0284C7 !important;
    border: 1px solid #38BDF8 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.user-pill.not-logged-in .avatar,
.user-pill.not-logged-in .user-info {
    display: none !important;
}

.user-pill.not-logged-in::before {
    content: "🔑 사원 로그인";
}

/* ==========================================================================
   실시간 메신저 전용 클린 레이아웃 및 상단 겹침 방지 (안전특보 & 필터바 숨김)
   ========================================================================== */
body.tab-chat-active #safety-alert-bar,
body.tab-chat-active .safety-alert-banner,
body.tab-chat-active #global-filter-bar {
    display: none !important;
}

body.tab-chat-active .main-content {
    padding-top: var(--header-height) !important;
}

@media (max-width: 768px) {
    #sec-chat.active {
        top: var(--header-height) !important;
        z-index: 1000 !important;
    }
}

/* ==========================================================================
   라이트박스 클린 뷰어 (원형 화살표 숨김)
   ========================================================================== */
.btn-lightbox-nav {
    display: none !important;
}

/* ==========================================================================
   서버 인프라 관제 프리미엄 대시보드 (NOC Dashboard)
   ========================================================================== */
.infra-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.infra-status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-pulse-dot {
    width: 12px;
    height: 12px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 12px #10B981;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.infra-host-title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: #F8FAFC;
    letter-spacing: -0.2px;
}

.infra-os-badge {
    display: inline-block;
    font-size: 0.78rem;
    color: #38BDF8;
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 2px;
}

.infra-refresh-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.infra-update-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 4대 관제 카드 그리드 */
.infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.infra-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.infra-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(56, 189, 248, 0.3);
}

.infra-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.infra-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-cyan { background: rgba(6, 182, 212, 0.15); color: #06B6D4; }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #10B981; }

.infra-card-title-box h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #F8FAFC;
}

.infra-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.infra-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.infra-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
}

.infra-metric-label {
    color: var(--text-secondary);
}

.infra-metric-val {
    font-weight: 700;
    color: #F1F5F9;
}

.highlight-cyan { color: #38BDF8 !important; font-size: 1.15rem; }
.highlight-blue { color: #60A5FA !important; font-size: 1.15rem; }
.highlight-amber { color: #FBBF24 !important; font-size: 1.15rem; }
.highlight-green { color: #34D399 !important; font-size: 1.15rem; }

.infra-progress-wrap {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.infra-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.bar-cyan { background: linear-gradient(90deg, #06B6D4, #38BDF8); box-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }
.bar-blue { background: linear-gradient(90deg, #2563EB, #60A5FA); box-shadow: 0 0 10px rgba(96, 165, 250, 0.5); }
.bar-amber { background: linear-gradient(90deg, #D97706, #FBBF24); box-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
.bar-green { background: linear-gradient(90deg, #059669, #34D399); box-shadow: 0 0 10px rgba(52, 211, 153, 0.5); }

/* 하단 서브 그리드 */
.infra-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.infra-detail-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.detail-icon {
    font-size: 1.8rem;
}

.detail-content {
    flex: 1;
}

.detail-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #F8FAFC;
    margin-bottom: 3px;
}

.detail-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   사원 계정 관리 테이블 액션 버튼 그룹
   ========================================================================== */
.admin-actions-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-action-edit {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #38BDF8 !important;
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-edit:hover {
    background: #38BDF8 !important;
    color: #0F172A !important;
}

.btn-action-pw {
    background: rgba(148, 163, 184, 0.15) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    color: #E2E8F0 !important;
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-pw:hover {
    background: rgba(148, 163, 184, 0.35) !important;
}

.btn-action-del {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #F87171 !important;
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-del:hover {
    background: #EF4444 !important;
    color: #FFFFFF !important;
}

/* 작업일지 모바일/데스크톱 카드 클릭 상호작용 및 사진 썸네일 그리드 */
.report-mobile-card {
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.report-mobile-card:hover {
    border-color: rgba(56, 189, 248, 0.45) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.report-mobile-card:active {
    transform: scale(0.99);
}

/* 작업일지 카드 내 사진 썸네일 가로 스트립 */
.report-card-photos {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.report-card-photos::-webkit-scrollbar {
    height: 4px;
}
.report-card-photos::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.report-card-thumb {
    position: relative;
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
}
.report-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.report-card-thumb:hover img {
    transform: scale(1.08);
}
.report-card-thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
}

/* 작업일지 상세 모달 사진 그리드 */
.report-detail-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.report-detail-photo-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0f172a;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease, border-color 0.18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.report-detail-photo-item:hover {
    transform: scale(1.03);
    border-color: var(--accent-primary);
}
.report-detail-photo-item:active {
    transform: scale(0.95);
    border-color: var(--brand-amber);
}
.report-detail-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.report-detail-photo-zoom {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.72rem;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

/* 모든 모달보다 최상위에 뜨는 라이트박스 */
#modal-lightbox {
    z-index: 999999 !important;
}
#modal-lightbox.open {
    display: flex !important;
}




