/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400;500;600;700;800;900&family=Nunito:wght@300;400;500;600&display=swap');

/* ── Font Variables ── */
:root {
    --display: 'Gabarito', sans-serif;
    --body: 'Nunito', sans-serif;
}

/* ── Theme Tokens ── */
[data-theme="light"] {
    --bg: #FFFAF5;
    --fg: #2A2420;
    --fg2: #7A7068;
    --fg3: #B5ADA5;
    --salsa: #D94E28;
    --salsa-soft: rgba(217, 78, 40, 0.07);
    --salsa-hover: #C14420;
    --lime: #5A8C32;
    --rule: #EDE7DF;
    --card: #FFF5EC;
    --card-hover: #FFF0E4;
}

[data-theme="dark"] {
    --bg: #1A1614;
    --fg: #F0E8DC;
    --fg2: #968E84;
    --fg3: #5A544E;
    --salsa: #E8623A;
    --salsa-soft: rgba(232, 98, 58, 0.08);
    --salsa-hover: #F07050;
    --lime: #7AB048;
    --rule: #2A2622;
    --card: #221E1A;
    --card-hover: #2A2420;
}

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

body {
    font-family: var(--body);
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(20px, 4vw, 40px);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.auth-pending {
    display: none !important;
}

::selection {
    background: var(--salsa);
    color: #fff;
}

/* ── Container ── */
.container {
    max-width: 860px;
    width: 100%;
    padding: clamp(20px, 4vw, 40px);
    margin: 0 auto;
}

/* ── Header ── */
.taco-header {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    padding: 60px clamp(20px, 4vw, 40px) 0;
}

.taco-header h1 {
    text-align: center;
    color: var(--fg);
    font-family: var(--display);
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.taco-header h1 a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.taco-header .subtitle {
    text-align: center;
    color: var(--fg2);
    font-family: var(--body);
    font-size: 1.05rem;
    font-weight: 300;
    margin-bottom: 0;
    letter-spacing: 0;
    line-height: 1.75;
}

.taco-header .header-image {
    height: 1.4em;
    width: auto;
    display: inline-block;
    border-radius: 8px;
    object-fit: contain;
}

/* ── Navigation ── */
.taco-nav {
    width: 100%;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    height: 56px;
    display: flex;
    align-items: center;
    margin-top: 24px;
    margin-bottom: 40px;
}

.taco-nav-inner {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 8px;
    font-family: var(--body);
    padding: 0 clamp(20px, 4vw, 40px);
}

.taco-nav a {
    color: var(--fg2);
    text-decoration: none;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 400;
    border-radius: 100px;
    transition: color 0.2s ease, background 0.2s ease;
}

.taco-nav a:hover {
    color: var(--salsa);
    background: var(--salsa-soft);
}

.taco-nav a.login-btn {
    color: var(--salsa);
    border: 1px solid var(--salsa);
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.76rem;
}

.taco-nav a.login-btn:hover {
    background: var(--salsa-soft);
    color: var(--salsa-hover);
}

/* ── Footer ── */
.taco-footer {
    max-width: 860px;
    width: 100%;
    margin: auto auto 0 auto;
    padding: 28px clamp(20px, 4vw, 40px);
    text-align: center;
    font-family: var(--body);
    border-top: 1px solid var(--rule);
}

.taco-footer .footer-message {
    color: var(--fg3);
    font-size: 0.72rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.taco-footer .footer-divider {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 0 auto 20px auto;
    max-width: 400px;
}

.taco-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.taco-footer .footer-links a {
    color: var(--fg2);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.taco-footer .footer-links a:hover {
    color: var(--salsa);
}

/* ── Homepage ── */
.welcome-title {
    text-align: center;
    font-family: var(--display);
    color: var(--fg);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.welcome-text {
    color: var(--fg2);
    font-family: var(--body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.warning-banner {
    background: var(--salsa-soft);
    border: 1px solid var(--salsa);
    border-radius: 14px;
    padding: 16px 24px;
    color: var(--salsa);
    font-family: var(--body);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.cta-section {
    margin-top: 20px;
    text-align: center;
}

.btn-primary {
    display: inline-block;
    background: var(--salsa);
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-family: var(--display);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 100px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: var(--salsa-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--fg3);
    cursor: not-allowed;
    transform: none;
}

/* ── Login Page ── */
.login-container {
    max-width: 460px;
    width: 100%;
    background: var(--card);
    border-radius: 20px;
    padding: clamp(32px, 6vw, 60px);
    margin-top: 40px;
    border: 1px solid var(--rule);
}

.form-title {
    text-align: center;
    font-family: var(--display);
    color: var(--fg);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 15px;
}

.signup-warning {
    background: var(--salsa-soft);
    border: 1px solid var(--salsa);
    border-radius: 14px;
    padding: 12px;
    color: var(--salsa);
    font-family: var(--body);
    font-size: 0.85rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--fg2);
    font-family: var(--body);
    font-weight: 500;
    font-size: 0.85rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: 14px;
    font-family: var(--body);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--fg);
    transition: border-color 0.2s ease;
}

.form-group input::placeholder {
    color: var(--fg3);
}

.form-group input:focus {
    outline: none;
    border-color: var(--salsa);
}

.toggle-section {
    text-align: center;
    margin-top: 20px;
    color: var(--fg2);
    font-family: var(--body);
    font-size: 0.85rem;
}

.toggle-link {
    color: var(--salsa);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.toggle-link:hover {
    text-decoration: underline;
}

.message {
    padding: 12px;
    border-radius: 14px;
    margin-bottom: 20px;
    text-align: center;
    font-family: var(--body);
    font-size: 0.85rem;
    display: none;
}

.message.error {
    background: var(--salsa-soft);
    border: 1px solid var(--salsa);
    color: var(--salsa);
}

.message.success {
    background: rgba(90, 140, 50, 0.1);
    border: 1px solid var(--lime);
    color: var(--lime);
}

.message.loading {
    background: var(--salsa-soft);
    border: 1px solid var(--salsa);
    color: var(--salsa);
}

/* ── Dashboard ── */
.links-title {
    text-align: center;
    font-family: var(--display);
    color: var(--fg);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    display: inline-block;
    padding: 14px 32px;
    background: var(--card);
    color: var(--salsa);
    text-decoration: none;
    border-radius: 14px;
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid var(--rule);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
    background: var(--card-hover);
    border-color: var(--salsa);
}

/* ── Theme Toggle ── */
.theme-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 2px;
    padding: 4px;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 100px;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.theme-toggle:hover {
    opacity: 1;
}

.theme-toggle button {
    all: unset;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg3);
    transition: color 0.2s ease, background 0.2s ease;
}

.theme-toggle button:hover {
    color: var(--fg2);
}

.theme-toggle button.active {
    background: var(--salsa-soft);
    color: var(--salsa);
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .taco-header {
        padding: 40px clamp(20px, 4vw, 40px) 0;
    }

    .taco-header h1 {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }

    .taco-nav-inner {
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .login-container {
        padding: 24px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }
}
