/* ==========================================================================
   BetPro Mobile App-Like CSS Framework
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Root Settings
   -------------------------------------------------------------------------- */
:root {
    /* App Colors */
    --color-offwhite: #fbf7f4;
    --color-darkhead: #111312;
    --color-primaryred: #d92c27;
    --color-accentgold: #a6a15e;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Safe Areas for iOS */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
    
    /* App Dimensions */
    --header-height: 56px;
    --bottom-nav-height: 64px;
    --bottom-nav-height-safe: calc(64px + var(--safe-area-bottom));
}

/* --------------------------------------------------------------------------
   Base & Reset for App Feel
   -------------------------------------------------------------------------- */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    height: 100%;
    overflow: hidden;
    background-color: var(--color-offwhite);
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on interactive elements */
button, a, .no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* --------------------------------------------------------------------------
   App Shell Structure
   -------------------------------------------------------------------------- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    overflow: hidden;
    position: relative;
}

/* App Header - Compact Top Bar */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    padding-top: var(--safe-area-top);
    background: linear-gradient(135deg, var(--color-darkhead) 0%, #1a1c1d 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: max(16px, var(--safe-area-left));
    padding-right: max(16px, var(--safe-area-right));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.app-header.with-safe-area {
    height: calc(var(--header-height) + var(--safe-area-top));
}

.app-header .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accentgold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header .balance-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-header .balance-pill .amount {
    color: var(--color-accentgold);
}

/* App Content Area */
.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(var(--header-height) + var(--safe-area-top));
    padding-bottom: var(--bottom-nav-height-safe);
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

.app-content.no-header {
    padding-top: var(--safe-area-top);
}

.app-content.no-bottom-nav {
    padding-bottom: var(--safe-area-bottom);
}

/* Content padding */
.app-content-inner {
    padding: 16px;
    padding-bottom: 24px;
}

/* --------------------------------------------------------------------------
   Bottom Navigation Bar
   -------------------------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--bottom-nav-height-safe);
    background: var(--color-darkhead);
    padding-bottom: var(--safe-area-bottom);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: var(--bottom-nav-height);
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.bottom-nav-item span {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-nav-item.active {
    color: var(--color-accentgold);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item:active {
    background: rgba(255, 255, 255, 0.05);
}

/* Center action button (Bet Now) */
.bottom-nav-item.action-btn {
    position: relative;
}

.bottom-nav-item.action-btn .action-circle {
    position: absolute;
    top: -20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primaryred) 0%, #b91c1c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(217, 44, 39, 0.4);
    border: 4px solid var(--color-darkhead);
}

.bottom-nav-item.action-btn .action-circle i {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}

.bottom-nav-item.action-btn span {
    margin-top: 34px;
    color: var(--color-primaryred);
}

/* --------------------------------------------------------------------------
   Touch-Friendly Buttons
   -------------------------------------------------------------------------- */
.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    gap: 8px;
}

.app-btn:active {
    transform: scale(0.98);
}

.app-btn-primary {
    background: linear-gradient(135deg, var(--color-primaryred) 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(217, 44, 39, 0.3);
}

.app-btn-primary:active {
    box-shadow: 0 2px 6px rgba(217, 44, 39, 0.3);
}

.app-btn-secondary {
    background: var(--color-darkhead);
    color: var(--color-accentgold);
}

.app-btn-outline {
    background: transparent;
    border: 2px solid var(--color-primaryred);
    color: var(--color-primaryred);
}

.app-btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    color: white;
}

.app-btn-block {
    width: 100%;
}

.app-btn-sm {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 0.875rem;
}

