/* Stili base già in bg-unified.css - rimossi duplicati */

/* Stili tabelle report già in bg-unified.css - rimossi duplicati */

/* Stili completed/failed righe tabelle già in bg-unified.css - rimossi duplicati */

/* Top Clienti - Colonna posizione */
.bg-sales-report th.bg-position,
.bg-sales-report td.bg-position {
    width: 50px;
    text-align: center;
    font-weight: bold;
}

/* Top Clienti - Colonna prenotazioni */
.bg-sales-report th.bg-bookings,
.bg-sales-report td.bg-bookings {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.bg-sales-report th.bg-paid {
    text-align: right;
}

.bg-sales-report td.bg-paid {
    text-align: right;
}

.bg-sales-report td.bg-post {
    text-align: right;
}

.bg-sales-report td.bg-owed {
    text-align: right;
}

.bg-sales-report td.bg-price {
    text-align: right;
}

.bg-price {
    max-width: 85px;
    width: 85px;
}

.bg-paid {
    min-width: 110px;
    width: auto;
}

.bg-purchaser {
    width: auto;
    min-width: 120px;
    max-width: none;
    white-space: nowrap;
}

.bg-whatsapp {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    text-align: center;
    padding: 5px !important;
}

.bg-whatsapp a {
    display: inline-block;
    text-decoration: none;
}

.bg-whatsapp-icon {
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.bg-whatsapp a:hover .bg-whatsapp-icon {
    transform: scale(1.2);
}

.bg-sales-report caption {
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1.5;
    margin-top: 2em;
}

.bg-sales-report thead th {
    background: #e9e9e9;
    text-align: center !important;
}

.bg-sales-report .bg-tickets {
    text-align: left;
    width: 70px;
    line-height: 1.2;
}

.bg-sales-report .bg-n_tickets {
    width: 50px;
    max-width: 50px;
    text-align: center;
}

.bg-sales-report .bg-status {
    width: 55px;
}

.bg-sales-report th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 20px !important;
    text-align: center !important;
}

.bg-sales-report th.sortable:after {
    content: '⇕';
    position: absolute;
    right: 5px;
    color: #999;
}

.bg-sales-report th.sorting-asc:after {
    content: '↑';
    color: #333;
}

.bg-sales-report th.sorting-desc:after {
    content: '↓';
    color: #333;
}

.bg-sales-report tr.alternate {
    background-color: #f9f9f9;
}

.bg-sales-report tr.even {
    background-color: #ffffff;
}

.bg-sales-report tr.bg-report-row.even {
    background-color: #f9f9f9;
}

.bg-sales-report tr.bg-report-row.odd {
    background-color: #ffffff;
}

.bg-sales-report tr.bg-report-row:hover {
    background-color: #f5f5f5;
}

.bg-sales-report .bg-type br + * {
    margin-top: 3px;
}

.bg-sales-report .bg-type .bg-money-format {
    color: #666;
    font-size: 0.95em;
}

/* .tablenav e .tablenav-pages già in bg-unified.css */

.bg-summary-value strong {
    color: #000;
    font-size: 16px;
    font-weight: 600;
}

/* .bg-filter-available, .bg-settings-section, .mt, .pending già in bg-unified.css */

/* .sortable-table, .table-container, .bg_sandbox_enabled, .extra-info-item, notice.e-notice già in bg-unified.css */

#sm_levels_settings {
    box-sizing: border-box;
}

#sm_levels_settings * {
    box-sizing: border-box;
}

#sm_levels_settings .postbox {
    position: static !important;
    z-index: 1;
    margin-bottom: 20px;
    background: transparent !important;
}

#sm_levels_settings .postbox.closed {
    overflow: visible;
}

#sm_levels_settings .postbox .inside {
    overflow: visible !important;
}

#sm_levels_settings .postbox .hndle {
    cursor: pointer;
}

#sm_levels_settings .form-table th {
    width: 200px;
}

#sm_levels_settings .level-row {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#sm_levels_settings .level-row:nth-child(even) {
    background: #fff;
}

#sm_levels_settings .level-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

#sm_levels_settings .level-name {
    font-weight: 600;
    font-size: 14px;
}

#sm_levels_settings .level-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

#sm_levels_settings input[type="number"] {
    max-width: 200px;
    width: 100%;
}

#sm_levels_settings input[type="text"] {
    max-width: 200px;
    width: 100%;
}

.sm-yearly-settings {
    width: 100%;
}

.sm-yearly-settings .form-table th {
    width: 200px;
}

.sm-yearly-settings textarea {
    width: 100%;
    min-height: 500px;
    font-family: monospace;
    font-size: 13px;
}

.sm-yearly-settings input[type="text"] {
    width: 100%;
}

.sm-info-box {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 20px 0;
}

.sm-info-box h4 {
    margin-top: 0;
}

.sm-info-box code {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
}

.sm-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sm-buttons .button-secondary {
    background: #f0f0f1;
}

.sm-buttons .button-warning {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.sm-buttons .button-warning:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

#sm_levels_settings .postbox > .inside {
    background: #fff;
}

#sm_levels_settings .sm-level-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    margin-bottom: 15px;
    position: static !important;
}

.biglietteria-levels .sm-level-box .hndle {
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid #ccd0d4;
    background: #f5f5f5;
    cursor: default;
}

.biglietteria-levels .sm-level-name-preview {
    font-weight: normal;
    color: #666;
}

.biglietteria-levels .sm-level-table {
    margin: 0;
}

.biglietteria-levels .sm-level-table th {
    width: 150px;
    padding: 15px 10px;
}

.biglietteria-levels .sm-level-table td {
    padding: 15px 10px;
}

.biglietteria-levels .inside {
    padding: 0 15px 15px;
    margin: 0;
}

.biglietteria-levels .postbox > .inside {
    padding-top: 15px;
}

.biglietteria-levels .sm-level-box .inside {
    padding: 0;
}

/* =====================================================================
   POPUP DESTINATARI BIGLIETTI (Metabox Evento)
   ===================================================================== */
.bg-label-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bg-recipients-btn {
    padding: 0 6px !important;
    min-width: 30px;
}

