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

:root {
    /* Core Palette - Dark (Default) */
    --bg: #111;
    --bg-card: #1a1a1a;
    --bg-input: #111;
    --border: #2a2a2a;
    --text: #eee;
    --text-muted: #888;
    --text-dim: #555;
    --accent: #2a5cff;
    --error: #ee5555;
    --success: #33aa66;
    --warning: #cc8855;

    /* Semantic Component Colors */
    --drop-border: #333;
    --drop-hover: #1e1e1e;
    --nav-off: var(--text-muted);
    --nav-on: var(--text);
    --btn-primary-text: #ffffff;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #f4f4f5;
        --bg-card: #ffffff;
        --bg-input: #f8f8f8;
        --border: #e4e4e7;
        --text: #18181b;
        --text-muted: #52525b;
        --text-dim: #a1a1aa;
        --accent: #2563eb;
        --error: #dc2626;
        --success: #16a34a;
        --warning: #d97706;
        --drop-border: #d4d4d8;
        --drop-hover: #f0f0f1;
    }
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 2rem 1rem;
}

/* --- Shared Layout Components --- */
.topbar,
.jobs,
.card {
    width: 100%;
    max-width: 540px;
    /* index.html size */
    margin: 0 auto 2rem;
}

.jobs {
    max-width: 860px;
}

/* Override for wider jobs list */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.user-info img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.sign-out {
    background: none;
    border: none;
    color: var(--text-dim);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.75rem;
}

/* --- Navigation --- */
nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

nav a {
    color: var(--nav-off);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

nav a.active {
    color: var(--nav-on);
    border-bottom: 2px solid var(--accent);
}

/* --- Forms & Cards --- */
.card,
.signin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

input[type="text"] {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.drop-zone {
    border: 2px dashed var(--drop-border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    margin-bottom: 1rem;
}

.drop-zone.has-file {
    border-color: var(--success);
    color: var(--success);
}

button.primary {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

button.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
button.google {
    width: 100%;
    padding: .75rem;
    background: var(--accent);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 4px;
    font-size: .95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}

/* button.google:hover {
    background: rgba(from var(--accent), r, g, b, 0.9);
} */

.progress {
    margin-top: 1rem;
    font-size: .85rem;
    color: var(--text-muted);
}

.progress-bar {
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    margin-top: .4rem;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: var(--accent);
    transition: width .3s;
}

.error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.success {
    color: var(--success);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.signin-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.signin-card h2 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 400;
}