/* DivineMom 2:1 Binary Referral Plan Design System - Light & Dark Modes */

:root, [data-theme="light"], [data-theme="dark"] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f1f5f9;
    --bg-card-hover: #e2e8f0;
    --border-color: rgba(15, 23, 42, 0.1);
    --border-accent: rgba(249, 87, 0, 0.35);
    
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
    
    --brand-orange: #f95700;
    --brand-green: #22c55e;
    --primary: #f95700;
    --primary-gradient: #f95700;
    --primary-light: rgba(249, 87, 0, 0.08);
    --accent-glow: rgba(249, 87, 0, 0.2);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    
    --success: #16a34a;
    --warning: #ea580c;
    --danger: #dc2626;
    --info: #2563eb;
    
    --table-header-bg: #f1f5f9;
    --table-hover-bg: #f8fafc;
    --input-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --modal-backdrop: rgba(15, 23, 42, 0.6);
    --event-log-bg: #0f172a;
    --event-log-text: #e2e8f0;
    
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Top Nav */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 2rem;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.logo-brand {
    display: flex;
    align-items: center;
    user-select: none;
}

.brand-logo-img {
    height: 64px;
    max-height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.05));
    transition: transform 0.2s ease;
}

.brand-logo-img:hover {
    transform: scale(1.04);
}

.brand-text-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--brand-orange);
    line-height: 1;
}

.logo-accent {
    color: var(--brand-green);
}

