/* ============================================================
   BOOTLEG25 – INDEX DASHBOARD (CLEAN 2025 – DEFINITIVE)
============================================================ */

:root {
    --dark: #05070C;
    --panel: rgba(15,18,25,0.55);
    --text: #e8ecf5;
    --text-soft: rgba(232,236,245,0.65);
    --gold: #d8c59a;
    --gold2: #b1996c;
    --accent-blue: #78a0ff;
    --accent-red: #ff6b6b;
    --accent-green: #43d37b;
    --accent-yellow: #ffd15c;
}

/* --------------------------- BASE --------------------------- */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
    font-family: "Work Sans", sans-serif;
    background: var(--dark);
    color: var(--text);
}

/* --------------------------- HEADER --------------------------- */
.b25-header {
	min-width: 980px;
	flex-wrap: nowrap;     /* ← CRITICO */
    height: 82px;
    display: flex;
    align-items: center;
    background: rgba(10,12,18,0.90);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.b25-header-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    width: 100%;
    box-sizing: border-box;
	flex-shrink: 0;
    white-space: nowrap;
}
.b25-header-right {
    white-space: nowrap;
    flex-shrink: 0;
}

/* LOGO PREMIUM */
.b25-logo-text{
  font-family: "Cinzel", serif;
  font-size: 34px;
  letter-spacing: 4px;
  font-weight: 700;
  color: #d8c59a;
  background: none;
  -webkit-text-fill-color: initial;
  text-transform: uppercase;
  text-shadow:
    0 0 6px rgba(216,197,154,0.35),
    0 2px 4px rgba(0,0,0,0.9);
	line-height: 1.3;
	white-space: nowrap;
	flex-shrink: 0;
}

.b25-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-soft);
    font-size: 14px;
}
.b25-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

/* --------------------------- LAYOUT --------------------------- */
.bl-main-layout {
    display: flex;
    height: calc(100vh - 82px);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* --------------------------- SIDEBAR --------------------------- */
.bl-sidebar {
    width: 150px;
	min-width: 150px;   /* ← FIX CRITICO */
	flex-shrink: 0;     /* ← IMPEDISCE COLLASSO */
    background: rgba(12,14,20,0.95);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}
.bl-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bl-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    text-decoration: none;
    color: var(--text);
    transition: .2s;
}
.bl-nav-link:hover {
    background: rgba(255,255,255,0.12);
}
.bl-nav-link.active {
    background: linear-gradient(145deg,var(--gold),var(--gold2));
    color: #000;
}

/* --------------------------- Bacheca BADGE / FLASH --------------------------- */
.bl-nav-link.bb-flash:not(.active){
    position: relative;
    outline: 1px solid rgba(255,209,92,0.20);
    background: rgba(255,209,92,0.08); /* statico: zero GPU loop */
}

.bl-nav-link.bb-flash.active{
    position: relative;
    box-shadow: 0 0 22px rgba(255,209,92,0.18);
}
.bl-nav-link.bb-flash-once:not(.active){
    animation: bbOnce 1.0s ease-in-out 2;
}
.bl-nav-link[data-bb]::after{
    content: attr(data-bb);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 18px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    color: #000;
    background: var(--accent-yellow);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
@keyframes bbPulseBg{
    0%,100%{ background: rgba(255,255,255,0.05); }
    50%    { background: rgba(255,209,92,0.18); }
}
@keyframes bbOnce{
    0%{ filter: brightness(1); }
    35%{ filter: brightness(1.28); }
    100%{ filter: brightness(1); }
}

/* --------------------------- MAIN CONTENT --------------------------- */
.bl-main-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    padding: 20px 30px;
    overflow: hidden;
    padding-right: 18px;
}

.b25-main-box {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    box-sizing: border-box;
    background: var(--panel);
	background: rgba(10,12,16,0.78);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 22px 16px 26px 6px;
    margin: 5px;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 0 40px rgba(0,0,0,0.45);
}

/* --------------------------- TOOLBAR FILTRI --------------------------- */
.b25-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
	align-items: center;
    gap: 14px;
    width: 100%;
}
.b25-toolbar-right {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 18px;
    max-width: 700px;
    width: 100%;
}
.b25-filters {
    display: flex;
    gap: 18px;
}
.b25-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.b25-filter-group label {
    font-size: 12px;
    opacity: .7;
    padding-left: 2px;
}
.b25-filter {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--text);
    min-width: 110px;
}

/* Bottone principale - Aggiungi brano (refined) */
.b25-add-btn {
    padding: 7px 14px;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--gold), var(--gold2));
    border: 1px solid rgba(255,215,150,0.35);
    color: #111;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.35);

    transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
