:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --primary: #0f172a;
    --secondary: #64748b;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --text: #1e293b;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Mesh Gradient Background */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    filter: blur(80px);
    pointer-events: none;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    min-height: 80px;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: relative;
    z-index: 50;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 3px;
}

/* Typography */
h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    margin: 4rem 0;
}

.bento-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.3s;
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #1e293b;
    transform: scale(1.02);
}

.btn-outline {
    border-color: var(--border);
    color: var(--text);
    background: var(--card-bg);
}

.btn-outline:hover {
    background: rgba(0,0,0,0.02);
}

/* Cards & Stats */
.stat-value {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.label-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Table Refinement */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.modern-table tr {
    background: rgba(255,255,255,0.02);
}

.modern-table td {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.modern-table td:first-child { border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; }
.modern-table td:last-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; }

/* Dashboard Sidebar */
.dash-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 2rem;
    border-right: 1px solid var(--border);
    background: #080808;
    z-index: 100;
}

.dash-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.95rem;
}

.dash-link.active {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.dash-link:hover:not(.active) {
    color: var(--text);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.75rem; }
    .bento-grid { grid-template-columns: 1fr; }
}

/* Modal System */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.modal.hidden { display: none; }

.modal-content {
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 24px;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.05);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