.logo-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--primary-gradient);
    color: #ffffff;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(249, 87, 0, 0.25);
    text-transform: uppercase;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.mode-tabs {
    display: flex;
    background: var(--bg-card-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 4px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.highlight-tab {
    border: 1px dashed var(--brand-orange);
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 99px;
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.1;
}

.user-rank {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Main Viewport */
.main-viewport {
    flex: 1;
    padding: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.view-section {
    display: none;
    animation: fadeIn 0.2s ease forwards;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gradient-brand-text {
    color: var(--primary);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.action-group {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: #e04e00;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 12px 26px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.stat-card.card-available {
    border-color: rgba(34, 197, 94, 0.35);
}

.stat-card.card-locked {
    border-color: rgba(249, 87, 0, 0.35);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 1.25rem;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-footer {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

/* Content Panels & Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px -5px rgba(15, 23, 42, 0.04), 0 4px 10px -2px rgba(15, 23, 42, 0.02);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.panel-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

/* Badges */
.pill-badge {
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.pill-orange { background: rgba(249, 87, 0, 0.12); color: var(--brand-orange); border-color: rgba(249, 87, 0, 0.3); }
.pill-green { background: rgba(34, 197, 94, 0.12); color: var(--brand-green); border-color: rgba(34, 197, 94, 0.3); }
.pill-purple { background: rgba(147, 51, 234, 0.12); color: #9333ea; border-color: rgba(147, 51, 234, 0.3); }
.pill-warning { background: rgba(245, 158, 11, 0.12); color: var(--warning); border-color: rgba(245, 158, 11, 0.3); }

/* Data Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.data-table th {
    padding: 12px 14px;
    background: var(--table-header-bg);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--table-hover-bg);
}

.table-input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    width: 100%;
    max-width: 90px;
    text-align: center;
}

/* ==========================================================================
   ENHANCED 2:1 BINARY TREE SYSTEM (LEVEL 0, LEVEL 1, LEVEL 2 WITH POSITION D)
   ========================================================================== */

.binary-tree-viewport {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0.5rem;
    background: radial-gradient(circle at 50% 10%, rgba(249, 87, 0, 0.03) 0%, transparent 70%);
    border-radius: var(--radius-md);
    min-height: 420px;
}

.tree-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
    width: 100%;
}

.tree-summary-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tree-pill {
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tree-pill.pill-left {
    background: rgba(249, 87, 0, 0.1);
    color: var(--brand-orange);
    border: 1px solid rgba(249, 87, 0, 0.25);
}

.tree-pill.pill-right {
    background: rgba(34, 197, 94, 0.1);
    color: var(--brand-green);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.tree-pill.pill-qual-complete {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(245, 158, 11, 0.15));
    color: #15803d;
    border: 1px solid #16a34a;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.tree-pill.pill-qual-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tree-main-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 580px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 1rem;
}

/* Tree Levels */
.tree-level {
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    z-index: 2;
}

.tree-level-0 {
    margin-bottom: 0;
}

/* Connectors */
.tree-connector-stem {
    width: 2px;
    height: 18px;
    background: var(--primary);
    margin: 0 auto;
}

.tree-connector-crossbar-row {
    position: relative;
    width: 70%;
    height: 16px;
    margin: 0 auto;
}

.tree-crossbar-line {
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--primary);
}

.tree-stem-left {
    position: absolute;
    top: 0;
    left: 25%;
    width: 2px;
    height: 16px;
    background: var(--primary);
}

.tree-stem-right {
    position: absolute;
    top: 0;
    right: 25%;
    width: 2px;
    height: 16px;
    background: var(--primary);
}

/* Level 1 Sub-branches */
.tree-level-1-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.tree-branch-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.leg-column-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.leg-column-badge.badge-left {
    color: var(--brand-orange);
}

.leg-column-badge.badge-right {
    color: var(--brand-green);
}

/* Level 1 -> Level 2 Connectors */
.tree-sub-connector-row {
    position: relative;
    width: 90%;
    height: 20px;
    margin: 0 auto;
}

.tree-sub-stem-center {
    width: 2px;
    height: 8px;
    background: var(--border-accent);
    margin: 0 auto;
}

.tree-sub-crossbar {
    position: absolute;
    top: 8px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--border-accent);
}

.tree-sub-stem-l {
    position: absolute;
    top: 8px;
    left: 25%;
    width: 2px;
    height: 12px;
    background: var(--border-accent);
}

.tree-sub-stem-r {
    position: absolute;
    top: 8px;
    right: 25%;
    width: 2px;
    height: 12px;
    background: var(--border-accent);
}

/* Level 2 Children Row */
.level-2-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
}

.level-2-leaf-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.position-tag-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
}

.position-tag-label.highlight-d {
    color: #9333ea;
    font-weight: 800;
}

/* Node Cards */
.tree-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    min-width: 120px;
    max-width: 150px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.tree-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
    border-color: var(--primary);
}

.tree-card.root-card {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(249, 87, 0, 0.04) 100%);
    box-shadow: 0 6px 18px var(--accent-glow);
    min-width: 140px;
}

.tree-card.tail-card-d {
    border-color: #9333ea;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(147, 51, 234, 0.06) 100%);
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.25);
    animation: gentlePulse 2.5s infinite;
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(147, 51, 234, 0.25); border-color: #9333ea; }
    50% { box-shadow: 0 4px 20px rgba(147, 51, 234, 0.45); border-color: #a855f7; }
}

.tree-card.empty-card {
    border: 2px dashed var(--border-color);
    background: rgba(241, 245, 249, 0.5);
    opacity: 0.8;
    cursor: pointer;
}

.tree-card.empty-card:hover {
    border-color: var(--primary);
    opacity: 1;
    background: var(--primary-light);
}

/* ==========================================================================
   STATUS COLOR CODING: Green for Activated, Yellow for Unverified, Red for Inactive
   ========================================================================== */
.tree-card.status-activated {
    border-color: #22c55e !important;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(34, 197, 94, 0.08) 100%) !important;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.22);
}
.tree-card.status-activated:hover {
    border-color: #16a34a !important;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.35);
}
.tree-card.status-activated .tree-card-avatar {
    background: #22c55e !important;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}
.tree-card.status-activated .tree-card-id,
.um-code.status-activated {
    color: #16a34a !important;
    font-weight: 800;
}

.tree-card.status-unverified {
    border-color: #eab308 !important;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(234, 179, 8, 0.08) 100%) !important;
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.22);
}
.tree-card.status-unverified:hover {
    border-color: #ca8a04 !important;
    box-shadow: 0 6px 18px rgba(234, 179, 8, 0.35);
}
.tree-card.status-unverified .tree-card-avatar {
    background: #eab308 !important;
    color: #854d0e !important;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}
.tree-card.status-unverified .tree-card-id,
.um-code.status-unverified {
    color: #ca8a04 !important;
    font-weight: 800;
}

.tree-card.status-inactive {
    border-color: #ef4444 !important;
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(239, 68, 68, 0.08) 100%) !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.22);
}
.tree-card.status-inactive:hover {
    border-color: #dc2626 !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}
.tree-card.status-inactive .tree-card-avatar {
    background: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}
.tree-card.status-inactive .tree-card-id,
.um-code.status-inactive {
    color: #dc2626 !important;
    font-weight: 800;
}

/* Status Pill in Tree */
.tree-status-badge {
    font-size: 0.62rem;
    padding: 1px 6px;
    border-radius: 99px;
    font-weight: 800;
    margin-bottom: 2px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.tree-status-badge.status-activated {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.35);
}
.tree-status-badge.status-unverified {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.35);
}
.tree-status-badge.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Tree Legend Bar */
.tree-legend-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    margin: 0 auto 1.25rem;
    font-size: 0.74rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.tree-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
}
.tree-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}
.tree-legend-dot.dot-activated { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.6); }
.tree-legend-dot.dot-unverified { background: #eab308; box-shadow: 0 0 6px rgba(234, 179, 8, 0.6); }
.tree-legend-dot.dot-inactive { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
.tree-legend-dot.dot-empty { background: transparent; border: 2px dashed var(--text-dim); }

.tree-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 3px;
}

.avatar-root { background: var(--primary-gradient); }
.avatar-left { background: #f95700; }
.avatar-right { background: #16a34a; }
.avatar-tail { background: #9333ea; }

.tree-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 2px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-card-id {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
    font-weight: 600;
    margin-bottom: 3px;
}

.tree-card-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 99px;
    font-weight: 700;
}

.badge-root { background: rgba(249, 87, 0, 0.15); color: var(--brand-orange); }
.badge-active { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.badge-tail { background: rgba(147, 51, 234, 0.15); color: #9333ea; font-weight: 800; }
.badge-spillover { background: rgba(14, 165, 233, 0.15); color: #0284c7; font-weight: 700; border: 1px solid rgba(14, 165, 233, 0.3); }
.badge-empty { background: rgba(148, 163, 184, 0.15); color: var(--text-dim); }

.tree-card-action {
    font-size: 0.65rem;
    color: var(--primary);
    margin-top: 3px;
    font-weight: 600;
}

/* Simulator Controls */
.simulator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.scenario-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.04);
}

.scenario-number {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 99px;
    background: var(--primary-gradient);
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    width: fit-content;
}

.event-log-container {
    background: var(--event-log-bg);
    color: var(--event-log-text);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-entry {
    color: var(--text-muted);
}

.log-entry.success { color: #34d399; }
.log-entry.warning { color: #fbbf24; }

/* Banners & Modals */
.status-banner {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.modal-backdrop.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 560px;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    z-index: 10;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* File Upload Components */
.file-upload-box {
    border: 2px dashed var(--border-accent);
    background: var(--bg-card-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.file-upload-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.file-upload-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.file-upload-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.file-upload-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.file-upload-btn {
    pointer-events: none;
    white-space: nowrap;
}

.file-preview-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 6px 12px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.preview-icon {
    font-size: 1rem;
}

.preview-filename {
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-status {
    font-size: 0.7rem;
}

.payment-instructions, .withdrawal-info-box {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

/* ==========================================================================
   DIVINEMOM LANDING PAGE LIGHT THEMED STYLES
   ========================================================================== */

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(249, 87, 0, 0.03) 0%, rgba(34, 197, 94, 0.03) 100%);
    border: none;
    border-radius: 24px;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--brand-orange);
    border: 1px solid var(--border-accent);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.hero-badge-logo {
    height: 22px;
    width: auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 620px;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-trust-pills {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.trust-check {
    color: var(--success);
    font-weight: 800;
}

/* Glass Preview Widget */
.hero-visual {
    position: relative;
}

.glass-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.pulse-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.visual-node-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.node-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    box-shadow: var(--shadow-sm);
}

.node-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.node-avatar.bg-orange { background: #f95700; }
.node-avatar.bg-green { background: #22c55e; }

.tree-branches-connector {
    width: 2px;
    height: 20px;
    background: var(--primary);
    margin: 6px 0;
}

.nodes-row {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: space-around;
}

.leg-tag {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dim);
    margin-bottom: 4px;
    text-align: center;
}

.reward-unlock-banner {
    background: var(--primary-light);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.875rem;
}

.reward-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.reward-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.reward-total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 1.05rem;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.metric-icon {
    font-size: 2rem;
}

.metric-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Landing Section & Stepper (Seamless Non-Card Layout) */
.landing-section, .panel-card.landing-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 2.5rem 0 !important;
    margin-bottom: 2rem !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.landing-section:last-of-type, .panel-card.landing-section:last-of-type {
    border-bottom: none !important;
}

.section-title-box {
    margin-bottom: 2rem;
}

.text-center { text-align: center; }

.section-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 6px;
    margin-bottom: 6px;
    color: var(--text-main);
}

.section-subtext {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rules-stepper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
}

.rule-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rule-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.rule-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--brand-orange);
    opacity: 0.45;
    margin-bottom: 8px;
}

.rule-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.rule-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Calculator Container */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.slider-group {
    margin-bottom: 1.5rem;
}

.slider-label-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.slider-val {
    color: var(--brand-orange);
    font-weight: 800;
    font-size: 1.1rem;
}

input[type=range] {
    width: 100%;
    accent-color: var(--brand-orange);
    cursor: pointer;
}

.calc-note {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-style: italic;
}

.calc-results-col {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calc-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-main);
}

.calc-result-card.highlight-res {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-weight: 800;
    font-size: 1.1rem;
}

.res-val {
    font-family: var(--font-heading);
    font-weight: 800;
}

.calc-rank-achieved {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-muted);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* FAQ Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
}

.faq-answer {
    display: none;
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
    margin-top: -4px;
    padding-top: 1rem;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

/* CTA Banner Card & Footer */
.cta-banner-card {
    background: var(--primary-gradient);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.cta-banner-card h2 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.cta-banner-card p {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 1.75rem;
}

.cta-banner-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    padding: 2.5rem 0;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
}

.footer-logo {
    height: 36px;
    width: auto;
}

.footer-admin-link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-admin-link:hover {
    color: var(--brand-orange);
    text-decoration: underline;
}

.search-box input {
    width: 260px;
}

/* Graphical Promotional Banner Showcase & Mobile Responsiveness System */
.promo-banner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    margin-bottom: 2.5rem;
}

.promo-banner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.promo-banner-img {
    width: 100%;
    height: auto;
    max-height: 580px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: transform 0.4s ease;
}

.promo-banner-card:hover .promo-banner-img {
    transform: scale(1.015);
}

.banner-caption-box {
    padding: 1.75rem 2rem;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-subtle) 100%);
    border-top: 1px solid var(--border-color);
}

.banner-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-text {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.promo-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2.5rem;
}

.helpline-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: #16a34a;
    color: #ffffff;
    padding: 1rem 1.75rem;
    border-radius: var(--radius-md);
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.25);
}

.helpline-phone {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Comprehensive Mobile Responsiveness Media Queries */
@media (max-width: 1024px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.5rem;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .promo-grid-2col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0.65rem 0.85rem;
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .brand-logo-img {
        height: 48px;
        max-height: 56px;
    }

    .nav-controls {
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .mode-tabs {
        order: 2;
        width: 100%;
        margin-top: 2px;
        display: flex;
    }

    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 6px 8px;
        font-size: 0.78rem;
    }

    .user-pill {
        padding: 4px 8px;
        gap: 0.4rem;
    }

    .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .user-name {
        font-size: 0.78rem;
    }

    .user-rank {
        display: none;
    }

    #btn-logout-header, #btn-register-header, #btn-login-header {
        padding: 5px 9px;
        font-size: 0.75rem;
    }

    .main-viewport {
        padding: 1rem;
    }

    .hero-wrapper {
        padding: 1.5rem 1rem;
        border-radius: var(--radius-md);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta-group .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .banner-caption-box {
        padding: 1.25rem 1rem;
    }

    .banner-title {
        font-size: 1.25rem;
    }

    .helpline-strip {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .helpline-phone {
        font-size: 1.1rem;
    }

    .grid-2-col {
        grid-template-columns: 1fr !important;
    }

    .modal-box {
        padding: 1.25rem;
        width: 95%;
        margin: 1rem auto;
    }

    .search-box input {
        width: 100%;
    }

    .data-table th, .data-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .section-heading {
        font-size: 1.35rem;
    }

    .pill-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .btn-lg {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* Password Input Eye Toggle Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper .form-control {
    padding-right: 44px;
}

.toggle-password-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 4px 8px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
    z-index: 5;
}

.toggle-password-btn:hover {
    color: var(--primary);
    background-color: rgba(249, 87, 0, 0.1);
}

/* Referral Share Card & Grid */
.referral-share-card {
    background: rgba(249, 87, 0, 0.04);
    border: 1px solid rgba(249, 87, 0, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.referral-share-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.referral-box {
    flex: 1;
    min-width: 240px;
}

.referral-box.flex-grow {
    flex: 2;
    min-width: 320px;
}

.referral-box-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
    display: block;
}

.referral-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.referral-code-input {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: var(--primary);
    background: #ffffff !important;
    border-color: var(--primary);
    flex: 1;
    min-width: 120px;
}

.referral-link-input {
    font-size: 0.9rem;
    background: #ffffff !important;
    flex: 1;
    min-width: 200px;
}

.btn-whatsapp-share {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #ffffff !important;
}

.btn-whatsapp-share:hover {
    background-color: #1eb956 !important;
    border-color: #1eb956 !important;
}

/* Admin Console Sidebar & Segregated Tab Navigation */
.admin-dashboard-container {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
}

.admin-sidebar {
    width: 270px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 0.85rem;
    position: sticky;
    top: 90px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
}

.admin-sidebar-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    padding: 0 10px 10px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.admin-sidebar-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.admin-sidebar-item.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.nav-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 99px;
}

.admin-sidebar-item.active .nav-badge {
    background: #ffffff;
    color: var(--primary);
}

.admin-content-area {
    flex: 1;
    min-width: 0;
}

.admin-sub-section {
    display: none;
    animation: fadeIn 0.25s ease forwards;
}

.admin-sub-section.active {
    display: block;
}

@media (max-width: 992px) {
    .admin-dashboard-container {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        overflow-x: auto;
    }
    .admin-sidebar-nav {
        flex-direction: row;
        gap: 8px;
    }
    .admin-sidebar-item {
        white-space: nowrap;
        width: auto;
    }
}

/* Divinemom Activation Coupons (3x Rs400 each) UI Styles */
.user-coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.coupon-voucher-card {
    background: linear-gradient(135deg, rgba(249, 87, 0, 0.04) 0%, rgba(34, 197, 94, 0.04) 100%);
    border: 2px dashed rgba(249, 87, 0, 0.35);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.85rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.coupon-voucher-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.coupon-voucher-card.voucher-redeemed {
    background: rgba(147, 51, 234, 0.04);
    border-color: rgba(147, 51, 234, 0.35);
    opacity: 0.88;
}

.coupon-voucher-card.voucher-redeemed .voucher-code-text {
    text-decoration: line-through;
    color: #9333ea;
}

.coupon-voucher-card.voucher-disabled {
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.35);
    opacity: 0.78;
}

.coupon-voucher-card.voucher-disabled .voucher-code-text {
    text-decoration: line-through;
    color: #dc2626;
}

.btn-purple {
    background: #9333ea;
    color: #ffffff;
    border: none;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-purple:hover {
    background: #7e22ce;
    color: #ffffff;
}

.voucher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.65rem;
}

.voucher-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.voucher-amount-badge {
    background: #16a34a;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.voucher-code-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.voucher-code-text {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-orange);
    letter-spacing: 0.5px;
}

.voucher-copy-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voucher-copy-btn:hover {
    background: #e04e00;
}

.voucher-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.voucher-store-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.8rem;
}

.voucher-store-link:hover {
    text-decoration: underline;
}

.locked-coupons-box {
    background: rgba(234, 88, 12, 0.05);
    border: 1px dashed var(--warning);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   ADMIN · USER MANAGEMENT (um-*) — toolbar, compact table, pagination, modal
   ========================================================================== */
.um-card { padding: 1.5rem; }

.um-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.um-subtitle {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.um-muted { color: var(--text-dim); font-size: 0.8rem; }

/* Quick filter chips */
.um-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.um-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 8px 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
}

.um-chip:hover { border-color: var(--border-accent); color: var(--text-main); }

.um-chip-count {
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 99px;
    background: var(--bg-card-subtle);
    color: var(--text-main);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
}

.um-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.um-chip.is-active .um-chip-count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.um-chip-attention:not(.is-active) .um-chip-count { background: rgba(234, 88, 12, 0.14); color: var(--warning); }

/* Toolbar */
.um-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: var(--bg-card-subtle);
    border-radius: var(--radius-md);
}

.um-search {
    position: relative;
    flex: 1 1 280px;
    min-width: 220px;
}

.um-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.6;
    pointer-events: none;
}

.um-search-input {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 36px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.um-search-input::-webkit-search-cancel-button { display: none; }

.um-search-input:focus,
.um-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.um-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card-hover);
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: none;
}

.um-search-clear.is-visible { display: inline-flex; align-items: center; justify-content: center; }
.um-search-clear:hover { background: var(--danger); color: #fff; }

.um-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.um-select {
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.um-select-sm { height: 34px; font-size: 0.82rem; }

/* Table */
.um-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.um-table th {
    white-space: nowrap;
    padding: 11px 14px;
    font-size: 0.7rem;
}

.um-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

.um-th-right, .um-td-right { text-align: right; }
.um-th-center, .um-td-center { text-align: center; }

.um-row { transition: background 0.15s ease; }
.um-row:hover { background: rgba(249, 87, 0, 0.035); }

/* User ID with copy pill */
.um-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-subtle);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.btn-copy-id {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 1px 4px;
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.15s ease;
}

.btn-copy-id:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-copied {
    color: var(--success) !important;
    font-weight: 800;
}

.um-member {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    min-width: 170px;
}

.um-member:hover .um-name { color: var(--primary); }

.um-avatar {
    --um-hue: 24;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: hsl(var(--um-hue), 70%, 34%);
    background: hsl(var(--um-hue), 85%, 93%);
}

.um-avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.4rem; }

.um-member-text { min-width: 0; }

.um-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.88rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.um-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--info);
    letter-spacing: 0.3px;
}

.um-contact-mini {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 2px;
}

.um-contact-line {
    font-size: 0.76rem;
    color: var(--text-muted);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.um-contact-line:hover {
    color: var(--primary);
}

/* User-friendly Account Status & Explicit Action Button */
.um-status-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 110px;
}

.btn-status-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-transform: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-status-deactivate {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.35);
}

