[x-cloak] {
    display: none !important;
}

/* Sidebar active indicator animation */
.sidebar-item {
    transition: all 0.15s ease-in-out;
}

/* Table hover */
.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading spinner */
.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal backdrop animation */
.modal-backdrop {
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Card hover effect */
.summary-card {
    transition: box-shadow 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Tab underline animation */
.tab-active {
    position: relative;
}

.tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3b82f6;
}

/* Chat markdown styles */
.chat-markdown h1, .chat-markdown h2, .chat-markdown h3 {
    font-weight: 600;
    margin: 8px 0 4px 0;
}
.chat-markdown h1 { font-size: 16px; }
.chat-markdown h2 { font-size: 15px; }
.chat-markdown h3 { font-size: 14px; }
.chat-markdown p {
    margin: 4px 0;
}
.chat-markdown ul, .chat-markdown ol {
    padding-left: 16px;
    margin: 4px 0;
}
.chat-markdown li {
    margin: 2px 0;
}
.chat-markdown ul li { list-style-type: disc; }
.chat-markdown ol li { list-style-type: decimal; }
.chat-markdown strong {
    font-weight: 600;
}
.chat-markdown code {
    background: rgba(0,0,0,0.06);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 13px;
}
.chat-markdown pre {
    background: rgba(0,0,0,0.06);
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 4px 0;
}
.chat-markdown pre code {
    background: none;
    padding: 0;
}
.chat-markdown table {
    border-collapse: collapse;
    margin: 4px 0;
    width: 100%;
}
.chat-markdown th, .chat-markdown td {
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    text-align: left;
}
.chat-markdown th {
    background: rgba(0,0,0,0.04);
    font-weight: 600;
}

/* ===== ECOS Dashboard ===== */

/* Font classes */
.font-mono-num {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.font-pretendard {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* Spread card - left status bar */
.spread-card {
    position: relative;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.spread-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}
.spread-card.status-safe {
    border-left-color: #22c55e;
}
.spread-card.status-normal {
    border-left-color: #3b82f6;
}
.spread-card.status-caution {
    border-left-color: #eab308;
}
.spread-card.status-danger {
    border-left-color: #ef4444;
}
.spread-card.status-conservative {
    border-left-color: #6366f1;
}

/* Highlight card (top pulse) */
.highlight-card {
    background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s ease;
}
.highlight-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Gauge bar */
.gauge-bar {
    position: relative;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: visible;
}
.gauge-bar-segment {
    position: absolute;
    top: 0;
    height: 100%;
    opacity: 0.25;
}
.gauge-bar-segment:first-child {
    border-radius: 3px 0 0 3px;
}
.gauge-bar-segment:last-child {
    border-radius: 0 3px 3px 0;
}
.gauge-bar-marker {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
    z-index: 1;
    transition: left 0.5s ease-out;
}

/* Status badge */
.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}
.status-badge.badge-safe {
    background: #dcfce7;
    color: #166534;
}
.status-badge.badge-normal {
    background: #dbeafe;
    color: #1e40af;
}
.status-badge.badge-caution {
    background: #fef9c3;
    color: #854d0e;
}
.status-badge.badge-danger {
    background: #fef2f2;
    color: #991b1b;
}
.status-badge.badge-conservative {
    background: #eef2ff;
    color: #4338ca;
}

/* Section divider */
.ecos-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
}

/* Value color for spread cards */
.value-positive { color: #dc2626; }
.value-negative { color: #2563eb; }
.value-neutral { color: #334155; }