.b25-add-btn:hover {
    filter: brightness(1.05);
    box-shadow:
        0 4px 10px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.45);
    transform: translateY(-1px);
}

/* --------------------------- VISTE (TAB) / QUICK FILTERS / SEARCH --------------------------- */
.b25-tabsbar{
  display:flex;
  gap:0;
  flex-wrap:nowrap;
  align-items:flex-end;
  margin: 0 0 10px 0;
  padding: 8px 10px 0 10px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px 14px 0 0;
}
.b25-tab{
  appearance:none;
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: none;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 15px;
  padding: 12px 18px;
  border-radius: 14px 14px 0 0;
  margin: 0 8px 0 0;
  cursor: pointer;
  display:flex;
  align-items:center;
  position: relative;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.b25-tab:hover{ transform: translateY(-1px); }
.b25-tab.active{
  border-color: rgba(255,215,150,0.45);
  background: rgba(255,215,150,0.12);
}
.b25-tab.active::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:0;
  height:3px;
  background: linear-gradient(90deg,
    rgba(255,215,150,0.00) 0%,
    rgba(255,215,150,0.95) 50%,
    rgba(255,215,150,0.00) 100%
  );
  box-shadow:
    0 0 16px rgba(255,215,150,0.45),
    0 0 2px rgba(255,215,150,0.75);
  border-radius: 3px;
}
.b25-tab-count{
  margin-left:10px;
  min-width: 34px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.10);
  text-align:center;
}

.b25-view-heading{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 8px 6px 10px 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,215,150,0.18);
  box-shadow: inset 0 0 18px rgba(255,215,150,0.06);
}
.b25-view-heading[hidden]{ display:none !important; }

.b25-view-ico{ font-size: 14px; opacity: .9; }
.b25-view-title{ font-size: 18px; letter-spacing: .2px; }
.b25-view-count{ color: #D8A063; font-weight: 700; }


.b25-toolbar-views{
  justify-content: space-between;
}
/* Toolbar compatta (solo griglia brani) */
.b25-toolbar.b25-toolbar-views{
  margin-bottom: 12px;
  gap: 12px;
}
.b25-toolbar-views .b25-toolbar-left{ gap: 8px; }
.b25-toolbar-views .b25-chip{
  font-size: 11px;
  padding: 6px 10px;
}
.b25-toolbar-views .b25-search{ min-width: 220px; }
.b25-toolbar-views .b25-search-input{ padding: 6px 12px; }
.b25-toolbar-views .b25-sort label{ font-size: 11px; }
.b25-toolbar-views .b25-toolbar-right{
  width: auto;
  max-width: none;
  align-items: flex-end;
}
.b25-toolbar-views .b25-toolbar-left{ flex: 1; }

.b25-toolbar-views .b25-toolbar-left{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.b25-toolbar-views .b25-chip{
  appearance:none;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease;
}
.b25-toolbar-views .b25-chip.active{
  border-color: rgba(255,215,150,0.55);
  background: rgba(255,215,150,0.10);
}

.b25-toolbar-views .b25-search{ min-width: 220px; }
.b25-toolbar-views .b25-search-input{
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text);
}

.b25-toolbar-views .b25-search-input:focus-visible,
.b25-filter:focus-visible{
  outline: none;
  border-color: rgba(255,215,150,0.55);
  box-shadow: 0 0 0 3px rgba(255,215,150,0.12), inset 0 1px 0 rgba(255,255,255,0.18);
}
.b25-chip:focus-visible,
.b25-tab:focus-visible,
.b25-add-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,215,150,0.12);
}
.b25-toolbar-views .b25-search-input::placeholder{ opacity: .6; }

.b25-toolbar-views .b25-sort{
  display:flex;
  align-items:center;
  gap: 8px;
}
.b25-toolbar-views .b25-sort label{
  font-size: 11px;
  opacity: .7;
}

.b25-pager{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 0 2px 0;
}
.b25-pager-btn{
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
}
.b25-pager-btn:disabled{
  opacity: .4;
  cursor: default;
}
.b25-pager-txt{
  font-size: 12px;
  opacity: .7;
}

/* --------------------------- TABELLA --------------------------- */
.b25-table-wrap{
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;

  /* hide scrollbar (keep scroll) */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* Edge legacy */
}


.b25-table-wrap::-webkit-scrollbar{ width:0; height:0; }
.b25-table-wrap::-webkit-scrollbar-track{ background:transparent; }
.b25-table-wrap::-webkit-scrollbar-thumb{ background:transparent; }

#songsTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}
#songsTable th{
  position: sticky;
  top: 0;
  z-index: 30;
  text-align: left;
  padding: 6px 6px;
  color: var(--text-soft);
  font-weight: 500;
  white-space: nowrap;
  background: rgba(10,12,18,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 0 rgba(0,0,0,0.55);
    overflow: hidden;
    text-overflow: ellipsis;
}
#songsTable tbody tr{
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
#songsTable tbody tr:nth-child(even):not(.row-warning){
    background: rgba(255,255,255,0.015);
}
#songsTable tbody tr:hover:not(.row-warning){
    background: rgba(255,255,255,0.045);
    box-shadow: inset 5px 0 0 rgba(255,215,150,0.22);
    transform: translateY(-1px);
}
#songsTable tbody tr.row-warning{
  background: linear-gradient(90deg,
    rgba(201,179,122,.16) 0%,
    rgba(201,179,122,.08) 35%,
    rgba(0,0,0,0) 100%
  );
  box-shadow: inset 4px 0 0 rgba(201,179,122,.55);
}
#songsTable tbody tr.row-warning td{
  border-top-color: rgba(201,179,122,.14);
  border-bottom-color: rgba(201,179,122,.10);
}
#songsTable tbody tr.row-warning:hover{
  background: linear-gradient(90deg,
    rgba(201,179,122,.22) 0%,
    rgba(201,179,122,.12) 40%,
    rgba(0,0,0,0) 100%
  );
  box-shadow: inset 5px 0 0 rgba(201,179,122,.70);
}


/* -------- RIDISTRIBUZIONE COLONNE (DEFINITIVA) -------- */

/* # */
#songsTable th:nth-child(1),
#songsTable td:nth-child(1) { width: 20px; }

/* STATUS */
#songsTable th:nth-child(2),
#songsTable td:nth-child(2) {
    width: 60px;
    min-width: 60px;
	overflow: visible;
}

/* COVER */
#songsTable th:nth-child(3),
#songsTable td:nth-child(3) {
    width: 68px;
    min-width: 68px;
    padding-left: 0;
    padding-right: 4px;
}

/* ARTISTA */
#songsTable th:nth-child(4),
#songsTable td:nth-child(4) { width: 150px; }

/* TITOLO */
#songsTable th:nth-child(5),
#songsTable td:nth-child(5) { width: 170px; }

/* GENERE */
#songsTable th:nth-child(6),
#songsTable td:nth-child(6) { width: 54px; }

/* DURATA */
#songsTable th:nth-child(7),
#songsTable td:nth-child(7) { width: 54px; }

/* BPM/TONO */
#songsTable th:nth-child(8),
#songsTable td:nth-child(8) {
    width: 58px;
    min-width: 58px;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}


/* PROPONENTE */
#songsTable th:nth-child(9),
#songsTable td:nth-child(9) { width: 70px; }

/* YOUTUBE */
#songsTable th:nth-child(10),
#songsTable td:nth-child(10) {
    width: 60px;
    min-width: 60px;
    text-align: center;
}
#songsTable td:nth-child(10) .b25-btn.blue {
    padding: 5px 8px;
    font-size: 12px;
}
/* VOTI */
#songsTable th:nth-child(11),
#songsTable td:nth-child(11) {
    width: 30px;
    min-width: 30px;
    text-align: center;
}
/* AZIONI (sempre visibile) */
#songsTable th:nth-child(12),
#songsTable td:nth-child(12) {
    width: 220px;
    min-width: 220px;
    white-space: nowrap;
}
#songsTable th:nth-child(n+5):not(:nth-child(7)):not(:nth-child(8)),
#songsTable td:nth-child(n+5):not(:nth-child(7)):not(:nth-child(8)) {
    padding-left: 8px;
    padding-right: 8px;
}
#songsTable th:nth-child(7),
#songsTable td:nth-child(7),
#songsTable th:nth-child(8),
#songsTable td:nth-child(8) {
    padding-left: 4px;
    padding-right: 4px;
}


.actions-cell {
    white-space: nowrap;
}
.actions-wrap {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
    align-items: center;
	white-space: nowrap;
}
.actions-wrap button {
    padding: 3px 7px;
    font-size: 12px;
    line-height: 1;
}


/* MINI THUMB */
.thumb-mini{
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.14);
}

