:root {
    /* Ultra-Premium Light Theme */
    --p-bg: #fdfdfd;
    /* Very subtle off-white for body */
    --p-card: #ffffff;
    /* Pure white for cards */
    --p-sidebar: #ffffff;
    /* White sidebar */

    --p-accent: #3b82f6;
    /* Bright Blue */
    --p-accent-soft: #eff6ff;
    /* Very light blue bg */
    --p-accent-text: #1d4ed8;
    /* Darker blue for text */

    --p-text: #1e293b;
    /* Dark Slate for main text */
    --p-text-muted: #64748b;
    /* Slate for secondary */
    --p-text-dim: #94a3b8;
    /* Lighter slate for tertiary */

    --p-border: #f1f5f9;
    /* Very light border */
    --p-border-darker: #e2e8f0;
    /* Slightly clearer border */

    /* Soft, diffused shadows - No harsh black shadows */
    --p-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02), 0 1px 2px 0 rgba(0, 0, 0, 0.01);
    --p-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
    --p-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);

    --p-radius: 12px;
    --p-radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--p-bg);
    color: var(--p-text);
    display: flex;
    min-height: 100vh;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar - Light Mode */
.sidebar {
    width: 280px;
    background: var(--p-sidebar);
    border-right: 1px solid var(--p-border-darker);
    /* Subtle separator */
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 1000;
}

.sidebar-header {
    padding: 2.5rem 2rem;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--p-text);
    /* Dark text for branding */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    letter-spacing: -0.04em;
}

.nav-section {
    padding-bottom: 2rem;
}

.nav-section-title {
    padding: 0 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--p-text-dim);
    /* Light slate for headers */
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 2rem;
    color: var(--p-text-muted);
    /* Darker slate for links */
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
}

.nav-link:hover {
    color: var(--p-accent);
    background: var(--p-accent-soft);
}

.nav-link.active {
    color: var(--p-accent);
    background: var(--p-accent-soft);
    font-weight: 600;
    border-right-color: var(--p-accent);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    opacity: 0.9;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 3rem 4rem;
    max-width: 1600px;
}

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

.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--p-text);
    line-height: 1.1;
}

/* Headers */
.section-header {
    margin: 3rem 0 1.5rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.03em;
    color: var(--p-text);
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--p-text-muted);
    margin-top: 0.4rem;
}

/* Cards & Grid */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.scenario-card {
    background: var(--p-card);
    border: 1px solid var(--p-border-darker);
    border-radius: var(--p-radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--p-shadow);
}

/* Minimal hover effect */
.scenario-card:hover {
    box-shadow: var(--p-shadow-lg);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.scenario-card.active {
    border: 2px solid var(--p-accent);
    box-shadow: 0 0 0 4px var(--p-accent-soft);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.scenario-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--p-text);
}

.badge-active {
    background: var(--p-accent-soft);
    color: var(--p-accent-text);
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.scenario-text {
    flex: 1;
    font-size: 0.95rem;
    color: var(--p-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stat-container {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--p-text-muted);
    border: 1px solid var(--p-border);
}

/* Tables */
.table-container {
    background: var(--p-card);
    border: 1px solid var(--p-border-darker);
    border-radius: var(--p-radius);
    overflow: hidden;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--p-text-muted);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--p-border-darker);
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--p-border);
    font-size: 0.95rem;
    color: var(--p-text);
    vertical-align: middle;
}

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

tr:hover td {
    background: #fdfdfd;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: var(--p-accent);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-white {
    background: white;
    border: 1px solid var(--p-border-darker);
    color: var(--p-text);
}

.btn-white:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.w-full {
    width: 100%;
    justify-content: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--p-border-darker);
    border-radius: var(--p-radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-icon-wrapper {
    width: 44px;
    height: 44px;
    background: var(--p-accent-soft);
    color: var(--p-accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--p-text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--p-text);
    letter-spacing: -0.03em;
}

/* Utils */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input:checked+.toggle-slider {
    background-color: var(--p-accent);
}

input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: var(--p-radius-lg);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--p-border-darker);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--p-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--p-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #fdfdfd;
    border-radius: 0 0 var(--p-radius-lg) var(--p-radius-lg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* Compatibility Aliases */
:root {
    --primary-color: var(--p-accent);
    --secondary-color: var(--p-text-muted);
    --background-color: var(--p-bg);
    --surface-color: var(--p-card);
    --text-primary: var(--p-text);
}
