:root {
    --primary: #60BCE1;
    --primary-dark: #297694;
    --secondary: #1e293b;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.mobile-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--background);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Authentification */
.auth-container {
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.logo h1 {
    font-size: 2rem;
    color: var(--text);
}

.auth-tabs {
    display: flex;
    background: var(--surface);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group i {
    color: var(--text-secondary);
}

.input-group input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Application */
.app-container {
    min-height: 100vh;
    padding-bottom: 80px;
}

.app-header {
    background: var(--surface);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.header-left h2 {
    color: var(--primary);
    font-size: 1.5rem;
}

.user-balance {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text);
}

.logout-btn {
    color: var(--text-secondary);
    font-size: 1.2rem;
    text-decoration: none;
}

.app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    padding: 10px 0;
    max-width: 480px;
    margin: 0 auto;
    z-index: 1000;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 0;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary);
}

.app-main {
    padding: 1rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.card h3 {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance {
    font-size: 2rem;
    font-weight: bold;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 1.5rem;
    color: var(--primary);
}

.send-form {
    background: var(--surface);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.send-form .input-group {
    background: var(--background);
    margin-bottom: 1rem;
}

.send-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.fee-info {
    background: var(--background);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.fee-info p {
    margin: 0.5rem 0;
}

.transactions-list {
    margin-top: 1rem;
}

.transaction-item {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.transaction-type i.sent {
    color: var(--danger);
}

.transaction-type i.received {
    color: var(--success);
}

.transaction-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.transaction-amount .negative {
    color: var(--danger);
    font-weight: bold;
}

.transaction-amount .positive {
    color: var(--success);
    font-weight: bold;
}

/* Panel d'administration */
.admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.stat-card h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.admin-tabs {
    display: flex;
    background: var(--surface);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 5px;
}

.admin-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.admin-tab-btn.active {
    background: var(--primary);
    color: white;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-table {
    width: 100%;
    background: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.85rem;
}

.admin-table thead {
    background: var(--background);
}

.admin-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}

.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.verified {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Page d'attente */
.pending-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--background);
}

.pending-content {
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.pending-icon {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 2rem;
}

.pending-content h2 {
    color: var(--text);
    margin-bottom: 2rem;
}

.pending-status {
    background: var(--surface);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.status-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-item i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.status-item h4 {
    color: var(--text);
    margin-bottom: 0.25rem;
}

.status-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.verification-form {
    background: var(--surface);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.verification-form h3 {
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
}

.resend-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.resend-link a {
    color: var(--primary);
    text-decoration: none;
}

.pending-info {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.pending-info p {
    color: var(--warning);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.pending-info i {
    margin-right: 0.5rem;
}

.logout-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Tableau de bord admin amélioré */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-card-small {
    background: var(--surface);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.admin-card-small h4 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.admin-card-small p {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-approve {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-approve:hover {
    background: rgba(16, 185, 129, 0.3);
}

.btn-reject {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-reject:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-view {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.3);
}

.transaction-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--surface);
    border-radius: 15px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-body textarea {
    width: 100%;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 100px;
}

.modal-body .transaction-details p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.modal-body .transaction-details strong {
    color: var(--text-secondary);
    min-width: 120px;
    display: inline-block;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* Admin links */
.admin-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link:hover {
    text-decoration: underline;
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

.admin-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

/* Transaction status colors */
.transaction-pending .transaction-amount {
    color: var(--warning);
}

.transaction-completed .transaction-amount {
    color: var(--success);
}

.transaction-failed .transaction-amount {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 480px) {
    .mobile-container {
        max-width: 100%;
    }
    
    .admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 5px 0;
    }
    
    .admin-tab-btn {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-sm {
        width: 100%;
    }
}