/* 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 Responsive App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    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);
}

@media (max-width: 768px) {
    .app-container {
        max-width: 100%;
        border-left: none;
        border-right: none;
    }
}

/* 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;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 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: 1200px;
    left: 50%;
    transform: translateX(-50%);
    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;
}

@media (max-width: 768px) {
    .bottom-nav {
        max-width: 100%;
        left: 0;
        transform: none;
    }
}

.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;
    }
}

/* Password View/Hide Toggle Styling */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

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

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 20px;
    z-index: 10;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--accent-cyan);
}

/* Advanced Genealogy Tree Visualizer Styling */
.tree-visualizer-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.tree-toolbar-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 16px;
}

.tree-controls-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tree-control-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.tree-control-btn:hover {
    background: var(--accent-cyan);
    color: #fff;
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.tree-control-btn.active {
    background: var(--accent-cyan);
    color: #fff;
    border-color: var(--accent-cyan);
}

.tree-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0;
    margin-bottom: 12px;
}

.breadcrumb-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb-chip:hover, .breadcrumb-chip.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.tree-viewport {
    width: 100%;
    overflow: auto;
    position: relative;
    padding: 40px 20px;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8) 0%, rgba(3, 7, 18, 0.95) 100%),
                linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    cursor: grab;
    user-select: none;
}

.tree-viewport:active {
    cursor: grabbing;
}

.tree-canvas {
    display: table !important;
    margin: 0 auto !important;
    min-width: 100% !important;
    width: max-content !important;
    transform-origin: top center;
    transition: transform 0.2s ease-out;
    text-align: center !important;
}

/* Horizontal Tree Layout Core Rules */
.tree-canvas ul, 
.subtree-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: flex-start !important;
    padding-top: 28px !important;
    position: relative !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    list-style: none !important;
    white-space: nowrap !important;
    gap: 16px !important;
}

/* Vertical connector line from parent to child list */
.tree-canvas ul ul::before,
.subtree-list::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    border-left: 2px solid rgba(6, 182, 212, 0.5) !important;
    width: 0 !important;
    height: 28px !important;
    transform: translateX(-50%) !important;
    z-index: 1 !important;
}

/* Tree Node List Items */
.tree-canvas li, 
.subtree-list > li {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    padding: 28px 8px 0 8px !important;
    list-style-type: none !important;
    list-style: none !important;
    margin: 0 !important;
    float: none !important;
}

/* Connectors using ::before and ::after */
.tree-canvas li::before, 
.tree-canvas li::after,
.subtree-list > li::before, 
.subtree-list > li::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: 50% !important;
    border-top: 2px solid rgba(6, 182, 212, 0.5) !important;
    width: 50% !important;
    height: 28px !important;
    z-index: 1 !important;
}

.tree-canvas li::after,
.subtree-list > li::after {
    right: auto !important;
    left: 50% !important;
    border-left: 2px solid rgba(6, 182, 212, 0.5) !important;
}

/* Single child node connector rules */
.tree-canvas li:only-child::after, 
.tree-canvas li:only-child::before,
.subtree-list > li:only-child::after, 
.subtree-list > li:only-child::before {
    display: none !important;
}

.tree-canvas li:only-child,
.subtree-list > li:only-child {
    padding-top: 28px !important;
}

/* First and Last Child Connectors */
.tree-canvas li:first-child::before, 
.tree-canvas li:last-child::after,
.subtree-list > li:first-child::before, 
.subtree-list > li:last-child::after {
    border: 0 none !important;
}

.tree-canvas li:last-child::before,
.subtree-list > li:last-child::before {
    border-right: 2px solid rgba(6, 182, 212, 0.5) !important;
    border-radius: 0 8px 0 0 !important;
}

.tree-canvas li:first-child::after,
.subtree-list > li:first-child::after {
    border-radius: 8px 0 0 0 !important;
}