.bg-recipients-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.bg-recipients-tags {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.bg-recipients-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    display: none;
}

.bg-recipients-popup.visible {
    display: flex;
}

.bg-recipients-popup-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 350px;
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.bg-recipients-popup-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bg-recipients-popup-header h4 {
    margin: 0;
}

.bg-recipients-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.bg-recipients-popup-body {
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bg-recipient-option {
    display: flex !important;
    align-items: center;
    padding: 14px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    background: #fafafa;
    transition: all 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}

.bg-recipient-option:hover {
    background: #e8f4fc;
    border-color: #0073aa;
}

.bg-recipient-option input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bg-recipient-option input:checked + span,
.bg-recipient-option:has(input:checked) {
    font-weight: 600;
    color: #0073aa;
}

.bg-recipients-popup-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ==========================================================================
   METABOX BIGLIETTERIA - PAGINA PRODOTTO
   ========================================================================== */

/* Mostra le iconcine di spostamento sui metabox */
#bg_biglietteria_box .handle-order-higher,
#bg_biglietteria_box .handle-order-lower,
#bg_biglietteria_box .handlediv {
    display: inline-block !important;
    visibility: visible !important;
}

/* ==========================================================================
   TABELLA PREZZI BIGLIETTI - LAYOUT COMPATTO
   ========================================================================== */

.widefat.bg-pricing {
  padding: 5px;
}
   
/* Pulsanti freccia su/giù/X più piccoli */
.bg-pricing .bg-controls button.button {
    margin: 0 0px !important;
  padding: 1px 0px !important;
  width: 25px !important;
  height: 29px !important;
}

.bg-pricing .bg-controls .dashicons {
    font-size: 12px !important;
    height: 12px !important;
    width: 12px !important;
}

/* Colonna Sposta - molto stretta */
.bg-pricing td:nth-child(1),
.bg-pricing th:nth-child(1) {
    padding: 2px !important;
    white-space: nowrap;
    width: 90px !important;
}

/* Colonna Etichetta - più larga */
.bg-pricing td:nth-child(2),
.bg-pricing th:nth-child(2) {
    width: 200px !important;
}

.bg-pricing td:nth-child(2) input[type="text"] {
    width: 200px !important;
}

/* Colonna Prezzo */
.bg-pricing td:nth-child(3),
.bg-pricing th:nth-child(3) {
    width: 55px !important;
}

.bg-pricing td:nth-child(3) input {
    width: 60px !important;
}

/* Pulsante tipo biglietto più piccolo */
.bg-pricing td:nth-child(3) button {
    min-width: 20px !important;
    padding: 2px 4px !important;
}

/* Colonna Disponibilità e Venduti più strette */
.bg-pricing td:nth-child(4),
.bg-pricing td:nth-child(5),
.bg-pricing th:nth-child(4),
.bg-pricing th:nth-child(5) {
    text-align: center;
    width: 50px !important;
}

.bg-pricing td:nth-child(4) input,
.bg-pricing td:nth-child(5) input {
    text-align: center;
    width: 40px !important;
}

/* Colonne Sconto a Tempo */
.bg-pricing td:nth-child(6),
.bg-pricing th:nth-child(6) {
    width: 60px !important;
}

.bg-pricing td:nth-child(6) input {
    width: 50px !important;
}

/* Colonna Scadenza Sconto */
.bg-pricing td:nth-child(7),
.bg-pricing th:nth-child(7) {
    width: 120px !important;
}

.bg-pricing td:nth-child(7) input {
    font-size: 11px !important;
    width: 100% !important;
}

/* Colonna Chiudi Vendite */
.bg-pricing td:nth-child(8),
.bg-pricing th:nth-child(8) {
    width: 120px !important;
}

.bg-pricing td:nth-child(8) input {
    font-size: 11px !important;
    width: 100% !important;
}

/* Intestazioni più compatte */
.bg-pricing th {
    font-size: 10px !important;
    padding: 4px 2px !important;
    white-space: nowrap;
}

.bg-pricing td {
    padding: 3px 2px !important;
}

/* Tabella non supera il contenitore */
.bg-pricing {
    table-layout: fixed !important;
    width: 100% !important;
}

/* ============================================================
   AFFITTO SALA - Stili per report e scheda evento
   ============================================================ */

/* Righe Affitto Sala nel report - sfondo arancione chiaro */
.widefat.bg-sales-report tbody tr.bg-venue-rental-row,
.widefat.bg-sales-report tbody tr.bg-venue-rental-row > td {
    background-color: #fef3c7 !important;
    border-left: 3px solid #f59e0b;
}

.widefat.bg-sales-report tbody tr.bg-venue-rental-row:nth-child(even),
.widefat.bg-sales-report tbody tr.bg-venue-rental-row:nth-child(even) > td {
    background-color: #fde68a !important;
}

/* Icona prima del nome evento per Affitto Sala */
.bg-venue-rental-row td.bg-events::before {
    content: "🏛️ ";
}

/* Box riepilogo Affitto Sala */
.bg-venue-rental-summary {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.bg-venue-rental-summary h3 {
    color: #92400e;
}

/* Box Affitto Sala nella scheda evento */
.bg-venue-rental-box {
    border: 2px solid #f59e0b;
    background: #fffbeb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
}

/* ============================================================================
 * COLONNE LISTA PAGAMENTI ADMIN
 * ============================================================================ */

.fixed .column-bg_order_id {
    width: 70px;
}

.fixed .column-bg_is_event {
    min-width: 180px;
    width: 180px;
}

.column-bg_is_event .mt.is-event div {
    white-space: nowrap;
}

/* ============================================================================
 * EMAIL RICORRENZE - PAGINA ADMIN
 * ============================================================================ */

.bg-recurring-emails-admin {
    max-width: 900px;
}

.bg-variables-box {
    background: #f0f6fc;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    margin: 20px 0;
    padding: 15px 20px;
}

.bg-variables-box h4 {
    margin: 0 0 10px;
}

.bg-variables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bg-var-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: inline-block;
    font-size: 12px;
    padding: 4px 8px;
}