/* APPROVED – pill sobria (stile EVAL) */
.badge-approved{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:22px;
    padding:0 10px;
    border-radius:999px;
    border:1px solid rgba(216,197,154,0.40);
    color:#f1e6b6;
    font-size:10px;
    font-weight:800;
    letter-spacing:0.9px;
    text-transform:uppercase;
    background: linear-gradient(180deg, rgba(20,18,10,0.85), rgba(10,12,16,0.92));
    box-shadow: 0 0 6px rgba(216,197,154,0.08), inset 0 0 6px rgba(255,255,255,0.05);
}
.badge-approved::before{
    content:"✓";
    font-size:12px;
    line-height:1;
    margin-right:6px;
    opacity:0.90;
}
.badge-approved::after{
    content:"OK";
    line-height:1;
    display:block;
    text-align:center;
}


/* ===============================
   BADGE NEW ENTRY (timbro)
================================ */

.badge-new-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;

    border: 2px dashed rgba(120,180,255,0.9);
    color: #9cc9ff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;

    background: radial-gradient(circle at center,
        rgba(40,80,140,0.35),
        rgba(10,20,40,0.9)
    );

    box-shadow:
        0 0 6px rgba(120,180,255,0.45),
        inset 0 0 5px rgba(255,255,255,0.18);
    animation: newEntryGlow 2.8s ease-in-out 4;
	animation-fill-mode: both;
}
@keyframes newEntryGlow {
    0%,100% {
        box-shadow:
            0 0 5px rgba(120,180,255,0.35),
            inset 0 0 4px rgba(255,255,255,0.15);
    }
    50% {
        box-shadow:
            0 0 9px rgba(120,180,255,0.75),
            inset 0 0 6px rgba(255,255,255,0.25);
    }
}
.badge-new-entry::after {
    content: "NEW ENTRY";
    line-height: 1;
    display: block;
    text-align: center;
    transform: translate(0.5px, 0.5px);
}

/* BADGE EVALUATING (in valutazione) */
.badge-evaluating{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:22px;
    padding:0 10px;
    border-radius:999px;
    border:1px solid rgba(120,160,255,0.35);
    color:#d6e4ff;
    font-size:10px;
    font-weight:800;
    letter-spacing:0.9px;
    text-transform:uppercase;
    background: linear-gradient(180deg, rgba(18,22,34,0.85), rgba(10,12,16,0.92));
    box-shadow: 0 0 6px rgba(120,160,255,0.10), inset 0 0 6px rgba(255,255,255,0.06);
}
.badge-evaluating::before{
    content:"↻";
    font-size:12px;
    line-height:1;
    margin-right:6px;
    opacity:0.85;
}
.badge-evaluating::after{
    content:"EVAL";
    line-height:1;
    display:block;
    text-align:center;
}

/* BADGE CLEANING (autoeliminazione) */
.badge-cleaning{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid rgba(201,179,122,.55);background:linear-gradient(135deg,rgba(201,179,122,.22),rgba(0,0,0,.25));color:#f1e6b6;font-size:11px;font-weight:800;letter-spacing:.3px;box-shadow:0 0 10px rgba(201,179,122,.18),inset 0 0 8px rgba(0,0,0,.55);}
.badge-cleaning-ico{font-size:12px;line-height:1;opacity:.95;}
.badge-cleaning-txt{font-variant-numeric:tabular-nums;}

/* ===============================
   BADGE IN VOTE (timbro)
================================ */

.badge-in-vote {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #cfd6e4;
    background: rgba(90,120,160,0.25);
    border: 1px solid rgba(120,160,220,0.35);
    border-radius: 10px;
    letter-spacing: 0.4px;
}


/* ===============================
   COPPE VOTI (oro/argento)
================================ */

.b25-cup{
    display:inline-block;
    margin-left:6px;
    line-height:1;
    vertical-align:middle;
    font-size:16px;
}
.b25-cup-silver{
    filter: grayscale(1) brightness(1.25) contrast(1.05);
}
.b25-cup-gold{
    filter:none;
}


/* hover: riga approvata cliccabile */
tr.approved-row:hover .badge-approved {
    background: rgba(216,197,154,0.12);
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.7),
        0 0 10px rgba(216,197,154,0.45);
}

/* --------------------------- BOTTONI GLOBALI --------------------------- */
/* base per tutti i bottoni “moderni” */
.b25-btn,
.action-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.10);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: .25s ease;
}
.b25-btn:hover,
.action-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.32);
}

/* azioni tabella – versione più compatta */
.action-btn {
    padding: 5px 11px;
}


