/* ============================================================
   Bass Buddy - Stili aggiuntivi versione PHP
   (da importare dopo elegant_dark_mode.css)
   ============================================================ */

/* ---- NAVBAR ---- */

.navbar-bb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: rgba(0,0,0,0.8);
  border-bottom: 1px solid rgba(212,175,55,0.3);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.navbar-brand-bb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #d4af37;
}

.navbar-brand-bb .icon { font-size: 1.2rem; }

.navbar-menu-bb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.navbar-email {
  font-size: 0.82rem;
  color: #888;
}

.navbar-role {
  font-size: 0.72rem;
  background: rgba(212,175,55,0.15);
  color: #d4af37;
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
}

.navbar-link {
  font-size: 0.85rem;
  color: #bbb;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.navbar-link:hover { color: #d4af37; background: rgba(212,175,55,0.1); }
.navbar-logout:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }

/* ---- AUTH ---- */

.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: rgba(20,20,20,0.9);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

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

.auth-logo i {
  font-size: 2.5rem;
  color: #d4af37;
  margin-bottom: 0.5rem;
  display: block;
}

.auth-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d4af37;
  margin-bottom: 0.5rem;
}

.auth-logo p {
  font-size: 0.9rem;
  color: #888;
}

.auth-hint {
  font-size: 0.78rem;
  color: #666;
  margin-top: 0.25rem;
}

.otp-input {
  font-size: 1.5rem !important;
  letter-spacing: 0.5rem !important;
  text-align: center !important;
}

.auth-back-link {
  font-size: 0.85rem;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-back-link:hover { color: #d4af37; }

/* ---- ADMIN ---- */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header .title { margin-bottom: 0; }

.user-inactive { opacity: 0.5; }

.inline-form { display: inline; }

table.table {
  background: transparent;
  color: #e0e0e0;
}
table.table thead th {
  color: #d4af37;
  border-bottom-color: rgba(212,175,55,0.3);
  background: transparent;
}
table.table tbody tr td {
  border-bottom-color: rgba(255,255,255,0.05);
  vertical-align: middle;
}
table.table.is-striped tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.03);
}

/* ============================================================
   PITCH CONTROL 
   ============================================================ */

.vw-pitch-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .75rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
}

