:root {
    --bg-app: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-surface: #fcfcfc;
    --border: #f0f0f0;
    --border-strong: #e5e5e5;
    --text-primary: #171717;
    --text-secondary: #737373;
    --text-muted: #a3a3a3;
    --accent: #171717;
    --accent-soft: #f5f5f5;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    overflow: hidden;
    letter-spacing: -0.011em;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
.outfit {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Layout Hierarchy */
.app-container {
    display: flex;
    height: 100vh;
    background: var(--bg-app);
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.25rem;
    z-index: 50;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2.5rem 3rem;
    position: relative;
    scroll-behavior: smooth;
}

/* Typography Driven Elements */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.label-caps {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Modern Minimalist Cards */
.glass-card {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.03);
}

/* Navigation */
.nav-item {
    font-family: 'Outfit', sans-serif;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.nav-item:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item span {
    font-size: 1.1rem;
    filter: grayscale(1);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.nav-item:hover span,
.nav-item.active span {
    filter: grayscale(0);
    opacity: 1;
}

/* Status Indicators */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-online {
    background: #f0fdf4;
    color: #166534;
}

.status-offline {
    background: #f5f5f5;
    color: #737373;
}

/* Micro-interactions */
button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background: var(--accent-soft);
    border-color: var(--border-strong);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e5e5e5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4d4d4;
}

/* Transitions */
section {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styling Overrides */
#intelligence-detail.flex {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Functional Utility Overrides for Tailwind */
.bg-indigo-600 {
    background-color: var(--accent) !important;
}

.text-indigo-600 {
    color: var(--accent) !important;
}

.border-indigo-500 {
    border-color: var(--accent) !important;
}

.focus\:border-indigo-500:focus {
    border-color: var(--accent) !important;
}

.bg-indigo-50 {
    background-color: var(--accent-soft) !important;
}

.text-indigo-400 {
    color: var(--text-secondary) !important;
}

/* Keep some functional colors but mute them */
.bg-emerald-500 {
    background-color: #10b981 !important;
}

.bg-rose-500 {
    background-color: #ef4444 !important;
}

.bg-amber-500 {
    background-color: #f59e0b !important;
}

/* Dashboard Specific Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Specialized Utilities for Dark/Glass Live View components */
.bg-glass-surface {
    background-color: #171717;
}

.border-glass-dim {
    border-color: rgba(255, 255, 255, 0.1);
}