/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #F8FBFF;
    color: #2C3E50;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F8FBFF;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E3F2FD;
    border-top: 4px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #4A90E2;
    font-size: 18px;
    font-weight: 600;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    margin-right: 12px;
    font-size: 28px;
}

.user-info {
    text-align: right;
}

.user-info span {
    display: block;
    font-size: 14px;
}

.user-info span:first-child {
    font-weight: 600;
    font-size: 16px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.back-btn {
    background: none;
    border: none;
    color: #4A90E2;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: #E3F2FD;
}

.section-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2C3E50;
    margin: 0;
}

/* Balance Card */
.balance-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.balance-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.balance-icon {
    width: 60px;
    height: 60px;
    background-color: #E3F2FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A90E2;
    font-size: 24px;
}

.balance-info h3 {
    color: #7F8C8D;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
    color: #4A90E2;
    margin-bottom: 4px;
}

.balance-info p {
    color: #7F8C8D;
    font-size: 14px;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.action-card {
    background: white;
    border: none;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.action-icon {
    width: 48px;
    height: 48px;
    background-color: #E3F2FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #4A90E2;
    font-size: 20px;
}

.action-card span {
    font-size: 14px;
    font-weight: 600;
    color: #2C3E50;
}

/* QR Codes Section */
.qr-codes-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.qr-codes-section .section-header {
    margin-bottom: 20px;
}

.refresh-btn {
    background: none;
    border: none;
    color: #4A90E2;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.refresh-btn:hover {
    background-color: #E3F2FD;
}

.qr-codes-list {
    display: grid;
    gap: 12px;
}

.qr-code-item {
    background: #F8FBFF;
    border: 1px solid #E1F5FE;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-code-id {
    font-size: 16px;
    font-weight: 600;
    color: #2C3E50;
}

.qr-code-meta {
    text-align: right;
}

.qr-code-type {
    font-size: 12px;
    color: #4A90E2;
    font-weight: 600;
    margin-bottom: 2px;
}

.qr-code-client {
    font-size: 12px;
    color: #7F8C8D;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 16px;
    font-weight: 600;
    color: #2C3E50;
}

.form-group input {
    padding: 16px;
    border: 1px solid #E1F5FE;
    border-radius: 12px;
    font-size: 16px;
    background-color: #F8FBFF;
    color: #2C3E50;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.help-text {
    font-size: 14px;
    color: #7F8C8D;
    margin-top: 4px;
}

/* Type Buttons */
.type-buttons {
    display: flex;
    gap: 12px;
}

.type-btn {
    flex: 1;
    padding: 16px;
    border: 1px solid #E1F5FE;
    border-radius: 12px;
    background-color: #F8FBFF;
    color: #4A90E2;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.type-btn.active {
    background-color: #4A90E2;
    color: white;
    border-color: #4A90E2;
}

/* Package Grid */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.package-card {
    background: #F8FBFF;
    border: 1px solid #E1F5FE;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.package-card:hover {
    border-color: #4A90E2;
    background-color: #E3F2FD;
}

.package-card.selected {
    background-color: #4A90E2;
    color: white;
    border-color: #4A90E2;
}

.package-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.package-card .price {
    font-size: 18px;
    font-weight: 700;
    color: #4A90E2;
    margin-bottom: 4px;
}

.package-card.selected .price {
    color: white;
}

.discount {
    font-size: 10px;
    color: #E74C3C;
    font-weight: 600;
    background-color: #FFEBEE;
    padding: 2px 6px;
    border-radius: 4px;
}

.package-card.selected .discount {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: #4A90E2;
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background-color: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background-color: #F1F3F4;
    color: #7F8C8D;
    border: 1px solid #E1F5FE;
}

.btn-secondary:hover {
    background-color: #E8EAED;
}

/* Generated QR Display */
.generated-qr {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.generated-qr h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 16px;
}

.qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-display canvas {
    border: 1px solid #E1F5FE;
    border-radius: 8px;
    padding: 8px;
    background: white;
}

.qr-display p {
    font-size: 16px;
    font-weight: 600;
    color: #4A90E2;
}

/* Profile Section */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-header {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}

.profile-info h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 16px;
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background-color: #E3F2FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #4A90E2;
    font-size: 18px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #4A90E2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #7F8C8D;
}

/* Profile Details */
.profile-details {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.profile-details h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F1F3F4;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item i {
    width: 32px;
    height: 32px;
    background-color: #E3F2FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A90E2;
    font-size: 14px;
}

.detail-item div {
    flex: 1;
}

.detail-item label {
    display: block;
    font-size: 12px;
    color: #7F8C8D;
    margin-bottom: 2px;
}

.detail-item span {
    font-size: 16px;
    color: #2C3E50;
    font-weight: 500;
}

/* Profile Actions */
.profile-actions, .support-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.1);
    border: 1px solid #E1F5FE;
}

.profile-actions h3, .support-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 16px;
}

.action-btn {
    width: 100%;
    background: none;
    border: 1px solid #E1F5FE;
    border-radius: 12px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2C3E50;
    font-size: 16px;
    margin-bottom: 8px;
}

.action-btn:hover {
    background-color: #F8FBFF;
    border-color: #4A90E2;
}

.action-btn i {
    color: #4A90E2;
    font-size: 18px;
    width: 20px;
}

/* Bottom Navigation */
.bottom-nav {
    background: white;
    border-top: 1px solid #E1F5FE;
    padding: 12px 20px 24px;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(74, 144, 226, 0.1);
}

.nav-item {
    background: none;
    border: none;
    color: #B0BEC5;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
    min-width: 60px;
}

.nav-item:hover {
    color: #4A90E2;
    background-color: #E3F2FD;
}

.nav-item.active {
    color: #4A90E2;
    background-color: #E3F2FD;
}

.nav-item i {
    font-size: 20px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .user-info {
        text-align: center;
    }
    
    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .package-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .type-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    .balance-header {
        flex-direction: column;
        text-align: center;
    }
    
    .package-grid {
        grid-template-columns: 1fr;
    }
    
    .bottom-nav {
        padding: 8px 16px 20px;
    }
    
    .nav-item {
        min-width: 50px;
    }
    
    .nav-item span {
        font-size: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
} 