/* PROFESSIONAL DASHBOARD - SaaS Style (Light/Dark) */
:root {
    /* 
       LIGHT THEME (Default) 
       Reference: Stripe, Linear Light, Raycast
    */
    --c-bg-main: #ffffff;
    --c-bg-panel: #f9fafb;
    /* Light Gray Panel */
    --c-bg-hover: #f3f4f6;

    --c-text-primary: #111827;
    /* Deep Blue-Black */
    --c-text-secondary: #6b7280;

    --c-border: #e5e7eb;
    /* Gentle Gray */
    --c-accent: #2563eb;
    /* Professional Blue */
    --c-accent-fg: #ffffff;

    /* Variables for Radius/Spacing */
    --u-radius: 8px;
    /* Modern standard */
    --u-spacing: 2rem;
    --u-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --u-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
    /* DARK THEME (Optional) */
    --c-bg-main: #0b0c10;
    --c-bg-panel: #15161c;
    --c-bg-hover: #1f2029;

    --c-text-primary: #f9fafb;
    --c-text-secondary: #9ca3af;

    --c-border: #27272a;
    /* Dark Zinc */
    --c-accent: #3b82f6;
    /* Blue is slightly lighter in dark mode */
    --c-accent-fg: #ffffff;

    --u-shadow-sm: none;
    --u-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-bg-main);
    color: var(--c-text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    color: var(--c-text-primary);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--u-spacing);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--c-text-primary);
    /* Primary text color as bg for contrast */
    color: var(--c-bg-main);
    /* Main bg color as text */
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--u-radius);
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: var(--u-shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--u-shadow-md);
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--c-text-primary);
    border: 1px solid var(--c-border);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--c-bg-panel);
    border-color: var(--c-text-secondary);
}

/* HEADER - Clean SaaS */
.header {
    border-bottom: 1px solid var(--c-border);
    background: var(--c-bg-main);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-saas {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-saas a {
    font-size: 0.9rem;
    color: var(--c-text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-saas a:hover {
    color: var(--c-text-primary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--c-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--u-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
    color: var(--c-text-primary);
    background: var(--c-bg-panel);
}

/* HERO - Professional Split */
.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    padding: 5rem 0;
    border-bottom: 1px solid var(--c-border);
    align-items: start;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--c-text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.stat-card {
    background: var(--c-bg-panel);
    border: 1px solid var(--c-border);
    border-radius: var(--u-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--c-text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--c-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* DASHBOARD GRID */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 1.5rem;
}

.dash-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-bottom: 4rem;
}

.card {
    background: var(--c-bg-main);
    border: 1px solid var(--c-border);
    border-radius: var(--u-radius);
    padding: 1.5rem;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    border-color: var(--c-text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--u-shadow-md);
}

.card-tag {
    display: inline-block;
    padding: 4px 8px;
    background: var(--c-bg-panel);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    /* Slightly tighter radius for tags */
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--c-text-secondary);
    margin-bottom: 1rem;
    width: fit-content;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--c-text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-primary);
    display: flex;
    align-items: center;
}

.card-link::after {
    content: "→";
    margin-left: 6px;
    transition: transform 0.2s;
}

.card-link:hover::after {
    transform: translateX(4px);
}

/* FOOTER */
.footer {
    border-top: 1px solid var(--c-border);
    background: var(--c-bg-panel);
    padding: 4rem 0;
    font-size: 0.9rem;
    color: var(--c-text-secondary);
}

.footer-cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer h4 {
    color: var(--c-text-primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 0.5rem;
}

.footer a:hover {
    color: var(--c-text-primary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .grid-cards {
        grid-template-columns: 1fr;
    }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}