/* Tree Node Wrapper & Cards */
.tree-node-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 10 !important;
    margin: 0 auto !important;
}

.tree-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(14px);
    border: 1.5px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 12px 14px;
    width: 145px;
    min-width: 145px;
    max-width: 155px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.tree-card:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: var(--accent-cyan);
    box-shadow: 0 14px 30px rgba(6, 182, 212, 0.3);
}

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

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

.tree-card.highlight-match {
    border-color: #f59e0b !important;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.8) !important;
    animation: pulseHighlight 1.5s infinite alternate;
}

@keyframes pulseHighlight {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* Rank Badge */
.tree-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Avatar Circle & LED Status Dot */
.avatar-circle-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto 6px auto;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: rgba(255, 255, 255, 0.1);
}

.avatar-circle.active {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-emerald) 100%);
    border-color: var(--accent-emerald);
}

.avatar-circle.inactive {
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    border-color: #64748b;
    opacity: 0.8;
}

.status-dot-pulse {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #0f172a;
}

.status-dot-pulse.active {
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.status-dot-pulse.inactive {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.node-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.node-username {
    color: var(--accent-cyan);
    font-size: 10px;
    font-family: monospace;
    font-weight: 600;
    margin-bottom: 6px;
}

.node-stats-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
}

.node-stat-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.tree-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-cyan);
    color: #fff;
    border: 2px solid #0f172a;
    font-size: 12px;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.2s ease;
    z-index: 12;
}

.tree-toggle-btn:hover {
    transform: scale(1.2);
}

.tree-toggle-btn.collapsed {
    transform: rotate(-90deg);
    background: var(--accent-purple);
}

/* Animated ATM Card Styling */
.atm-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.atm-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 190px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(25, 33, 53, 0.95) 0%, rgba(13, 19, 33, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    margin: 10px auto;
    perspective: 1000px;
}

/* Hover Tilt and Outer Neon Glow */
.atm-card:hover {
    transform: translateY(-6px) rotateX(8deg) rotateY(6deg);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15), 0 0 25px rgba(139, 92, 246, 0.15);
    border-color: rgba(6, 182, 212, 0.35);
}

/* Hologram chip details */
.atm-card-chip {
    position: absolute;
    top: 25px;
    left: 20px;
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.atm-card-chip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        rgba(0, 0, 0, 0.08) 4px,
        rgba(0, 0, 0, 0.08) 8px
    );
    border-radius: 6px;
}

/* Glass Reflection effect */
.atm-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.6s ease;
    transform: rotate(-10deg);
    pointer-events: none;
    z-index: 1;
}

.atm-card:hover::after {
    left: 120%;
}

/* Card logo */
.atm-card-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    z-index: 2;
}

/* Card Number */
.atm-card-number {
    font-family: 'OCR A Extended', 'Courier New', monospace;
    font-size: 16px;
    color: #f8fafc;
    letter-spacing: 1.5px;
    margin-top: 55px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), -1px -1px 0 rgba(255,255,255,0.05);
    white-space: nowrap;
    z-index: 2;
}

/* Expiry styling */
.atm-card-expiry {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    z-index: 2;
}

.expiry-label {
    font-size: 6px;
    color: var(--text-secondary);
    line-height: 1.1;
    font-weight: 700;
}

.expiry-value {
    font-family: 'OCR A Extended', 'Courier New', monospace;
    font-size: 11px;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Holder/Code section */
.atm-card-holder {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    z-index: 2;
}

.code-label {
    font-size: 7px;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.code-value {
    font-family: 'OCR A Extended', 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Card balance */
.atm-card-amount {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-emerald);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
    z-index: 2;
}

.atm-card-holder-name {
    font-family: 'OCR A Extended', 'Courier New', monospace;
    font-size: 11px;
    color: #fff;
    letter-spacing: 0.5px;
    margin-top: 6px;
    text-transform: uppercase;
    z-index: 2;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}