/* css/base.css */
/* Reset + layout primitives */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, textarea {
    font: inherit;
}

/* Header */
header {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.logo {
    height: 60px;
    width: auto;
}

.brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.brand-logo {
    height: 70px;
    width: auto;
}

:root[data-theme="light"] .brand-logo,
:root:not([data-theme]) .brand-logo {
    /* myCIO logo is white; invert it on light backgrounds */
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .brand-logo {
        filter: invert(1);
    }
}

:root[data-theme="light"] .brand-logo {
    filter: invert(1);
}

.brand-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.actions {
    display: flex;
    justify-content: flex-end;
}

/* Status (bottom of page, transient) */
#status {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-muted);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: var(--space-2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden { display: none !important; }