* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Nanum Gothic', '나눔고딕', 'Malgun Gothic', sans-serif; background: #0f172a; color: #e2e8f0; }
.app { min-height: 100vh; }

/* Header */
.header { height: 64px; background: #1e293b; border-bottom: 1px solid #334155; 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; }
.header-left h1 { font-size: 20px; font-weight: 700; }
.header-left .phase { background: #059669; padding: 4px 12px; border-radius: 20px; font-size: 11px; }
.header-left .phase2 { background: #8b5cf6; padding: 4px 12px; border-radius: 20px; font-size: 11px; margin-left: 4px; }
.header-left .version { background: #3b82f6; padding: 4px 12px; border-radius: 20px; font-size: 11px; margin-left: 8px; }
.header-center { display: flex; align-items: center; gap: 12px; }
.workplace-selector { padding: 8px 36px 8px 12px; background: #0f172a; border: 2px solid #f97316; border-radius: 8px; color: #e2e8f0; font-size: 13px; font-weight: 500; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f97316' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 20px; min-width: 200px; }
.workplace-selector:focus { outline: none; border-color: #fb923c; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: #059669; color: white; }
.btn-primary:hover { background: #047857; }
.btn-primary:disabled { background: #334155; color: #64748b; cursor: not-allowed; }
.btn-secondary { background: #334155; color: #e2e8f0; }
.btn-secondary:hover { background: #475569; }
.btn-purple { background: #8b5cf6; color: white; }
.btn-purple:hover { background: #7c3aed; }
.btn-blue { background: #3b82f6; color: white; }
.btn-blue:hover { background: #2563eb; }
.btn-orange { background: #f97316; color: white; }
.btn-orange:hover { background: #ea580c; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-teal { background: #14b8a6; color: white; }
.btn-teal:hover { background: #0d9488; }
.btn-pink { background: #ec4899; color: white; }
.btn-pink:hover { background: #db2777; }
.btn-large { padding: 16px 32px; font-size: 16px; }

.main { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* Tabs */
.tabs { display: none; }
.nav-btn:hover:not(.disabled) { background: rgba(255,255,255,0.18) !important; transform: translateX(4px); }
.nav-btn.disabled { cursor: not-allowed !important; }
.tab { display: none; }
.tab .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; background: rgba(255,255,255,0.2); border-radius: 10px; font-size: 11px; margin-left: 6px; }

.panel { display: none; }
.panel.active { display: block; }

/* Cards */
.card { background: #1e293b; border-radius: 16px; border: 1px solid #334155; overflow: hidden; margin-bottom: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid #334155; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.card-header h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.card.purple-border { border-color: #8b5cf6; }
.card.blue-border { border-color: #3b82f6; }
.card.orange-border { border-color: #f97316; }
.card.teal-border { border-color: #14b8a6; }
.card.pink-border { border-color: #ec4899; }

.upload-zone { border: 2px dashed #475569; border-radius: 12px; padding: 48px; text-align: center; cursor: pointer; transition: all 0.3s; }
.upload-zone:hover { border-color: #10b981; background: rgba(16,185,129,0.05); }
.upload-zone.done { border-color: #10b981; border-style: solid; background: rgba(16,185,129,0.1); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* 사업장 관리 스타일 */
.workplace-dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dashboard-stat { background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 16px; padding: 24px; text-align: center; border: 1px solid #334155; }
.dashboard-stat .icon { font-size: 32px; margin-bottom: 12px; }
.dashboard-stat .value { font-size: 36px; font-weight: 700; margin-bottom: 4px; }
.dashboard-stat .label { font-size: 13px; color: #94a3b8; }
.dashboard-stat.orange { border-color: #f97316; background: linear-gradient(135deg, rgba(249,115,22,0.1), #0f172a); }
.dashboard-stat.orange .value { color: #f97316; }
.dashboard-stat.green .value { color: #10b981; }
.dashboard-stat.yellow .value { color: #f59e0b; }
.dashboard-stat.red .value { color: #ef4444; }

.workplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.workplace-card { background: #1e293b; border-radius: 16px; border: 2px solid #334155; padding: 20px; cursor: pointer; transition: all 0.3s; position: relative; }
.workplace-card:hover { border-color: #475569; transform: translateY(-2px); }
.workplace-card.active { border-color: #f97316; background: rgba(249,115,22,0.1); }
.workplace-card .wp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.workplace-card .wp-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.workplace-card .wp-industry { font-size: 12px; color: #64748b; }
.workplace-card .wp-badge { padding: 4px 10px; background: #f97316; color: white; border-radius: 12px; font-size: 11px; font-weight: 500; }
.workplace-card .wp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.workplace-card .wp-stat { text-align: center; padding: 8px; background: #0f172a; border-radius: 8px; }
.workplace-card .wp-stat .value { font-size: 18px; font-weight: 700; }
.workplace-card .wp-stat .label { font-size: 10px; color: #64748b; }
.workplace-card .wp-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.workplace-card:hover .wp-actions { opacity: 1; }
.wp-action-btn { width: 28px; height: 28px; border: none; border-radius: 6px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.wp-action-btn.edit { background: #3b82f6; color: white; }
.wp-action-btn.delete { background: #dc2626; color: white; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 64px; opacity: 0.3; margin-bottom: 16px; }
.empty-state h4 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: #64748b; margin-bottom: 24px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay.show { display: flex; }
.modal { background: #1e293b; border-radius: 20px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; border: 1px solid #334155; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid #334155; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close { width: 32px; height: 32px; border: none; background: #334155; color: #94a3b8; border-radius: 8px; cursor: pointer; font-size: 18px; }
.modal-close:hover { background: #475569; color: white; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #334155; display: flex; justify-content: flex-end; gap: 12px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; color: #94a3b8; }
.form-group label .required { color: #ef4444; }
.form-input { width: 100%; padding: 12px 16px; background: #0f172a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; font-size: 14px; }
.form-input:focus { outline: none; border-color: #f97316; }
.form-input::placeholder { color: #64748b; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select { width: 100%; padding: 12px 16px; background: #0f172a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; font-size: 14px; }

/* 기존 스타일 유지 */
.marking-container { display: flex; gap: 20px; min-height: 600px; }
.marking-canvas-wrapper { flex: 1; position: relative; background: #0f172a; border-radius: 12px; overflow: hidden; border: 1px solid #334155; }
.marking-canvas { width: 100%; height: 600px; position: relative; overflow: hidden; cursor: grab; }
.marking-canvas.dragging { cursor: grabbing; }
.marking-canvas.marking-mode { cursor: crosshair; }
.marking-inner { position: absolute; transform-origin: 0 0; transition: transform 0.1s ease-out; }
.marking-inner img { display: block; max-width: none; pointer-events: none; }
.zoom-controls { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 20; }
.zoom-btn { width: 36px; height: 36px; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; border-radius: 8px; cursor: pointer; font-size: 16px; }
.zoom-btn:hover { background: #334155; }
.zoom-level { background: #0f172a; padding: 4px 8px; border-radius: 6px; font-size: 11px; text-align: center; margin-top: 4px; }
.mode-controls { position: absolute; top: 12px; left: 12px; display: flex; gap: 4px; z-index: 20; }
.mode-btn { padding: 8px 12px; border: 1px solid #334155; background: #1e293b; color: #94a3b8; border-radius: 8px; cursor: pointer; font-size: 12px; }
.mode-btn:hover { background: #334155; color: #e2e8f0; }
.mode-btn.active { background: #059669; border-color: #059669; color: white; }
.marking-sidebar { width: 280px; }
.marker { position: absolute; transform: translate(-50%, -50%); cursor: pointer; z-index: 10; }
.marker-dot { width: 36px; height: 36px; border-radius: 50%; border: 3px solid white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.marker-dot.noise { background: #f59e0b; }
.marker-dot.chemical { background: #3b82f6; }
.marker.selected .marker-dot { transform: scale(1.2); box-shadow: 0 0 0 4px rgba(16,185,129,0.5); }
.point-list { max-height: 400px; overflow-y: auto; }
.point-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: #0f172a; border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; }
.point-item:hover { background: #1e293b; }
.point-item.selected { background: rgba(16,185,129,0.2); border: 1px solid #10b981; }
.point-code { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: white; }
.point-code.noise { background: #f59e0b; }
.point-code.chemical { background: #3b82f6; }
.point-info { flex: 1; }
.point-info .name { font-size: 13px; font-weight: 500; }
.point-info .meta { font-size: 11px; color: #64748b; }
.delete-btn { width: 24px; height: 24px; border: none; background: #dc2626; color: white; border-radius: 6px; cursor: pointer; font-size: 12px; opacity: 0; transition: opacity 0.2s; }
.point-item:hover .delete-btn { opacity: 1; }
.type-selector { display: flex; gap: 8px; margin-bottom: 16px; }
.type-btn { flex: 1; padding: 12px; border: 2px solid #334155; border-radius: 8px; background: transparent; color: #94a3b8; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.type-btn:hover { border-color: #475569; }
.type-btn.active.noise { background: rgba(245,158,11,0.2); border-color: #f59e0b; color: #f59e0b; }
.type-btn.active.chemical { background: rgba(59,130,246,0.2); border-color: #3b82f6; color: #3b82f6; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 12px; background: #0f172a; color: #94a3b8; font-weight: 500; border-bottom: 1px solid #334155; }
.data-table td { padding: 12px; border-bottom: 1px solid #334155; }
.data-table tr:hover { background: rgba(255,255,255,0.02); }
.code-cell { font-weight: 700; }
.code-cell.noise { color: #f59e0b; }
.code-cell.chemical { color: #3b82f6; }
.status { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.status.normal { background: rgba(16,185,129,0.2); color: #10b981; }
.status.warning { background: rgba(245,158,11,0.2); color: #f59e0b; }
.status.danger { background: rgba(239,68,68,0.2); color: #ef4444; }
.match-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.match-item { background: #0f172a; padding: 16px; border-radius: 12px; text-align: center; }
.match-item .value { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.match-item .label { font-size: 12px; color: #64748b; }
.match-item.success .value { color: #10b981; }
.match-item.error .value { color: #ef4444; }
.viz-container { display: grid; grid-template-columns: 1fr 300px; gap: 20px; height: 600px; }
.viz-canvas { background: #0a0f1a; border-radius: 12px; position: relative; overflow: hidden; }
#threeCanvas { width: 100%; height: 100%; }
.viz-info { position: absolute; top: 16px; left: 16px; background: rgba(30,41,59,0.95); padding: 16px; border-radius: 12px; border: 1px solid #334155; min-width: 200px; }
.viz-info h4 { font-size: 11px; color: #64748b; text-transform: uppercase; margin-bottom: 4px; }
.viz-info .code { font-size: 24px; font-weight: 700; }
.viz-info .code.normal { color: #10b981; }
.viz-info .code.warning { color: #f59e0b; }
.viz-info .code.danger { color: #ef4444; }
.viz-info .detail { font-size: 13px; color: #94a3b8; margin-top: 8px; }
.viz-legend { position: absolute; bottom: 16px; left: 16px; background: rgba(30,41,59,0.95); padding: 12px 16px; border-radius: 12px; border: 1px solid #334155; }
.legend-row { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.legend-row:last-child { margin-bottom: 0; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #94a3b8; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; }
.result-list { height: 100%; overflow-y: auto; }
.result-card { background: #1e293b; border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.result-card:hover { border-color: #475569; }
.result-card.selected { border-color: #10b981; background: rgba(16,185,129,0.1); }
.result-card.warning { border-left: 4px solid #f59e0b; }
.result-card.danger { border-left: 4px solid #ef4444; }
.rc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rc-code { font-weight: 700; font-size: 14px; }
.rc-code.noise { color: #f59e0b; }
.rc-code.chemical { color: #3b82f6; }
.rc-status { padding: 2px 8px; border-radius: 8px; font-size: 10px; font-weight: 500; }
.rc-status.normal { background: rgba(16,185,129,0.2); color: #10b981; }
.rc-status.warning { background: rgba(245,158,11,0.2); color: #f59e0b; }
.rc-status.danger { background: rgba(239,68,68,0.2); color: #ef4444; }
.rc-bar { height: 4px; background: #334155; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.rc-bar-fill { height: 100%; border-radius: 2px; }
.trend-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.trend-stat { background: #0f172a; border-radius: 12px; padding: 20px; text-align: center; }
.trend-stat .icon { font-size: 24px; margin-bottom: 8px; }
.trend-stat .value { font-size: 32px; font-weight: 700; margin-bottom: 4px; }
.trend-stat .label { font-size: 12px; color: #64748b; }
.trend-stat .change { margin-top: 8px; padding: 4px 8px; border-radius: 8px; font-size: 11px; font-weight: 500; display: inline-block; }
.trend-stat .change.up { background: rgba(239,68,68,0.2); color: #ef4444; }
.trend-stat .change.down { background: rgba(16,185,129,0.2); color: #10b981; }
.trend-stat .change.same { background: rgba(148,163,184,0.2); color: #94a3b8; }
.chart-card { min-height: 350px; }
.chart-container { height: 280px; position: relative; }
.trend-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.trend-table th { text-align: left; padding: 12px; background: #0f172a; color: #94a3b8; font-weight: 500; }
.trend-table td { padding: 12px; border-bottom: 1px solid #334155; }
.change-badge { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.change-badge.up { background: rgba(239,68,68,0.2); color: #ef4444; }
.change-badge.down { background: rgba(16,185,129,0.2); color: #10b981; }
.change-badge.same { background: rgba(148,163,184,0.2); color: #94a3b8; }

/* 베이시안 예측 */
.predict-header { background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%); padding: 24px; border-radius: 16px; margin-bottom: 24px; }
.predict-header h2 { font-size: 24px; margin-bottom: 8px; }
.predict-header p { color: rgba(255,255,255,0.8); font-size: 14px; }
.predict-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.predict-stat { background: #1e293b; border-radius: 16px; padding: 24px; text-align: center; border: 1px solid #334155; }
.predict-stat.danger { border-color: #ef4444; background: rgba(239,68,68,0.1); }
.predict-stat.warning { border-color: #f59e0b; background: rgba(245,158,11,0.1); }
.predict-stat.safe { border-color: #10b981; background: rgba(16,185,129,0.1); }
.predict-stat .icon { font-size: 32px; margin-bottom: 12px; }
.predict-stat .value { font-size: 36px; font-weight: 700; margin-bottom: 4px; }
.predict-stat .label { font-size: 13px; color: #94a3b8; }
.predict-result { background: #0f172a; border-radius: 12px; padding: 20px; margin-bottom: 16px; border-left: 4px solid #334155; }
.predict-result.critical-risk { border-left-color: #7f1d1d; background: linear-gradient(135deg, rgba(127,29,29,0.3), #0f172a); }
.predict-result.high-risk { border-left-color: #ef4444; background: linear-gradient(135deg, rgba(239,68,68,0.1), #0f172a); }
.predict-result.medium-risk { border-left-color: #f59e0b; background: linear-gradient(135deg, rgba(245,158,11,0.1), #0f172a); }
.predict-result.low-risk { border-left-color: #10b981; }
.predict-result-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.predict-result-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.predict-result-subtitle { font-size: 12px; color: #64748b; }
.predict-result-prob { text-align: right; }
.predict-result-prob .value { font-size: 28px; font-weight: 700; }
.predict-result-prob .label { font-size: 11px; color: #64748b; }
.predict-result-prob.critical .value { color: #fca5a5; }
.predict-result-prob.high .value { color: #ef4444; }
.predict-result-prob.medium .value { color: #f59e0b; }
.predict-result-prob.low .value { color: #10b981; }
.predict-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.predict-metric { background: #1e293b; padding: 12px; border-radius: 8px; text-align: center; }
.predict-metric .label { font-size: 10px; color: #64748b; margin-bottom: 4px; }
.predict-metric .value { font-size: 14px; font-weight: 600; }

/* Report styles */
.report-header { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); padding: 24px; border-radius: 16px; margin-bottom: 24px; }
.report-header h2 { font-size: 24px; margin-bottom: 8px; }
.report-header p { color: rgba(255,255,255,0.8); font-size: 14px; }
.report-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.report-form .form-group { display: flex; flex-direction: column; gap: 6px; }
.report-form .form-group label { font-size: 12px; color: #94a3b8; font-weight: 500; }
.report-form .form-group input, .report-form .form-group textarea { padding: 12px; background: #0f172a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; font-size: 14px; }
.report-form .form-group input:focus, .report-form .form-group textarea:focus { outline: none; border-color: #3b82f6; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.checkbox-item input { width: 18px; height: 18px; accent-color: #3b82f6; }

.filter-select { padding: 8px 32px 8px 12px; background: #0f172a; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; font-size: 13px; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; min-width: 160px; }
.filter-select:focus { outline: none; border-color: #8b5cf6; }

.help-box { background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(99,102,241,0.1)); border: 1px solid #8b5cf6; border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.help-box h4 { color: #a78bfa; font-size: 14px; margin-bottom: 8px; }
.help-box p { font-size: 13px; color: #94a3b8; line-height: 1.6; }
.help-box ul { font-size: 12px; color: #94a3b8; padding-left: 20px; margin-top: 8px; line-height: 1.8; }

.marking-help { position: absolute; bottom: 12px; left: 12px; right: 12px; background: rgba(30,41,59,0.95); padding: 10px 16px; border-radius: 8px; font-size: 12px; color: #94a3b8; z-index: 15; }

/* Phase 2 Styles */
.sim-header { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); padding: 24px; border-radius: 16px; margin-bottom: 24px; }
.sim-header.pink { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.sim-header h2 { font-size: 24px; margin-bottom: 8px; }
.sim-header p { color: rgba(255,255,255,0.8); font-size: 14px; }

.sim-input-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.sim-input-group { background: #0f172a; padding: 16px; border-radius: 12px; }
.sim-input-group label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.sim-input-group input, .sim-input-group select { width: 100%; padding: 10px; background: #1e293b; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; font-size: 14px; }
.sim-input-group input:focus, .sim-input-group select:focus { outline: none; border-color: #14b8a6; }
.sim-input-group .unit { font-size: 11px; color: #64748b; margin-top: 4px; }

.sim-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.sim-result-card { background: #1e293b; border-radius: 16px; padding: 20px; text-align: center; border: 1px solid #334155; }
.sim-result-card .icon { font-size: 28px; margin-bottom: 8px; }
.sim-result-card .value { font-size: 32px; font-weight: 700; color: #14b8a6; margin-bottom: 4px; }
.sim-result-card .label { font-size: 12px; color: #94a3b8; }
.sim-result-card .sublabel { font-size: 11px; color: #64748b; margin-top: 4px; }
.sim-result-card.warning .value { color: #f59e0b; }
.sim-result-card.danger .value { color: #ef4444; }
.sim-result-card.safe .value { color: #10b981; }

/* LEV Wizard */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; }
.wizard-step { flex: 1; min-width: 120px; padding: 12px 16px; background: #1e293b; border: 2px solid #334155; border-radius: 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.wizard-step:hover { border-color: #475569; }
.wizard-step.active { background: #14b8a6; border-color: #14b8a6; }
.wizard-step.completed { background: rgba(20,184,166,0.2); border-color: #14b8a6; }
.wizard-step .step-num { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.wizard-step .step-label { font-size: 11px; color: #94a3b8; }
.wizard-step.active .step-label { color: white; }

.hood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hood-card { background: #0f172a; border: 2px solid #334155; border-radius: 16px; padding: 20px; cursor: pointer; transition: all 0.2s; text-align: center; }
.hood-card:hover { border-color: #475569; }
.hood-card.selected { border-color: #14b8a6; background: rgba(20,184,166,0.1); }
.hood-card .hood-icon { font-size: 48px; margin-bottom: 12px; }
.hood-card .hood-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.hood-card .hood-desc { font-size: 12px; color: #64748b; }

/* Time-Concentration Chart */
.td-chart-container { height: 350px; position: relative; }
.td-scenario-btns { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.td-scenario-btn { padding: 8px 16px; background: #1e293b; border: 1px solid #334155; border-radius: 8px; color: #94a3b8; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.td-scenario-btn:hover { border-color: #475569; color: #e2e8f0; }
.td-scenario-btn.active { background: #ec4899; border-color: #ec4899; color: white; }

/* Heatmap */
.heatmap-container { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.heatmap-canvas-wrapper { background: #0f172a; border-radius: 12px; padding: 20px; position: relative; }
#heatmapCanvas { border: 1px solid #334155; border-radius: 8px; cursor: crosshair; }
.heatmap-sidebar { }
.source-list { max-height: 300px; overflow-y: auto; }
.source-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: #0f172a; border-radius: 8px; margin-bottom: 8px; }
.source-item .source-color { width: 12px; height: 12px; border-radius: 50%; background: #ec4899; }
.source-item .source-info { flex: 1; }
.source-item .source-name { font-size: 13px; font-weight: 500; }
.source-item .source-meta { font-size: 11px; color: #64748b; }
.source-item .delete-btn { opacity: 0; }
.source-item:hover .delete-btn { opacity: 1; }

.quick-add-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick-add-btn { padding: 6px 12px; background: #334155; border: none; border-radius: 6px; color: #e2e8f0; cursor: pointer; font-size: 11px; }
.quick-add-btn:hover { background: #475569; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); transform: translateY(100px); opacity: 0; transition: all 0.3s; z-index: 1000; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { font-size: 24px; }
.toast-content h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.toast-content p { font-size: 12px; color: #94a3b8; }

/* Progress overlay */
.progress-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.9); display: flex; align-items: center; justify-content: center; z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s; }
.progress-overlay.show { opacity: 1; visibility: visible; }
.progress-box { background: #1e293b; padding: 40px; border-radius: 16px; text-align: center; border: 1px solid #334155; }
.progress-spinner { width: 48px; height: 48px; border: 4px solid #334155; border-top-color: #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.hidden-inputs { position: absolute; left: -9999px; }

/* V22: Action Cards 호버 효과 */
.action-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.3) !important; }
.action-card:active { transform: translateY(-2px); }

/* V22: 내러티브 가이드 애니메이션 */
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.narrative-guide { animation: slideIn 0.3s ease; }

/* V22: 모델 경고 스타일 */
.model-warning { background: #1e1b4b; border-left: 4px solid #f59e0b; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; font-size: 12px; }
.model-warning-title { display: flex; align-items: center; gap: 8px; color: #fbbf24; font-weight: 600; margin-bottom: 4px; }
.model-warning-text { color: #a5b4fc; margin: 0; }

/* V22: 사례 카드 스타일 */
.case-card { background: #1e293b; padding: 16px; border-radius: 12px; margin-bottom: 12px; transition: all 0.2s; }
.case-card:hover { background: #334155; }
.case-card.high-risk { border-left: 4px solid #ef4444; }
.case-card.medium-risk { border-left: 4px solid #fbbf24; }