.bg-var-item code {
    background: #e7e7e7;
    border-radius: 2px;
    margin-right: 4px;
    padding: 1px 4px;
}

.bg-email-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.bg-email-card.predefined {
    border-left: 4px solid #2271b1;
}

.bg-email-card.custom {
    border-left: 4px solid #8c8f94;
}

.bg-email-card.disabled {
    opacity: 0.7;
}

.bg-email-header {
    align-items: center;
    background: #f6f7f7;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 12px 15px;
}

.bg-email-icon {
    font-size: 24px;
}

.bg-email-name-input {
    background: transparent;
    border: 1px solid transparent;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    padding: 4px 8px;
}

.bg-email-name-input:not([readonly]):hover,
.bg-email-name-input:not([readonly]):focus {
    background: #fff;
    border-color: #2271b1;
}

.bg-badge {
    background: #2271b1;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
}

.bg-toggle {
    position: relative;
}

.bg-toggle input {
    height: 0;
    opacity: 0;
    width: 0;
}

.bg-toggle-slider {
    background-color: #ccc;
    border-radius: 20px;
    cursor: pointer;
    display: inline-block;
    height: 24px;
    position: relative;
    transition: 0.3s;
    width: 44px;
}

.bg-toggle-slider:before {
    background-color: #fff;
    border-radius: 50%;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: 0.3s;
    width: 18px;
}

.bg-toggle input:checked + .bg-toggle-slider {
    background-color: #00a32a;
}

.bg-toggle input:checked + .bg-toggle-slider:before {
    transform: translateX(20px);
}

.bg-email-content {
    padding: 20px;
}

.bg-email-card.collapsed .bg-email-content {
    display: none;
}

.bg-field-row {
    margin-bottom: 15px;
}

.bg-field-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.bg-date-info {
    background: #f0f0f1;
    border-radius: 4px;
    color: #50575e;
    font-style: italic;
    margin: 10px 0;
    padding: 8px 12px;
}

.bg-date-config {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bg-date-config label {
    margin-bottom: 0;
}

.bg-bonus-section,
.bg-discounts-section {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin: 15px 0;
    padding: 15px;
}

.bg-bonus-section h4,
.bg-discounts-section h4 {
    border-bottom: 1px solid #ddd;
    margin: 0 0 15px;
    padding-bottom: 10px;
}

.bg-bonus-grid {
    display: flex;
    gap: 20px;
}

.bg-bonus-item {
    align-items: center;
    display: flex;
    gap: 8px;
}

.bg-bonus-item input[type="number"] {
    width: 80px;
}

.bg-discount-row {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.bg-checkbox-label {
    align-items: center;
    display: flex;
    gap: 5px;
    min-width: 140px;
}

.bg-discount-validity {
    align-items: center;
    border-top: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
}

.bg-discount-validity .description {
    color: #757575;
    font-size: 12px;
}

.bg-email-actions {
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
}

.bg-actions-bar {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
}

.bg-test-email-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin: 20px 0;
    padding: 15px 20px;
}

.bg-test-email-box h4 {
    color: #856404;
    margin: 0 0 8px;
}

.bg-test-email-box .description {
    color: #856404;
    margin-bottom: 10px;
}

.bg-test-email-box input[type="email"] {
    width: 300px;
}

/* ============================================================================
   GESTIONE SCONTI ADMIN
   ============================================================================ */

.bg-admin-discounts-container {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .bg-admin-discounts-container {
        grid-template-columns: 1fr;
    }
}

.bg-admin-discounts-form-box,
.bg-admin-discounts-list-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
}

.bg-admin-discounts-form-box h2,
.bg-admin-discounts-list-box h2 {
    border-bottom: 1px solid #c3c4c7;
    margin: -20px -20px 20px;
    padding: 15px 20px;
}