/* Flip up/down (feedback voto su riga) */
@keyframes b25VoteFlipUp {
  0%   { transform: translateY(0);    filter: brightness(1); }
  35%  { transform: translateY(-4px); filter: brightness(1.12); }
  70%  { transform: translateY(2px);  filter: brightness(1.05); }
  100% { transform: translateY(0);    filter: brightness(1); }
}
@keyframes b25VoteFlipDown {
  0%   { transform: translateY(0);    filter: brightness(1); }
  35%  { transform: translateY(4px);  filter: brightness(1.10); }
  70%  { transform: translateY(-2px); filter: brightness(1.04); }
  100% { transform: translateY(0);    filter: brightness(1); }
}
#songsTable tr.song-row.vote-flip-up   { animation: b25VoteFlipUp 340ms ease-out; }
#songsTable tr.song-row.vote-flip-down { animation: b25VoteFlipDown 340ms ease-out; }
/* stati azione */
.action-btn.green {
    background: rgba(67,211,123,0.22);
    border-color: rgba(67,211,123,0.55);
    color: #d7ffe7;
}
.action-btn.green:hover {
    background: rgba(67,211,123,0.32);
}

.action-btn.yellow {
    background: rgba(255,209,92,0.22);
    border-color: rgba(255,209,92,0.55);
    color: #fff4d0;
}
.action-btn.yellow:hover {
    background: rgba(255,209,92,0.32);
}

/* NOTE DOT (usa ::before per non interferire col tooltip ::after) */
.action-btn.note-btn.has-note::before{
  content:"";
  position:absolute;
  top:3px; right:3px;
  width:6px; height:6px;
  border-radius:50%;
  background: rgba(67,211,123,0.95);
  box-shadow: 0 0 0 1px rgba(5,7,12,0.85), 0 0 6px rgba(67,211,123,0.25);
  pointer-events:none;
}
.action-btn.note-btn:disabled::before{ display:block; }
/* mantieni il dot verde anche se disabled (evita grayscale globale) */
.action-btn.note-btn.has-note:disabled{ filter:none; }

.action-btn.red {
    background: rgba(255,107,107,0.22);
    border-color: rgba(255,107,107,0.6);
    color: #ffe3e3;
}
.action-btn.red:hover {
    background: rgba(255,107,107,0.32);
}

/* ===== DISABLED STATE (APPROVED) ===== */
.action-btn:disabled{
    opacity: .35;
    filter: grayscale(1);
    cursor: not-allowed;
    box-shadow: none;
}

/* bottone YouTube dedicato (classe .blue usata in script.js) */
.b25-btn.blue {
    background: rgba(90,140,255,0.22);
    border-color: rgba(120,160,255,0.40);
    color: #eaf0ff;
}
.b25-btn.blue:hover {
    background: rgba(120,170,255,0.35);
}

/* ===== TOOLTIP CUSTOM ACTION BUTTON ===== */
.action-btn{
    position: relative;
}

.action-btn[data-tip]::after{
    content: attr(data-tip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(10,12,18,0.96);
    color: var(--gold);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 8px 22px rgba(0,0,0,.55);
    transition: opacity .18s ease, transform .18s ease;
    z-index: 30;
}

.action-btn:hover::after{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}



/* --------------------------- MODALI INDEX --------------------------- */
/* overlay/backdrop è gestito da overlay.css; qui solo la “card” */

/* Modali Aggiungi/Modifica/Note */
.b25-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(20,24,34,0.98), rgba(8,10,16,0.96));
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    padding: 12px 14px;
    min-width: 320px;
    max-width: 360px;
    color: var(--text);
}
/* ===================================================
   CENTRATURA CONTENUTO MODALI (ADD / EDIT / NOTE)
=================================================== */
.b25-modal-content .modal-body,
.b25-modal-content .form-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* === COMPATTA SPAZI INTERNI MODALE FORM === */
.b25-modal-content .modal-body,
.b25-modal-content .form-body {
    gap: 8px;
}

.b25-modal-content label {
    margin: 6px 0 2px;
}

.b25-modal-content input,
.b25-modal-content select {
    margin: 0 0 6px;
}

.b25-modal-content label {
    width: 100%;
    max-width: 300px;
}

.b25-modal-content input,
.b25-modal-content select {
    width: 100%;
    max-width: 300px;
}

/* Variante leggermente più stretta usata da Nuovo brano */
.b25-modal-content.narrow {
    max-width: 340px;
}


/* ===================================================
   MODALE BRANO (Aggiungi/Modifica) PIÙ COMPATTA
   - impatta solo #editModal (usato per add/edit brano)
=================================================== */
#editModal .b25-modal-content{
    padding: 10px 12px;
    min-width: 280px;
    max-width: 320px;
}

