/* ===================================================================
   OFS Customer Portal — Frontend Styles
   Version: 1.1.0  (Brand refresh — OFS green #8dc63f + purple #8b2082)
   =================================================================== */

/* ---- Reset / Base ---- */
.ofs-portal-wrap *,
.ofs-portal-wrap *::before,
.ofs-portal-wrap *::after {
    box-sizing: border-box;
}

.ofs-portal-wrap {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* ---- Typography ---- */
.ofs-portal-wrap h1,
.ofs-portal-wrap h2,
.ofs-portal-wrap h3 {
    margin: 0 0 12px;
    color: #1a0d24;
    font-weight: 700;
}

/* ---- Brand Colours ---- */
:root {
    --ofs-primary:      #8b2082;   /* OFS purple  */
    --ofs-secondary:    #8dc63f;   /* OFS green   */
    --ofs-primary-dark: #6a1863;
    --ofs-primary-light:#b03eaa;
    --ofs-secondary-dark:#6ea02e;
    --ofs-accent:       #8dc63f;   /* green used as accent */
    --ofs-success:      #16a34a;
    --ofs-danger:       #dc2626;
    --ofs-warning:      #d97706;
    --ofs-light-bg:     #f9f5fc;   /* soft purple tint */
    --ofs-border:       #e8d6e8;
    --ofs-card-bg:      #ffffff;
    --ofs-text-muted:   #6b7280;
    --ofs-radius:       12px;
    --ofs-shadow:       0 2px 16px rgba(139,32,130,.09);
    --ofs-gradient:     linear-gradient(135deg, #8b2082 0%, #6a1863 60%, #3d0c3a 100%);
    --ofs-gradient-alt: linear-gradient(135deg, #8dc63f 0%, #6ea02e 100%);
}

/* ================================================================
   LOGIN PAGE  —  full-page background with brand gradient
   ================================================================ */

.ofs-portal-wrap.ofs-login-page {
    max-width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background: var(--ofs-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* decorative accent blobs */
.ofs-portal-wrap.ofs-login-page::before,
.ofs-portal-wrap.ofs-login-page::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.ofs-portal-wrap.ofs-login-page::before {
    width: 520px;
    height: 520px;
    background: rgba(141,198,63,.18);
    top: -160px;
    right: -120px;
    filter: blur(60px);
}
.ofs-portal-wrap.ofs-login-page::after {
    width: 380px;
    height: 380px;
    background: rgba(255,255,255,.06);
    bottom: -100px;
    left: -80px;
    filter: blur(50px);
}

.ofs-auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* Logo section */
.ofs-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.ofs-auth-logo .ofs-logo-img {
    width: auto;
    height: 72px;
    max-width: 240px;
    object-fit: contain;
    display: block;
    margin: 0 auto 14px;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,.25));
}

.ofs-auth-logo h2 {
    display: none; /* hidden: logo itself carries the brand name */
}

.ofs-auth-tagline {
    color: rgba(255,255,255,.82);
    font-size: .88rem;
    letter-spacing: .04em;
    margin: 0;
}

/* Auth card */
.ofs-auth-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 4px 16px rgba(139,32,130,.14);
    overflow: hidden;
}

/* Tab switcher */
.ofs-auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--ofs-border);
}

.ofs-auth-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--ofs-text-muted);
    background: none;
    border: none;
    font-size: 0.95rem;
    transition: all .2s;
}

.ofs-auth-tab.active {
    color: var(--ofs-primary);
    border-bottom: 3px solid var(--ofs-primary);
    margin-bottom: -2px;
}

.ofs-auth-body {
    padding: 32px 28px;
}

.ofs-auth-panel {
    display: none;
}

.ofs-auth-panel.active {
    display: block;
}

/* Footer copyright */
.ofs-auth-footer-copy {
    text-align: center;
    color: rgba(255,255,255,.5);
    font-size: .77rem;
    margin-top: 20px;
}

/* ================================================================
   FORM ELEMENTS  (shared login + dashboard)
   ================================================================ */

.ofs-form-group {
    margin-bottom: 18px;
}

.ofs-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.ofs-form-group label .req {
    color: var(--ofs-danger);
    margin-left: 2px;
}

.ofs-form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--ofs-border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1a1a2e;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.ofs-form-control:focus {
    border-color: var(--ofs-primary);
    box-shadow: 0 0 0 3px rgba(139,32,130,.12);
}

.ofs-form-control::placeholder {
    color: #adb5bd;
}

select.ofs-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ================================================================
   BUTTONS
   ================================================================ */

.ofs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
}

.ofs-btn-primary {
    background: var(--ofs-primary);
    color: #fff;
}
.ofs-btn-primary:hover {
    background: var(--ofs-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(139,32,130,.35);
}

.ofs-btn-accent {
    background: var(--ofs-secondary);
    color: #fff;
}
.ofs-btn-accent:hover {
    background: var(--ofs-secondary-dark);
}

.ofs-btn-outline {
    background: transparent;
    border: 1.5px solid var(--ofs-primary);
    color: var(--ofs-primary);
}
.ofs-btn-outline:hover {
    background: var(--ofs-primary);
    color: #fff;
}

.ofs-btn-danger {
    background: var(--ofs-danger);
    color: #fff;
}

.ofs-btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}

.ofs-btn-block {
    width: 100%;
}

.ofs-btn:disabled,
.ofs-btn.loading {
    opacity: .65;
    cursor: not-allowed;
}

/* ================================================================
   ALERTS / NOTICES
   ================================================================ */

.ofs-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: none;
}

.ofs-alert.show {
    display: block;
}

.ofs-alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.ofs-alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.ofs-alert-info {
    background: #f3e8fb;
    color: var(--ofs-primary);
    border: 1px solid #d8b4e8;
}