.bg-form-section {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.bg-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.bg-form-section h3 {
    color: #1d2327;
    font-size: 14px;
    margin: 0 0 15px;
}

.bg-form-row {
    margin-bottom: 15px;
}

.bg-form-row label {
    color: #1d2327;
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.bg-form-row .description {
    color: #646970;
    font-size: 12px;
    font-style: italic;
    margin-top: 5px;
}

/* Ricerca utenti */
.bg-user-search-results {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    display: none;
    left: 0;
    max-height: 300px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
}

.bg-form-row:has(#bg_user_search) {
    position: relative;
}

.bg-user-result {
    border-bottom: 1px solid #eee;
    cursor: pointer;
    padding: 10px 15px;
}

.bg-user-result:last-child {
    border-bottom: none;
}

.bg-user-result:hover {
    background: #f0f6fc;
}

.bg-user-result-name {
    display: block;
    font-weight: 600;
}

.bg-user-result-email {
    color: #646970;
    display: block;
    font-size: 12px;
}

.bg-user-result-phone {
    color: #646970;
    display: block;
    font-size: 12px;
}

.bg-no-results {
    color: #646970;
    font-style: italic;
    padding: 10px 15px;
}

.bg-selected-user-info {
    align-items: center;
    background: #f0f6fc;
    border: 1px solid #2271b1;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    padding: 10px 15px;
}

.bg-selected-user-info span {
    flex: 1;
    font-weight: 600;
}

/* Tipi di sconto */
.bg-discount-types {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 782px) {
    .bg-discount-types {
        grid-template-columns: 1fr;
    }
}

.bg-discount-type-option input[type="radio"] {
    display: none;
}

.bg-discount-type-card {
    align-items: center;
    background: #f6f7f7;
    border: 2px solid #c3c4c7;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s ease;
}

.bg-discount-type-card:hover {
    border-color: #2271b1;
}

.bg-discount-type-option input[type="radio"]:checked + .bg-discount-type-card {
    background: #f0f6fc;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.bg-discount-type-icon {
    font-size: 24px;
}

.bg-discount-type-name {
    font-size: 14px;
    font-weight: 600;
}

.bg-discount-type-desc {
    color: #646970;
    font-size: 12px;
}

/* Input con suffisso */
.bg-input-with-suffix {
    align-items: center;
    display: flex;
    gap: 5px;
}

.bg-input-with-suffix input {
    max-width: 100px;
}

.bg-input-suffix {
    color: #646970;
    font-weight: 600;
}

/* Azioni form */
.bg-form-actions {
    margin-top: 20px;
    text-align: center;
}

/* Tabella sconti */
.bg-admin-discounts-list-box .wp-list-table code {
    background: #f0f0f1;
    font-size: 11px;
    padding: 2px 5px;
}

.bg-discount-status {
    border-radius: 3px;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
}

.bg-status-available {
    background: #d4edda;
    color: #155724;
}

.bg-status-used {
    background: #e2e3e5;
    color: #383d41;
}

.bg-status-expired {
    background: #f8d7da;
    color: #721c24;
}

.bg-expired {
    color: #dc3545;
}

/* ============================================================================
   DASHBOARD WIDGET - Eventi Attivi
   ============================================================================ */

.bg-dashboard-events-table {
    margin-top: 10px;
}

.bg-dashboard-events-table th {
    font-weight: 600;
}

.bg-dashboard-events-table td {
    vertical-align: middle;
}

.bg-dashboard-events-table a {
    text-decoration: none;
}

.bg-dashboard-events-table a:hover {
    text-decoration: underline;
}

.bg-tickets-badge {
    border-radius: 12px;
    color: #fff;
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    padding: 3px 10px;
}

.bg-tickets-total {
    font-weight: 400;
    opacity: 0.8;
}

.bg-weekly-badge {
    background: #e7f5e7;
    border-radius: 10px;
    color: #00a32a;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
}

.bg-weekly-zero {
    color: #999;
    font-size: 12px;
}

.bg-widget-empty {
    color: #666;
    padding: 20px 0;
    text-align: center;
}

.bg-widget-footer {
    border-top: 1px solid #eee;
    color: #666;
    margin: 10px 0 0 0;
    padding-top: 8px;
    text-align: right;
}

.bg-col-center {
    text-align: center;
}

.bg-col-right {
    text-align: right;
}

.bg-col-small {
    width: 50px;
}

.bg-col-medium {
    width: 70px;
}

.bg-event-date {
    color: #999;
}

.bg-sold-out-badge {
    background: #d63638;
    border-radius: 3px;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    text-transform: uppercase;
    vertical-align: middle;
}

.bg-days-past {
    color: #999;
    font-size: 11px;
}

.bg-days-today {
    background: #d63638;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
}

.bg-days-tomorrow {
    background: #dba617;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
}

.bg-days-soon {
    color: #dba617;
    font-size: 12px;
    font-weight: 600;
}

.bg-days-normal {
    color: #666;
    font-size: 12px;
}

.bg-revenue {
    color: #2271b1;
    font-weight: 600;
}

.bg-actions {
    white-space: nowrap;
}

.bg-action-icon {
    font-size: 16px;
    margin: 0 2px;
    text-decoration: none;
}

.bg-action-icon:hover {
    opacity: 0.7;
}

/* Affitto Sala - separazione metabox nella colonna principale */
body.post-type-bg-venue-rental #poststuff #normal-sortables .postbox,
body.post-type-bg-venue-rental #poststuff #normal-sortables > .postbox,
body.post-type-bg-venue-rental #normal-sortables .postbox {
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    border: 1px solid #c3c4c7 !important;
    box-shadow: 0 1px 1px rgba(0,0,0,.04) !important;
}

body.post-type-bg-venue-rental #poststuff #normal-sortables .postbox:first-child {
    margin-top: 20px !important;
}

/* Forza separazione visiva tra i metabox quando vengono trascinati */
body.post-type-bg-venue-rental .meta-box-sortables .postbox {
    margin-bottom: 20px !important;
    display: block !important;
    clear: both !important;
}

/* Assicura che il placeholder del drag abbia altezza */
body.post-type-bg-venue-rental .sortable-placeholder {
    margin-bottom: 20px !important;
    min-height: 70px !important;
    background: #f0f0f1 !important;
    border: 2px dashed #c3c4c7 !important;
}

/* Widget Incassi Totali */
.bg-totals-widget {
    padding: 5px 0;
}

.bg-totals-row {
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 0;
}

.bg-totals-row:last-of-type {
    border-bottom: none;
}

.bg-totals-label {
    color: #1d2327;
    flex: 1;
    font-weight: 500;
}

.bg-totals-value {
    color: #2271b1;
    font-size: 18px;
    font-weight: 700;
    text-align: right;
}

.bg-totals-count {
    color: #666;
    flex-basis: 100%;
    font-size: 12px;
    margin-top: 4px;
    text-align: right;
}

.bg-diff-positive {
    color: #00a32a;
    font-weight: 600;
}

.bg-diff-negative {
    color: #d63638;
    font-weight: 600;
}

/* Stili per riepilogo biglietti nei report */
.bg-n_tickets {
    cursor: default;
    position: relative;
}

.bg-n_tickets.bg-tickets-changed {
    background-color: rgba(255, 193, 7, 0.15) !important;
    font-weight: 600;
}

.bg-tickets-info {
    color: #2271b1;
    cursor: help;
    font-size: 12px;
    margin-left: 4px;
}

.bg-n_tickets[title] {
    cursor: help;
}

/* Stili per prezzo modificato nel report */
.bg-price.bg-price-changed,
.bg-paid.bg-price-changed {
    background-color: rgba(33, 150, 243, 0.12) !important;
    font-weight: 600;
}

.bg-price-info {
    color: #1976d2;
    cursor: help;
    font-size: 12px;
    margin-left: 4px;
}

.bg-price[title],
.bg-paid[title] {
    cursor: help;
}

/* Drag and drop sortable */
.bg-vr-sortable-placeholder {
    border: 2px dashed #3b82f6;
    background: #eff6ff;
    margin-bottom: 15px;
    min-height: 80px;
    border-radius: 4px;
}

.bg-vr-drag-handle:hover {
    background: #d5d5d5 !important;
}

