html {
    background-color: #f4f8fb;
}

body {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease-in-out;
}

body.auth-resolved {
    opacity: 1 !important;
    visibility: visible !important;
}

.auth-main-wrapper {
    width: min(92%, 520px);
    max-width: 520px;
    margin: 0 auto;
}

.auth-container {
    width: 100%;
    max-width: 100%;
    gap: 14px;
}

.auth-card {
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.auth-card.secondary {
    padding: 1rem 1.4rem;
}

.auth-header {
    margin: 0 0 1.35rem;
    text-align: center;
}

.auth-header i {
    color: #0ea5e9;
    font-size: 2.3rem;
    margin-bottom: 0.65rem;
}

.auth-header h1 {
    margin-bottom: 0.45rem;
    font-weight: 800;
    font-size: 1.72rem;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
}

.auth-header p {
    margin: 0;
    font-size: 0.94rem;
    color: #64748b;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
    text-align: left;
}

.field-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.form-group input {
    width: 100%;
    padding: 0.82rem 0.9rem;
    border: 1px solid #d8e2ec;
    background: #fbfdff;
    border-radius: 12px;
    font-size: 0.92rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
    outline: none;
}

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 0.92rem 1.1rem;
    margin-top: 0.25rem;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    color: #f8fafc;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.28);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.status-msg {
    margin-bottom: 1rem;
    font-size: 0.84rem;
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    text-align: left;
    border: 1px solid transparent;
    background: rgba(248, 250, 252, 0.95);
}

.status-msg.error {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.25);
    background: rgba(254, 242, 242, 0.9);
}

.status-msg.success {
    color: #047857;
    border-color: rgba(4, 120, 87, 0.2);
    background: rgba(236, 253, 245, 0.92);
}

.auth-link-row {
    margin-top: 0.75rem;
    text-align: center;
}

.forgot-password-link {
    color: #2563eb;
    font-size: 0.8rem;
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.auth-footer {
    color: #334155;
    margin: 0;
}

.toggle-form {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
}

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

@media (max-width: 520px) {
    .auth-card {
        padding: 1.4rem 1.2rem;
        border-radius: 16px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }
}