.ofs-alert-warning {
    background: #fef9c3;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ================================================================
   SPINNER
   ================================================================ */

.ofs-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ofs-spin .7s linear infinite;
    display: none;
}

.ofs-btn.loading .ofs-spinner {
    display: inline-block;
}

@keyframes ofs-spin {
    to { transform: rotate(360deg); }
}

/* ================================================================
   DASHBOARD LAYOUT
   ================================================================ */

.ofs-dashboard {
    display: grid;
    grid-template-columns: 268px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .ofs-dashboard {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   SIDEBAR  — brand gradient header
   ================================================================ */

.ofs-sidebar {
    background: var(--ofs-card-bg);
    border-radius: var(--ofs-radius);
    box-shadow: var(--ofs-shadow);
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.ofs-sidebar-header {
    background: var(--ofs-gradient);
    color: #fff;
    padding: 18px 16px 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* subtle green circle accent in header */
.ofs-sidebar-header::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    background: rgba(141,198,63,.15);
    border-radius: 50%;
    bottom: -70px;
    right: -40px;
    pointer-events: none;
}

/* ---- Avatar ---- */
.ofs-sidebar-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

.ofs-sidebar-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.15);
    display: block;
}

.ofs-sidebar-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: rgba(255,255,255,.85);
    border: 3px solid rgba(255,255,255,.3);
}

/* small green "change photo" badge over avatar */
.ofs-avatar-change-btn {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    background: var(--ofs-secondary);
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .65rem;
    color: #fff;
    line-height: 1;
    transition: background .2s;
    text-decoration: none;
}
.ofs-avatar-change-btn:hover {
    background: var(--ofs-secondary-dark);
}

.ofs-sidebar-name {
    font-size: .9rem;
    font-weight: 700;
    margin: 0 0 2px;
    position: relative;
    z-index: 1;
}

.ofs-sidebar-id {
    font-size: 0.72rem;
    opacity: .75;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Sidebar logo strip — hidden by default on ALL screen sizes.
   customer-portal-mobile.css adds .logo-loaded via JS only when the
   image URL resolves, preventing the empty rectangle when no logo
   is configured. Desktop guard is also applied in the same file. */
.ofs-sidebar-logo {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px 20px 0;
    position: relative;
    z-index: 1;
}
.ofs-sidebar-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(.55);
}

/* ---- Nav ---- */
.ofs-sidebar-nav {
    padding: 10px 0;
}

.ofs-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #374151;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: all .15s;
    text-decoration: none;
}

.ofs-nav-item:hover {
    background: var(--ofs-light-bg);
    color: var(--ofs-primary);
}

.ofs-nav-item.active {
    background: #f5e9f9;
    color: var(--ofs-primary);
    font-weight: 700;
    border-left: 3px solid var(--ofs-primary);
}

.ofs-nav-item .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.ofs-nav-item .nav-badge {
    margin-left: auto;
    background: var(--ofs-secondary);
    color: #fff;
    border-radius: 10px;
    font-size: 0.7rem;
    padding: 2px 7px;
    font-weight: 700;
}

.ofs-sidebar-footer {
    border-top: 1px solid var(--ofs-border);
    padding: 10px 0;
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */

.ofs-main {
    min-height: 500px;
}

.ofs-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ofs-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ofs-primary);
    margin: 0;
}

.ofs-panel {
    display: none;
}

.ofs-panel.active {
    display: block;
}

/* ================================================================
   CARDS
   ================================================================ */

.ofs-card {
    background: var(--ofs-card-bg);
    border-radius: var(--ofs-radius);
    box-shadow: var(--ofs-shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.ofs-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ofs-primary);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ofs-border);
}

/* ================================================================
   STATS GRID
   ================================================================ */

.ofs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.ofs-stat-card {
    background: var(--ofs-card-bg);
    border-radius: var(--ofs-radius);
    box-shadow: var(--ofs-shadow);
    padding: 20px;
    text-align: center;
    border-top: 4px solid var(--ofs-primary);
}

.ofs-stat-card.accent {
    border-top-color: var(--ofs-secondary);
}

.ofs-stat-card.success {
    border-top-color: var(--ofs-success);
}

.ofs-stat-card.danger {
    border-top-color: var(--ofs-danger);
}

.ofs-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ofs-primary);
    margin-bottom: 4px;
}

.ofs-stat-label {
    font-size: 0.78rem;
    color: var(--ofs-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

/* ================================================================
   TABLE
   ================================================================ */

.ofs-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--ofs-border);
}

.ofs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ofs-table thead tr {
    background: var(--ofs-primary);
    color: #fff;
}

.ofs-table thead th {
    padding: 12px 14px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.ofs-table tbody tr {
    border-bottom: 1px solid var(--ofs-border);
}

.ofs-table tbody tr:last-child {
    border-bottom: none;
}

.ofs-table tbody tr:hover {
    background: var(--ofs-light-bg);
}

.ofs-table td {
    padding: 11px 14px;
    color: #374151;
}

.ofs-table .amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ofs-table .amount.credit {
    color: var(--ofs-success);
}

.ofs-table .amount.debit {
    color: var(--ofs-danger);
}

/* ================================================================
   BADGES
   ================================================================ */

.ofs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: capitalize;
}

.badge-active,
.badge-paid {
    background: #dcfce7;
    color: #15803d;
}

.badge-pending {
    background: #fef9c3;
    color: #92400e;
}

.badge-overdue,
.badge-rejected,
.badge-defaulter {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-closed,
.badge-fully-paid {
    background: #e5e7eb;
    color: #4b5563;
}

.badge-approved {
    background: #f0d6f5;
    color: var(--ofs-primary);
}

/* ================================================================
   EMPTY STATE
   ================================================================ */

.ofs-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--ofs-text-muted);
}

