/* ============================================
   PANEL DE ADMINISTRACIÓN - BOLETOSTAR
   ============================================ */

.bt-admin-panel {
    background: #0d0d0d;
    color: #fff;
    padding: 30px;
    border-radius: 24px;
    margin: 40px 0;
    border: 1px solid #2a2a2a;
}

.bt-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.bt-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

.bt-tab-btn {
    background: none;
    border: none;
    color: #aaa;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.bt-tab-btn.active {
    color: #d4af37;
    border-bottom-color: #d4af37;
}

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

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

.bt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.bt-stat-card {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #333;
    text-align: center;
}

.bt-stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d4af37;
    margin-top: 10px;
}

.bt-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bt-chart-container {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 16px;
    overflow: hidden; /* Previene desbordamiento del canvas */
}

/* Asegurar que los canvas sean responsivos */
.bt-chart-container canvas {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    display: block;
}

.bt-table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.bt-tickets-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.bt-tickets-table th,
.bt-tickets-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.bt-tickets-table th {
    background: #1a1a1a;
    color: #d4af37;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.valid {
    background: #1e3a2f;
    color: #81c784;
}

.badge.used {
    background: #3a1e1e;
    color: #e57373;
}

.bt-table-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* ===== ESTILOS MEJORADOS PARA SELECT E INPUTS ===== */
.bt-table-filters select,
.bt-table-filters input,
.bt-occupancy-filters select,
.bt-events-management select,
#bt-settings-form input,
#bt-settings-form select {
    background: #1a1a1a;
    border: 1px solid #444;
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
    padding-right: 40px;
}

.bt-table-filters select:hover,
.bt-table-filters input:hover,
.bt-occupancy-filters select:hover,
.bt-events-management select:hover {
    border-color: #d4af37;
}

.bt-table-filters select:focus,
.bt-table-filters input:focus,
.bt-occupancy-filters select:focus,
.bt-events-management select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
    outline: none;
}

/* Inputs de texto */
.bt-table-filters input {
    background-image: none;
    padding-right: 18px;
    cursor: text;
}

/* Placeholder */
.bt-table-filters input::placeholder {
    color: #888;
}

/* Botones */
.btn {
    background: #d4af37;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    background: #e6c44a;
    transform: translateY(-1px);
}

.btn-danger {
    background: #c62828;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-small {
    background: #d4af37;
    color: black;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin: 2px;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #e6c44a;
}

.btn-warning {
    background: #ff9800;
}

.btn-warning:hover {
    background: #ffa726;
}

.bt-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.bt-pagination button {
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.bt-pagination button:hover {
    background: #333;
}

.bt-pagination button.active {
    background: #d4af37;
    color: black;
    border-color: #d4af37;
}

.bt-occupancy-section {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.bt-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.bt-section-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.bt-progress-bar {
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.bt-progress-fill {
    height: 100%;
}

.bt-rows-detail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.warning-text {
    color: #ff9800;
    margin-top: 10px;
}

#bt-settings-form label {
    display: block;
    margin: 15px 0 5px;
}

#bt-settings-form input {
    width: 100%;
    max-width: 400px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: white;
    padding: 12px;
    border-radius: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .bt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bt-charts-row {
        grid-template-columns: 1fr;
    }

    .bt-tabs {
        justify-content: center;
    }

    .bt-table-filters {
        flex-direction: column;
        gap: 10px;
    }

    .bt-table-filters select,
    .bt-table-filters input,
    .bt-table-filters .btn {
        width: 100%;
    }

    .bt-admin-panel {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .bt-stats-grid {
        grid-template-columns: 1fr;
    }

    .bt-stat-value {
        font-size: 2rem;
    }

    .bt-tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .bt-chart-container {
        padding: 15px;
    }
}