.ui-sortable-helper {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================================================
   STILI DA bg-report-events.php
   ============================================================================ */

/* ========================================
   REPORT VENDITE - INDICATORI ORDINAMENTO
   ======================================== */
.bg-sales-report th.sortable:after {
    content: "↕";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
.bg-sales-report th.sorted.asc:after {
    content: "↑";
    color: #333;
}
.bg-sales-report th.sorted.desc:after {
    content: "↓";
    color: #333;
}

/* Prenotazioni annullate - sfondo leggero e opacità ridotta */
.bg-sales-report tr.turned-back,
.bg-report-row.turned-back {
    background-color: rgba(200,0,0,0.06) !important;
    opacity: 0.6;
}

/* Override: colora intere righe per stato */
.widefat.bg-sales-report tbody tr.bg-report-row.completed,
.widefat.bg-sales-report tbody tr.completed,
.widefat.bg-sales-report tbody tr.bg-report-row.completed > td,
.widefat.bg-sales-report tbody tr.completed > td {
    background-color: #dff0d8 !important;
}
.widefat.bg-sales-report tbody tr.bg-report-row.completed:nth-child(even),
.widefat.bg-sales-report tbody tr.completed:nth-child(even),
.widefat.bg-sales-report tbody tr.bg-report-row.completed:nth-child(even) > td,
.widefat.bg-sales-report tbody tr.completed:nth-child(even) > td {
    background-color: #d4e9cd !important;
}
.widefat.bg-sales-report tbody tr.bg-report-row.failed,
.widefat.bg-sales-report tbody tr.failed,
.widefat.bg-sales-report tbody tr.bg-report-row.failed > td,
.widefat.bg-sales-report tbody tr.failed > td {
    background-color: #f8d7da !important;
}
.widefat.bg-sales-report tbody tr.bg-report-row.failed:nth-child(even),
.widefat.bg-sales-report tbody tr.failed:nth-child(even),
.widefat.bg-sales-report tbody tr.bg-report-row.failed:nth-child(even) > td,
.widefat.bg-sales-report tbody tr.failed:nth-child(even) > td {
    background-color: #f4c7cb !important;
}

/* ========================================
   REPORT VENDITE - BOX TOTALI
   ======================================== */
.bg-totals-container {
    margin: 20px auto;
    max-width: 35%;
}
@media screen and (max-width: 768px) {
    .bg-totals-container {
        max-width: 100%;
    }
}
.bg-totals-columns {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.bg-totals-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.bg-summary-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 5px 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.bg-summary-label {
    font-weight: bold;
    color: #444;
    margin-bottom: 8px;
}
.bg-summary-value {
    font-size: 1.2em;
    color: #000;
}
@media screen and (max-width: 480px) {
    .bg-totals-columns {
        flex-direction: column;
    }
    .bg-totals-column {
        width: 100%;
    }
}

/* ========================================
   POPUP WHATSAPP
   ======================================== */
.bg-whatsapp-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease;
}
.bg-whatsapp-btn:hover {
    transform: scale(1.2);
}
.bg-wa-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}
.bg-wa-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.bg-wa-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
}
.bg-wa-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #25D366;
    color: #fff;
    border-radius: 8px 8px 0 0;
}
.bg-wa-popup-header h3 {
    margin: 0;
    font-size: 18px;
}
.bg-wa-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    line-height: 1;
}
.bg-wa-popup-body {
    padding: 20px;
}
.bg-wa-recipient {
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}
.bg-wa-message-select {
    margin-bottom: 15px;
}
.bg-wa-message-select label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.bg-wa-message-select select {
    width: 100%;
    padding: 8px;
    font-size: 14px;
}
.bg-wa-message-preview label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.bg-wa-message-preview textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    resize: vertical;
}
.bg-wa-popup-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}
.bg-wa-popup-footer .button {
    margin-left: 10px;
}
#bg-wa-send {
    background: #25D366;
    border-color: #25D366;
}
#bg-wa-send:hover {
    background: #128C7E;
    border-color: #128C7E;
}

/* =============================================================================
   BLACKLIST - Ricerca utenti
   ============================================================================= */

.bg-blacklist-search-wrap {
    position: relative;
    max-width: 400px;
}

.bg-blacklist-search-wrap #bg_blacklist_search {
    width: 100%;
}

.bg-blacklist-search-results {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 0 0 4px 4px;
    border-top: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    max-height: 300px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    z-index: 1000;
}

.bg-blacklist-search-item {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    padding: 8px 12px;
    transition: background 0.15s;
}

.bg-blacklist-search-item:hover {
    background: #f0f6fc;
}

.bg-blacklist-search-item strong {
    flex-shrink: 0;
}