.vw-pitch-lbl {
    font-size: .75rem;
    color: var(--color-text-muted, #888);
    min-width: 2.5rem;
    flex-shrink: 0;
}

.vw-pitch-btns {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}

.vw-pitch-btns button {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    font-size: .75rem;
    padding: .2rem .55rem;
    transition: background .15s;
}

.vw-pitch-btns button:hover {
    background: rgba(255, 255, 255, .2);
}

.vw-pitch-btns button.active {
    background: var(--color-primary, #d4af37);
    border-color: var(--color-primary, #d4af37);
    color: #000;
    font-weight: 700;
}

/* Cursore OSMD nel viewer */
img[id^="cursorImg"] {
    height: auto !important;
    z-index: 2 !important;
    opacity: 0.5 !important;
}

#vw-score-osmd {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* ============================================================
   SEZIONE LEZIONI
   ============================================================ */
 
/* Layout a due colonne: sidebar + main */
.lessons-layout {
    display: flex;
    min-height: calc(100vh - 3.5rem);
    position: relative;
}
 
/* ── Sidebar ─────────────────────────────────────────────── */
 
.lessons-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--color-surface, #1a1a2e);
    border-right: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 3.5rem;
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
}
 
.sidebar-header {
    display: flex;
    align-items: center;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-weight: 600;
}
 
.sidebar-title { display: flex; align-items: center; gap: .5rem; }
 
.sidebar-nav { flex: 1; overflow-y: auto; padding: .5rem 0; }
 
.sidebar-category { border-bottom: 1px solid rgba(255,255,255,.06); }
 
.sidebar-cat-btn {
    width: 100%;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    opacity: .7;
}
.sidebar-cat-btn:hover { opacity: 1; background: rgba(255,255,255,.05); }
 
.sidebar-cat-icon { font-size: .7rem; transition: transform .2s; }
.sidebar-cat-count {
    margin-left: auto;
    font-size: .7rem;
    background: rgba(255,255,255,.1);
    border-radius: 10px;
    padding: .1rem .4rem;
}
 
.sidebar-lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-lesson-list.is-hidden { display: none; }
 
.sidebar-lesson-link {
    display: block;
    padding: .45rem 1rem .45rem 2rem;
    font-size: .88rem;
    color: inherit;
    opacity: .8;
    transition: background .15s, opacity .15s;
    border-left: 3px solid transparent;
}
.sidebar-lesson-link:hover {
    background: rgba(255,255,255,.07);
    opacity: 1;
}
.sidebar-lesson-link.is-active {
    border-left-color: var(--color-primary, #d4af37);
    background: rgba(212,175,55,.1);
    opacity: 1;
    font-weight: 600;
}
 
.sidebar-empty { padding: 1rem; font-size: .85rem; opacity: .5; }
 
.sidebar-footer {
    padding: .75rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
 
/* Bottone apri sidebar (mobile / sidebar chiusa) */
.sidebar-open-btn {
    display: none;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    font-size: .85rem;
    padding: .4rem .8rem;
    margin-bottom: 1rem;
    gap: .4rem;
    align-items: center;
}
 
/* ── Contenuto principale ────────────────────────────────── */
 
.lessons-main {
    flex: 1;
    padding: 1.5rem;
    max-width: 860px;
    min-width: 0;
}
 
/* ── Lesson cards (lista) ─────────────────────────────────── */
 
.lesson-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .75rem;
}
 
.lesson-card {
    display: block;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: .85rem 1rem;
    color: inherit;
    transition: background .15s, border-color .15s;
    text-decoration: none;
}
.lesson-card:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--color-primary, #d4af37);
    color: inherit;
}
 
.lesson-card-title {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .4rem;
}
.lesson-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .75rem;
    opacity: .6;
}
.lesson-card-edit { opacity: .6; }
.lesson-card-edit:hover { opacity: 1; }
 
/* ── Visualizzazione lezione ─────────────────────────────── */
 
.lesson-content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.lesson-content-actions { display: flex; gap: .5rem; flex-shrink: 0; }
 
.lesson-body {
    line-height: 1.75;
}
 
/* Stili per il contenuto Markdown renderizzato */
.lesson-body h1, .lesson-body h2, .lesson-body h3 {
    margin-top: 1.5em;
    margin-bottom: .5em;
}
.lesson-body h1 { font-size: 1.6rem; }
.lesson-body h2 { font-size: 1.3rem; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: .3rem; }
.lesson-body h3 { font-size: 1.1rem; }
 
.lesson-body table {
    width: auto;
    border-collapse: collapse;
    margin: 1rem 0;
}
.lesson-body th, .lesson-body td {
    border: 1px solid rgba(255,255,255,.2);
    padding: .4rem .75rem;
    font-size: .9rem;
}
.lesson-body th { background: rgba(255,255,255,.08); font-weight: 600; }
 
.lesson-body code {
    background: rgba(255,255,255,.08);
    border-radius: 3px;
    padding: .1em .35em;
    font-family: 'Latin Modern Mono', 'Courier New', monospace;
    font-size: .9em;
}
.lesson-body pre {
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}
.lesson-body pre code {
    background: none;
    padding: 0;
    font-size: .88rem;
    line-height: 1.6;
}
.lesson-body blockquote {
    border-left: 3px solid var(--color-primary, #d4af37);
    padding-left: 1rem;
    margin: 1rem 0;
    opacity: .85;
}
.lesson-body img {
    max-width: 100%;
    border-radius: 4px;
    margin: .5rem 0;
}
/* Note a piè di pagina Parsedown */
.lesson-body .footnotes {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .85rem;
    opacity: .75;
}
.lesson-body sup a { color: var(--color-primary, #d4af37); }
 
.lesson-footer {
    margin-top: 2rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
 
/* Breadcrumb lezioni */
.lesson-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    flex-wrap: wrap;
}
.breadcrumb-sep { opacity: .4; }
 
/* ── Todo ────────────────────────────────────────────────── */
 
.todo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
 
.todo-list { display: flex; flex-direction: column; gap: .5rem; }
 
.todo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem .75rem;
    background: rgba(255,255,255,.04);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.08);
    transition: background .15s;
}
.todo-row:hover { background: rgba(255,255,255,.08); }
.todo-row.todo-done { opacity: .55; }
 
.todo-row-left { display: flex; align-items: flex-start; gap: .6rem; flex: 1; min-width: 0; }
 
.todo-status-btn {
    cursor: pointer;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
}
 
.todo-row-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.todo-row-title { font-size: .9rem; font-weight: 500; }
.todo-row-lesson { font-size: .75rem; opacity: .65; }
.todo-row-lesson a { color: inherit; text-decoration: underline dotted; }
.todo-row-notes { font-size: .75rem; opacity: .55; }
 
.todo-row-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
 
.todo-due-date { font-size: .75rem; opacity: .6; white-space: nowrap; }
.todo-due-date.is-overdue { color: #ff6b6b; opacity: 1; }
 
/* ── Mobile ──────────────────────────────────────────────── */
 
@media (max-width: 768px) {
    .lessons-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100vh;
        width: 260px;
        z-index: 100;
        transition: left .25s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,.4);
    }
    .lessons-sidebar.is-open { left: 0; }
 
    .lessons-main { padding: 1rem; }
 
    .sidebar-open-btn { display: inline-flex; }
 
    .lesson-cards { grid-template-columns: 1fr; }
 
    .lesson-content-header { flex-direction: column; }
}
 
/* Sidebar collassata su desktop */
.lessons-layout.sidebar-collapsed .lessons-sidebar {
    display: none;
}
.lessons-layout.sidebar-collapsed .lessons-main {
    max-width: 100%;
}
 
/* Logo navbar cliccabile */
.navbar-brand-bb {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}
.navbar-brand-bb:hover {
    opacity: .85;
}
 
/* ── Score player panel nel viewer ───────────────────────────── */
 
.vw-score-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    background: rgba(0,0,0,.2);
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-wrap: wrap;
}
 
.vw-score-status {
    padding: .25rem .75rem;
    font-size: .75rem;
    background: rgba(0,0,0,.2);
    min-height: 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.vw-score-status.ok    { color: #6bffb8; }
.vw-score-status.error { color: #ff6b6b; }
 
#vw-score-osmd {
    flex: 1;
    overflow: auto;
    background: #fff;
}
 
/* ── File correnti nel modal di modifica ─────────────────────── */
 
.current-file-tag {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
    flex-wrap: wrap;
}
 
.current-file-hint {
    font-size: .72rem;
    opacity: .55;
    font-style: italic;
}
 