/* ==========================================================================
   SIKKHALAY INSTITUTE PORTAL — BENGALI AUTHENTICATION & SUBSCRIPTION (CSS)
   Rose/Crimson Theme with Interactive Pricing & bKash/Nagad Payment Selector
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --auth-inst-primary: #E11D48;          /* Rose/Crimson Institute Primary */
    --auth-inst-dark: #BE123C;
    --auth-inst-light: #FFE4E6;
    --auth-inst-glow: rgba(225, 29, 72, 0.28);
    
    --auth-amber: #D97706;
    --auth-indigo: #4F46E5;
    
    --auth-bg-page: #0F172A;
    --auth-surface: #FFFFFF;
    --auth-surface-soft: #F8FAFC;
    --auth-border: #E2E8F0;
    --auth-border-focus: #E11D48;
    
    --auth-text-dark: #0F172A;
    --auth-text-muted: #475569;
    --auth-text-subtle: #94A3B8;
    
    --auth-danger: #EF4444;
    --auth-success: #10B981;

    --auth-font-bn: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif;
    --auth-shadow-card: 0 25px 50px -12px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(226, 232, 240, 0.8);
    --auth-shadow-glow: 0 12px 30px rgba(225, 29, 72, 0.28);
}

/* Base Body Auth Override */
body.auth-page {
    min-height: 100vh;
    background: #0F172A;
    background-image: 
        radial-gradient(at 10% 10%, rgba(225, 29, 72, 0.25) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(79, 70, 229, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(217, 119, 6, 0.15) 0px, transparent 50%);
    font-family: var(--auth-font-bn);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    color: var(--auth-text-dark);
    -webkit-font-smoothing: antialiased;
}

/* Header Navbar for Auth Pages */
.auth-navbar {
    width: 100%;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.auth-logo-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #E11D48, #D97706);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.4);
    animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(225, 29, 72, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 28px rgba(225, 29, 72, 0.6); }
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
}

.auth-brand-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.auth-brand-subtitle {
    font-size: 12px;
    font-weight: 600;
    color: #FB7185;
    letter-spacing: 0.5px;
}

.auth-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.auth-nav-link:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Main Container Layout */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
}

.auth-card-container {
    width: 100%;
    background: #FFFFFF;
    border-radius: 28px;
    box-shadow: var(--auth-shadow-card);
    display: grid;
    grid-template-columns: 1.05fr 1.2fr;
    overflow: hidden;
    min-height: 660px;
    position: relative;
    animation: cardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left Hero Banner Side (Desktop) */
.auth-hero-side {
    background: linear-gradient(135deg, #881337 0%, #0F172A 100%);
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
}

.auth-hero-side::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatGlow 8s infinite alternate ease-in-out;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, 30px); }
}

.auth-hero-content {
    position: relative;
    z-index: 2;
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(251, 113, 133, 0.18);
    border: 1px solid rgba(253, 164, 175, 0.4);
    border-radius: 9999px;
    color: #FDA4AF;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.auth-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
    color: #FFFFFF;
}

.auth-hero-title span {
    background: linear-gradient(135deg, #FDA4AF, #FCD34D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero-desc {
    font-size: 15px;
    color: #CBD5E1;
    line-height: 1.6;
    margin-bottom: 24px;
}

.auth-hero-banner-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    max-height: 240px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.auth-hero-banner-img:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(225, 29, 72, 0.38);
}

.auth-hero-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #E2E8F0;
}

.auth-feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(225, 29, 72, 0.28);
    border: 1px solid rgba(253, 164, 175, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FDA4AF;
    font-size: 16px;
    flex-shrink: 0;
}

/* Mobile Top Banner Card */
.mobile-hero-banner-card {
    display: none;
    width: 100%;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.mobile-hero-banner-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.mobile-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(136, 19, 55, 0.92) 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #FFFFFF;
}

.mobile-hero-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #FFFFFF;
}

.mobile-hero-title span {
    color: #FDA4AF;
}

.mobile-hero-desc {
    font-size: 12px;
    color: #E2E8F0;
    line-height: 1.4;
}

/* Right Form Side */
.auth-form-side {
    padding: 44px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #FFFFFF;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--auth-text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-form-subtitle {
    font-size: 14px;
    color: var(--auth-text-muted);
}

/* Registration Multi-Step Progress Tracker */
.wizard-steps-container {
    margin-bottom: 28px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 19px;
    left: 0;
    right: 0;
    height: 4px;
    background: #F1F5F9;
    border-radius: 9999px;
    z-index: 1;
}

.wizard-progress-bar {
    position: absolute;
    top: 19px;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #E11D48, #D97706);
    border-radius: 9999px;
    z-index: 2;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0%;
}

.wizard-step-item {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    color: #94A3B8;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.wizard-step-item.active .step-circle {
    border-color: #E11D48;
    background: #E11D48;
    color: #FFFFFF;
    box-shadow: var(--auth-shadow-glow);
    transform: scale(1.12);
}

