/* ============================================================
   auth.css — Shared styles for all authentication pages
   Login, ForgotPassword, ForgotPasswordConfirmation,
   ResetPassword, ResetPasswordConfirmation
   ============================================================ */

/* --- Reset ------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

/* --- Body / Background ------------------------------------- */
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0d1b35 0%, #0f3460 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative orb — top right */
body::before {
    content: '';
    position: fixed;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, transparent 65%);
    top: -250px;
    right: -200px;
    border-radius: 50%;
    pointer-events: none;
}

/* Decorative orb — bottom left */
body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 65%);
    bottom: -150px;
    left: -100px;
    border-radius: 50%;
    pointer-events: none;
}

/* Dot-grid overlay */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* --- Wrapper & Entry Animation ----------------------------- */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    animation: fadeSlideUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Card -------------------------------------------------- */
.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    padding: 48px 44px 44px;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Centered variant — used on confirmation pages */
.login-card--centered {
    text-align: center;
}

/* --- Logo -------------------------------------------------- */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 48px;
    object-fit: contain;
}

/* --- Title block ------------------------------------------- */
.login-title {
    text-align: center;
    margin-bottom: 28px;
}

.login-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-title p {
    font-size: 13.5px;
    color: #64748b;
}

/* Standalone h1 used on confirmation pages */
.login-card--centered h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

/* --- Icon circles ------------------------------------------ */
.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 28px;
}

/* Blue — used on ForgotPassword, ResetPassword */
.icon-circle--blue {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.icon-circle--blue i {
    font-size: 24px;
    color: #3b82f6;
}

/* Green — used on confirmation pages */
.icon-circle--green {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.icon-circle--green i {
    font-size: 28px;
    color: #16a34a;
}

/* --- Hint / message text ----------------------------------- */
.hint-text {
    font-size: 13.5px;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 28px;
}

.message {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 32px;
}

/* --- Validation -------------------------------------------- */
.validation-alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 4px solid #ef4444;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13.5px;
    color: #dc2626;
    line-height: 1.5;
}

.validation-alert.validation-summary-valid {
    display: none;
}

.field-error {
    font-size: 12.5px;
    color: #dc2626;
    margin-top: 5px;
    margin-left: 4px;
    display: block;
}

/* --- Input fields ------------------------------------------ */
.field-group {
    position: relative;
    margin-bottom: 16px;
}

.field-group .field-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.25s ease;
    z-index: 1;
}

.field-group:focus-within .field-icon {
    color: #3b82f6;
}

.field-group input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14.5px;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
}

.field-group input::placeholder {
    color: #9faabb;
    font-weight: 400;
}

.field-group input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* --- Remember me row --------------------------------------- */
.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: #475569;
    font-weight: 500;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.forgot-link {
    font-size: 13.5px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #1d4ed8;
}

/* --- Primary button ---------------------------------------- */
.btn-signin {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.2px;
    font-family: inherit;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-signin::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
    color: #fff;
}

.btn-signin:hover::before {
    opacity: 1;
}

.btn-signin:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Link variant — auto-width, used on confirmation pages */
a.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    padding: 13px 28px;
    font-size: 14.5px;
}

/* --- Back link --------------------------------------------- */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    font-size: 13.5px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #1d4ed8;
}

/* --- Card footer ------------------------------------------- */
.card-footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 0.2px;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 480px) {
    .login-card {
        padding: 36px 28px 32px;
        border-radius: 20px;
    }
}
