* { box-sizing: border-box; }

:root {
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --sh-sm: 0 1px 2px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.14);
    --sh-md: 0 4px 10px rgba(15,23,42,0.16), 0 10px 26px rgba(15,23,42,0.20);
    --sh-xl: 0 14px 30px rgba(15,23,42,0.24), 0 32px 70px rgba(15,23,42,0.34);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255,255,255,0.06), transparent 60%),
        linear-gradient(135deg, #2c3e50 0%, #34495e 60%, #4a6785 100%);
    color: #2c3e50;
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Tvådelad layout (register/login) ---- */

.auth-shell {
    display: flex;
    min-height: 100vh;
}

.auth-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4vw 5vw;
    color: #fff;
}

.auth-info-panel h1 {
    font-size: 2.4rem;
    margin: 0 0 0.5rem 0;
}

.auth-info-panel .tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 420px;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    max-width: 420px;
}

.feature-list li {
    padding: 0.5rem 0;
    font-size: 1rem;
    opacity: 0.95;
}

.already {
    opacity: 0.85;
}

.already a, .auth-box a, .muted a {
    color: #fff;
    font-weight: 600;
}

.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.98);
    padding: 4vw;
}

.auth-box {
    width: 100%;
    max-width: 380px;
}

.auth-box h2 {
    margin-top: 0;
    color: #2c3e50;
}

/* ---- Enkolumns-sidor (verify/forgot/reset) ---- */

body.single-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box-standalone {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    width: 100%;
    max-width: 420px;
    animation: pop-in 0.28s var(--ease-spring);
}

.auth-box-standalone h2 { margin-top: 0; color: #2c3e50; }

/* ---- Delade formulärstilar ---- */

.field-row {
    display: flex;
    gap: 12px;
}

.field-row .field { flex: 1; }

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.field input, .field select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #dcdde1;
    border-radius: var(--r-sm);
    font-size: 1rem;
    background: #fafafa;
    transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background 0.15s var(--ease-out);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #555;
    cursor: pointer;
}

.checkbox-row input {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.field input:focus, .field select:focus {
    outline: none;
    border-color: #4a6785;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74,103,133,0.18);
}

.primary-btn {
    width: 100%;
    padding: 0.75rem;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: var(--sh-sm);
    transition: background 0.18s var(--ease-out), transform 0.18s var(--ease-spring), box-shadow 0.18s var(--ease-out);
}

.primary-btn:hover { background: #1a252f; transform: translateY(-1px); box-shadow: var(--sh-md); }
.primary-btn:active { transform: translateY(0); }

.link-btn {
    background: none;
    border: none;
    color: #2c3e50;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.error {
    background: #fdecea;
    color: #c0392b;
    padding: 0.6rem 0.8rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    animation: pop-in 0.2s var(--ease-spring);
}

.ok {
    background: #eafaf1;
    color: #1e8449;
    padding: 0.6rem 0.8rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    animation: pop-in 0.2s var(--ease-spring);
}

.muted {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.muted.small {
    font-size: 0.85rem;
    margin-top: 1.2rem;
}

.muted a { color: #2c3e50; }

@media (max-width: 800px) {
    .auth-shell { flex-direction: column; }
    .auth-info-panel { padding: 8vw 6vw 4vw 6vw; }
    .auth-form-panel { padding: 4vw 6vw 8vw 6vw; }
}