#editModal .modal-header{
    gap: 8px;
    margin-bottom: 8px;
}
#editModal .modal-header h2{
    font-size: 14px;
}

#editModal .b25-modal-content .modal-body,
#editModal .b25-modal-content .form-body{
    gap: 6px;
}

#editModal .b25-modal-content label{
    font-size: 11.5px;
    margin: 6px 0 2px;
}

#editModal .b25-modal-content .modal-body input,
#editModal .b25-modal-content .modal-body select{
    height: 32px;
    padding: 5px 8px;
    font-size: 12.5px;
}

#editModal .modal-footer .b25-btn{
    padding: 6px 10px;
    font-size: 12.5px;
}

/* Box login admin */
.login-box {
    position: relative;
    background: linear-gradient(135deg, rgba(20,24,34,0.98), rgba(8,10,16,0.96));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    padding: 20px 22px;
    min-width: 380px;
    max-width: 480px;
    color: var(--text);
}

/* Allineamento semantico Bootleg25 */
.b25-panel {
  background: rgba(14,16,24,0.74);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.modal-header h2 {
    margin: 0;
    font-size: 16px;
}
.modal-close {
    border: none;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    font-size: 16px;
}
.modal-close:hover {
    color: #fff;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.form-body label {
    font-size: 12px;
    opacity: 0.8;
}
.form-body input,
.form-body select,
.b25-modal-content .modal-body input,
.b25-modal-content .modal-body select{
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(5,7,12,0.9);
    color: var(--text);
}

/* uniforma input number (BPM) */
.b25-modal-content .modal-body input[type="number"]{
  -moz-appearance: textfield;
  appearance: textfield;
}
.b25-modal-content .modal-body input[type="number"]::-webkit-outer-spin-button,
.b25-modal-content .modal-body input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* Fix autofill */
html body .b25-modal-content input:-webkit-autofill,
html body .b25-modal-content input:-webkit-autofill:hover,
html body .b25-modal-content input:-webkit-autofill:focus,
html body .b25-modal-content input:-webkit-autofill:active{
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px rgba(5,7,12,0.92) inset;
  caret-color: var(--text);
  background-clip: content-box;
  transition: background-color 9999s ease-out 0s;
}

html body .b25-modal-content input:autofill{
  box-shadow: 0 0 0 1000px rgba(5,7,12,0.92) inset;
  color: var(--text);
  caret-color: var(--text);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* textarea note */
.b25-textarea,
#noteText,
#svNotesArea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(5,7,12,0.9);
    color: var(--text);
    resize: vertical;
}

/* login admin quick box */
.login-box h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
}
.login-close {
    position: absolute;
    top: 10px;
    right: 14px;
    cursor: pointer;
    font-size: 20px;
}
.login-field {
    margin-bottom: 12px;
}
.login-field label {
    font-size: 13px;
    opacity: .8;
}
.login-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(5,7,12,0.9);
    color: var(--text);
}
.login-btn {
    width: 100%;
    margin-top: 10px;
}
/* Fix autofill anche per filtro Bacheca */
html body #bbFilterText:-webkit-autofill,
html body #bbFilterText:-webkit-autofill:hover,
html body #bbFilterText:-webkit-autofill:focus{
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px rgba(5,7,12,0.92) inset;
  caret-color: var(--text);
}

html body #bbFilterText:autofill{
  box-shadow: 0 0 0 1000px rgba(5,7,12,0.92) inset;
  color: var(--text);
  caret-color: var(--text);
}

/* --------------------------- SONG DETAILS ROW --------------------------- */
.song-details-card {
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    margin-top: 6px;
}
.song-details-title {
    font-size: 20px;
    font-weight: 600;
}
.song-details-actions {
    display: flex;
    gap: 8px;
}

/* --------------------------- TOOLTIP VOTANTI --------------------------- */
.vote-perc {
    display: inline-block;
    margin-left: 6px;
    font-size: 13px;
    opacity: 0.75;
}
#songsTable td.vote-cell{
  position: relative;
  overflow: visible;
}

/* tooltip container (stile leggero, se già esiste in CSS lo sovrascrive in meglio) */
.vote-tooltip {
	z-index: 200;
    position: absolute;
	top: auto;
	bottom: calc(100% + 3px);
	left: 50%;
	transform: translateX(-50%);
	margin-top: 0;
	z-index: 9999;
    padding: 6px 10px;
    background: rgba(10,12,18,0.96);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    min-width: unset;
    width: fit-content;
}

