:root {
    --primary: #0F172A;
    --secondary: #334155;
    --accent: #0EA5E9;
    --bg-main: #F8FAFC;
    --sidebar-width: 260px;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary);
    color: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

.nav-item.active {
    border-right: 3px solid var(--accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #64748B;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
}

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

.page-title h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Data Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Tables */
.table-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: #F1F5F9;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

/* Badges & Indicators */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Callouts */
.callout {
    padding: 1rem;
    border-left: 4px solid var(--accent);
    background: #F0F9FF;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.callout-title {
    font-weight: 700;
    color: #0369A1;
    margin-bottom: 0.25rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

button {
    background: var(--accent);
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { width: 80px; }
    .sidebar-header h1, .nav-item span, .sidebar-footer { display: none; }
    .main-content { margin-left: 80px; }
}
