* { box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Malgun Gothic', sans-serif; background: #0f172a; color: #e2e8f0; margin: 0; padding: 24px; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 모든 버튼 줄바꿈 방지 */
.btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 9px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn:hover { background: #2563eb; }
.btn-secondary { background: #1e293b; color: #e2e8f0; border: 1px solid #475569; }
.btn-secondary:hover { background: #334155; }
.btn-success { background: #059669; color: #ffffff; }
.btn-success:hover { background: #047857; }
.btn-warning { background: #d97706; color: #ffffff; }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: #dc2626; color: #ffffff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ====================================================================
   [로그인 / 회원가입 신청 / PW 초기화 요청 화면]
   ==================================================================== */
.auth-wrapper {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-box {
    width: 100%;
    max-width: 460px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand h2 { margin: 0 0 6px 0; font-size: 21px; color: #f8fafc; }
.auth-brand p { margin: 0; font-size: 13px; color: #94a3b8; }

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    gap: 4px;
}
.auth-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 9px 6px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}
.auth-tab-btn.active { background: #0284c7; color: #ffffff; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: #cbd5e1; margin-bottom: 6px; }
.form-input, .form-textarea {
    width: 100%;
    background: #0f172a;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    outline: none;
    font-family: inherit;
}
.form-input:focus, .form-textarea:focus { border-color: #38bdf8; }
.auth-msg {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
    line-height: 1.5;
}
.auth-msg.error { display: block; background: rgba(248, 113, 113, 0.15); border: 1px solid #f87171; color: #fca5a5; }
.auth-msg.success { display: block; background: rgba(52, 211, 153, 0.15); border: 1px solid #34d399; color: #6ee7b7; }

.logo-upload-box {
    background: #0f172a;
    border: 1px dashed #475569;
    border-radius: 8px;
    padding: 12px;
}
.logo-preview-thumb {
    max-height: 36px;
    max-width: 160px;
    object-fit: contain;
    background: #1e293b;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #334155;
}

/* ====================================================================
   [상단 통합 바: 좌측 회사 로고+회사명 / 우측 햄버거 아이콘]
   ==================================================================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #1e293b;
    position: relative;
}
.company-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 10px;
    margin-left: -10px;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
}
.company-brand-link:hover { background: rgba(30, 41, 59, 0.85); }
.company-logo-img {
    height: 36px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: brightness(1.15) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.company-logo-fallback {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0284c7, #3b82f6);
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.hamburger-wrap { position: relative; }
.hamburger-btn {
    background: #1e293b;
    border: 1px solid #475569;
    color: #f8fafc;
    width: 44px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}
.hamburger-btn:hover { border-color: #38bdf8; background: #263349; }
.hamburger-icon { font-size: 20px; line-height: 1; }
.hamburger-corner-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 10.5px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 999px;
    border: 1.5px solid #0f172a;
}
.pending-badge {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 999px;
}
.hamburger-drawer {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 285px;
    max-height: 85vh;
    overflow-y: auto;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.6);
    z-index: 950;
    display: none;
    flex-direction: column;
    gap: 4px;
}
.hamburger-drawer.open { display: flex; }
.drawer-profile {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 4px;
    font-size: 12.5px;
    line-height: 1.5;
}
.drawer-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    padding: 6px 10px 2px 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.drawer-item {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}
.drawer-item:hover { background: #334155; border-color: #475569; }
.drawer-item.active { background: #0284c7; color: #ffffff; border-color: #38bdf8; }
.drawer-item.danger { color: #fca5a5; }
.drawer-item.danger:hover { background: rgba(220, 38, 38, 0.2); border-color: #ef4444; }
.drawer-divider { height: 1px; background: #334155; margin: 5px 0; }

/* [최상단 AI 보안 관제 브리핑 패널] */
.ai-panel {
    background: linear-gradient(145deg, #1e293b 0%, #172033 100%);
    border: 1px solid #3b82f6;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.5);
}
.ai-panel.collapsed { padding: 14px 22px; }
.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #334155;
    cursor: pointer;
    user-select: none;
}
.ai-panel.collapsed .ai-header { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.ai-title-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-title { margin: 0; font-size: 17px; font-weight: bold; color: #f8fafc; }
.ai-engine-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.risk-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.risk-LOW { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }
.risk-MEDIUM { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); }
.risk-HIGH { background: rgba(248, 113, 113, 0.18); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.4); }
.ai-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-briefing-body {
    background: #0f172a;
    border-left: 4px solid #38bdf8;
    padding: 18px 20px;
    border-radius: 8px;
    font-size: 14.5px;
    line-height: 1.8;
    color: #e2e8f0;
    white-space: pre-line;
}
.ai-panel.collapsed .ai-briefing-body { display: none; }

/* ====================================================================
   [메인 확장 SecOps 위젯: 4단 위협 단계 + 분할 추이 + 도넛 + 레이더 + 가로바]
   ==================================================================== */
.threat-stage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 1150px) { .threat-stage-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .threat-stage-grid { grid-template-columns: 1fr; } }

.stage-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-top-width: 4px;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.stage-critical { border-top-color: #f87171; }
.stage-warning { border-top-color: #fbbf24; }
.stage-info { border-top-color: #38bdf8; }
.stage-ticket { border-top-color: #34d399; }

.stage-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.stage-label { font-size: 13px; font-weight: 700; color: #cbd5e1; }
.stage-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.pill-red { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }
.pill-amber { background: rgba(251, 191, 36, 0.16); color: #fde68a; }
.pill-blue { background: rgba(56, 189, 248, 0.16); color: #bae6fd; }

.stage-num { font-size: 30px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.stage-sub { font-size: 12px; color: #94a3b8; }

.ticket-mini-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    text-align: center;
}
.ticket-mini-item span { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
.ticket-mini-item strong { font-size: 17px; }

/* 기간별 탐지 추이 분할 패널 (좌측 요약 + 우측 차트) */
.trend-split-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 20px;
    align-items: center;
}
@media (max-width: 960px) { .trend-split-layout { grid-template-columns: 1fr; } }

.trend-summary-side {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px 18px;
}
.breakdown-list { display: flex; flex-direction: column; gap: 9px; }
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.breakdown-name { display: inline-flex; align-items: center; gap: 8px; color: #cbd5e1; }
.color-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* 2단 차트 그리드 */
.analytics-2col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 1024px) { .analytics-2col-grid { grid-template-columns: 1fr; } }

/* 도넛 차트 + 중앙 수치 + 우측 범례 레이아웃 */
.donut-widget-body {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    align-items: center;
    min-height: 200px;
}
@media (max-width: 560px) { .donut-widget-body { grid-template-columns: 1fr; justify-items: center; } }

.donut-canvas-wrap {
    position: relative;
    width: 185px;
    height: 185px;
}
.donut-center-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
}
.donut-center-overlay span { font-size: 11.5px; color: #94a3b8; }
.donut-center-overlay strong { font-size: 18px; color: #f8fafc; margin-top: 2px; }

.donut-legend-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.donut-legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.65);
}

/* 최다 공격 대상 경로(URI) 가로 프로그레스 바 */
.hbar-list { display: flex; flex-direction: column; gap: 10px; }
.hbar-item { display: flex; flex-direction: column; gap: 4px; }
.hbar-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.hbar-uri {
    font-family: Consolas, monospace;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hbar-track {
    width: 100%;
    height: 7px;
    background: #0f172a;
    border-radius: 999px;
    overflow: hidden;
}
.hbar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #f87171);
    border-radius: 999px;
}

/* 상세 페이지 조회 조건 바 */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.controls-left { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.control-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.control-label { font-size: 13px; font-weight: 600; color: #94a3b8; margin-right: 4px; }

.seg-group { display: inline-flex; background: #0f172a; border: 1px solid #334155; border-radius: 6px; overflow: hidden; }
.seg-btn {
    background: transparent;
    color: #94a3b8;
    border: none;
    border-right: 1px solid #334155;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.seg-btn:last-child { border-right: none; }
.seg-btn:hover { color: #e2e8f0; background: #1e293b; }
.seg-btn.active { background: #0284c7; color: #ffffff; }

.action-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.action-toggle input { accent-color: #38bdf8; cursor: pointer; margin: 0; }
.action-toggle.checked-Blocked { border-color: #f87171; background: rgba(248, 113, 113, 0.14); color: #fca5a5; }
.action-toggle.checked-Detected { border-color: #fbbf24; background: rgba(251, 191, 36, 0.14); color: #fde68a; }
.action-toggle.checked-Matched { border-color: #38bdf8; background: rgba(56, 189, 248, 0.14); color: #bae6fd; }

/* 상세 로그 검색 · 내보내기(CSV/Excel/PDF) 툴바 */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.search-box-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 260px; max-width: 520px; }
.search-input {
    width: 100%;
    min-width: 0;
    background: #0f172a;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.search-input:focus { border-color: #38bdf8; }
.export-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.select-control {
    background: #0f172a;
    border: 1px solid #475569;
    color: #e2e8f0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* 공통 KPI 카드 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }
.card { background: #1e293b; padding: 20px; border-radius: 8px; border: 1px solid #334155; }
.card h3 { margin: 0 0 8px 0; font-size: 14px; color: #94a3b8; }
.card .num { font-size: 28px; font-weight: bold; }
.blocked { color: #f87171; }
.accent { color: #38bdf8; }

/* 차트 카드 */
.chart-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 20px;
}
.chart-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.chart-title { margin: 0; font-size: 16px; font-weight: bold; color: #f8fafc; }
.chart-container { position: relative; height: 245px; width: 100%; }

/* IP / 국가 배지 리스트 */
.ip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ip-chip { display: inline-flex; align-items: center; gap: 6px; background: #0f172a; border: 1px solid #334155; padding: 5px 10px; border-radius: 6px; font-size: 12px; color: #e2e8f0; }
.ip-chip.clickable { cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ip-chip.clickable:hover { border-color: #38bdf8; background: #172554; }
.ip-chip.selected { border-color: #38bdf8; background: #1e3a8a; }
.country-tag { background: #334155; color: #38bdf8; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.ip-count { color: #f87171; font-weight: bold; }

/* 메인 페이지 서비스 그리드 (상태 배지 + 미니 스파크라인) */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 960px) { .service-grid { grid-template-columns: 1fr; } }
.service-card { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 22px; cursor: pointer; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; display: flex; flex-direction: column; justify-content: space-between; }
.service-card:hover { transform: translateY(-2px); border-color: #38bdf8; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.service-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; border-bottom: 1px solid #334155; padding-bottom: 12px; gap: 8px; }
.service-title { font-size: 20px; font-weight: bold; color: #f8fafc; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.service-sub { font-size: 12px; color: #94a3b8; margin-top: 4px; display: block; }
.detail-link { font-size: 12px; color: #38bdf8; font-weight: bold; background: rgba(56, 189, 248, 0.12); padding: 5px 10px; border-radius: 6px; white-space: nowrap; }
.service-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; background: #0f172a; padding: 14px; border-radius: 8px; }
.metric-box span { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 4px; }
.metric-box strong { font-size: 20px; }
.service-spark-box {
    background: #0f172a;
    border: 1px solid #293548;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 14px;
}
.service-ip-section { font-size: 12px; color: #94a3b8; }

/* 상세 페이지 로그 테이블 및 페이징 */
.filter-banner { display: none; align-items: center; justify-content: space-between; background: #1e3a8a; border: 1px solid #38bdf8; padding: 10px 16px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.table-wrapper { width: 100%; overflow-x: auto; border-radius: 8px; border: 1px solid #334155; background: #1e293b; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; background: #1e293b; }
th, td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
    border-right: 1px solid #293548;
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: middle;
}
th:last-child, td:last-child { border-right: none; }
th {
    position: relative;
    background: #0f172a;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}
.resizer { position: absolute; top: 0; right: 0; width: 7px; height: 100%; cursor: col-resize; user-select: none; z-index: 2; }
.resizer::after { content: ''; position: absolute; top: 22%; right: 2px; width: 2px; height: 56%; background: #475569; border-radius: 1px; }
.resizer:hover::after, .resizer.resizing::after { background: #38bdf8; width: 3px; }
body.col-resizing { cursor: col-resize !important; user-select: none !important; }

.inline-edit-input, .inline-edit-select {
    width: 100%;
    background: #0f172a;
    border: 1px solid #38bdf8;
    color: #f8fafc;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 12.5px;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 13px;
}
.page-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.page-btn {
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 6px 11px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.page-btn:hover:not(:disabled) { border-color: #38bdf8; color: #fff; }
.page-btn.active { background: #0284c7; border-color: #38bdf8; color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 11px; white-space: nowrap; background: #334155; color: #e2e8f0; }
.badge-Blocked { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.badge-Detected { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.badge-Matched { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.status-pending { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.status-received { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.status-approved, .status-completed { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.status-rejected { background: rgba(248, 113, 113, 0.2); color: #f87171; }
.status-reset { background: rgba(249, 115, 22, 0.25); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.4); }

/* [요청사항 및 회사 관리 2단 레이아웃] */
.requests-layout {
    display: grid;
    grid-template-columns: 390px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1024px) { .requests-layout { grid-template-columns: 1fr; } }

.req-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.req-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.req-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px 0;
    flex-wrap: wrap;
}
.step-node {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    padding: 4px 10px;
    border-radius: 6px;
}
.step-node.done { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.step-node.current { color: #38bdf8; background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(56, 189, 248, 0.4); }
.step-node.current-completed { color: #34d399; background: rgba(52, 211, 153, 0.2); border: 1px solid rgba(52, 211, 153, 0.5); }
.step-arrow { color: #475569; font-weight: bold; }

.req-body-box {
    background: #0f172a;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.65;
    color: #e2e8f0;
    white-space: pre-line;
}
.req-admin-reply {
    margin-top: 10px;
    background: rgba(52, 211, 153, 0.09);
    border-left: 3px solid #34d399;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #a7f3d0;
}

/* [공통 모달] */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}
.modal-backdrop.open { display: flex; }
.modal-card {
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.65);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #334155;
}
.modal-header h3 { margin: 0; font-size: 18px; color: #f8fafc; }
.soar-guide-box {
    background: #0f172a;
    border: 1px solid #334155;
    border-left: 4px solid #34d399;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.75;
}
.temp-pass-banner {
    display: none;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(52, 211, 153, 0.14);
    border: 1px solid #34d399;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13.5px;
}

/* 토스트 알림 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0284c7;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 2000;
}
.toast.show { opacity: 1; transform: translateY(0); }

.hidden { display: none !important; }

/* PDF 출력용 전용 A4 보고서 스타일 */
#printReportContainer { display: none; }
@media print {
    body { background: #ffffff !important; color: #111827 !important; padding: 0 !important; }
    #authScreen, #appShell, .modal-backdrop, .toast { display: none !important; }
    #printReportContainer {
        display: block !important;
        background: #ffffff;
        color: #111827;
        font-family: 'Malgun Gothic', sans-serif;
        padding: 12mm;
    }
    #printReportContainer h1 { font-size: 20px; border-bottom: 2px solid #1e293b; padding-bottom: 8px; margin: 0 0 12px 0; }
    #printReportContainer h2 { font-size: 15px; margin: 18px 0 8px 0; color: #0f172a; border-left: 4px solid #0284c7; padding-left: 8px; }
    #printReportContainer .meta-table, #printReportContainer .report-table {
        width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 11px; table-layout: auto;
    }
    #printReportContainer .meta-table th, #printReportContainer .meta-table td,
    #printReportContainer .report-table th, #printReportContainer .report-table td {
        border: 1px solid #cbd5e1; padding: 6px 8px; color: #111827; background: #ffffff; word-break: break-all;
    }
    #printReportContainer .meta-table th, #printReportContainer .report-table th { background: #f1f5f9 !important; font-weight: bold; }
    #printReportContainer .guide-print-box {
        border: 1px solid #94a3b8; background: #f8fafc; padding: 10px 12px; font-size: 11.5px; line-height: 1.6; white-space: pre-line;
    }
}