/* VARIABLES */
:root {
    --primary: #0d6efd;
    --secondary: #198754;
    --accent: #fd7e14;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #28a745;
    --warning: #ffc107;
    --info: #0dcaf0;
    --danger: #dc3545;
    --gray: #6c757d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 10px;
    --transition: all 0.3s ease;
}

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* LAYOUT */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

.main-app {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
    min-height: 100vh;
}

/* HEADER */
header {
    background: var(--primary);
    color: white;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
}

/* MAIN CONTENT */
.main-content {
    padding: 15px;
    position: relative;
    min-height: 500px;
}

.section-title {
    font-size: 1.1rem;
    margin: 15px 0 12px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* SERVICES GRID */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.service-item {
    background: var(--light);
    border-radius: var(--radius);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.service-item i {
    font-size: 1.5rem;
    margin-bottom: 6px;
    display: block;
    color: var(--primary);
    transition: var(--transition);
}

.service-item:hover i {
    color: var(--secondary);
}

.service-item span {
    font-size: 0.75rem;
    display: block;
    font-weight: 500;
    color: var(--dark);
}

/* PROMO SECTION */
.promo-section {
    background: linear-gradient(to right, var(--accent), #ff9800);
    border-radius: var(--radius);
    padding: 12px;
    color: white;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.promo-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    margin-bottom: 8px;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-icon {
    font-size: 1.8rem;
    opacity: 0.8;
}

.promo-text {
    font-size: 0.85rem;
    flex: 1;
}

.promo-text strong {
    font-weight: 700;
    font-size: 1rem;
}

/* BUTTONS */
.btn {
    display: inline-block;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: var(--shadow);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-whatsapp {
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 20px 0;
    padding: 14px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* TRANSACTION HISTORY */
.transaction-history {
    background: var(--light);
    border-radius: var(--radius);
    padding: 12px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--info);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
}

.history-details {
    flex: 1;
}

.history-title {
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--dark);
}

.history-date {
    font-size: 0.75rem;
    color: var(--gray);
}

.history-amount {
    font-weight: 700;
    font-size: 1rem;
    color: var(--success);
}

.history-amount.negative {
    color: var(--danger);
}

/* FOOTER */
footer {
    background: white;
    color: var(--gray);
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #e9ecef;
}

.footer-links {
    display: flex;
    justify-content: space-around;
    margin: 10px 0 15px;
}

.footer-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.75rem;
}

.footer-link i {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.footer-link.active {
    color: var(--primary);
}

.footer-link:hover {
    color: var(--primary);
}

.copyright {
    margin-top: 10px;
    color: var(--gray);
    font-size: 0.75rem;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    padding-top: 60px;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    background: var(--primary);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1001;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
    cursor: pointer;
}

.sidebar-item:hover {
    background: rgba(13, 110, 253, 0.05);
}

.sidebar-item i {
    width: 28px;
    font-size: 1.1rem;
    color: var(--primary);
}

.menu-text {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

/* LOGIN PAGE */
.login-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    width: 100%;
    max-width: 450px;
}

.login-header {
    margin-bottom: 30px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.login-logo .logo-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
}

.login-logo .logo-text {
    font-size: 1.8rem;
    color: var(--primary);
}

.login-header h2 {
    margin-bottom: 8px;
    color: var(--dark);
}

.login-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

.login-form {
    background: white;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.login-options {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
    z-index: 1;
}

.divider span {
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 15px;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    background: #f8f9fa;
}

.register-link {
    margin-top: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .service-item {
        padding: 10px 6px;
    }
    
    .service-item i {
        font-size: 1.3rem;
    }
    
    .social-login {
        flex-direction: column;
    }
}