.btn-status-deactivate:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

.btn-status-activate {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.35);
}

.btn-status-activate:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
    transform: translateY(-1px);
}

.um-status-hint {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
}

/* KYC Cell */
.um-kyc-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Aadhaar & PAN details cell */
.um-kyc-details-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.78rem;
    min-width: 130px;
}

.um-kyc-detail-line {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-xs {
    padding: 1px 6px;
    font-size: 0.68rem;
    border-radius: 4px;
    line-height: 1.3;
}

/* Status badges */
.um-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.um-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.um-badge-success { background: rgba(22, 163, 74, 0.1); color: #15803d; border-color: rgba(22, 163, 74, 0.22); }
.um-badge-warning { background: rgba(234, 88, 12, 0.1); color: #c2410c; border-color: rgba(234, 88, 12, 0.22); }
.um-badge-danger  { background: rgba(220, 38, 38, 0.1); color: #b91c1c; border-color: rgba(220, 38, 38, 0.22); }
.um-badge-muted   { background: var(--bg-card-subtle); color: var(--text-dim); border-color: var(--border-color); }

/* Wallet & sponsor */
.um-wallet { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.um-wallet-main { font-weight: 800; color: var(--success); font-size: 0.92rem; }
.um-wallet-locked { font-size: 0.74rem; color: var(--text-dim); white-space: nowrap; }

.um-sponsor { display: flex; flex-direction: column; }
.um-sponsor-name {
    font-size: 0.82rem;
    font-weight: 600;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row actions */
.um-actions { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }

.um-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.um-icon-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
.um-icon-approve { color: var(--success); border-color: rgba(22, 163, 74, 0.3); }
.um-icon-approve:hover { background: var(--success); color: #fff; border-color: var(--success); }
.um-icon-reject { color: var(--danger); border-color: rgba(220, 38, 38, 0.3); }
.um-icon-reject:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.um-view-btn { height: 32px; padding: 0 14px; box-shadow: none; }

/* Empty state */
.um-empty-row:hover { background: transparent !important; }
.um-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2.5rem 1rem; text-align: center; }
.um-empty-icon { font-size: 2rem; opacity: 0.7; }
.um-empty-title { font-weight: 700; font-size: 1rem; }
.um-empty-text { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.5rem; }

/* Pagination */
.um-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.um-page-info { font-size: 0.84rem; color: var(--text-muted); }
.um-page-info strong { color: var(--text-main); }

.um-page-controls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.um-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.um-page-btn:hover:not(:disabled):not(.is-current) { border-color: var(--primary); color: var(--primary); }

.um-page-btn.is-current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px var(--accent-glow);
    cursor: default;
}

.um-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.um-page-ellipsis { padding: 0 6px; color: var(--text-dim); }

.um-page-size { display: flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-muted); }

/* Member details modal */
.um-modal-box { 
    max-width: 1040px; 
    width: 95vw; 
    max-height: 92vh; 
    display: flex;
    flex-direction: column;
}

.um-clickable-row {
    cursor: pointer;
    transition: background 0.15s ease;
}
.um-clickable-row:hover {
    background: var(--bg-hover) !important;
}

.um-modal-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.25rem;
    padding-bottom: 2px;
    overflow-x: auto;
    flex-shrink: 0;
}

.um-modal-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.um-modal-tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-card-subtle);
}

.um-modal-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg-card-subtle);
}