.vote-tooltip.vote-tooltip-down{
  top: calc(100% + 6px);
  bottom: auto;
}



.vote-tip-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    margin-bottom: 4px;
}
.vote-tip-row.vip {
    color: var(--accent-yellow);
}
.vote-tip-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
}
.vote-tip-empty {
    font-size: 13px;
    opacity: .7;
}

/* --------------------------- RESPONSIVE --------------------------- */
@media (max-width: 1280px) {
    #songsTable th:nth-child(5),
    #songsTable td:nth-child(5) {
		width: 200px;
		height: 40px;
}

    .b25-toolbar-right {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
/* Forza menu tendina scuro sui browser moderni */
.b25-filter {
    background-color: #0b0e15;
    color: #e8e8e8;
    border: 1px solid rgba(255,255,255,0.25);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Sfondo scuro della lista opzioni */
.b25-filter option {
    background-color: #0b0e15;
    color: #e8e8e8;
}
#chartVotes,
#chartProps {
    height: 160px;
    max-height: none;
}

/* ===== FIX INPUT MODALI BRANO (Nuovo / Modifica) ===== */
#nTitle, #nArtist, #nGenre, #nLink, #nProp,
#eTitle, #eArtist, #eGenre, #eLink {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(5,7,12,0.92);
    color: var(--text);
    font-size: 13px;
}
#nTitle:focus, #nArtist:focus, #nGenre:focus, #nLink:focus, #nProp:focus,
#eTitle:focus, #eArtist:focus, #eGenre:focus, #eLink:focus {
    outline: none;
    border-color: rgba(255,255,255,0.30);
    background: rgba(5,7,12,0.98);
}
/* ===== FIX MODALE NOTE BRANO ===== */
#noteModal .modal-body {
    padding: 6px 2px 6px 2px;
    margin-bottom: 10px;
}

#noteText {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(5,7,12,0.92);
    border: 1px solid rgba(255,255,255,0.16);
    color: var(--text);
    font-size: 13px;
    resize: vertical;
}
/* ===== Padding equilibrato modali Bootleg25 ===== */

.modal-body.form-body {
    padding: 0;  /* nessun padding extra che sbilancia */
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
}

/* Footer modale statistiche */
.b25-modal-footer {
    margin-top: 18px;
    text-align: right;
}

.b25-modal-footer .b25-btn {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}
/* Fix definitivo posizione pulsante CHIUDI (X) modale statistiche */
#statsModal .b25-modal-box {
    position: relative;
}

/* Popup minimo login admin */
#adminLoginPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #11141c;
    padding: 10px;
    border-radius: 5px;
    width: 180px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    z-index: 99999;
    display: none;
	font-size: 14px;
}
/* bottone login admin */
#adminLoginPopup button {
    width: 30%;
    padding: 2px;
    border-radius: 6px;
    background: #d9c7a0;
    color: #000;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
tr.is-approved {
    cursor: pointer;
}


/* ============================================================
   DISABILITAZIONE VISIVA BRANI APPROVED (INDEX)
============================================================ */

tr.is-approved {
    opacity: 0.55;
}

tr.is-approved:hover {
    background: none !important;
}

/* bottoni azione disabilitati */
tr.is-approved .action-btn {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* badge approved sempre leggibile */
tr.is-approved .badge-approved {
    opacity: 1;
}

/* icone YouTube ancora cliccabili se vuoi */
tr.is-approved .b25-btn.blue {
    pointer-events: auto;
    opacity: 0.85;
}

.status-new-entry {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #0b3558;
    background: linear-gradient(135deg,#7cc4ff,#eaf4ff);
    border: 1px solid #5aa8e6;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: 0 0 6px rgba(90,168,230,.4);
}
/* ============================================================
   PROTEZIONE CONTENUTI – MEDIA
   ============================================================ */
img, video {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
    pointer-events: auto;
}
/* ============================================================
   MODALE CONFERMA GLOBALE – FIX CENTRATURA ASSOLUTA
============================================================ */

#b25Confirm {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;              /* default */
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.55);
}

#b25Confirm.active {
    display: flex;
}

/* box modale */
#b25Confirm .b25-modal-content {
    position: relative;
    width: 340px;
    max-width: calc(100vw - 40px);

    margin: 0;                  /* BLOCCA SLIDE */
    transform: none;            /* BLOCCA TRASLAZIONI */
}


/* ============================================================
   MODALE CONFERMA APPROVAZIONE – DASHBOARD
============================================================ */

#b25ApproveConfirm{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
}

