/* Premium Mobile App Interface Style */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131a26;
    --card-bg: rgba(20, 27, 45, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;
    --accent-violet: #8b5cf6;
    --accent-gold: #f59e0b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #030712;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Centered Mobile App Container */
.app-container {
    width: 100%;
    max-width: 480px;
    /* Standard phone width in browser */
    background: linear-gradient(135deg, var(--bg-primary) 0%, #030712 100%);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 84px;
    /* Space for sticky bottom navigation */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* App Header styling */
.app-header {
    background-color: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.badge-active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.badge-inactive {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

/* Main Content Wrapper */
.app-content {
    padding: 20px;
    flex: 1;
}

/* Glassmorphic Card Widgets */
.app-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Dynamic Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-widget {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.stat-usd {
    font-size: 11px;
    color: var(--accent-cyan);
}

/* Gradient background buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-emerald) 100%);
    border: none;
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    text-decoration: none;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Sticky Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background-color: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s;
    width: 20%;
}

.nav-item.active {
    color: var(--accent-cyan);
}

.nav-icon {
    font-size: 20px;
}

/* Status Badges */
.status-pill {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.status-pill.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.status-pill.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-gold);
}

/* Genealogy tree styles */
.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.tree-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
    max-width: 280px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tree-card.active-node {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.tree-card.inactive-node {
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.tree-connector {
    width: 2px;
    height: 20px;
    background-color: var(--border-color);
}

.tree-children {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
}

/* Alert styles */
.alert {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

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

/* Transactions list */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
    border-bottom: none;
}

.item-title {
    font-size: 14px;
    font-weight: 500;
}

.item-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

.item-amount {
    font-size: 14px;
    font-weight: 600;
}

.item-amount.credit {
    color: var(--accent-emerald);
}

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

/* Product grid and cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.05);
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-cyan);
}

.product-meta {
    font-size: 10px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 4px;
    text-align: center;
}

/* Admin Dashboard grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.admin-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
}

/* Virtual Voucher Card Styles */
.virtual-voucher-card {
    background: linear-gradient(135deg, #181d2f 0%, #0d101b 100%);
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #fff;
    min-height: 180px;
}

.virtual-voucher-card::before {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
    pointer-events: none;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: linear-gradient(to right, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.card-chip {
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border-radius: 5px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.card-chip::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 8px;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 2px;
}

.card-number {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: monospace;
    margin: 8px 0;
    text-align: center;
    color: #f1f5f9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.card-label {
    font-size: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-top: 2px;
}

.card-code {
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.08);
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Responsive adjustment for desktop viewing */
@media(min-width: 481px) {
    body {
        background-color: #030712;
    }
}