.bg-blacklist-search-email {
    color: #666;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bg-blacklist-search-loading,
.bg-blacklist-search-no-results {
    color: #666;
    font-style: italic;
    padding: 10px 12px;
}

.bg-blacklist-selected-user {
    align-items: center;
    background: #f0f6fc;
    border: 1px solid #0073aa;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-top: 6px;
    padding: 8px 12px;
}

.bg-blacklist-remove-selection {
    color: #dc3232;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
}

.bg-blacklist-remove-selection:hover {
    color: #a00;
}

.bg-blacklist-search-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bg-blacklist-search-item--existing {
    background: #fff8e5;
}

.bg-blacklist-search-item--existing:hover {
    background: #fff3cd;
}

.bg-blacklist-badge {
    background: #fef0f0;
    border: 1px solid #dc3232;
    border-radius: 3px;
    color: #dc3232;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    white-space: nowrap;
}

/* BLACKLIST - Box e tabella */

.bg-blacklist-add-form {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    margin: 20px 0;
    padding: 20px;
}

.bg-blacklist-list {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

.bg-blacklist-col-id {
    width: 50px;
}

.bg-blacklist-col-gateway {
    width: 130px;
}

.bg-blacklist-col-date {
    width: 150px;
}

.bg-blacklist-col-actions {
    width: 100px;
}

.bg-blacklist-remove-form {
    display: inline;
}

.bg-blacklist-info {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    margin-top: 20px;
    padding: 15px;
}

.bg-blacklist-info h3 {
    margin-top: 0;
}

.bg-blacklist-info ul {
    margin-bottom: 0;
}

/* BLACKLIST - Responsive smartphone */

@media screen and (max-width: 782px) {

    .bg-blacklist-add-form {
        padding: 12px;
    }

    .bg-blacklist-add-form .form-table th {
        display: block;
        padding: 8px 0 4px;
    }

    .bg-blacklist-add-form .form-table td {
        display: block;
        padding: 4px 0 12px;
    }

    .bg-blacklist-search-wrap {
        max-width: 100%;
    }

    .bg-blacklist-list {
        padding: 12px;
    }

    .bg-blacklist-list .wp-list-table thead {
        display: none;
    }

    .bg-blacklist-list .wp-list-table tr {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        display: block;
        margin-bottom: 12px;
        padding: 12px;
    }

    .bg-blacklist-list .wp-list-table tr:nth-child(odd) {
        background: #fafafa;
    }

    .bg-blacklist-list .wp-list-table td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        text-align: right;
    }

    .bg-blacklist-list .wp-list-table td::before {
        color: #1d2327;
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        text-align: left;
    }

    .bg-blacklist-list .wp-list-table td:last-child {
        border-top: 1px solid #eee;
        justify-content: center;
        margin-top: 8px;
        padding-top: 10px;
    }

    .bg-blacklist-list .wp-list-table td:last-child::before {
        display: none;
    }

    .bg-blacklist-info {
        padding: 12px;
    }

    .bg-blacklist-info li {
        font-size: 13px;
        line-height: 1.5;
    }

    .bg-blacklist-selected-user {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

/* ============================================================================
   FIDELIZZAZIONE ADMIN - Base
   ============================================================================ */

.bg-loyalty-admin .stats-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.bg-loyalty-admin .stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    min-width: 150px;
    padding: 15px 20px;
}

.bg-loyalty-admin .stat-card h3 {
    color: #666;
    font-size: 14px;
    margin: 0 0 5px 0;
}

.bg-loyalty-admin .stat-card .value {
    color: #2271b1;
    font-size: 28px;
    font-weight: bold;
}

.bg-loyalty-admin .level-badge {
    border-radius: 4px;
    color: white;
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
}

.bg-loyalty-admin .level-badge-large {
    font-size: 16px;
    padding: 5px 12px;
}

.bg-loyalty-level-name {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.bg-loyalty-admin .log-entry {
    align-items: center;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
    padding: 10px;
}

.bg-loyalty-admin .log-entry:hover {
    background: #f9f9f9;
}

.bg-loyalty-admin .log-icon {
    font-size: 20px;
}

.bg-loyalty-admin .log-details {
    flex: 1;
}

.bg-loyalty-admin .log-date {
    color: #666;
    font-size: 12px;
}

.bg-loyalty-admin .log-tokens {
    color: #28a745;
    font-weight: bold;
}

.bg-loyalty-admin .log-tokens.negative {
    color: #dc3545;
}

.bg-loyalty-admin .log-stars {
    color: #ffc107;
    font-weight: bold;
}

.bg-loyalty-admin .edit-field {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.bg-loyalty-admin .edit-field label {
    font-weight: bold;
    min-width: 100px;
}

.bg-loyalty-admin .edit-field input[type="number"] {
    width: 100px;
}

.bg-loyalty-admin .search-box {
    margin-bottom: 20px;
}

.bg-loyalty-admin .widefat .level-badge {
    font-size: 10px;
}

.bg-loyalty-admin .delete-log-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    opacity: 0.6;
}

.bg-loyalty-admin .delete-log-btn:hover {
    opacity: 1;
}

/* Paginazione */

.bg-loyalty-tablenav {
    margin: 10px 0;
}

.bg-loyalty-page-link {
    margin: 0 2px;
}

.bg-loyalty-paging-input {
    border-left: 1px solid #ddd;
    display: inline-block;
    margin-left: 15px;
    padding-left: 15px;
}

.bg-loyalty-goto-form {
    display: inline-block;
}

.bg-loyalty-page-input {
    text-align: center;
    width: 50px;
}

/* Dettaglio utente */

.bg-loyalty-edit-box {
    max-width: 500px;
}

.bg-loyalty-log-box {
    margin-top: 20px;
}

.bg-loyalty-clear-form {
    margin-bottom: 15px;
}

.bg-loyalty-delete-log-form {
    margin: 0;
}

/* Colonne tabella */

.bg-loyalty-col-id {
    width: 50px;
}

.bg-loyalty-col-level {
    width: 100px;
}

.bg-loyalty-col-tokens {
    width: 90px;
}

.bg-loyalty-col-stars {
    width: 90px;
}

.bg-loyalty-col-actions {
    width: 100px;
}

/* ============================================================================
   FIDELIZZAZIONE ADMIN - Responsive smartphone
   ============================================================================ */

@media screen and (max-width: 782px) {

    /* Search box */
    .bg-loyalty-admin .search-box form {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .bg-loyalty-admin .search-box input[type="search"] {
        flex: 1 1 100%;
    }

    /* Paginazione */
    .bg-loyalty-tablenav {
        text-align: center;
    }

    .bg-loyalty-tablenav .alignleft {
        float: none;
        text-align: center;
    }

    .bg-loyalty-tablenav .tablenav-pages {
        float: none;
        margin-top: 8px;
        text-align: center;
    }

    .bg-loyalty-paging-input {
        border-left: none;
        display: block;
        margin-left: 0;
        margin-top: 8px;
        padding-left: 0;
    }

    .bg-loyalty-page-link {
        margin: 0 1px;
    }

    .bg-loyalty-page-link a,
    .bg-loyalty-page-link span {
        min-width: 32px;
        padding: 4px 8px;
    }

    /* Tabella → Card */
    .bg-loyalty-table thead {
        display: none;
    }

    .bg-loyalty-table tbody tr {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 6px;
        display: block;
        margin-bottom: 12px;
        padding: 12px;
    }

    .bg-loyalty-table tbody tr:nth-child(odd) {
        background: #fafafa;
    }

    .bg-loyalty-table td {
        border: none;
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        text-align: right;
    }

    .bg-loyalty-table td::before {
        color: #1d2327;
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        text-align: left;
    }

    .bg-loyalty-table td:last-child {
        border-top: 1px solid #eee;
        justify-content: center;
        margin-top: 8px;
        padding-top: 10px;
    }

    .bg-loyalty-table td:last-child::before {
        display: none;
    }

    /* Pagina dettaglio */
    .bg-loyalty-admin .stats-cards {
        flex-direction: column;
        gap: 10px;
    }

    .bg-loyalty-admin .stat-card {
        min-width: auto;
    }

    .bg-loyalty-edit-box {
        max-width: 100%;
    }

    .bg-loyalty-admin .edit-field {
        flex-wrap: wrap;
    }

    .bg-loyalty-admin .edit-field label {
        min-width: auto;
        width: 100%;
    }

    .bg-loyalty-admin .edit-field input[type="number"] {
        flex: 1;
    }

    /* Log entries */
    .bg-loyalty-admin .log-entry {
        flex-wrap: wrap;
        gap: 6px;
    }

    .bg-loyalty-admin .log-details {
        flex: 1 1 calc(100% - 40px);
        min-width: 0;
    }

    .bg-loyalty-admin .log-tokens,
    .bg-loyalty-admin .log-stars {
        font-size: 13px;
    }
}

/* ============================================================================
   SCONTI EMAIL RICORRENZE
   ============================================================================ */

.bg-recurring-discounts-wrap {
    max-width: 1400px;
}

.bg-re-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
}

.bg-re-stat-card {
    align-items: center;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 140px;
    padding: 16px 20px;
}

.bg-re-stat-card.bg-re-stat-available {
    border-left-color: #00a32a;
}

.bg-re-stat-card.bg-re-stat-used {
    border-left-color: #dba617;
}

.bg-re-stat-card.bg-re-stat-expired {
    border-left-color: #d63638;
}

.bg-re-stat-number {
    color: #1d2327;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

.bg-re-stat-label {
    color: #646970;
    font-size: 13px;
    margin-top: 4px;
}

.bg-re-stat-euro {
    color: #1d2327;
    font-size: 15px;
    font-weight: 600;
    margin-top: 6px;
}

.bg-re-filters {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-bottom: 16px;
    padding: 12px 16px;
}

.bg-re-filters form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bg-re-filters label {
    font-weight: 600;
    margin-left: 8px;
}

.bg-re-filters label:first-child {
    margin-left: 0;
}

.bg-re-filters select {
    max-width: 200px;
}

.bg-re-filters input[type="search"] {
    max-width: 250px;
}

.bg-re-results-count {
    color: #646970;
    font-style: italic;
    margin: 8px 0 16px;
}

.bg-re-no-results {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
}

.bg-re-no-results p {
    color: #646970;
    font-size: 14px;
    margin: 4px 0;
}

.bg-re-table .bg-re-col-user {
    width: 18%;
}

.bg-re-table .bg-re-col-email {
    width: 12%;
}

.bg-re-table .bg-re-col-type {
    width: 10%;
}

.bg-re-table .bg-re-col-label {
    width: 14%;
}

.bg-re-table .bg-re-col-value {
    width: 8%;
}

.bg-re-table .bg-re-col-created {
    width: 10%;
}

.bg-re-table .bg-re-col-expiry {
    width: 8%;
}

.bg-re-table .bg-re-col-status {
    width: 8%;
}

.bg-re-table .bg-re-col-used {
    width: 10%;
}

.bg-re-table .bg-re-col-payment {
    width: 6%;
}

.bg-re-user-email {
    color: #646970;
}

.bg-re-user-id {
    color: #646970;
}

.bg-re-email-icon {
    margin-right: 4px;
}

.bg-re-expired-date {
    color: #d63638;
}

.bg-re-status-badge {
    border-radius: 3px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    white-space: nowrap;
}

.bg-re-status-available {
    background: #edfaef;
    color: #00a32a;
}

.bg-re-status-used {
    background: #fef8e7;
    color: #996800;
}

.bg-re-status-expired {
    background: #fef0f0;
    color: #d63638;
}

.bg-re-table tr.bg-re-status-used td {
    opacity: 0.8;
}

.bg-re-table tr.bg-re-status-expired td {
    opacity: 0.6;
}

.bg-re-table .tablenav .tablenav-pages {
    margin: 12px 0;
}

.bg-re-table .tablenav .paging-input {
    margin: 0 6px;
}

/* ============================================================
   Report Stats Bar - Card orizzontali compatte per totali
   ============================================================ */
.bg-stats-bar {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    padding: 10px;
}

.bg-stat-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    display: flex;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
    padding: 6px 12px;
}

.bg-stat-icon {
    align-items: center;
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: bold;
    height: 28px;
    justify-content: center;
    line-height: 1;
    width: 28px;
}

.bg-stat-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bg-stat-value {
    color: #222;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.bg-stat-label {
    color: #888;
    font-size: 10px;
    letter-spacing: 0.3px;
    line-height: 1.3;
    text-transform: uppercase;
    white-space: nowrap;
}

.bg-stat-cancelled {
    background: #fff5f5;
    border-color: #dc3545;
}

.bg-stat-paypal {
    border-left: 3px solid #0070ba;
}

.bg-stat-stripe {
    border-left: 3px solid #635bff;
}

.bg-stat-satispay {
    border-left: 3px solid #e53935;
}

.bg-stat-fees-total {
    background: #f5f5f5;
    border-left: 3px solid #333;
}

.bg-stat-venue {
    border-left: 3px solid #f59e0b;
}

.bg-stat-net {
    border-left: 3px solid #2e7d32;
}

@media screen and (max-width: 600px) {
    .bg-stats-bar {
        flex-direction: column;
    }
    .bg-stat-card {
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   EDITOR SCHEMA SALA (popup dalla pagina Serata)
   ========================================================================== */

.bg-schema-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100100;
}

.bg-schema-popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 100101;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.bg-schema-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f6f7f7;
    border-radius: 8px 8px 0 0;
}

.bg-schema-header h2 {
    margin: 0;
    font-size: 18px;
}

.bg-schema-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 5px;
    line-height: 1;
}

.bg-schema-close:hover {
    color: #c00;
}

.bg-schema-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.bg-schema-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px 15px;
    background: #f6f7f7;
    border-radius: 4px;
    margin-bottom: 15px;
}

.bg-schema-controls label {
    font-weight: 500;
}

.bg-schema-stage {
    background: linear-gradient(135deg, #1d2327 0%, #3c434a 100%);
    color: #fff;
    padding: 10px 30px;
    text-align: center;
    margin: 10px auto 5px;
    max-width: 350px;
    border-radius: 4px 4px 0 0;
    font-size: 13px;
    letter-spacing: 1px;
}

.bg-schema-preview {
    background: #f0f0f1;
    border-radius: 0 0 8px 8px;
    padding: 15px 10px;
    margin-bottom: 10px;
    min-height: 60px;
}

.bg-schema-seat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px 5px 2px 2px;
    font-size: 10px;
    font-weight: bold;
    background: #4caf50;
    color: #fff;
    border: 2px solid #2e7d32;
    cursor: default;
    transition: all 0.15s;
}

.bg-schema-seat.bg-schema-angled {
    background: #ff9800;
    border-color: #e65100;
}

/* Schienale sedia (pseudo-element) */
.bg-schema-seat::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 3px;
    right: 3px;
    height: 6px;
    background: inherit;
    border: 2px solid;
    border-color: inherit;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}

