/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #06ffa5;
    --danger: #ef233c;
    --warning: #f8961e;
    --info: #4cc9f0;
    --dark: #2b2d42;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --border: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.5;
}

/* Mobile Container */
.mobile-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    position: relative;
    box-shadow: var(--shadow-lg);
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.app-header h1 {
    font-size: 22px;
    font-weight: 600;
}

.app-header p {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 15px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    padding: 20px;
    padding-bottom: 80px;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius);
    padding: 20px;
    color: var(--white);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.balance-amount {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.balance-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
}

.stat-label {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.action-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--dark);
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.action-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.action-title {
    font-size: 14px;
    font-weight: 600;
}

/* Section Styles */
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Button Styles */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* Transaction List */
.transaction-list {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.3s;
}

.transaction-item:hover {
    background: var(--light);
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.transaction-details {
    font-size: 12px;
    color: var(--gray);
}

.transaction-amount {
    text-align: right;
}

.amount {
    font-weight: bold;
    font-size: 16px;
}

.amount.credit {
    color: var(--success);
}

.amount.debit {
    color: var(--danger);
}

.transaction-date {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: rgba(6, 255, 165, 0.2);
    color: #00a86b;
}

.badge-danger {
    background: rgba(239, 35, 60, 0.2);
    color: var(--danger);
}

.badge-warning {
    background: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 450px;
    margin: 0 auto;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    text-align: center;
    text-decoration: none;
    color: var(--gray);
    transition: color 0.3s;
    flex: 1;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 11px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 90%;
    width: 400px;
    max-height: 80%;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .balance-amount {
        font-size: 24px;
    }
    
    .quick-actions {
        gap: 10px;
    }
    
    .action-card {
        padding: 12px;
    }
    
    .action-icon {
        font-size: 24px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}