.wizard-step-item.completed .step-circle {
    border-color: #E11D48;
    background: #FFE4E6;
    color: #E11D48;
    animation: checkPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes checkPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.step-label {
    font-size: 12px;
    font-weight: 700;
    color: #94A3B8;
    transition: color 0.3s ease;
}

.wizard-step-item.active .step-label {
    color: #E11D48;
}

.wizard-step-item.completed .step-label {
    color: #BE123C;
}

/* Form Steps */
.wizard-form-step {
    display: none;
}

.wizard-form-step.active {
    display: block;
    animation: slideInStep 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInStep {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Input Fields & Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid.single {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label span.req {
    color: var(--auth-danger);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #94A3B8;
    font-size: 18px;
    pointer-events: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--auth-font-bn);
    color: var(--auth-text-dark);
    transition: all 0.25s ease;
}

.form-control.no-icon {
    padding-left: 16px;
}

.form-control:focus {
    background: #FFFFFF;
    border-color: var(--auth-inst-primary);
    box-shadow: 0 0 0 4px var(--auth-inst-glow);
    outline: none;
}

.form-control:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--auth-inst-primary);
    transform: scale(1.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
}

/* PRICING PLAN SELECTOR CARDS (STEP 3) */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.pricing-card {
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 18px;
    padding: 20px 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card:hover {
    border-color: #FB7185;
    background: #FFF1F2;
}

.pricing-card.selected {
    border-color: #E11D48;
    background: #FFE4E6;
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.22);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 14px;
    background: linear-gradient(135deg, #E11D48, #D97706);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

.pricing-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 4px;
}

.pricing-price {
    font-size: 24px;
    font-weight: 800;
    color: #E11D48;
    margin-bottom: 4px;
}

.pricing-subtext {
    font-size: 12px;
    color: #64748B;
    font-weight: 600;
}

/* PAYMENT GATEWAY SELECTOR CARDS (STEP 4) */
.gateway-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.gateway-card {
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gateway-card:hover {
    border-color: #E11D48;
}

.gateway-card.selected {
    border-color: #E11D48;
    background: #FFE4E6;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.2);
}

.gateway-logo {
    font-size: 22px;
    margin-bottom: 4px;
}

.gateway-name {
    font-size: 13px;
    font-weight: 800;
    color: #0F172A;
}

.payment-instruction-box {
    background: #FFFBEB;
    border: 1.5px solid #FDE68A;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13px;
    color: #92400E;
    line-height: 1.6;
    margin-bottom: 18px;
}

.merchant-num-badge {
    display: inline-block;
    background: #D97706;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Password Toggle Icon */
.toggle-password-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: color 0.2s ease;
}

.toggle-password-btn:hover {
    color: var(--auth-inst-primary);
}

/* Summary Review Box */
.summary-box {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 14px;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-key {
    color: var(--auth-text-muted);
    font-weight: 600;
}

.summary-val {
    color: var(--auth-text-dark);
    font-weight: 700;
}

/* Form Action Buttons */
.auth-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-auth-primary {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, #E11D48, #BE123C);
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--auth-font-bn);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--auth-shadow-glow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-primary:hover {
    background: linear-gradient(135deg, #BE123C, #881337);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(225, 29, 72, 0.38);
}

.btn-auth-secondary {
    padding: 14px 20px;
    background: #F1F5F9;
    color: var(--auth-text-dark);
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--auth-font-bn);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-auth-secondary:hover {
    background: #E2E8F0;
}

.btn-auth-demo {
    width: 100%;
    margin-top: 14px;
    padding: 12px 18px;
    background: #EFF6FF;
    border: 1.5px dashed #3B82F6;
    border-radius: 14px;
    color: #1D4ED8;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--auth-font-bn);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-auth-demo:hover {
    background: #DBEAFE;
    transform: translateY(-1px);
}

/* Footer Switch Link */
.auth-footer-text {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--auth-text-muted);
}

.auth-footer-text a {
    color: var(--auth-inst-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

/* Error Toast / Alert */
.auth-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: alertPop 0.3s ease-out;
}

@keyframes alertPop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-alert.danger {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    display: flex;
}

.auth-alert.success {
    background: #FFE4E6;
    border: 1px solid #FDA4AF;
    color: #BE123C;
    display: flex;
}

/* Modal Dialog for Forgot Password */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.auth-modal-overlay.active {
    display: flex;
}

.auth-modal-card {
    background: #FFFFFF;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #F1F5F9;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748B;
    font-size: 16px;
    transition: background 0.2s ease;
}

.auth-modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
}

/* ==========================================================================
   RESPONSIVE DESIGN FOR ALL MOBILE SCREENS (320px to 992px)
   ========================================================================== */
@media (max-width: 992px) {
    .auth-card-container {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }
    
    .auth-hero-side {
        display: none;
    }
    
    .mobile-hero-banner-card {
        display: block;
    }

    .auth-form-side {
        padding: 28px 24px;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 76px 12px 24px;
    }

    .auth-navbar {
        padding: 14px 16px;
    }

    .auth-brand-title {
        font-size: 19px;
    }

    .auth-logo-badge {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 12px;
    }

    .auth-nav-link {
        padding: 8px 14px;
        font-size: 12px;
    }

    .auth-form-title {
        font-size: 22px;
    }

    .auth-form-subtitle {
        font-size: 13px;
    }

    .form-grid, .pricing-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gateway-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
    }

    .wizard-steps {
        gap: 4px;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .step-label {
        font-size: 10px;
    }

    .form-control {
        padding: 12px 14px 12px 42px;
        font-size: 14px;
    }

    .input-icon {
        left: 14px;
        font-size: 16px;
    }

    .btn-auth-primary {
        padding: 12px 18px;
        font-size: 15px;
    }
}
