/* ==========================================================================
   DFINPE Web App Integration Styles
   Auth Modals, Recharge Portal, Product Forms, and User Dashboard
   ========================================================================== */

/* User Nav Profile & Actions */
.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    text-decoration: none;
}
.btn-login-header {
    background: linear-gradient(135deg, #0F4C81, #18A0FB);
    color: #fff;
    box-shadow: 0 4px 15px rgba(24, 160, 251, 0.3);
}
.btn-login-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 160, 251, 0.45);
}

.user-profile-menu {
    position: relative;
    display: inline-block;
}
.user-badge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(15, 76, 129, 0.08);
    border: 1px solid rgba(24, 160, 251, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    transition: var(--transition-fast);
}
.user-badge-header:hover {
    background: rgba(15, 76, 129, 0.15);
}
.user-avatar-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0F4C81, #18A0FB);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* User Dropdown Menu */
.user-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 230px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(15, 76, 129, 0.15);
    border: 1px solid #E2E8F0;
    padding: 10px 0;
    z-index: 1100;
}
.user-dropdown-panel.show {
    display: block;
    animation: fadeInDown 0.25s ease-out;
}
.user-dropdown-panel a, .user-dropdown-panel button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}
.user-dropdown-panel a:hover, .user-dropdown-panel button:hover {
    background: #F1F5F9;
    color: var(--secondary);
}
.dropdown-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 6px 0;
}

/* Modal Overlay & Card System */
.dfin-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}
.dfin-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.25s ease-out;
}

.dfin-modal-card {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    position: relative;
    box-shadow: 0 25px 60px rgba(15, 76, 129, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dfin-modal-card.modal-lg {
    max-width: 720px;
}
.dfin-modal-card.modal-xl {
    max-width: 950px;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #64748B;
    transition: all 0.2s;
}
.modal-close-btn:hover {
    background: #E2E8F0;
    color: #0F172A;
    transform: rotate(90deg);
}

.modal-header-block {
    text-align: center;
    margin-bottom: 24px;
}
.modal-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(24, 160, 251, 0.2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 14px;
    color: var(--primary);
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
.modal-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* Form Controls */
.form-group-dfin {
    margin-bottom: 20px;
    text-align: left;
}
.form-label-dfin {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.input-group-dfin {
    position: relative;
    display: flex;
    align-items: center;
}
.input-addon-flag {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #475569;
    border-right: 1px solid #CBD5E1;
    padding-right: 10px;
}
.input-dfin {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.25s;
    background: #F8FAFC;
    color: #0F172A;
}
.input-dfin.with-addon {
    padding-left: 92px;
}
.input-dfin:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(24, 160, 251, 0.15);
}

/* OTP Digits Inputs */
.otp-inputs-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.otp-box {
    width: 50px;
    height: 56px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    background: #F8FAFC;
    transition: all 0.2s;
}
.otp-box:focus {
    border-color: var(--secondary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(24, 160, 251, 0.15);
}

.btn-dfin-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0F4C81, #18A0FB);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(15, 76, 129, 0.25);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-dfin-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(24, 160, 251, 0.4);
}
.btn-dfin-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.modal-notice-text {
    font-size: 0.82rem;
    color: #94A3B8;
    text-align: center;
    margin-top: 14px;
}
.modal-notice-text a {
    color: var(--secondary);
    text-decoration: underline;
}

/* Interactive Recharge Live Panel on Landing Page */
.recharge-widget-container {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(15, 76, 129, 0.1);
    border: 1px solid #E2E8F0;
    margin: 40px auto 20px;
    max-width: 950px;
}
.recharge-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 16px;
}
.recharge-steps-indicator {
    display: flex;
    gap: 24px;
}
.step-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #94A3B8;
}
.step-bubble.active {
    color: var(--primary);
}
.step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.step-bubble.active .step-num {
    background: var(--secondary);
    color: #fff;
}

.recharge-form-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 16px;
    align-items: flex-end;
}
@media (max-width: 850px) {
    .recharge-form-grid {
        grid-template-columns: 1fr;
    }
}

.operator-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1D4ED8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 6px;
}

/* Plans Filter & Grid */
.plans-filter-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin: 20px 0;
}
.plan-tab-pill {
    padding: 8px 16px;
    border-radius: 50px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.plan-tab-pill.active, .plan-tab-pill:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.plans-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    max-height: 480px;
    overflow-y: auto;
    padding: 6px;
}
.plan-card-item {
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s;
    cursor: pointer;
    position: relative;
}
.plan-card-item:hover {
    border-color: var(--secondary);
    box-shadow: 0 8px 25px rgba(24, 160, 251, 0.15);
    transform: translateY(-2px);
}
.plan-card-item.selected {
    border-color: var(--secondary);
    background: #F8FAFC;
    box-shadow: 0 0 0 3px rgba(24, 160, 251, 0.2);
}
.plan-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.plan-price-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}
.plan-validity-badge {
    background: #FEF3C7;
    color: #92400E;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}
.plan-desc-text {
    font-size: 0.88rem;
    color: #64748B;
    line-height: 1.45;
    margin-bottom: 14px;
    flex-grow: 1;
}

/* User Dashboard & Drawer */
.user-dashboard-banner {
    background: linear-gradient(135deg, #0F4C81, #18A0FB);
    color: #fff;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.user-wallet-stat {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 4px;
}

/* Transaction List Table */
.tx-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 16px;
}
.tx-history-table th {
    background: #F8FAFC;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #E2E8F0;
}
.tx-history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #F1F5F9;
    color: #1E293B;
}
.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-success {
    background: #DCFCE7;
    color: #166534;
}
.status-pending {
    background: #FEF3C7;
    color: #92400E;
}
.status-failed {
    background: #FEE2E2;
    color: #991B1B;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
