@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0A1E3C;
    --primary-dark: #061429;
    --secondary: #0055FF;
    --secondary-dark: #0044CC;
    --success: #00AA5E;
    --success-dark: #008847;
    --danger: #FF3B30;
    --warning: #FF9500;
    --info: #5856D6;
    --gray-50: #F9F9F9;
    --gray-100: #F2F2F2;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
}

/* Header - OPay Style */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 1.75rem;
    color: var(--secondary);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--secondary);
}

.nav-link.active {
    color: var(--secondary);
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--gray-200);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--secondary), var(--info));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Cards - OPay Style */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

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

.stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 85, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.stat-icon i {
    font-size: 1.25rem;
    color: var(--secondary);
}

.stat-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Buttons - OPay Style */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Forms - OPay Style */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
}

/* Network Selector */
.network-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.network-option {
    cursor: pointer;
}

.network-option input {
    display: none;
}

.network-card {
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.2s;
    background: white;
}

.network-option input:checked + .network-card {
    border-color: var(--secondary);
    background: rgba(0, 85, 255, 0.05);
}

.network-icon i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.network-name {
    font-weight: 600;
    font-size: 0.75rem;
}

/* Amount Grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.amount-btn {
    padding: 0.625rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.875rem;
}

.amount-btn:hover {
    border-color: var(--secondary);
    background: var(--gray-50);
}

.amount-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qty-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    background: white;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.qty-input {
    width: 4rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

/* Cost Summary */
.cost-summary {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.cost-row.total {
    border-top: 1px solid var(--gray-200);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
}

/* PINs Grid */
.pins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.pin-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.pin-card:hover {
    box-shadow: var(--shadow-md);
}

.pin-code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
    background: var(--gray-50);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background: rgba(0, 170, 94, 0.1); color: var(--success); }
.badge-danger { background: rgba(255, 59, 48, 0.1); color: var(--danger); }
.badge-warning { background: rgba(255, 149, 0, 0.1); color: var(--warning); }
.badge-info { background: rgba(88, 86, 214, 0.1); color: var(--info); }

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

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 0.75rem;
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

/* Alerts */
.alert {
    padding: 0.875rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(0, 170, 94, 0.1);
    color: var(--success);
    border-left: 3px solid var(--success);
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}

.alert-warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
    border-left: 3px solid var(--warning);
}

/* Payment Methods - OPay Style */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-option:hover {
    border-color: var(--secondary);
    background: var(--gray-50);
}

.payment-option.selected {
    border-color: var(--secondary);
    background: rgba(0, 85, 255, 0.05);
}

.payment-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.payment-details {
    flex: 1;
}

.payment-name {
    font-weight: 600;
}

.payment-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Bank Details */
.bank-details {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    text-align: center;
}

.bank-details p {
    margin: 0.5rem 0;
}

.copy-btn {
    background: var(--gray-200);
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1500;
    padding: 2rem;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    color: var(--gray-700);
    text-decoration: none;
    padding: 0.75rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pins-grid {
        grid-template-columns: 1fr;
    }
    
    .network-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.75rem;
}