.um-modal-tab-badge {
    background: var(--bg-hover);
    color: var(--text-muted);
    padding: 1px 7px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 800;
}

.um-modal-tab-btn.active .um-modal-tab-badge {
    background: var(--primary);
    color: #fff;
}

.um-downline-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.um-downline-stat-card {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.um-downline-stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.um-downline-stat-card .stat-val {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
}

.um-downline-stat-card .stat-sub {
    font-size: 0.74rem;
    color: var(--text-dim);
}

.um-downline-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    background: var(--bg-card-subtle);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.um-downline-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    flex: 1 1 240px;
}

.um-downline-search-box input {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.84rem;
    width: 100%;
}

.um-downline-filters-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.um-downline-filters-wrap select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
}

.um-detail-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.um-detail-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.um-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.um-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.1rem; }

.um-detail-stat {
    background: var(--bg-card-subtle);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.um-detail-stat span { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.um-detail-stat strong { font-family: var(--font-heading); font-size: 1.35rem; }

.um-detail-section { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.4rem 1rem; margin-bottom: 0.9rem; }

.um-detail-heading {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0.5rem 0 0.25rem;
}

.um-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0;
    border-top: 1px dashed var(--border-color);
    font-size: 0.86rem;
}

.um-detail-heading + .um-detail-row { border-top: none; }
.um-detail-label { color: var(--text-muted); flex-shrink: 0; }
.um-detail-value { text-align: right; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; word-break: break-word; }
.um-doc-btn { padding: 3px 10px; font-size: 0.75rem; }

.um-detail-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.4rem; }
.um-detail-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Mobile: turn each row into a card */
@media (max-width: 768px) {
    .um-card { padding: 1rem; }
    .um-toolbar { padding: 0.6rem; }
    .um-filters { width: 100%; }
    .um-filters .um-select { flex: 1 1 120px; }

    .um-table-wrap { border: none; }
    .um-table thead { display: none; }
    .um-table, .um-table tbody, .um-table tr, .um-table td { display: block; width: 100%; }

    .um-table tr.um-row {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 0.75rem;
        padding: 0.4rem 0.9rem;
        background: var(--bg-card);
    }

    .um-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border-color);
        text-align: right;
    }

    .um-table tr.um-row td:last-child { border-bottom: none; }

    .um-table td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-dim);
        text-align: left;
    }

    .um-table td[data-label="Member Name & Contact"]::before { display: none; }
    .um-table td[data-label="Member Name & Contact"] { justify-content: flex-start; }
    .um-table td[data-label="User ID"] { justify-content: space-between; }
    .um-pagination { flex-direction: column; align-items: stretch; text-align: center; }
    .um-page-controls { justify-content: center; }
    .um-page-size { justify-content: center; }
    .um-detail-stats { grid-template-columns: 1fr; }
}

