html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Full-height split screen */
.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-visual {
    flex: 1 1 52%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-height: 320px;
    background: #d9b48f; /* shows only if neither the video nor its poster loads */
}

.auth-visual video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 56px;
    color: #fff;
    background: linear-gradient(to top, rgba(15, 20, 40, 0.75), rgba(15, 20, 40, 0.05) 60%, rgba(15, 20, 40, 0));
}

.visual-badge {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f7cff, #34c98f);
    font-weight: 700;
    font-size: 1.2em;
}

.visual-overlay h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.visual-overlay p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 420px;
}

.auth-panel {
    flex: 1 1 48%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: linear-gradient(160deg, #eef4ff 0%, #f7fafc 55%, #edf7f1 100%);
}

/* Auth card */
.auth-card {
    --primary: #4f7cff;
    --accent: #34c98f;
    --text: #1a1f36;
    --muted: #667085;
    --border: #e4e7ec;

    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(30, 41, 59, 0.10), 0 2px 8px rgba(30, 41, 59, 0.06);
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
}

.tab-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tab-switch {
    display: flex;
    background: #f2f4f7;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab-label {
    flex: 1;
    text-align: center;
    padding: 9px 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

#tabLogin:checked ~ .tab-switch label[for="tabLogin"],
#tabSignup:checked ~ .tab-switch label[for="tabSignup"] {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 4px rgba(16, 24, 40, 0.10);
}

.tab-panels {
    display: grid;
}

.panel {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

#tabLogin:checked ~ .tab-panels .panel-login,
#tabSignup:checked ~ .tab-panels .panel-signup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-input {
    width: 100%;
    box-sizing: border-box; /* keep the padding inside the 100%, or inputs overflow the card */
    height: 44px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background-color: #fff;
    font-size: 0.95rem;
    color: var(--text);
    padding: 0 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input::placeholder {
    color: #98a2b3;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}

.auth-btn {
    margin-top: 6px;
    height: 46px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 124, 255, 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(79, 124, 255, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .auth-page {
        flex-direction: column;
    }
    .auth-visual {
        flex: none;
        min-height: 240px;
    }
    .visual-overlay {
        padding: 32px;
    }
    .visual-overlay h2 {
        font-size: 1.5rem;
    }
    .auth-panel {
        flex: none;
        padding: 36px 24px;
    }
}

.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
}

.toast-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid #667085;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.15);
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a1f36;
    animation: toast-in 0.25s ease;
}

@keyframes toast-in {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success { border-left-color: #0f7a4c; }
.toast-danger { border-left-color: #c0362c; }
.toast-warning { border-left-color: #a15c07; }
.toast-info { border-left-color: #4f7cff; }

.toast-close {
    background: none;
    border: none;
    color: #667085;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.toast-close:hover {
    color: #1a1f36;
}

@media (max-width: 480px) {
    .toast-stack {
        left: 12px;
        right: 12px;
        max-width: none;
    }
}
