/* =============================================================
   AUTH LAYOUT CSS
   Fountain UI - Login, Register, Forgot Password Pages
   Skeleton Loader for Auth Pages
   ============================================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

/* Fountain UI Custom Design - Premium Spacious Layout */
html, body {
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    width: 100%;
    max-width: 100%;
    font-family: 'Poppins', 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #2d3748;
}

.fountain-auth-container {
    display: flex;
    height: 100vh !important;
    max-height: 100vh !important;
    width: 100%;
    max-width: 100%;
    overflow: hidden !important;
    position: relative;
    box-sizing: border-box;
}

/* Left side visual banner */
.fountain-left-banner {
    width: 45%;
    height: 100vh !important;
    max-height: 100vh !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    color: #ffffff;
    background-size: cover;
    background-position: center bottom;
    z-index: 1;
    box-sizing: border-box;
    overflow: hidden !important;
}

.fountain-banner-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(6, 52, 35, 0.95) 0%, rgba(6, 52, 35, 0.75) 45%, rgba(6, 52, 35, 0.55) 75%, rgba(6, 52, 35, 0.45) 100%) !important;
    z-index: 2;
}

.fountain-banner-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.fountain-brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
}

.fountain-brand-logo img {
    max-height: 52px;
    width: auto;
}

.fountain-banner-middle {
    margin-top: 5rem !important;
    margin-bottom: auto !important;
    padding: 1rem 0;
    text-align: left;
}

.fountain-banner-middle h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 0.6rem;
}

.fountain-banner-middle h1 span.purpose-highlight {
    color: #d4af37 !important;
}

.fountain-accent-line-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.15rem;
}

.fountain-accent-line-left,
.fountain-accent-line-right {
    height: 1px;
    width: 35px;
    background-color: rgba(255, 255, 255, 0.35);
}

.fountain-accent-ornament {
    color: #d4af37;
    font-size: 0.95rem;
    line-height: 1;
}

.fountain-banner-middle p {
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    font-weight: 400;
    max-width: 500px;
}

/* Features Card - Transparent glass design */
.fountain-features-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px;
    padding: 1.15rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fountain-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}

.fountain-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.fountain-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 0.9rem;
}

.fountain-feature-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff !important;
    line-height: 1.2;
}

.fountain-feature-subtitle {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.2;
}

/* Quote Section */
.fountain-banner-bottom {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.15rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fountain-quote-arabic {
    font-family: 'Adzan Subuh Demo', 'Amiri', serif;
    font-size: 1.4rem;
    color: #d4af37 !important;
    margin-bottom: 0.25rem;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 4px 12px rgba(0, 0, 0, 0.85);
}

.fountain-quote-english {
    font-size: 0.85rem;
    color: #ffffff !important;
    line-height: 1.4;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 4px 12px rgba(0, 0, 0, 0.85);
}

/* Right side form area */
.fountain-right-form {
    width: 55%;
    height: 100vh !important;
    max-height: 100vh !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 3.5rem 2rem 3.5rem;
    box-sizing: border-box;
    background-color: #f8fafc;
    overflow-y: auto !important;
    scrollbar-width: thin;
}

.fountain-card {
    width: 100%;
    max-width: 480px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    box-sizing: border-box;
    margin: auto 0;
    display: flex;
    flex-direction: column;
}

.fountain-card-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #e6f4ea;
    color: #137333;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
    font-size: 1.3rem;
}

.fountain-form-title {
    margin-bottom: 1.75rem;
    text-align: center;
}

.fountain-form-title h2 {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.fountain-form-title p {
    color: #718096;
    font-size: 0.95rem;
}

/* Spacious Input Design */
.fountain-input-wrapper { margin-bottom: 1.25rem; }

.fountain-input-wrapper label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
}

.fountain-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.fountain-input-group i.input-icon {
    position: absolute;
    left: 1.1rem;
    color: #a0aec0;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 10;
}

