/* ============================================
   SISTEMA DE REVISION DE TEXTOS - TEMA OSCURO CON GRADIENTES
   ACTUALIZADO: 2026-01-11
   ============================================ */

:root {
    --primary: #3B82F6;
    --primary-dark: #1D4ED8;
    --primary-light: #60A5FA;
    --primary-lighter: rgba(59, 130, 246, 0.15);

    --secondary: #64748B;
    --secondary-light: #94A3B8;

    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --success-dark: #059669;
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.15);
    --warning-dark: #D97706;
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-dark: #DC2626;
    --info: #06B6D4;
    --info-light: rgba(6, 182, 212, 0.15);
    --info-dark: #0891B2;

    --bg-dark: #0F172A;
    --bg-darker: #020617;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;
    --surface: #1E293B;

    --border-dark: #334155;
    --border-medium: #475569;

    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    --gradient-dark: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    --gradient-card: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --gradient-info: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    --gradient-accent: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
}

/* ============================================
   NAVEGACION
   ============================================ */

.nav-top {
    background: var(--gradient-dark);
    border-bottom: 1px solid var(--border-dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.nav-brand i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-dark);
}

.nav-user i {
    color: var(--primary);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-btn {
    background: var(--gradient-primary);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   ALERTAS
   ============================================ */

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    border: 1px solid;
}

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

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

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border-color: rgba(6, 182, 212, 0.3);
}

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

/* ============================================
   TARJETAS DE ESTADISTICAS
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.stat-pending { background: var(--gradient-warning); }
.stat-working { background: var(--gradient-info); }
.stat-approved { background: var(--gradient-success); }
.stat-rejected { background: var(--gradient-danger); }
.stat-money { background: var(--gradient-accent); }

.stat-content { flex: 1; }

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-detail {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ============================================
   GRID PRINCIPAL
   ============================================ */

.main-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .main-grid { grid-template-columns: 1fr; }
}

/* ============================================
   TARJETAS
   ============================================ */

.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.25rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-dark);
    border: 2px solid var(--border-dark);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lighter);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background: var(--bg-darker);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-medium);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-medium);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.badge-working {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

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

.badge-rejected {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-dark);
}

/* ============================================
   ITEMS DE TEXTO
   ============================================ */

.texts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text-item {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.text-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.text-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.text-item:hover::before {
    opacity: 1;
}

.text-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.text-item-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.text-item-meta i {
    color: var(--primary);
}

.text-content {
    background: var(--bg-dark);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    max-height: 150px;
    overflow: hidden;
    position: relative;
}

.text-content.expanded {
    max-height: none;
}

.text-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   PAGINACION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.page-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ============================================
   ESTADO VACIO
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state-small {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.empty-state-small i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.active { display: flex; }

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-content,
.modal-container {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ============================================
   AUTENTICACION
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
    background-image:
        radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    padding: 2rem;
}

.auth-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    max-width: 450px;
    width: 100%;
}

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

.auth-header i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-dark);
    color: var(--text-muted);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   TABLAS
   ============================================ */

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg-dark);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-dark);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

.amount-warning {
    color: var(--warning);
    font-weight: 700;
    font-size: 1.125rem;
}

.amount-primary {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.125rem;
}

/* ============================================
   GRIDS ESPECIALES
   ============================================ */

.stats-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

/* ============================================
   TARJETAS DE USUARIO
   ============================================ */

.user-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.user-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.user-card:hover::before {
    transform: scaleX(1);
}

.user-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.user-info { flex: 1; }

.user-info h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}

.user-balance > i {
    font-size: 2rem;
    color: var(--success);
}

.balance-content { flex: 1; }

.balance-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success);
    line-height: 1;
}

.balance-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.user-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border-radius: var(--radius-md);
}

.user-action i {
    color: var(--primary);
}

/* ============================================
   ADMIN CARD
   ============================================ */

.admin-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.admin-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.admin-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.admin-card h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.admin-info {
    margin-bottom: 1rem;
}

.admin-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.admin-info i {
    color: var(--primary);
    width: 20px;
    margin-right: 0.5rem;
}