.app-btn-lg {
    min-height: 56px;
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   App Cards
   -------------------------------------------------------------------------- */
.app-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.app-card-header {
    padding: 16px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid #e5e7eb;
}

.app-card-body {
    padding: 16px;
}

.app-card-footer {
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* Match Card - Special styling */
.match-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.match-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.match-card-header {
    background: linear-gradient(135deg, var(--color-darkhead) 0%, #1a1c1d 100%);
    padding: 12px 16px;
    text-align: center;
}

.match-card-header .match-time {
    font-size: 0.75rem;
    color: var(--color-accentgold);
    font-weight: 600;
}

.match-card-teams {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-card-team {
    flex: 1;
    text-align: center;
}

.match-card-team .team-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    border: 3px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-card-team .team-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.match-card-team .team-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--color-darkhead);
    max-width: 100px;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-card-vs {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #9ca3af;
}

.match-card-options {
    padding: 16px;
    border-top: 1px solid #f3f4f6;
    display: grid;
    gap: 8px;
}

.match-card-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.match-card-option:active {
    background: #fef2f2;
    border-color: var(--color-primaryred);
}

.match-card-option .option-name {
    font-weight: 600;
    color: var(--color-darkhead);
}

.match-card-option .option-odds {
    background: var(--color-darkhead);
    color: var(--color-accentgold);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Balance Widget
   -------------------------------------------------------------------------- */
.balance-widget {
    background: linear-gradient(135deg, var(--color-darkhead) 0%, #1a1c1d 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.balance-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(166, 161, 94, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.balance-widget .balance-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.balance-widget .balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accentgold);
    line-height: 1;
    margin-bottom: 20px;
}

.balance-widget .balance-actions {
    display: flex;
    gap: 12px;
}

.balance-widget .balance-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.balance-widget .balance-action-btn.deposit {
    background: var(--color-primaryred);
    color: white;
}

.balance-widget .balance-action-btn.withdraw {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Section Headers
   -------------------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-darkhead);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--color-primaryred);
}

.section-link {
    font-size: 0.875rem;
    color: var(--color-primaryred);
    font-weight: 600;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Form Styles - App-like
   -------------------------------------------------------------------------- */
.app-input-group {
    margin-bottom: 16px;
}

.app-input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-darkhead);
    margin-bottom: 8px;
}

.app-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.app-input:focus {
    outline: none;
    border-color: var(--color-accentgold);
    box-shadow: 0 0 0 4px rgba(166, 161, 94, 0.1);
}

.app-input::placeholder {
    color: #9ca3af;
}

.app-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 44px;
}

.app-textarea {
    height: auto;
    min-height: 120px;
    padding: 16px;
    resize: vertical;
}

/* --------------------------------------------------------------------------
   Status Badges
   -------------------------------------------------------------------------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-won, .status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-lost, .status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-refunded {
    background: #e5e7eb;
    color: #374151;
}

/* --------------------------------------------------------------------------
   List Styles
   -------------------------------------------------------------------------- */
.app-list {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.app-list-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.app-list-item:last-child {
    border-bottom: none;
}

.app-list-item:active {
    background: #f9fafb;
}

.app-list-item .item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 1.25rem;
}

.app-list-item .item-content {
    flex: 1;
    min-width: 0;
}

.app-list-item .item-title {
    font-weight: 600;
    color: var(--color-darkhead);
    margin-bottom: 2px;
}

.app-list-item .item-subtitle {
    font-size: 0.8125rem;
    color: #6b7280;
}

.app-list-item .item-value {
    text-align: right;
}

.app-list-item .item-amount {
    font-weight: 700;
    color: var(--color-darkhead);
}

.app-list-item .item-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Modal - App Style
   -------------------------------------------------------------------------- */
.app-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.app-modal-overlay.active {
    display: flex;
}

.app-modal {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.app-modal-overlay.active .app-modal {
    transform: translateY(0);
}

.app-modal-handle {
    width: 36px;
    height: 5px;
    background: #d1d5db;
    border-radius: 3px;
    margin: 12px auto;
}

.app-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-darkhead);
}

.app-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border: none;
    cursor: pointer;
}

.app-modal-body {
    padding: 20px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    padding-bottom: calc(20px + var(--safe-area-bottom));
}

/* Desktop modal style */
@media (min-width: 640px) {
    .app-modal-overlay {
        align-items: center;
        padding: 20px;
    }
    
    .app-modal {
        max-width: 440px;
        border-radius: 20px;
        transform: scale(0.95);
        opacity: 0;
    }
    
    .app-modal-overlay.active .app-modal {
        transform: scale(1);
        opacity: 1;
    }
    
    .app-modal-handle {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Alerts & Toast
   -------------------------------------------------------------------------- */
.app-alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.app-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.app-alert-success {
    background: #d1fae5;
    color: #065f46;
}

.app-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.app-alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.app-alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* --------------------------------------------------------------------------
   Page Transition Animations
   -------------------------------------------------------------------------- */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-slide-up {
    animation: slideInUp 0.4s ease-out;
}

.animate-fade {
    animation: fadeIn 0.3s ease-out;
}

/* Stagger children */
.stagger-children > * {
    animation: slideInUp 0.4s ease-out backwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.25s; }

/* --------------------------------------------------------------------------
   Pull to Refresh Visual (CSS only indicator)
   -------------------------------------------------------------------------- */
.pull-refresh-indicator {
    text-align: center;
    padding: 16px;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   Empty State
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-darkhead);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 280px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Tabs - App Style
   -------------------------------------------------------------------------- */
.app-tabs {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.app-tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: transparent;
}

.app-tab.active {
    background: white;
    color: var(--color-darkhead);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   Skeleton Loaders
   -------------------------------------------------------------------------- */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Page-Specific: Login/Register 
   -------------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--color-darkhead) 0%, var(--color-darkhead) 40%, var(--color-offwhite) 40%);
}