.fountain-input-group i.toggle-password {
    position: absolute;
    right: 1.1rem;
    color: #a0aec0;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.fountain-input-group i.toggle-password:hover { color: #063423; }

.fountain-input-group .form-control {
    width: 100% !important;
    padding: 0.85rem 1rem 0.85rem 2.8rem !important;
    font-size: 0.95rem !important;
    border: 1.5px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #2d3748 !important;
    border-radius: 8px !important;
    height: auto !important;
    line-height: normal !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out !important;
    box-sizing: border-box;
}

.fountain-input-group .form-control.has-toggle { padding-right: 2.8rem !important; }

.fountain-input-group .form-control:focus {
    background-color: #ffffff !important;
    border-color: #063423 !important;
    box-shadow: 0 0 0 3px rgba(6, 52, 35, 0.12) !important;
    outline: 0 !important;
}

/* Custom buttons */
.fountain-btn {
    background-color: #063423 !important;
    border-color: #063423 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 0.85rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    width: 100% !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 4px 12px rgba(6, 52, 35, 0.15) !important;
    cursor: pointer;
    border: none;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.fountain-btn:hover {
    background-color: #0b4b34 !important;
    border-color: #0b4b34 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(6, 52, 35, 0.25) !important;
}

.fountain-link {
    color: #063423 !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fountain-link:hover {
    color: #0b4b34 !important;
    text-decoration: underline;
}

.fountain-form-footer {
    margin-top: 1.25rem;
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
}

.fountain-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.fountain-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.fountain-checkbox-label input {
    accent-color: #063423;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.fountain-footer-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.25rem;
    margin-top: auto;
    color: #a0aec0;
    font-size: 0.85rem;
    font-weight: 500;
    box-sizing: border-box;
}

.fountain-footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fountain-footer-left i { color: #48bb78; }

@media (max-width: 991px) {
    html, body {
        height: auto !important;
        max-height: none !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .fountain-auth-container {
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        display: block !important;
    }
    .fountain-left-banner { display: none !important; }
    .fountain-right-form {
        width: 100% !important;
        max-width: 100% !important;
        padding: 2.25rem 1.25rem 1.5rem 1.25rem !important;
        min-height: 100vh;
        height: auto !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        box-sizing: border-box !important;
    }
    .fountain-card {
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        margin: 1rem auto !important;
        width: 100% !important;
        max-width: 440px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .fountain-footer-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding-top: 1rem;
        margin-top: 2rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    .fountain-footer-left,
    .fountain-footer-right {
        width: 100%;
        text-align: center;
        justify-content: center;
        word-break: break-word;
    }
}

/* Cloudflare Turnstile responsive handling - Preserves original left alignment */
.cf-turnstile {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    display: block !important;
    text-align: left !important;
    overflow-x: hidden !important;
}

.cf-turnstile iframe {
    max-width: 100% !important;
}

/* =============================================
   ALERT NOTIFICATIONS (Auth Layout)
   ============================================= */
.alert {
    position: relative !important;
    padding: 0.75rem 2.5rem 0.75rem 1rem !important;
    margin-bottom: 1.25rem !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    text-align: left !important;
    display: block !important;
}

.alert-danger {
    color: #991b1b !important;
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
}

.alert-success {
    color: #065f46 !important;
    background-color: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
}

.alert-warning {
    color: #92400e !important;
    background-color: #fffbeb !important;
    border-color: #fde68a !important;
}

.alert-info {
    color: #1e40af !important;
    background-color: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.alert ul {
    margin: 0 !important;
    padding-left: 1.1rem !important;
    list-style-type: disc !important;
}

.alert ul li {
    margin-bottom: 2px !important;
}

.alert ul li:last-child {
    margin-bottom: 0 !important;
}

.alert-dismissible .close,
.alert .close {
    position: absolute !important;
    top: 50% !important;
    right: 0.75rem !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    color: inherit !important;
    opacity: 0.55 !important;
    cursor: pointer !important;
    padding: 0.25rem !important;
    margin: 0 !important;
    transition: opacity 0.15s ease !important;
    outline: none !important;
    display: inline-block !important;
}

.alert-dismissible .close:hover,
.alert .close:hover {
    opacity: 1 !important;
    background: transparent !important;
}

@media (max-width: 360px) {
    .fountain-right-form {
        padding: 1.75rem 0.75rem 1.25rem 0.75rem !important;
    }
    .cf-turnstile {
        transform: scale(0.92);
        transform-origin: left center;
    }
}

@media (max-height: 720px) {
    .fountain-left-banner { padding: 1.5rem !important; }
    .fountain-banner-middle { margin-top: 1.75rem !important; }
    .fountain-banner-middle h1 { font-size: 1.65rem !important; }
    .fountain-features-card { padding: 0.75rem 0.5rem !important; }
    .fountain-right-form { padding: 1.25rem 3.5rem 0.85rem 3.5rem !important; }
    .fountain-card-icon-circle { width: 34px !important; height: 34px !important; font-size: 0.95rem !important; margin-bottom: 0.4rem !important; }
    .fountain-form-title { margin-bottom: 0.85rem !important; }
    .fountain-form-title h2 { font-size: 1.5rem !important; }
    .fountain-form-title p { font-size: 0.82rem !important; }
    .fountain-input-wrapper { margin-bottom: 0.6rem !important; }
    .fountain-input-wrapper label { font-size: 0.82rem !important; margin-bottom: 0.2rem !important; }
    .fountain-input-group .form-control { padding: 0.68rem 1rem 0.68rem 2.6rem !important; font-size: 0.9rem !important; }
    .fountain-btn { padding: 0.72rem 1.5rem !important; font-size: 0.92rem !important; margin-top: 0.35rem !important; }
    .fountain-footer-row { margin-top: 0.5rem !important; padding-top: 0.5rem !important; font-size: 0.75rem !important; }
}

/* =============================================
   AUTH PAGE SKELETON LOADER
   ============================================= */
#tsa-skeleton {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #f8fafc;
    z-index: 99998;
    opacity: 1;
    transition: opacity 0.35s ease;
    overflow: hidden;
    display: flex;
}
#tsa-skeleton.tsa-hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes tsa-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}
.skel {
    background: linear-gradient(90deg, #e8f0eb 25%, #d4e8da 50%, #e8f0eb 75%);
    background-size: 600px 100%;
    animation: tsa-shimmer 1.4s infinite linear;
    border-radius: 4px;
}
.skel-dark {
    background: linear-gradient(90deg, #0b3e2a 25%, #12553b 50%, #0b3e2a 75%);
    background-size: 600px 100%;
    animation: tsa-shimmer 1.4s infinite linear;
    border-radius: 4px;
}

.skel-auth-left {
    width: 45%;
    background: #063423;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.skel-auth-logo { width: 150px; height: 45px; }
.skel-auth-middle { margin-top: 5rem; display: flex; flex-direction: column; gap: 16px; }
.skel-auth-h1 { height: 40px; width: 80%; }
.skel-auth-p { height: 15px; width: 60%; }
.skel-auth-bottom { display: flex; flex-direction: column; gap: 12px; }
.skel-auth-quote1 { height: 20px; width: 90%; }
.skel-auth-quote2 { height: 14px; width: 70%; }

.skel-auth-right {
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}
.skel-auth-card { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 20px; }
.skel-auth-circle { width: 60px; height: 60px; border-radius: 50%; }
.skel-auth-title { height: 28px; width: 180px; }
.skel-auth-subtitle { height: 14px; width: 280px; }
.skel-auth-inputs { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.skel-auth-label { height: 12px; width: 80px; }
.skel-auth-input { height: 45px; width: 100%; }
.skel-auth-btn { height: 48px; width: 100%; margin-top: 10px; }

@media (max-width: 768px) {
    .skel-auth-left { display: none; }
    .skel-auth-right { width: 100%; padding: 1.5rem; }
}