.ofs-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: .4;
}

.ofs-empty-state p {
    margin: 0 0 16px;
    font-size: 0.95rem;
}

/* ================================================================
   PROFILE PHOTO — sidebar + profile panel
   ================================================================ */

.ofs-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ofs-profile-grid {
        grid-template-columns: 1fr;
    }
}

.ofs-profile-photo-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--ofs-light-bg);
    border-radius: 10px;
    border: 1px solid var(--ofs-border);
}

.ofs-profile-photo-wrap img#ofs-passport-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--ofs-primary);
    box-shadow: 0 2px 10px rgba(139,32,130,.2);
    flex-shrink: 0;
}

.ofs-profile-photo-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #ede0f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    border: 3px solid var(--ofs-primary);
    flex-shrink: 0;
}

.ofs-profile-photo-info {
    flex: 1;
}

.ofs-profile-photo-info strong {
    display: block;
    font-size: .9rem;
    color: #374151;
    margin-bottom: 4px;
}

/* ================================================================
   LOAN CARD ACCORDION
   ================================================================ */

.ofs-loan-card {
    border: 1px solid var(--ofs-border);
    border-radius: var(--ofs-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.ofs-loan-card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ofs-light-bg);
    cursor: pointer;
    gap: 12px;
    flex-wrap: wrap;
}

.ofs-loan-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ofs-primary);
}

.ofs-loan-card-meta {
    font-size: 0.8rem;
    color: var(--ofs-text-muted);
    margin-top: 2px;
}

.ofs-loan-card-body {
    display: none;
    padding: 20px;
    border-top: 1px solid var(--ofs-border);
}

.ofs-loan-card-body.open {
    display: block;
}

.ofs-loan-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ofs-loan-detail-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ofs-text-muted);
    margin-bottom: 3px;
}

.ofs-loan-detail-item span {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a2e;
}

/* ================================================================
   PROGRESS BAR
   ================================================================ */

.ofs-progress-wrap {
    margin-bottom: 20px;
}

.ofs-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--ofs-text-muted);
    margin-bottom: 6px;
}

.ofs-progress-bar {
    height: 8px;
    background: var(--ofs-border);
    border-radius: 4px;
    overflow: hidden;
}

.ofs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ofs-primary), var(--ofs-secondary));
    border-radius: 4px;
    transition: width .5s;
}

/* ================================================================
   MODAL
   ================================================================ */

.ofs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ofs-modal-overlay.open {
    display: flex;
}

.ofs-modal {
    background: #fff;
    border-radius: var(--ofs-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.ofs-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--ofs-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--ofs-gradient);
    color: #fff;
    border-radius: var(--ofs-radius) var(--ofs-radius) 0 0;
}

.ofs-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.ofs-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: rgba(255,255,255,.8);
    padding: 0;
    line-height: 1;
}

.ofs-modal-body {
    padding: 24px;
}

.ofs-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ofs-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ================================================================
   PHONE UPDATE NOTICE
   ================================================================ */

.ofs-phone-notice {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: var(--ofs-radius);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ofs-phone-notice .notice-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.ofs-phone-notice h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: #92400e;
}

.ofs-phone-notice p {
    margin: 0 0 12px;
    font-size: 0.875rem;
    color: #78350f;
}

/* ================================================================
   LOAN APPLICATION FORM
   ================================================================ */

.ofs-loan-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ofs-loan-form-grid {
        grid-template-columns: 1fr;
    }
    .ofs-dashboard {
        gap: 12px;
    }
}

.ofs-col-full {
    grid-column: 1 / -1;
}

/* ================================================================
   MISC
   ================================================================ */

.ofs-section-divider {
    border: none;
    border-top: 1px solid var(--ofs-border);
    margin: 20px 0;
}

.ofs-subtabs-container {
    margin-top: 16px;
}

.ofs-subtabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--ofs-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ofs-subtab {
    padding: 9px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--ofs-text-muted);
    border-radius: 6px 6px 0 0;
    transition: all .15s;
}

.ofs-subtab.active {
    background: var(--ofs-primary);
    color: #fff;
}

.ofs-subtab-panel {
    display: none;
}

.ofs-subtab-panel.active {
    display: block;
}

.ofs-hint {
    font-size: 0.78rem;
    color: var(--ofs-text-muted);
    margin-top: 4px;
}

@media (max-width: 480px) {
    .ofs-table {
        font-size: 0.78rem;
    }
    .ofs-table td,
    .ofs-table th {
        padding: 9px 10px;
    }
}


/* ================================================================
   IMPROVEMENTS v2.7.9.2
   ================================================================ */

/* FIX 2: Next payment due card */
.ofs-next-due-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--ofs-radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ofs-next-due-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.ofs-next-due-body {
    flex: 1;
    min-width: 160px;
}
.ofs-next-due-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.ofs-next-due-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}
.ofs-next-due-meta {
    font-size: .78rem;
    color: var(--ofs-text-muted);
}

/* FIX 4: Schedule table row states */
.ofs-table tr.ofs-row-overdue {
    background: #fff1f1;
    border-left: 3px solid var(--ofs-danger) !important;
}
.ofs-table tr.ofs-row-overdue td {
    color: #7f1d1d;
}
.ofs-table tr.ofs-row-paid {
    opacity: .6;
}

/* FIX 5: Loan application confirmation card */
.ofs-apply-confirm-card {
    background: var(--ofs-light-bg);
    border: 1.5px solid var(--ofs-border);
    border-radius: var(--ofs-radius);
    padding: 24px;
    text-align: center;
}
.ofs-apply-confirm-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* FIX 6: Profile last-saved timestamp */
.ofs-profile-saved-ts {
    font-size: .82rem;
    color: var(--ofs-success);
    font-weight: 500;
}