/* ========================================================
   USER DASHBOARD: 2:1 BONUS DETAILS & QUALIFICATION STYLES
   ======================================================== */
.bonus-tracker-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border: 1px solid var(--border-accent);
    box-shadow: 0 8px 24px -6px rgba(249, 87, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.bonus-tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bonus-ratio-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
}

.ratio-text {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
}

.bonus-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bonus-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bonus-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bmc-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 0.35rem;
}

.bmc-value {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    letter-spacing: -0.5px;
}

.bmc-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.leg-balance-container {
    background: rgba(241, 245, 249, 0.6);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem;
}

.leg-balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.leg-meters-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.leg-meter-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-sm);
}

.leg-meter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.leg-meter-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    word-break: break-word;
}

.leg-meter-vs {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qualification-progress-wrap {
    margin-top: 0.85rem;
}

.qualification-progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.qualification-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f95700, #22c55e);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.qualification-progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* ========================================================
   USER DASHBOARD: PASSBOOK & TRANSACTIONS LIST STYLES
   ======================================================== */
.user-transactions-panel {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tx-filter-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tx-chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tx-chip:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.tx-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(249, 87, 0, 0.25);
}

.tx-amt-credit {
    font-weight: 700;
    color: var(--success);
    font-size: 0.95rem;
}

.tx-amt-debit {
    font-weight: 700;
    color: var(--danger);
    font-size: 0.95rem;
}

.tx-amt-neutral {
    font-weight: 700;
    color: var(--info);
    font-size: 0.95rem;
}

.tx-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.tx-badge-completed, .tx-badge-approved {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.tx-badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.tx-badge-rejected {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.tx-category-badge {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    display: inline-block;
}

@media (max-width: 768px) {
    .leg-meters-grid {
        grid-template-columns: 1fr;
    }
    .leg-meter-vs {
        margin: 0 auto;
    }
    .bonus-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Verified & Locked KYC Mode Styles */
.kyc-locked-mode .file-upload-box {
    display: none !important;
}

.kyc-input-locked,
.kyc-input-locked:focus,
.kyc-input-locked:read-only {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    user-select: all !important;
}

.kyc-verified-locked-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(16, 185, 129, 0.12) 100%);
    border: 1.5px solid rgba(34, 197, 94, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.08);
}

.kyc-locked-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #16a34a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.kyc-locked-body {
    flex: 1;
}

.kyc-locked-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kyc-locked-desc {
    font-size: 0.88rem;
    color: #166534;
    margin-top: 4px;
    line-height: 1.45;
}

.kyc-locked-tag {
    flex-shrink: 0;
}

.kyc-doc-view-btn {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 8px;
}

.kyc-doc-view-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--primary);
}

@media (max-width: 640px) {
    .kyc-verified-locked-card {
        flex-direction: column;
        align-items: flex-start;
    }
}



