/* Main CSS - Base Styles (Colors defined in themes.css) */

:root {
    /* Spacing & Sizing */
    --space-unit: 8px;
    --space-xs: calc(var(--space-unit) * 0.5);
    /* 4px */
    --space-sm: calc(var(--space-unit) * 1);
    /* 8px */
    --space-md: calc(var(--space-unit) * 2);
    /* 16px */
    --space-lg: calc(var(--space-unit) * 3);
    /* 24px */
    --space-xl: calc(var(--space-unit) * 4);
    /* 32px */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --header-height: 64px;
    --footer-height: 40px;
}

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

html,
body {
    height: 100%;
    overflow: hidden;
    /* Main app will be SPA with internal scrolling */
}

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-header {
    height: var(--header-height);
    background-color: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 calc(var(--space-unit) * 3);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.app-content {
    margin-top: var(--header-height);
    margin-bottom: var(--footer-height);
    height: calc(100% - var(--header-height) - var(--footer-height));
    overflow-y: auto;
    padding: calc(var(--space-unit) * 3);
}

.app-footer {
    height: var(--footer-height);
    background-color: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 calc(var(--space-unit) * 2);
    font-size: 0.85rem;
    color: var(--clr-text-dim);
}

/* Typography */
h1 {
    font-size: 2rem;
    margin-bottom: var(--space-unit);
    color: var(--clr-text);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-unit);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-unit);
}

p {
    color: var(--clr-text-dim);
}

/* Logo */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo-accent {
    color: var(--clr-accent);
}

/* Grid Layouts */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--space-unit) * 3);
    margin-top: calc(var(--space-unit) * 3);
}

/* Navigation Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        height: auto;
        padding: var(--space-unit);
    }

    .app-content {
        margin-top: 110px;
        /* Adjust for stacked header */
    }

    .main-nav {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-top: var(--space-unit);
    }
}