/* ============================================
   PERFIL DE USUARIO
   ============================================ */

.user-profile-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.profile-info { flex: 1; }

.profile-info h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-info p {
    margin: 0.25rem 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

/* ============================================
   INFO BOXES
   ============================================ */

.user-info-box {
    background: var(--primary-lighter);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: none;
}

.user-info-box.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.user-info-box h5 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

.info-item strong {
    color: var(--text-primary);
}

.payment-method-info {
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.75rem;
    border-left: 3px solid var(--success);
}

.payment-method-info i {
    color: var(--success);
    margin-right: 0.5rem;
}

.payment-method-info strong {
    color: var(--success);
}

.payment-method-info small {
    display: block;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   BANNER DE GANANCIAS
   ============================================ */

.earnings-week-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-xl);
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.earnings-week-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.earnings-week-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.earnings-week-icon i {
    font-size: 1.5rem;
    color: white;
}

.earnings-week-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.earnings-week-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.earnings-week-amount {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.earnings-week-detail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   TITULOS DE SECCION
   ============================================ */

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.section-title i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.section-hint {
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   NOTIFICACIONES
   ============================================ */

.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

.notification-hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

/* ============================================
   CHECKBOX
   ============================================ */

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    user-select: none;
}

/* ============================================
   CARD HEADER EXTRAS
   ============================================ */

.card-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.card-header-subtitle {
    display: block;
    font-size: 0.75rem;
    font-weight: normal;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ============================================
   FILTROS
   ============================================ */

.filter-card {
    margin-bottom: 1.5rem;
}

.filter-button {
    display: flex;
    align-items: end;
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-medium);
}

/* ============================================
   RANKING SEMANAL
   ============================================ */

.ranking-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2rem;
}

.ranking-header {
    background: var(--gradient-accent);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ranking-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ranking-header-left h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.ranking-header-left i {
    font-size: 1.5rem;
}

.ranking-week-info {
    font-size: 0.875rem;
    opacity: 0.9;
}

.ranking-body {
    padding: 0;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    transition: all 0.3s;
    position: relative;
}

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

.ranking-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.ranking-position {
    width: 65px;
    height: 65px;
    padding: 8px;
    border-radius: 50%;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    color: white;
    box-shadow: var(--shadow-md);
}

.ranking-position i.fa-crown {
    font-size: 1rem;
    line-height: 1;
    display: block !important;
    margin: 0;
}

.ranking-position .position-number {
    white-space: nowrap;
    line-height: 1;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0;
    display: block !important;
    text-align: center;
    margin: 0;
}

.ranking-position.top-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    animation: pulse-gold 2s ease-in-out infinite;
}

.ranking-position.top-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
}

.ranking-position.top-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
}

.ranking-position.other {
    background: var(--gradient-primary);
}

@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.ranking-user-info {
    flex: 1;
    min-width: 0;
}

.ranking-username {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ranking-username i {
    color: var(--primary);
    font-size: 0.875rem;
}

.ranking-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ranking-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ranking-stat i {
    color: var(--primary);
}

.ranking-earnings {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.ranking-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
}

.ranking-texts {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ranking-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.ranking-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.ranking-empty h4 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ranking-highlight {
    background: var(--primary-lighter);
    border-left: 4px solid var(--primary);
}

.ranking-highlight::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
}

/* ============================================
   UTILIDADES
   ============================================ */

.text-muted { color: var(--text-muted) !important; }
.payment-type {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .tables-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .main-container { padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .stats-grid-2 { grid-template-columns: 1fr; }
    .main-grid { grid-template-columns: 1fr; }
    .users-grid { grid-template-columns: 1fr; }
    .admins-grid { grid-template-columns: 1fr; }
    .filter-grid { grid-template-columns: 1fr; }

    .text-item-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .auth-card { padding: 1.5rem; }

    .earnings-week-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .earnings-week-detail {
        align-items: center;
    }

    .ranking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .ranking-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .ranking-user-info {
        flex: 1 1 100%;
        order: 2;
    }

    .ranking-earnings {
        order: 3;
        align-items: flex-start;
    }

    .ranking-position {
        order: 1;
    }
}
