/* 
 * ANL Network - Mobile-First Wallet Style CSS
 * Color Palette: 
 *   Blue (#007AFF) - iOS Blue / Primary App Color
 *   Green (#34C759) - iOS Green / Success / Positive
 *   Red (#FF3B30) - iOS Red / Danger / Withdrawal
 *   Gold (#FFD60A) - Gold Highlight / Secondary Accent
 */

/* ========================================================================= */
/* 1. Global & Base Styles (FINAL FIX FOR CENTERING & MARGIN) */
/* ========================================================================= */
/* FIX 1: Global Box Sizing for consistent padding/margin calculation */
*, *::before, *::after {
    box-sizing: border-box; 
}

/* FIX 2: Prevent horizontal scroll and ensure full width */
html, body {
    width: 100%;
    overflow-x: hidden; 
    padding: 0; /* Ensures no default padding */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5; /* Light background */
    margin: 0; /* CRITICAL FIX: Ensure zero default margin */
    color: #1c1c1e; /* Dark text */
    
    /* Global Login/Register Centering: REMOVED FLEX PROPERTIES FROM BODY */
    /* This allows form-container to be centered using margin: auto */
    min-height: 100vh;
}

a {
    color: #007AFF; /* iOS Blue */
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0056b3;
}

/* ========================================================================= */
/* 2. Button Styles (Unified for all pages) */
/* ========================================================================= */
.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #007AFF; /* Default: App Blue */
    color: white;
    border: none;
    border-radius: 8px; /* Rounded corners for app look */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 122, 255, 0.2); /* Subtle shadow */
}

.btn-submit:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.btn-submit:disabled {
    background-color: #a8a8a8 !important;
    box-shadow: none;
    cursor: not-allowed;
}

/* Specific Button Colors */
.btn-green {
    background-color: #34C759 !important; /* Green for Activation */
    box-shadow: 0 2px 5px rgba(52, 199, 89, 0.2);
}
.btn-green:hover {
    background-color: #28a745 !important;
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.3);
}

.btn-red {
    background-color: #FF3B30 !important; /* Red for Withdrawal */
    box-shadow: 0 2px 5px rgba(255, 59, 48, 0.2);
}
.btn-red:hover {
    background-color: #cc0000 !important;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
}

/* ========================================================================= */
/* 3. Alert/Message Styles (App Notifications look) */
/* ========================================================================= */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.alert-error {
    background-color: #ffeaea; /* Very Light Red */
    color: #FF3B30; /* iOS Red */
    border-left: 5px solid #FF3B30;
}

.alert-success {
    background-color: #e1f5e6; /* Very Light Green */
    color: #34C759; /* iOS Green */
    border-left: 5px solid #34C759;
}


/* ========================================================================= */
/* 4. Login/Register Page Layout (FINAL CENTERING FIX) */
/* ========================================================================= */
.login-header {
    background-color: #007AFF; 
    color: white;
    padding: 25px 20px;
    /* FIX: Use 100% width to let the element naturally span the width */
    width: 100%; 
    max-width: 100%;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.login-logo {
    font-size: 28px;
    font-weight: 700;
    color: #FFD60A; 
}

.form-container {
    width: 90%; 
    max-width: 400px;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    border-top: 5px solid #007AFF; 
    /* FIX: Use auto margins to center when not using body flex */
    margin: 40px auto; 
    
    /* Ensure it works correctly when body is flexed on taller screens */
    display: block; 
}

.form-title {
    text-align: center;
    color: #007AFF;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1c1c1e;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
}

/* Re-introduce flex for tall screens to center everything vertically */
@media (min-height: 800px) {
    body {
        display: flex;
        justify-content: center; /* Center vertically on taller screens */
        align-items: center; /* Center horizontally on taller screens */
    }
    .form-container {
         margin: 0; /* Reset margins when flex-centering */
    }
}


/* ========================================================================= */
/* 5. Dashboard & Content Layout (FIXED FOR MOBILE PADDING) */
/* ========================================================================= */
.header {
    background-color: #007AFF; /* Main App Blue */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* FIX: Use 100% width and let the overflow:hidden on html/body handle edges */
    width: 100%; 
    max-width: 100%;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #FFD60A; /* Gold */
}

.dashboard-layout {
    min-height: 100vh;
    width: 100%; 
    padding: 0;
}

.main-content {
    /* FIX: Ensure symmetrical padding and no sticking to the edges */
    padding: 15px 15px; 
    max-width: 600px; 
    margin: 0 auto;
}

/* Wallet Card (Primary focus - Crypto Wallet Style) */
.wallet-card {
    background: linear-gradient(135deg, #007AFF, #5AC8FA); /* Gradient Blue */
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
}

.wallet-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    opacity: 0.8;
}

.wallet-balance {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 5px;
}

.asset-value {
    font-size: 20px;
    font-weight: 500;
    color: #FFD60A; /* Gold for ANL Share Value */
}

/* Action Buttons Grid (Send/Receive/Transfer - Icon style) */
.action-grid {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 10px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.action-item {
    text-align: center;
    padding: 10px;
    color: #1c1c1e;
}

.action-item a {
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 24px;
    margin: 0 auto 5px auto;
    border-radius: 50%;
    background-color: #f2f2f7; /* Light grey background */
    color: #007AFF;
}

/* Info Cards (Standard App-like Cards) */
.info-card {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 5px solid transparent;
}

.info-card.green { border-left-color: #34C759; } /* iOS Green for Earnings/Cashback */
.info-card.gold { border-left-color: #FFD60A; } /* Gold for Shares/Royalty */

.card-title {
    font-size: 16px;
    color: #8e8e93; /* Subtle grey title */
    margin-top: 0;
    margin-bottom: 5px;
}

.card-value {
    font-size: 24px;
    font-weight: 600;
    color: #1c1c1e;
}

/* Activation Banner (Red/Orange) */
.activation-banner {
    padding: 15px;
    background-color: #FF3B30; /* iOS Red */
    color: white;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.activation-banner a {
    color: #FFD60A; /* Gold link */
    font-weight: bold;
    text-decoration: underline;
}

/* Transaction List (Simple list style) */
.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5ea;
}

.txn-type {
    font-weight: 500;
}

.txn-amount.plus { color: #34C759; } /* Green for positive */
.txn-amount.minus { color: #FF3B30; } /* Red for negative */


/* ========================================================================= */
/* 6. Mobile Navigation & Media Queries */
/* ========================================================================= */
.mobile-nav {
    display: none; /* Hide by default */
}

@media (max-width: 768px) {
    body {
        /* Reset body display for dashboard pages */
        display: block; 
        align-items: stretch;
    }
    .dashboard-layout {
        display: block; /* Stack content */
    }
    
    /* Remove traditional sidebar on mobile (if any was left) */
    .sidebar {
        display: none; 
    }
    
    /* FIX: Main content padding to account for bottom nav */
    .main-content {
        padding: 15px 15px 70px 15px; /* Top/Left/Right: 15px, Bottom: 70px for fixed nav */
    }
    
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: white;
        border-top: 1px solid #d1d1d6;
        padding: 5px 0;
        justify-content: space-around;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
        z-index: 100;
    }
    .mobile-nav-item {
        text-align: center;
        font-size: 12px;
        padding: 5px 0;
        flex: 1;
    }
    .mobile-nav-item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #8e8e93;
    }
    .mobile-nav-item a:hover, .mobile-nav-item.active a {
        color: #007AFF;
    }
    .nav-icon {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    /* Grid adjustments for mobile */
    .action-grid {
        margin: 10px 0;
    }
}