.auth-header {
    padding: 48px 24px 60px;
    text-align: center;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accentgold);
    margin-bottom: 8px;
}

.auth-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.auth-content {
    flex: 1;
    padding: 0 20px 40px;
    margin-top: -24px;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------------------------------
   Quick Stats Grid
   -------------------------------------------------------------------------- */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-stat {
    background: white;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quick-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-darkhead);
    line-height: 1.2;
}

.quick-stat .stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Responsive Utilities
   -------------------------------------------------------------------------- */
/* Hide on mobile */
@media (max-width: 639px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 640px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Desktop adjustments */
@media (min-width: 640px) {
    .app-content-inner {
        max-width: 480px;
        margin: 0 auto;
        padding: 24px;
    }
    
    /* Show larger match grid on tablet+ */
    .matches-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .app-content-inner {
        max-width: 800px;
    }
    
    .matches-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Admin Panel Overrides (Keep existing desktop design)
   -------------------------------------------------------------------------- */
.admin-panel {
    /* Admin pages use traditional layout */
    overflow: auto;
}

.admin-panel .app-content {
    padding-bottom: 0;
}

/* Mobile sidebar toggle for admin */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 150;
        transition: left 0.3s ease;
    }
    
    .admin-sidebar.open {
        left: 0;
    }
    
    .admin-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 140;
    }
    
    .admin-sidebar.open + .admin-overlay {
        display: block;
    }
}

/* --------------------------------------------------------------------------
   File Upload - App Style
   -------------------------------------------------------------------------- */
.app-file-upload {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.app-file-upload:active {
    border-color: var(--color-accentgold);
    background: #fefdf8;
}

.app-file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.app-file-upload i {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.app-file-upload .upload-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.app-file-upload .upload-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   QR Code Display
   -------------------------------------------------------------------------- */
.qr-display {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.qr-display img {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.copy-field {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-top: 16px;
}

.copy-field input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-darkhead);
}

.copy-field input:focus {
    outline: none;
}

.copy-field button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--color-darkhead);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Page Header (Sub-pages)
   -------------------------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
}

.page-header .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-darkhead);
    margin-right: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.page-header .page-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-darkhead);
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-gold { color: var(--color-accentgold); }
.text-red { color: var(--color-primaryred); }
.text-success { color: var(--color-success); }
.text-muted { color: #6b7280; }

.bg-dark { background-color: var(--color-darkhead); }

.rounded-xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

.shadow-app { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }

.mb-safe { margin-bottom: var(--safe-area-bottom); }
.pb-safe { padding-bottom: var(--safe-area-bottom); }

/* --------------------------------------------------------------------------
   Upload Progress Indicator
   -------------------------------------------------------------------------- */
.upload-progress-container {
    margin-top: 12px;
    display: none;
}

.upload-progress-container.active {
    display: block;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success), #34d399);
    border-radius: 999px;
    width: 0%;
    transition: width 0.2s ease-out;
}

.upload-progress-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
}

.upload-progress-text .progress-label {
    color: #6b7280;
}

.upload-progress-text .progress-percent {
    font-weight: 600;
    color: var(--color-success);
}

.upload-success-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    color: #059669;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.upload-success-indicator.active {
    display: flex;
}

.upload-success-indicator i {
    font-size: 1.1rem;
}

.upload-file-preview {
    margin-top: 12px;
    display: none;
}

.upload-file-preview.active {
    display: block;
}

.upload-file-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.upload-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #4b5563;
}

.upload-file-info i {
    color: var(--color-success);
    font-size: 1rem;
}

.upload-file-info .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-file-info .file-size {
    color: #9ca3af;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