/* Fila Close-Up nel popup */
.bg-schema-closeup-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    margin-bottom: 14px;
    padding-bottom: 8px;
}

/* Sfalsamento scacchiera - file pari spostate di mezza sedia */
.bg-schema-closeup-row.bg-schema-row-staggered {
    margin-left: 18px;
}

/* Etichetta fila */
.bg-schema-row-label {
    width: 36px;
    text-align: right;
    font-size: 11px;
    color: #666;
    margin-right: 6px;
    align-self: center;
    flex-shrink: 0;
}

/* Sedia nel popup - posizionamento relativo per ::before */
.bg-schema-closeup-row .bg-schema-seat {
    position: relative;
}

/* Sedia inclinata verso centro (lato sinistro - ruota verso destra) */
.bg-schema-seat.bg-schema-angled-right {
    background: #ff9800;
    border-color: #e65100;
    transform: rotate(30deg);
}

/* Sedia inclinata verso centro (lato destro - ruota verso sinistra) */
.bg-schema-seat.bg-schema-angled-left {
    background: #ff9800;
    border-color: #e65100;
    transform: rotate(-30deg);
}

/* Gruppo sedie inclinate (affiancate orizzontalmente, sfalsate verticalmente) */
.bg-schema-angled-group {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    margin: 0 8px;
}

