@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
    --bg-main: #090d16;
    --bg-card: #111827;
    --bg-card-hover: #161f30;
    --bg-surface: #0e1524;
    --border-subtle: #1f2937;
    --border-highlight: #374151;
    --emerald-accent: #10b981;
    --teal-accent: #14b8a6;
    --cyan-accent: #06b6d4;
    --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.25);
    --glow-teal: 0 0 20px rgba(20, 184, 166, 0.25);
}

body {
    background-color: var(--bg-main);
    color: #e5e7eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Panel Card Identity */
.sys-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sys-card:hover {
    border-color: #2e3a4e;
}
.sys-card-interactive:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 6px 24px -2px rgba(16, 185, 129, 0.08);
}

/* Status Glow Indicators */
.pulse-online {
    position: relative;
}
.pulse-online::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-color: #10b981;
    animation: statusPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(2.4); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Sparklines */
.sparkline-svg {
    overflow: visible;
}
.sparkline-path {
    stroke: #10b981;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sparkline-area {
    fill: url(#emerald-gradient);
    opacity: 0.2;
}

/* Terminal Drawer */
.sys-terminal-box {
    background: #070a10;
    border: 1px solid #1e293b;
    border-radius: 0.625rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.825rem;
    line-height: 1.5;
    color: #e2e8f0;
}
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #10b981;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Command Palette Overlay */
.cmd-palette-backdrop {
    background-color: rgba(5, 8, 15, 0.82);
    backdrop-filter: blur(8px);
}

/* Custom Badges */
.badge-emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-teal {
    background: rgba(20, 184, 166, 0.12);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.25);
}
.badge-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(6, 182, 212, 0.25);
}
.badge-rose {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.25);
}
.badge-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-gray {
    background: rgba(55, 65, 81, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Micro Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Toast Notification Styles */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
    width: calc(100% - 3rem);
    pointer-events: none;
}
.toast-item {
    pointer-events: auto;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-item.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-item.toast-success { border-left: 4px solid #10b981; }
.toast-item.toast-error { border-left: 4px solid #f43f5e; }
.toast-item.toast-warning { border-left: 4px solid #f59e0b; }
.toast-item.toast-info { border-left: 4px solid #06b6d4; }