#b25ApproveConfirm.active{ display:flex; }

#b25ApproveConfirm .b25-approve-modal{
  width: min(860px, calc(100vw - 60px));
  max-width: calc(100vw - 60px);
  height: min(78vh, 740px);
  display:flex;
  flex-direction: column;
}

#b25ApproveConfirm .modal-body{
  flex: 1;
  overflow: hidden;
  display:flex;
  flex-direction: column;
  align-items: stretch;
}

#b25ApproveConfirm .b25-approve-voters,
#b25ApproveConfirm .b25-approve-approved-head,
#b25ApproveConfirm .b25-approve-approved-cols,
#b25ApproveConfirm .b25-approve-approved-list{
  width: 100%;
}

#b25ApproveMsg{
  margin: 6px 0 10px;
  color: var(--text);
  font-size: 15px;
}

.b25-approve-label{
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 8px;
}

.b25-approve-chips{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.b25-approve-chip{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(216,197,154,0.45);
  background: rgba(18,20,28,0.6);
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .2px;
}

.b25-approve-divider{
  height: 1px;
  background: rgba(216,197,154,0.18);
  margin: 10px 0 12px;
}

.b25-approve-approved-title{
  color: var(--text);
  font-weight: 700;
  display:flex;
  align-items: baseline;
  gap: 10px;
}

.b25-approve-approved-count{
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  opacity: .95;
}

.b25-approve-approved-cols{
  display:grid;
  grid-template-columns: 1.6fr 1fr 0.8fr;
  gap: 14px;
  padding: 6px 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.b25-approve-approved-list{
  flex: 1;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(8,10,16,0.35);
  padding: 8px;
}

.b25-approve-row{
  display:grid;
  grid-template-columns: 1.6fr 1fr 0.8fr;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
}

.b25-approve-row:nth-child(odd){
  background: rgba(255,255,255,0.03);
}

.b25-btn.gold{
  border: 1px solid rgba(216,197,154,0.55);
  background: linear-gradient(180deg, rgba(216,197,154,0.95), rgba(177,153,108,0.90));
  color: rgba(10,12,18,0.92);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

.b25-btn.gold:hover{
  filter: brightness(1.05);
}

/* ============================================================
   NOTE MODAL (lista) – ISOLATA / FIX LAYOUT (autore accanto testo)
============================================================ */
#noteModal .b25-modal-content.wide{
  width: min(980px, calc(100vw - 80px));
  max-width: calc(100vw - 80px);
  height: min(78vh, 760px);
  display:flex;
  flex-direction: column;
}

#noteModal .modal-body{
  align-items: stretch !important;
  margin-bottom: 0 !important;
  padding: 10px 12px 12px !important;
  flex: 1 1 auto;
  min-height: 0;
}

#noteModal .nm-unified{
  flex: 1 1 auto;
  min-height: 0;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

#noteModal .nm-list{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(0,0,0,.18);
}

#noteModal .note-row{
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
#noteModal .note-row:last-child{ border-bottom: none; }

#noteModal .nm-line{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
}

#noteModal .nm-main{
  display:flex;
  align-items: baseline;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

#noteModal .nm-author{
  font-size: 12px;
  font-weight: 600;
  color: rgba(120,160,255,.85);
  white-space: nowrap;
  flex: 0 0 auto;
}
#noteModal .nm-author{ margin-top: 1px; }

#noteModal .nm-text{
  flex: 1 1 auto;
  min-width: 0;
  white-space: pre-wrap;
  color: #e8ecf5;
  line-height: 1.35;
}
#noteModal .nm-text{ font-size: 14px; }

#noteModal .nm-empty{
  padding: 8px 6px;
  color: rgba(232,236,245,.75);
}

#noteModal textarea#newNoteText{
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 8px 10px;
  line-height: 22px;
  resize: none;
  overflow: hidden;
  white-space: nowrap;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(5,7,12,0.92);
  color: var(--text);
}

#noteModal .nm-actions{
  display:flex;
  justify-content: flex-end;
  padding-top: 2px;
}

#noteModal .nm-del{
  padding: 4px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #e8ecf5;
}
#noteModal .nm-del:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
}
#noteModal .nm-list{ scrollbar-width: thin; }
#noteModal .note-row:hover{ background: rgba(255,255,255,.03); border-radius: 10px; }
#noteModal .nm-del{ opacity: .85; }
#noteModal .note-row:hover .nm-del{ opacity: 1; }

/* Index: evita filtri costosi su superfici grandi */
#songsTable, .b25-main-box, .b25-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
