/* ========================================
   MiniPyme360 - Auth UI (Monolithic Direct Style)
   ======================================== */

/* 
   GLOBAL RESET FOR AUTH PAGES 
   Defined specifically for body.guest scope to isolate from components.css 
*/
body.guest {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg) !important;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    line-height: 1.34;
    -webkit-font-smoothing: antialiased;
}

/* Container Reset */
body.guest * {
    box-sizing: border-box;
}

/* Main Layout Container */
.auth-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    /* Vertically and Horizontally centered in flex body */
    flex: 1;
    /* Take up available vertical space */
    gap: 40px;
    min-height: calc(100vh - 120px);
}

/* === LEFT COLUMN: BRANDING === */
.auth-branding {
    flex: 1 1 400px;
    max-width: 580px;
    padding-bottom: 20px;
    text-align: left;
}

.auth-branding h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    margin: 0;
    padding: 0;
    letter-spacing: -2px;
}

.auth-branding h1 a {
    color: var(--primary, #1e3a5f) !important;
    text-decoration: none;
}

.auth-branding p {
    font-size: 1.35rem;
    line-height: 1.35;
    color: var(--text-muted, #5a6b7c) !important;
    margin-top: 14px;
    margin-bottom: 0;
}

.auth-branding p a {
    color: var(--primary, #1e3a5f) !important;
    text-decoration: none;
    font-weight: 700;
}

/* === RIGHT COLUMN: CARD === */
.auth-card {
    flex: 1 1 400px;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: var(--glass-blur, blur(24px)) !important;
    -webkit-backdrop-filter: var(--glass-blur, blur(24px)) !important;
    padding: 30px;
    border-radius: var(--card-radius, 28px) !important;
    box-shadow: var(--glass-shadow, 0 10px 30px rgba(0, 0, 0, 0.03)) !important;
    border: var(--border-glow, 1px solid rgba(255, 255, 255, 0.5)) !important;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    position: relative;
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(30, 58, 95, 0.06) !important;
}

/* Typography inside Card */
.auth-card h2 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: var(--primary, #1e3a5f) !important;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.auth-card p {
    margin: 0 0 20px 0;
    color: var(--text-muted, #5a6b7c) !important;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Inputs */
.auth-card input {
    width: 100%;
    font-size: 16px !important;
    padding: 12px 16px !important;
    margin-bottom: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: var(--glass-blur, blur(24px)) !important;
    color: var(--text, #111319) !important;
    transition: all 0.25s ease !important;
}

.auth-card input:focus {
    background: #ffffff !important;
    border-color: var(--primary, #1e3a5f) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1) !important;
    outline: none !important;
}

/* Buttons - Specific styling to override any component.css bleed */
.auth-card button,
.auth-card .btn-primary,
.auth-card .btn-green,
.auth-card .btn-orange,
.auth-card .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    min-height: 48px;
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
    text-align: center;
    font-family: inherit;
    transition: all 0.25s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Grey Action (Cancel/Secondary) */
.auth-card .btn-secondary {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    color: var(--text-muted, #5a6b7c) !important;
    backdrop-filter: blur(8px);
}

.auth-card .btn-secondary:hover {
    background: #ffffff !important;
    border-color: rgba(30, 58, 95, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.05) !important;
}

/* Primary Action (Login) */
.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--primary, #1e3a5f) 0%, var(--accent-muted, #2d4a7a) 100%) !important;
    color: white !important;
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-muted, #2d4a7a) 0%, #1e3a5f 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
}

/* Secondary Action (Register) */
.auth-card .btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    padding: 12px 32px;
    font-size: 16px !important;
    margin-top: 14px;
}

.auth-card .btn-green:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Mobile/Blue Action (Converted from Orange to Brand Blue #1e3a5f) */
.auth-card .btn-orange {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a7a 100%) !important;
    color: white !important;
}

.auth-card .btn-orange:hover {
    background: linear-gradient(135deg, #2d4a7a 0%, #172c47 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

/* Links */
.auth-forgot {
    margin-top: 18px;
    color: var(--primary, #1e3a5f) !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.auth-forgot:hover {
    color: var(--success, #10b981) !important;
    text-decoration: underline;
}

.auth-divider {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
    margin: 24px 0;
}

/* Google Button Re-styling */
.auth-card .btn-google {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--text, #111319) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    margin-top: 15px;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 14px !important;
    transition: all .25s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px !important;
    min-height: 48px !important;
    width: 100% !important;
}

.auth-card .btn-google:hover {
    background: #ffffff !important;
    border-color: rgba(30, 58, 95, 0.2) !important;
    box-shadow: 0 8px 16px rgba(30, 58, 95, 0.06) !important;
    transform: translateY(-2px) !important;
}

.auth-card .btn-google:active {
    background-color: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(0) !important;
}

.auth-card .btn-google img {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

/* Alerts */
.alert-error {
    width: 100%;
    background-color: rgba(254, 242, 242, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    padding: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Action Buttons Container (Side by Side) */
.auth-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 14px;
}

.alert-success {
    width: 100%;
    background-color: rgba(240, 253, 250, 0.8) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(20, 184, 166, 0.4) !important;
    color: #0d9488 !important;
    padding: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* === FOOTER === */
.auth-footer {
    background: rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    color: var(--text-muted) !important;
    padding: 20px 0;
    font-size: 12px;
    width: 100%;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--glass-border) !important;
}

.auth-footer-content {
    max-width: 980px;
    margin: 0 auto;
}

.auth-footer-links a {
    color: #737373;
    margin: 0 10px;
    text-decoration: none;
}

.auth-footer-links a:hover {
    text-decoration: underline;
}

/* === RESPONSIVE RULES === */
@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
        justify-content: center;
        padding-top: 20px;
        gap: 30px;
    }

    .auth-branding {
        text-align: center;
        padding-bottom: 0;
        max-width: 100%;
        flex: 0 0 auto;
        /* Prevent growing vertically */
        width: 100%;
    }

    .auth-branding h1 {
        font-size: 2.25rem;
        margin-bottom: 5px;
    }

    .auth-branding p {
        font-size: 1.2rem;
        margin-top: 5px;
    }

    .auth-card {
        width: 100%;
        max-width: 400px;
    }



    /* Stack buttons on mobile */
    .auth-actions {
        flex-direction: column;
        gap: 10px;
    }

    .auth-actions .btn-secondary,
    .auth-actions .btn-orange {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 30px 15px !important;
        gap: 20px !important;
        min-height: calc(100vh - 100px) !important;
    }
    
    .auth-branding h1 {
        font-size: clamp(2rem, 7vw, 2.5rem) !important;
    }
    
    .auth-branding p {
        font-size: 1rem !important;
        line-height: 1.35 !important;
        margin-top: 8px !important;
    }
    
    .auth-card {
        padding: 24px 16px !important;
        border-radius: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02) !important;
    }
    
    .auth-card h2 {
        font-size: 1.35rem !important;
        margin-bottom: 6px !important;
    }
    
    .auth-card p {
        font-size: 0.88rem !important;
        margin-bottom: 16px !important;
    }
    
    .auth-card input {
        padding: 10px 14px !important;
        font-size: 15px !important;
        margin-bottom: 10px !important;
        border-radius: 10px !important;
    }
    
    .auth-card button,
    .auth-card .btn-primary,
    .auth-card .btn-green,
    .auth-card .btn-orange,
    .auth-card .btn-secondary,
    .auth-card .btn-google {
        padding: 10px 20px !important;
        font-size: 15px !important;
        min-height: 44px !important;
        border-radius: 10px !important;
    }
    
    .auth-forgot {
        margin-top: 14px !important;
        font-size: 13px !important;
    }
    
    .auth-divider {
        margin: 18px 0 !important;
    }
}