/* FIX 3: Lazy loading placeholder */
.ofs-lazy-placeholder {
    display: flex;
    align-items: center;
    padding: 16px 0;
}

/* FIX 8: Banking subtab panel — remove double top radius when card sits under tabs */
.ofs-subtabs-container > .ofs-subtab-panel > .ofs-card {
    border-radius: 0 var(--ofs-radius) var(--ofs-radius) var(--ofs-radius);
}

/* FIX 9: Session info row */
.ofs-session-info {
    border: 1px solid var(--ofs-border);
    border-radius: var(--ofs-radius);
    overflow: hidden;
}
.ofs-session-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--ofs-light-bg);
}
.ofs-session-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}
.ofs-session-details {
    display: flex;
    flex-direction: column;
    font-size: .875rem;
}
.ofs-session-details strong {
    font-size: .9rem;
}
.ofs-session-details span {
    font-size: .78rem;
    color: var(--ofs-text-muted);
    margin-top: 2px;
}

/* FIX 10: New customer welcome banner */
.ofs-new-customer-banner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f5e9f9 0%, #ede0f7 100%);
    border: 1.5px solid var(--ofs-border);
    border-radius: var(--ofs-radius);
    padding: 20px;
    margin-bottom: 24px;
}
.ofs-new-customer-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.ofs-new-customer-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ofs-primary);
    margin: 0 0 6px;
}
.ofs-new-customer-body p {
    font-size: .875rem;
    color: #374151;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .ofs-new-customer-banner {
        flex-direction: column;
        gap: 10px;
    }
    .ofs-next-due-card {
        padding: 12px 14px;
    }
    .ofs-next-due-amount {
        font-size: 1.1rem;
    }
    .ofs-session-row {
        flex-wrap: wrap;
    }
}

/* ── Overdue stat card (danger variant) ─────────────────────────── */
.ofs-stat-card.danger {
    border-top: 3px solid var(--ofs-danger);
}
.ofs-stat-card.danger .ofs-stat-value {
    color: var(--ofs-danger);
}
.ofs-stat-card.danger .ofs-stat-label {
    color: var(--ofs-danger);
    opacity: .8;
}

/* ── Profile gate card on Apply panel ───────────────────────────── */
.ofs-profile-gate-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-left: 4px solid var(--ofs-primary) !important;
}
.ofs-profile-gate-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 2px;
}
@media (max-width: 480px) {
    .ofs-profile-gate-card {
        flex-direction: column;
        gap: 10px;
    }
}


/* ================================================================
   PAYMENT ALERT BANNERS  (overdue + upcoming)
   ================================================================ */

.ofs-alert-section {
    border-radius: var(--ofs-radius);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

/* ── Section header bar ── */
.ofs-alert-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: .875rem;
    font-weight: 500;
}

.ofs-alert-section-header--danger {
    background: #fef2f2;
    color: #991b1b;
    border-bottom: 1px solid #fecaca;
}
.ofs-alert-section-header--danger strong { color: #7f1d1d; }

.ofs-alert-section-header--info {
    background: #eff6ff;
    color: #1e40af;
    border-bottom: 1px solid #bfdbfe;
}
.ofs-alert-section-header--info strong { color: #1e3a8a; }

.ofs-alert-section-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ── Individual alert item rows ── */
.ofs-alert-items {
    background: #fff;
    border: 1px solid transparent;
}

.ofs-alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}
.ofs-alert-item:last-child { border-bottom: none; }

/* Danger — overdue */
.ofs-alert-section:has(.ofs-alert-item--danger) {
    border-color: #fca5a5;
}
.ofs-alert-item--danger {
    background: #fff;
    border-left: 4px solid var(--ofs-danger);
}
.ofs-alert-item--danger:hover { background: #fff5f5; }
.ofs-alert-item--danger .ofs-alert-item-amount { color: var(--ofs-danger); }

/* Warning — due today or ≤3 days */
.ofs-alert-section:has(.ofs-alert-item--warn) {
    border-color: #fcd34d;
}
.ofs-alert-item--warn {
    border-left: 4px solid var(--ofs-warning);
}
.ofs-alert-item--warn:hover { background: #fffbeb; }
.ofs-alert-item--warn .ofs-alert-item-amount { color: #92400e; }

/* Soon — ≤7 days */
.ofs-alert-item--soon {
    border-left: 4px solid #f59e0b;
}
.ofs-alert-item--soon:hover { background: #fffbeb; }

/* Upcoming — 8-30 days */
.ofs-alert-section:has(.ofs-alert-item--upcoming) {
    border-color: #bfdbfe;
}
.ofs-alert-item--upcoming {
    border-left: 4px solid #3b82f6;
}
.ofs-alert-item--upcoming:hover { background: #eff6ff; }

/* Content within items */
.ofs-alert-item-left { flex: 1; min-width: 0; }

.ofs-alert-item-title {
    font-size: .875rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.ofs-alert-item-meta {
    font-size: .78rem;
    color: var(--ofs-text-muted);
}
.ofs-alert-item-meta strong { color: #374151; }

.ofs-alert-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ofs-alert-item-amount {
    font-size: .95rem;
    font-weight: 700;
    min-width: 90px;
    text-align: right;
}

/* Pulse animation on the danger header icon for overdue */
@keyframes ofs-pulse-danger {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .7; transform: scale(1.18); }
}
.ofs-alert-section-header--danger .ofs-alert-section-icon {
    animation: ofs-pulse-danger 1.6s ease-in-out infinite;
}

/* Link-style button for "view all loans" */
.ofs-btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--ofs-primary);
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}
.ofs-btn-link:hover { color: var(--ofs-primary-dark); }

/* Mobile adjustments */
@media (max-width: 480px) {
    .ofs-alert-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    .ofs-alert-item-right {
        width: 100%;
        justify-content: space-between;
    }
    .ofs-alert-item-amount {
        min-width: auto;
        text-align: left;
    }
    .ofs-alert-section-header {
        font-size: .82rem;
        padding: 10px 14px;
    }
}

/* ==========================================================================
   v3.0.0 — Paystack Modal + 2FA + OTP verification
   ========================================================================== */

/* Modal backdrop */
.ofs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}

/* Modal box */
.ofs-modal-backdrop .ofs-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: ofs-modal-in .18s ease;
}
@keyframes ofs-modal-in {
    from { opacity:0; transform:scale(.96) translateY(12px); }
    to   { opacity:1; transform:scale(1)   translateY(0); }
}

/* Keep existing schedule modal working */
.ofs-modal-overlay .ofs-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.ofs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
}
.ofs-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}
.ofs-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s;
}
.ofs-modal-close:hover { background: #f3f4f6; color: #111; }

.ofs-modal-body {
    padding: 20px;
}
.ofs-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Quick amount buttons */
.ofs-quick-amount:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
}

