/* Estilos específicos para el panel de administrador */
.admin-body {
    background: var(--bg-page);
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main";
    grid-template-columns: 250px 1fr;
    grid-template-rows: 70px 1fr;
    min-height: 100vh;
}

/* Header del Administrador */
.admin-header {
    grid-area: header;
    background: var(--bg-header);
    color: var(--text-on-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 100%;
}

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

.admin-logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-logo i {
    font-size: 20px;
    color: var(--primary);
}

.admin-logo h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

#adminUserName {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

#adminUserName i {
    color: var(--primary);
    font-size: 16px;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Sidebar */
.admin-sidebar {
    grid-area: sidebar;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 24px 0;
}

.admin-menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: var(--sidebar-item-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: var(--sidebar-item-hover-bg);
    color: var(--sidebar-item-hover-color);
}

.menu-item.active {
    background: var(--sidebar-item-active-bg);
    color: var(--sidebar-item-active-color);
    border-left-color: var(--sidebar-item-active-border);
    font-weight: 600;
}

.menu-item i {
    width: 18px;
    text-align: center;
}

/* Contenido Principal */
.admin-main {
    grid-area: main;
    padding: 20px;
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.section-header p {
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

/* Tarjetas de Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stat-info p {
    color: var(--text-secondary);
    margin: 2px 0 0 0;
    font-size: 13px;
}

/* Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.chart-placeholder {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-page);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}

.chart-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Tablas */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

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

.admin-table th {
    background: var(--bg-table-header);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: var(--bg-table-row-hover);
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Filtros */
.filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filters select,
.filters input {
    padding: 8px 12px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-primary);
}

/* Reportes */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.report-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    text-align: center;
}

.report-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.report-card p {
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    font-size: 14px;
}

/* Configuración */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.setting-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.setting-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.setting-item label {
    font-weight: 500;
    color: var(--text-primary);
}

.setting-item input {
    padding: 6px 10px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    width: 100px;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator.connected {
    background: var(--success-light);
    color: var(--success-text);
}

.status-indicator.disconnected {
    background: var(--error-light);
    color: var(--error-text);
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    padding-bottom: 0;
}

.settings-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border-radius: 6px 6px 0 0;
}

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

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

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

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

/* Orphaned Accounts Panel */
.orphaned-accounts-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.orphaned-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.orphaned-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.orphaned-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.btn-analyze {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.btn-analyze:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.orphaned-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.orphaned-status.loading {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}

.orphaned-status.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.orphaned-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.orphaned-summary .summary-item {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.orphaned-summary .summary-item strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.orphaned-summary .summary-item span {
    color: var(--text-secondary);
}

.orphaned-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.orphaned-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.orphaned-table thead th {
    background: var(--bg-table-header);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.orphaned-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.orphaned-table tbody tr:hover {
    background: var(--bg-table-row-hover);
}

.orphaned-table .uid-cell {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orphaned-table .provider-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-delete-orphan {
    padding: 6px 14px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-delete-orphan:hover {
    background: #fca5a5;
    color: #7f1d1d;
}

.btn-delete-orphan:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.orphaned-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.orphaned-empty i {
    font-size: 2.5rem;
    color: var(--success);
    margin-bottom: 12px;
    display: block;
}

.orphaned-empty p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* DIDIT KYC Config Panel */
.didit-config-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
}

.didit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.didit-header-info h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.didit-header-info h3 i {
    color: var(--primary);
    margin-right: 6px;
}

.didit-header-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.didit-header-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.didit-header-info a:hover {
    text-decoration: underline;
}

.btn-didit-load {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-didit-load:hover { background: var(--primary-hover); }
.btn-didit-load:disabled { opacity: 0.5; cursor: not-allowed; }

.didit-status {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.didit-status.loading {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.didit-status.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.didit-status.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.didit-section {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.didit-section h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.didit-section h4 i {
    color: var(--primary);
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.didit-field {
    margin-bottom: 14px;
}

.didit-field:last-child {
    margin-bottom: 0;
}

.didit-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.didit-input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input);
    transition: border-color 0.2s;
}

.didit-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.didit-input-group input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-primary);
    background: transparent;
    outline: none;
    min-width: 0;
}

.didit-input-group input[readonly] {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
}

.didit-input-group input.didit-masked {
    -webkit-text-security: disc;
    color: var(--text-muted);
}

.didit-input-group input:not([readonly]) {
    background: var(--bg-input);
}

.btn-copy-field,
.btn-toggle-field {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    border: none;
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 1px solid var(--border);
}

.btn-copy-field:hover,
.btn-toggle-field:hover {
    background: var(--border);
    color: var(--text-primary);
}

.didit-field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.didit-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.didit-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.didit-meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.didit-meta-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.didit-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.btn-didit-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-didit-edit:hover {
    background: var(--border);
    color: var(--text-primary);
}

.btn-didit-save {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-didit-save:hover { background: #059669; }
.btn-didit-save:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-didit-cancel {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-didit-cancel:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.didit-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.didit-empty i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.didit-empty p {
    font-size: 0.9rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.btn-didit-init {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

@media (max-width: 768px) {
    .settings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .settings-tab {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .orphaned-header {
        flex-direction: column;
    }

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

    .orphaned-summary {
        flex-direction: column;
    }

    .didit-header {
        flex-direction: column;
    }

    .btn-didit-load {
        width: 100%;
        justify-content: center;
    }

    .didit-meta-grid {
        grid-template-columns: 1fr;
    }

    .didit-actions {
        flex-wrap: wrap;
    }

    .didit-actions button {
        flex: 1;
        justify-content: center;
    }
}

/* Logs */
.logs-container {
    background: var(--bg-header);
    border-radius: 8px;
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
}

.log-entry {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
}

.log-time {
    color: var(--text-muted);
    min-width: 140px;
}

.log-level {
    min-width: 50px;
    font-weight: 600;
    text-align: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.log-level.info {
    background: #3b82f6;
    color: #fff;
}

.log-level.warning {
    background: #f59e0b;
    color: #fff;
}

.log-level.error {
    background: #ef4444;
    color: #fff;
}

.log-message {
    color: var(--text-on-dark);
    flex: 1;
}

/* Botones */
.btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-input);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-body {
        grid-template-areas: 
            "header"
            "main";
        grid-template-columns: 1fr;
        grid-template-rows: 70px 1fr;
    }
    
    .admin-sidebar {
        position: fixed;
        left: -250px;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .admin-sidebar.open {
        left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .admin-table {
        font-size: 14px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 8px;
    }
}

/* Estilos para Gestión de Tasas */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.rate-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-table-header);
    border-bottom: 1px solid var(--border);
}

.rate-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.rate-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rate-status.active {
    background: var(--success-light);
    color: var(--success-text);
}

.rate-status.inactive {
    background: var(--error-light);
    color: var(--error-text);
}

.rate-content {
    padding: 16px 24px 24px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.currency-pair {
    font-weight: 500;
    color: var(--text-primary);
}

.rate-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.btn-edit {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-input);
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-edit:hover {
    background: var(--border);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-edit i {
    font-size: 14px;
}

.rates-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.rates-table-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Responsive para Gestión de Tasas */
@media (max-width: 768px) {
    .rates-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .rate-header {
        padding: 16px 20px;
    }
    
    .rate-content {
        padding: 12px 20px 20px;
    }
    
    .rate-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .btn-edit {
        align-self: flex-end;
    }
}

/* ===================================
   PROGRAMS & COMMISSIONS SECTION
   =================================== */
/* =============================================
   PROGRAMS GRID (side by side)
   ============================================= */
.programs-container-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.program-card-compact {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
}

.program-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.program-header-compact h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.program-header-compact h3 i {
    color: #6366f1;
}

.program-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.program-badge.europa {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.program-badge.latam {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Program table */
.program-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}

.program-table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.program-table thead th:not(:first-child) {
    text-align: center;
}

.program-table tbody tr {
    border-bottom: 1px solid var(--border);
}

.program-table tbody tr:last-child {
    border-bottom: none;
}

.program-table tbody td {
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}

.program-table tbody td:not(:first-child) {
    text-align: center;
}

.membership-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tier-adv { color: #f59e0b; }
.tier-start { color: #6366f1; }
.tier-rook { color: #10b981; }

.commission-input-sm,
.price-input-sm {
    width: 70px;
    padding: 0.3rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    text-align: center;
    transition: border-color 0.2s;
}

.commission-input-sm {
    color: #f59e0b;
}

.commission-input-sm.crypto {
    color: #8b5cf6;
}

.price-input-sm {
    color: #6366f1;
}

.commission-input-sm:focus,
.price-input-sm:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Hide number input spinners for compact look */
.commission-input-sm::-webkit-inner-spin-button,
.commission-input-sm::-webkit-outer-spin-button,
.price-input-sm::-webkit-inner-spin-button,
.price-input-sm::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.commission-input-sm[type=number],
.price-input-sm[type=number] {
    -moz-appearance: textfield;
}

.save-program-btn-sm {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.save-program-btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.3);
}

@media (max-width: 768px) {
    .programs-container-grid {
        grid-template-columns: 1fr;
    }

    .eur-rate-body {
        flex-direction: column;
        align-items: stretch;
    }

    .commission-input-sm,
    .price-input-sm {
        width: 60px;
    }
}
