:root {
    --bg-dark: #09090b;
    --panel-bg: rgba(24, 24, 27, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --brand-blue: #3b82f6;
    --brand-blue-glow: rgba(59, 130, 246, 0.5);
    --brand-purple: #8b5cf6;
    --brand-emerald: #10b981;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Stunning Animated Mesh Gradient Background */
.bg-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #09090b;
}

.mesh-blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.6;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, rgba(0,0,0,0) 70%);
}

.blob-2 {
    bottom: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%; left: 60%;
    width: 40vw; height: 40vw;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Glassmorphism Panel Base */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Sidebar */
.sidebar {
    width: 280px;
    margin: 1.5rem;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.brand-icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem;
    border-radius: 12px;
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.8rem;
    color: var(--brand-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
    border-left: 3px solid var(--brand-blue);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--panel-border);
}

.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
}

.user-info .name { font-weight: 600; font-size: 0.95rem; }
.user-info .role { font-size: 0.8rem; color: var(--brand-emerald); }

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem 1.5rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.kpi-card {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.2);
}

.kpi-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-blue { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.05)); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.gradient-purple { background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(168,85,247,0.05)); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.gradient-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.05)); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }

.kpi-data h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.kpi-data .value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kpi-data .value span {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.kpi-data .trend { font-size: 0.8rem; color: var(--text-muted); }
.kpi-data .trend.positive { color: var(--brand-emerald); }

/* Dashboard Body Layout */
.dashboard-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.col-main, .col-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
}

.chart-container {
    padding: 1.5rem;
    height: 350px;
}

/* Modern Table */
.table-container {
    padding: 1.5rem;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.modern-table th {
    text-align: left;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--panel-border);
}

.modern-table td {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.modern-table tr td:first-child { border-radius: 12px 0 0 12px; }
.modern-table tr td:last-child { border-radius: 0 12px 12px 0; }

.modern-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.status-confirmed { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.status-draft { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* Objects List */
.objects-panel { padding: 1.5rem; }

.objects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.obj-card {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.3s;
    cursor: default;
}

.obj-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.obj-card h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.obj-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Highlight Panel */
.highlight-panel {
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
    border: 1px solid rgba(139,92,246,0.3);
    padding: 1.5rem;
}

.highlight-content h3 {
    font-family: var(--font-heading);
    color: #c084fc;
    margin-bottom: 0.5rem;
}
.highlight-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
