
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

body {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    width:100vw;
    max-width: 1000px;
}

/* Page Container */
.page {
    box-sizing: border-box;
    display: none;
    min-height: 100vh;
    width: 100%;
    margin: auto;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auth Pages (Sign In/Sign Up) */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--primary-gradient);
    padding: 40px 24px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 48px;
}

.auth-logo-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 48px;
    font-weight: 900;
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-lg);
}

.auth-logo h1 {
    color: white;
    font-size: 28px;
    font-weight: 800;
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    font-size: 14px;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
    max-width: 450px; 
} 
 
.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #f9fafb;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: scale(0.98);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.country-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    user-select: none;
}

.user-id {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: monospace;
    margin-top: 2px;
}

/* App Header */
.app-header {
    background: var(--card-bg);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.user-details h3 {
    font-size: 16px;
    font-weight: 700;
}

.user-country {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

.header-greeting {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* App Grid */
.section-title {
    padding: 24px 20px 12px;
    font-size: 18px;
    font-weight: 700;
}

.apps-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px 20px;
}

.app-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-card:active {
    transform: scale(0.98);
}

.app-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

/*.app-icon.fintech { background: linear-gradient(135deg, #3b82f6, #1e40af); }
.app-icon.ecommerce { background: linear-gradient(135deg, #10b981, #059669); }
.app-icon.infotech { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }*/

.app-content {
    flex: 1;
}

.app-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Notifications Page */
.notifications-list {
    padding: 0 20px 20px;
}

.notification-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    cursor: pointer;
}

.notification-item.unread {
    border-left: 4px solid var(--primary-color);
}

.notification-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notification-icon-circle.success { background: #d1fae5; }
.notification-icon-circle.info { background: #dbeafe; }
.notification-icon-circle.warning { background: #fef3c7; }

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Profile Page */
.profile-header {
    background: var(--primary-gradient);
    padding: 40px 20px;
    text-align: center;
    color: white;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-country {
    font-size: 14px;
    opacity: 0.9;
}

.profile-menu {
    padding: 20px;
}

.menu-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--background);
}

.menu-item-text {
    font-size: 15px;
    font-weight: 600;
}

.menu-item-arrow {
    color: var(--text-secondary);
    font-size: 18px;
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    margin-top: 20px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex: 1;
    padding: 8px 0;
    transition: all 0.2s;
}

.nav-icon {
    font-size: 24px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-label {
    font-size: 11px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-item.active .nav-icon,
.nav-item.active .nav-label {
    color: var(--primary-color);
}

/* Wallet Page */
.wallet-balance {
    background: var(--primary-gradient);
    margin: 20px;
    padding: 32px 24px;
    border-radius: 20px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 4px;
}

.balance-currency {
    font-size: 16px;
    opacity: 0.9;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 0 20px 20px;
}

.action-btn {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px 8px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--background);
}

.action-label {
    font-size: 11px;
    font-weight: 600;
}

/* Page Header with Back Button */
.page-header {
    background: var(--card-bg);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (min-width: 480px) {
    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