/* Sfalsamento verticale - sedie inclinate sinistra (dalla più lontana alla più vicina) */
.bg-schema-angled-group.bg-schema-angled-group-left .bg-schema-seat:nth-last-child(1) { margin-bottom: 6px; }
.bg-schema-angled-group.bg-schema-angled-group-left .bg-schema-seat:nth-last-child(2) { margin-bottom: 22px; }
.bg-schema-angled-group.bg-schema-angled-group-left .bg-schema-seat:nth-last-child(3) { margin-bottom: 38px; }
.bg-schema-angled-group.bg-schema-angled-group-left .bg-schema-seat:nth-last-child(4) { margin-bottom: 54px; }
.bg-schema-angled-group.bg-schema-angled-group-left .bg-schema-seat:nth-last-child(5) { margin-bottom: 70px; }
.bg-schema-angled-group.bg-schema-angled-group-left .bg-schema-seat:nth-last-child(6) { margin-bottom: 86px; }

/* Sfalsamento verticale - sedie inclinate destra (dalla più vicina alla più lontana) */
.bg-schema-angled-group.bg-schema-angled-group-right .bg-schema-seat:nth-child(1) { margin-bottom: 6px; }
.bg-schema-angled-group.bg-schema-angled-group-right .bg-schema-seat:nth-child(2) { margin-bottom: 22px; }
.bg-schema-angled-group.bg-schema-angled-group-right .bg-schema-seat:nth-child(3) { margin-bottom: 38px; }
.bg-schema-angled-group.bg-schema-angled-group-right .bg-schema-seat:nth-child(4) { margin-bottom: 54px; }
.bg-schema-angled-group.bg-schema-angled-group-right .bg-schema-seat:nth-child(5) { margin-bottom: 70px; }
.bg-schema-angled-group.bg-schema-angled-group-right .bg-schema-seat:nth-child(6) { margin-bottom: 86px; }

/* Corridoio nel popup */
.bg-schema-aisle {
    width: 28px;
    height: 28px;
}

.bg-schema-teatro-seat {
    cursor: pointer;
    background: #ccc;
    border-color: #999;
    color: #999;
}

.bg-schema-teatro-seat:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.bg-schema-teatro-seat.bg-schema-selected {
    background: #4caf50;
    border-color: #2e7d32;
    color: #fff;
}

.bg-schema-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #f6f7f7;
    border-radius: 0 0 8px 8px;
}

/* ==========================================================================
   IMPOSTAZIONI AI CENTRALIZZATE
   ========================================================================== */

.bg-ai-settings-wrap {
    max-width: 900px;
}

.bg-ai-info-box {
    background: #e7f5fe;
    border: 1px solid #72aee6;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    padding: 15px 20px;
    margin: 15px 0;
    font-size: 13px;
    line-height: 1.7;
}

.bg-ai-info-box ol {
    margin-left: 20px;
    padding-left: 0;
}

.bg-ai-info-box ol li {
    margin-bottom: 4px;
}

.bg-ai-info-box ul {
    margin-left: 20px;
    padding-left: 0;
}

.bg-ai-info-box p {
    margin: 5px 0;
}

/* ============================================================================
   MODAL REPORT - Link Modifica Utente e Switch User
   ============================================================================ */

.bg-modal-header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.bg-modal-header-left h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bg-modal-edit-user-link,
.bg-modal-switch-user-link {
    color: #666;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s;
}

.bg-modal-edit-user-link:hover {
    color: #0073aa;
}

.bg-modal-switch-user-link:hover {
    color: #d63638;
}

/* Banner Switch User: stili inline nel PHP (bg-common.php) perché appare
   anche nel frontend dove bg-admin.css non è caricato */