/* Wallet badge on resolved account name */
#ofs-resolved-name {
    padding: 6px 10px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: .875rem;
}

/* 2FA wrap in login */
#ofs-2fa-wrap {
    animation: ofs-fade-in .2s ease;
}
@keyframes ofs-fade-in {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
}

/* OTP input styling */
input[inputmode="numeric"].ofs-form-control {
    font-family: 'Courier New', monospace;
}

/* Phone verified badge */
#ofs-phone-verified-badge {
    padding: 6px 12px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    font-size: .875rem;
}

/* 2FA settings card toggle */
#ofs-2fa-disable-confirm {
    animation: ofs-fade-in .18s ease;
}

/* Wallet gradient card text contrast */
.ofs-panel #ofs-wallet-display {
    font-variant-numeric: tabular-nums;
}

/* Status badge for transactions */
.ofs-badge.badge-success    { background:#dcfce7;color:#166534; }
.ofs-badge.badge-pending    { background:#fef9c3;color:#92400e; }
.ofs-badge.badge-failed     { background:#fee2e2;color:#dc2626; }
.ofs-badge.badge-reversed   { background:#f3f4f6;color:#6b7280; }

/* Spinner in buttons (ensure visible on dark backgrounds) */
.ofs-btn-primary .ofs-spinner,
.ofs-modal .ofs-spinner {
    border-color: rgba(255,255,255,.3);
    border-top-color: #fff;
}

/* Responsive modal */
@media (max-width: 520px) {
    .ofs-modal-backdrop { padding: 8px; }
    .ofs-modal-backdrop .ofs-modal { border-radius: 10px; }
    .ofs-modal-body { padding: 16px; }
}

/* ==========================================================================
   v3.1.0 — Active Sessions List
   ========================================================================== */

.ofs-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.ofs-session-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}
.ofs-session-item:last-child { border-bottom: none; }
.ofs-session-item:hover      { background: #fafafa; }

.ofs-session-current {
    background: #f0fdf4;
}
.ofs-session-current:hover { background: #dcfce7; }

.ofs-session-icon-wrap {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
}
.ofs-session-current .ofs-session-icon-wrap {
    background: #d1fae5;
}

.ofs-session-meta {
    flex: 1;
    min-width: 0;
}

.ofs-session-device {
    font-weight: 600;
    font-size: .9rem;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ofs-session-sub {
    font-size: .78rem;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ofs-session-time {
    font-size: .75rem;
    color: #9ca3af;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* Pulsing green dot for current session */
.ofs-session-active-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: ofs-pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes ofs-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .6; transform: scale(1.3); }
}

.ofs-session-actions {
    flex-shrink: 0;
    margin-left: auto;
}

/* Responsive */
@media (max-width: 600px) {
    .ofs-session-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 14px;
    }
    .ofs-session-actions {
        margin-left: 0;
        width: 100%;
    }
    .ofs-session-actions .ofs-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   Bills & VTU  v3.2.4
   Desktop: sticky left nav (200px) + centred form card (1fr)
   Mobile : tile grid → tap → full-screen pane
   Brand  : OFS purple #8b2082 / green #8dc63f
   ============================================================ */

/* ── Panel-level reset ────────────────────────────────────── */
#ofs-panel-bills { padding: 0; }

/* ── Top bar ──────────────────────────────────────────────── */
.vtu-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid #f0e8f5;
}
.vtu-page-title  { font-size: 1.25rem; font-weight: 800; color: #1a0d24; margin: 0 0 3px; letter-spacing: -.015em; }
.vtu-page-sub    { font-size: .74rem; color: var(--ofs-text-muted); margin: 0; }

.vtu-wallet-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--ofs-gradient);
    color: #fff;
    padding: 11px 20px;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(139,32,130,.35);
}
.vtu-wallet-label { font-size: .6rem; opacity: .7; text-transform: uppercase; letter-spacing: .07em; line-height: 1.3; }
.vtu-wallet-val   { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.vtu-fund-btn {
    background: rgba(255,255,255,.22);
    border: 1.5px solid rgba(255,255,255,.5);
    color: #fff;
    border-radius: 24px;
    padding: 6px 16px;
    font-size: .74rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .03em;
    transition: background .15s;
}
.vtu-fund-btn:hover { background: rgba(255,255,255,.35); }

/* ── Desktop two-column layout ────────────────────────────── */
.vtu-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

/* ── Left: sticky service nav ─────────────────────────────── */
.vtu-sidenav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 20px;
    background: #fff;
    border: 1.5px solid #f0e8f5;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 2px 12px rgba(139,32,130,.06);
}

.vtu-sn-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all .16s;
    position: relative;
}
.vtu-sn-btn:hover { background: var(--ofs-light-bg); }
.vtu-sn-btn.active {
    background: linear-gradient(135deg, #f9f0f8, #f5e6f5);
    box-shadow: 0 2px 10px rgba(139,32,130,.12);
}
.vtu-sn-btn.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--ofs-primary);
    border-radius: 0 3px 3px 0;
}
.vtu-sn-ic {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.vtu-sn-name {
    flex: 1;
    font-size: .83rem;
    font-weight: 700;
    color: #374151;
    line-height: 1.3;
}
.vtu-sn-btn.active .vtu-sn-name { color: var(--ofs-primary); }
.vtu-sn-arr {
    font-size: .8rem;
    color: var(--ofs-primary);
    opacity: 0;
    margin-left: auto;
    transition: opacity .15s, transform .15s;
}
.vtu-sn-btn:hover  .vtu-sn-arr { opacity: .5; }
.vtu-sn-btn.active .vtu-sn-arr { opacity: 1; transform: translateX(1px); }

/* ── Right: form card ─────────────────────────────────────── */
.vtu-formarea { min-width: 0; }

.vtu-panes {
    background: #fff;
    border: 1.5px solid #ede4f5;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(139,32,130,.07), 0 1px 4px rgba(0,0,0,.04);
}

.vtu-pane { display: none; }
.vtu-pane.active { display: flex; flex-direction: column; animation: vtu-appear .2s cubic-bezier(.22,1,.36,1); }
@keyframes vtu-appear { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── Pane header ──────────────────────────────────────────── */
.vtu-ph {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 26px 18px;
    border-bottom: 1.5px solid #f5eef9;
    background: linear-gradient(135deg, #fdf8ff 0%, #fff 60%);
    flex-shrink: 0;
}
.vtu-back {
    display: none;
    background: none;
    border: 1.5px solid #e8d6e8;
    border-radius: 8px;
    padding: 5px 11px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--ofs-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .14s;
}
.vtu-back:hover { background: var(--ofs-light-bg); }
.vtu-ph-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,.14);
}
.vtu-ph strong  { display: block; font-size: .98rem; font-weight: 800; color: #1a0d24; line-height: 1.3; }
.vtu-ph small   { font-size: .72rem; color: var(--ofs-text-muted); display: block; margin-top: 1px; }

/* ── FORM BODY — centred, max 560px, generous padding ──────── */
.vtu-form {
    padding: 28px 32px 32px;
    width: 100%;
    max-width: 560px;      /* comfortable reading width */
    box-sizing: border-box;
    /* centre the form content within the card */
    margin: 0 auto;
}

/* ── Alert ────────────────────────────────────────────────── */
.vtu-msg {
    display: none;
    padding: 11px 15px;
    border-radius: 9px;
    font-size: .86rem;
    font-weight: 500;
    margin-bottom: 18px;
}
.vtu-msg.vtu-ok  { display:block; background:#f0fdf4; border:1px solid #86efac; color:#166534; }
.vtu-msg.vtu-err { display:block; background:#fef2f2; border:1px solid #fca5a5; color:#dc2626; }

/* ── Field layout ─────────────────────────────────────────── */
.vtu-row2  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vtu-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.vtu-field:last-of-type { margin-bottom: 0; }

.vtu-lbl {
    font-size: .69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9b8aad;          /* muted purple label */
}
.vtu-in {
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid #e8ddf4;
    border-radius: 10px;
    font-size: .9rem;
    color: #1a0d24;
    background: #fdfaff;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.vtu-in:focus {
    border-color: var(--ofs-primary);
    box-shadow: 0 0 0 3px rgba(139,32,130,.1);
    outline: none;
    background: #fff;
}
.vtu-sel {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b2082' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}
.vtu-pfx { position: relative; display: flex; align-items: center; }
.vtu-pfx > span {
    position: absolute; left: 14px;
    font-weight: 700; color: var(--ofs-primary);
    font-size: .9rem; z-index: 1; pointer-events: none;
}
.vtu-pfx .vtu-in { padding-left: 30px; }

/* ── Network buttons ──────────────────────────────────────── */
.vtu-nets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.vtu-net {
    display: flex; align-items: center; justify-content: center;
    min-width: 74px;
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid #e8ddf4;
    cursor: pointer; user-select: none;
    font-size: .83rem; font-weight: 700; color: #374151;
    transition: all .15s;
}
.vtu-net input { display: none; }
.vtu-net:has(input:checked) {
    background: var(--nb, #8b2082);
    color: var(--nf, #fff);
    border-color: var(--nb, #8b2082);
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
.vtu-net:hover { border-color: var(--ofs-primary-light); background: var(--ofs-light-bg); }
.vtu-net:has(input:checked):hover { background: var(--nb, #8b2082); }

/* ── Cable TV provider buttons ────────────────────────────── */
.vtu-providers { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.vtu-prov {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 24px; border-radius: 10px;
    border: 2px solid #e8ddf4;
    cursor: pointer; font-size: .88rem; font-weight: 700;
    color: #374151; user-select: none; transition: all .15s;
}
.vtu-prov input { display: none; }
.vtu-prov:has(input:checked) {
    background: var(--pc, #8b2082); color: #fff;
    border-color: var(--pc, #8b2082);
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
}
.vtu-prov:hover { border-color: var(--ofs-primary-light); background: var(--ofs-light-bg); }
.vtu-prov:has(input:checked):hover { background: var(--pc, #8b2082); }

/* ── Betting platform grid ────────────────────────────────── */
.vtu-bet-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}
.vtu-bet-opt {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 5px;
    border: 2px solid #e8ddf4; border-radius: 10px;
    cursor: pointer; font-size: .74rem; font-weight: 700;
    text-align: center; color: #374151;
    user-select: none; transition: all .15s;
    line-height: 1.25;
}
.vtu-bet-opt input { display: none; }
.vtu-bet-opt:has(input:checked) {
    background: var(--ofs-primary); color: #fff;
    border-color: var(--ofs-primary);
    box-shadow: 0 3px 10px rgba(139,32,130,.25);
}
.vtu-bet-opt:hover { border-color: var(--ofs-primary-light); background: var(--ofs-light-bg); }
.vtu-bet-opt:has(input:checked):hover { background: var(--ofs-primary); }

/* ── Verify input row ─────────────────────────────────────── */
.vtu-vrow { display: flex; gap: 9px; }
.vtu-vrow .vtu-in { flex: 1; }
.vtu-vbtn {
    display: flex; align-items: center; gap: 5px;
    padding: 0 18px; height: 46px;
    border: 1.5px solid var(--ofs-primary); border-radius: 10px;
    background: #fff; color: var(--ofs-primary);
    font-size: .82rem; font-weight: 700;
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: all .15s;
}
.vtu-vbtn:hover { background: var(--ofs-light-bg); }
.vtu-vbtn:disabled { opacity: .45; cursor: not-allowed; }

.vtu-vname {
    display: none;
    margin-top: 7px;
    padding: 8px 13px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: .82rem; color: #166534; font-weight: 600;
    word-break: break-word;
}

/* ── Meter type toggle ────────────────────────────────────── */
.vtu-radio-row { display: flex; gap: 18px; margin-top: 8px; }
.vtu-radio-row label {
    display: flex; align-items: center; gap: 7px;
    font-size: .88rem; font-weight: 600; color: #374151; cursor: pointer;
}

/* ── Quick amount chips ───────────────────────────────────── */
.vtu-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.vtu-chip {
    padding: 6px 14px;
    border: 1.5px solid #e8ddf4; border-radius: 22px;
    background: #fdfaff; font-size: .78rem; font-weight: 600;
    color: #7a6b8a; cursor: pointer; transition: all .15s;
}
.vtu-chip:hover, .vtu-chip.active {
    background: var(--ofs-light-bg);
    border-color: var(--ofs-primary);
    color: var(--ofs-primary);
}

/* ── Order summary ────────────────────────────────────────── */
.vtu-summary {
    background: #f9f5fc;
    border: 1px solid #e8d6e8;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .86rem;
}
.vtu-summary.hidden { display: none; }
.vtu-sr { display: flex; justify-content: space-between; padding: 4px 0; color: #7a6b8a; }
.vtu-sr strong { color: #1a0d24; font-weight: 700; }

/* ── Electricity token box ────────────────────────────────── */
.vtu-token-box {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    text-align: center;
}
.vtu-tok-lbl { font-size: .67rem; font-weight: 700; color: #166534; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.vtu-tok-val {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem; font-weight: 700;
    letter-spacing: .2em; color: #1a0d24; word-break: break-all;
}
.vtu-tok-copy {
    margin-top: 10px;
    background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46;
    padding: 6px 16px; border-radius: 7px;
    font-size: .79rem; font-weight: 600; cursor: pointer; transition: background .15s;
}
.vtu-tok-copy:hover { background: #a7f3d0; }

/* ── Submit button ────────────────────────────────────────── */
.vtu-sub-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px 20px;
    background: var(--ofs-gradient); color: #fff;
    border: none; border-radius: 11px;
    font-size: .96rem; font-weight: 700; letter-spacing: .01em;
    cursor: pointer; margin-top: 8px;
    box-shadow: 0 5px 16px rgba(139,32,130,.32);
    transition: opacity .15s, transform .12s, box-shadow .15s;
}
.vtu-sub-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); box-shadow: 0 7px 22px rgba(139,32,130,.38); }
.vtu-sub-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.vtu-btn-spin {
    display: inline-block; width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: vtu-spin .65s linear infinite;
}
@keyframes vtu-spin { to { transform: rotate(360deg); } }

/* ── History ──────────────────────────────────────────────── */
#vtu-p-history .vtu-form { padding: 20px 22px 22px; max-width: 100%; }
.vtu-hist-wrap { overflow-x: auto; }
.vtu-loading  { text-align: center; padding: 40px; color: #9ca3af; }
.vtu-spin-lg  { width: 34px; height: 34px; border: 3px solid #f0e8f5; border-top-color: var(--ofs-primary); border-radius: 50%; animation: vtu-spin .7s linear infinite; margin: 0 auto 12px; }
.vtu-empty    { text-align: center; padding: 40px; color: #9ca3af; }
.vtu-empty span { font-size: 2.2rem; display: block; margin-bottom: 10px; }
.vtu-err      { color: #dc2626; padding: 14px; font-size: .875rem; }

/* ── Mobile tiles (hidden on desktop) ────────────────────── */

/* ── Mobile tiles — hidden by default, shown on mobile ───────── */
.vtu-tiles {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.vtu-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 16px 8px 13px;
    background: #fff;
    border: 2px solid #f0e8f5;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    font-size: .79rem;
    font-weight: 700;
    color: #1a0d24;
    transition: all .18s;
    user-select: none;
    position: relative;
    overflow: hidden;
}
.vtu-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(139,32,130,.04));
    border-radius: inherit;
}
.vtu-tile:hover, .vtu-tile.active {
    border-color: var(--ofs-primary);
    background: linear-gradient(145deg, #fdf8ff, #f9f0f8);
    box-shadow: 0 4px 16px rgba(139,32,130,.16);
    transform: translateY(-2px);
}
.vtu-tile-ic {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 3px 10px rgba(0,0,0,.14);
    transition: transform .18s;
}
.vtu-tile:hover .vtu-tile-ic,
.vtu-tile.active .vtu-tile-ic { transform: scale(1.08); }
.vtu-tile-name {
    font-size: .76rem;
    font-weight: 700;
    color: #374151;
    line-height: 1.2;
}
.vtu-tile.active .vtu-tile-name { color: var(--ofs-primary); }

/* ══════════════════════════════════════════════════════════
   MOBILE  ≤ 767px
   Same card-centred philosophy as desktop:
   - Form content capped at 480px, centred
   - Purple gradient pane header (app-bar feel)
   - White card body attached below header
   - Generous internal padding — never full-bleed
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* ── Layout: collapse to single column ── */
    .vtu-layout  { display: block; }
    .vtu-sidenav { display: none; }
    .vtu-tiles   { display: grid; }

    /* ── Top bar ── */
    .vtu-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 16px;
    }
    .vtu-page-title { font-size: 1.1rem; }
    .vtu-wallet-pill {
        width: 100%;
        border-radius: 16px;
        padding: 14px 18px;
        box-sizing: border-box;
        justify-content: flex-start;
        gap: 14px;
    }
    .vtu-fund-btn {
        margin-left: auto;
        padding: 7px 18px;
        font-size: .78rem;
    }

    /* ── Tile grid ── */
    .vtu-tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .vtu-tile  { padding: 15px 6px 12px; border-radius: 13px; }
    .vtu-tile-ic { width: 42px; height: 42px; font-size: 1.18rem; }

    /* ── Pane card wrapper: matches desktop card style ── */
    .vtu-panes {
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    /* Each active pane is its own self-contained card */
    .vtu-pane.active {
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 4px 28px rgba(139,32,130,.10), 0 1px 4px rgba(0,0,0,.05);
        animation: vtu-mob-in .22s cubic-bezier(.22,1,.36,1);
    }
    @keyframes vtu-mob-in {
        from { opacity: 0; transform: translateY(10px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* ── Pane header: purple gradient app-bar ── */
    .vtu-ph {
        padding: 16px 20px 14px;
        background: var(--ofs-gradient);
        border-bottom: none;
        border-radius: 0;
        flex-shrink: 0;
        gap: 12px;
    }
    .vtu-ph strong { color: #fff; font-size: .95rem; }
    .vtu-ph small  { color: rgba(255,255,255,.78); font-size: .7rem; }
    .vtu-ph-icon   { width: 40px; height: 40px; font-size: 1.15rem; }

    /* Back button: white ghost on purple header */
    .vtu-back {
        display: flex;
        background: rgba(255,255,255,.18);
        border: 1.5px solid rgba(255,255,255,.45);
        color: #fff;
        border-radius: 8px;
        padding: 5px 11px;
        font-size: .78rem;
        font-weight: 700;
    }
    .vtu-back:hover { background: rgba(255,255,255,.28); }

    /* ── Form body: white card — same proportions as desktop ── */
    .vtu-form {
        background: #fff;
        /* Border completes the card — top is open (header sits above) */
        border: 1.5px solid #ede4f5;
        border-top: none;
        border-radius: 0 0 18px 18px;
        /* KEY: constrain width and centre — matches desktop card feel */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        /* Same generous padding as desktop */
        padding: 24px 20px 28px;
    }

    /* ── Alert ── */
    .vtu-msg { margin-bottom: 14px; }

    /* ── Labels ── */
    .vtu-lbl { font-size: .7rem; }

    /* ── Inputs: taller touch targets ── */
    .vtu-in { height: 48px; font-size: .92rem; border-radius: 11px; }

    /* ── Two-col → single col ── */
    .vtu-row2 { grid-template-columns: 1fr; gap: 0; }

    /* ── Network chips: even row, no wrapping ── */
    .vtu-nets { flex-wrap: nowrap; gap: 8px; }
    .vtu-net  { flex: 1; min-width: 0; padding: 10px 6px; font-size: .8rem; border-radius: 10px; }

    /* ── Cable provider chips: equal flex ── */
    .vtu-providers { gap: 8px; }
    .vtu-prov { flex: 1; padding: 10px 8px; font-size: .83rem; border-radius: 10px; }

    /* ── Betting: 3-col grid ── */
    .vtu-bet-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .vtu-bet-opt  { padding: 10px 4px; font-size: .72rem; border-radius: 9px; }

    /* ── Verify button: taller touch target ── */
    .vtu-vbtn { height: 48px; padding: 0 14px; font-size: .8rem; }

    /* ── Amount chips ── */
    .vtu-chips { gap: 7px; }
    .vtu-chip  { padding: 6px 13px; font-size: .77rem; }

    /* ── Submit button: prominent ── */
    .vtu-sub-btn {
        padding: 15px 20px;
        font-size: .96rem;
        border-radius: 12px;
        margin-top: 10px;
        box-shadow: 0 6px 20px rgba(139,32,130,.32);
    }

    /* ── Electricity token ── */
    .vtu-tok-val { font-size: 1.22rem; letter-spacing: .14em; }

    /* ── History pane: same card, full-width table ── */
    #vtu-p-history .vtu-form { padding: 18px 16px 22px; }

}

/* ══════════════════════════════════════════════════════════
   DESKTOP ≥ 768px — tiles hidden, panes always shown
   ══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .vtu-tiles { display: none !important; }
    .vtu-panes { display: flex !important; flex-direction: column; }
}

/* Wallet balance flash after purchase */
@keyframes vtu-bal-flash {
    0%   { color: #fff; }
    35%  { color: #8dc63f; transform: scale(1.07); }
    100% { color: #fff; }
}
.vtu-bal-flash { animation: vtu-bal-flash .85s ease; }
