/* DOXA Banda — tema inspirado no logo: carvão, branco e cinza. Pensado primeiro para celular. */
:root {
    --bg: #191919;
    --bg-2: #141414;
    --surface: #212121;
    --surface-2: #2a2a2a;
    --border: #333333;
    --border-strong: #474747;
    --text: #f2f2f2;
    --text-soft: #c9c9c9;
    --text-muted: #8a8a8a;
    --gray: #747474;
    --white: #ffffff;
    --danger: #e0685e;
    --danger-bg: rgba(224, 104, 94, 0.12);
    --success: #6fbf8e;
    --success-bg: rgba(111, 191, 142, 0.12);
    --warning: #d9b45a;
    --warning-bg: rgba(217, 180, 90, 0.12);
    --whatsapp: #25d366;
    --radius: 14px;
    --radius-sm: 10px;
    --topbar-h: 56px;
    --bottomnav-h: 64px;
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--topbar-h) + 60px); -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    font-variant-numeric: lining-nums;   /* Cormorant usa "1" estilo romano por padrão */
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--bottomnav-h) + 24px + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}
body.sem-bottom-nav { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }  /* .btn e afins definem display e venceriam o atributo */
button { font-family: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; margin: 0; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 26px; line-height: 1.15; }
h3 { font-size: 21px; }

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-muted);
}
a.eyebrow { display: inline-flex; align-items: center; min-height: 36px; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.only-mobile { display: none !important; }
@media (max-width: 760px) {
    .only-mobile { display: revert !important; }
    .only-desktop { display: none !important; }
}

.container { max-width: 980px; margin: 0 auto; padding: 18px 16px 32px; }
.container-auth { max-width: 440px; }

/* ── Topbar ───────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 16px;
    background: rgba(20, 20, 20, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 28px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text span { font-size: 13px; letter-spacing: 0.42em; font-weight: 500; }
.brand-text small { font-size: 9px; letter-spacing: 0.5em; color: var(--text-muted); margin-top: 4px; }

.topbar-links { display: flex; gap: 4px; margin-left: auto; }
.topbar-links a {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.topbar-links a:hover { color: var(--text); }
.topbar-links a.active { color: var(--white); background: var(--surface-2); }

.user-menu { display: flex; align-items: center; gap: 12px; }
.user-chip {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
    background: var(--surface);
}
.logout-link { font-size: 12px; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.logout-link:hover { color: var(--text); }

/* ── Bottom nav (celular) ─────────────────────────── */
.bottom-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(20, 20, 20, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 4px 4px env(safe-area-inset-bottom);
    justify-content: space-around;
}
.bn-item {
    flex: 1;
    min-height: 56px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10px; letter-spacing: 0.04em;
    color: var(--text-muted);
}
.bn-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bn-item.active { color: var(--white); }
.bn-item.active span { font-weight: 600; }
.bn-add svg { background: var(--white); color: var(--bg); border-radius: 50%; padding: 5px; width: 34px; height: 34px; stroke-width: 2.4; }

@media (max-width: 760px) {
    .topbar-links, .logout-link { display: none; }
    .user-menu { margin-left: auto; }
    .bottom-nav { display: flex; }
    h1 { font-size: 30px; }
}
@media (min-width: 761px) {
    body, body.sem-bottom-nav { padding-bottom: 30px; }
}

/* ── Flash / toast ────────────────────────────────── */
.flash {
    max-width: 948px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid transparent;
}
.card .flash, .auth-wrap .flash { margin: 0 0 14px; }
.flash-sucesso { background: #1d2a22; color: var(--success); border-color: rgba(111,191,142,.3); }
.flash-erro { background: #2d1e1d; color: var(--danger); border-color: rgba(224,104,94,.3); }
.flash-aviso { background: #2b2618; color: var(--warning); border-color: rgba(217,180,90,.3); }
@media (max-width: 980px) { .flash { margin: 16px 16px 0; } }
@media (max-width: 760px) {
    /* No celular a mensagem aparece como aviso flutuante, visível em qualquer ponto da rolagem */
    .flash.toast {
        position: fixed;
        top: calc(var(--topbar-h) + 10px);
        left: 12px; right: 12px;
        margin: 0;
        z-index: 60;
        box-shadow: 0 10px 30px rgba(0,0,0,.5);
        animation: toast-in .25s ease-out;
    }
}
@keyframes toast-in { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Botões ───────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    font-family: var(--sans);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    white-space: nowrap;
    user-select: none;
}
.btn:hover { border-color: var(--text-muted); background: var(--surface-2); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-primary { background: var(--white); color: #111; border-color: var(--white); }
.btn-primary:hover { background: #e6e6e6; border-color: #e6e6e6; }
.btn-danger { color: var(--danger); border-color: rgba(224,104,94,.4); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-whatsapp { color: var(--whatsapp); border-color: rgba(37,211,102,.35); }
.btn-whatsapp:hover { background: rgba(37,211,102,.08); border-color: var(--whatsapp); }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: 11px; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; }
.btn-icon { width: 44px; padding: 0; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Cabeçalho de página ──────────────────────────── */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    margin: 4px 0 18px;
    flex-wrap: wrap;
}
.page-head .eyebrow { display: block; margin-bottom: 6px; }
.divider { height: 1px; background: var(--border); margin: 28px 0; border: 0; }

.section-title {
    display: flex; align-items: center; gap: 14px;
    margin: 26px 0 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); order: 1; }
.section-title .eyebrow { color: var(--text-soft); }
.section-title .link { order: 2; font-size: 12px; color: var(--text-muted); background: none; border: 0; padding: 6px 0; cursor: pointer; }

/* ── Cards ────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.min-card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}
.min-card:hover { border-color: var(--border-strong); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.min-card:active { transform: scale(0.985); }
.min-card.destaque { border-color: var(--text-muted); }
.min-card-top { display: flex; gap: 14px; padding: 16px 16px 12px; align-items: flex-start; }
.date-block {
    flex-shrink: 0;
    width: 58px;
    text-align: center;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 6px 0 7px;
}
.destaque .date-block { background: var(--white); color: #111; border-color: var(--white); }
.destaque .date-block .m { color: #555; }
.date-block .d { display: block; font-family: var(--serif); font-size: 30px; line-height: 1; font-weight: 700; }
.date-block .m { display: block; font-size: 10px; letter-spacing: 0.3em; color: var(--text-muted); margin-top: 3px; padding-left: .3em; }
.min-card-info { min-width: 0; flex: 1; }
.min-card-info h3 { font-size: 22px; line-height: 1.15; margin-bottom: 4px; overflow-wrap: anywhere; }
.min-card-meta { font-size: 12px; color: var(--text-muted); }
.min-card-tema { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--text-soft); padding: 0 16px 10px; }
.min-card-songs { list-style: none; margin: 0; padding: 0 16px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.min-card-songs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--text-soft); }
.min-card-songs li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-card-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
.min-card-foot strong { color: var(--white); font-weight: 600; }
.min-card.passada { opacity: .7; }
.min-card.passada:hover { opacity: 1; }
.badge {
    display: inline-block;
    font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
    padding: 3px 8px; border-radius: 999px;
    background: var(--white); color: #111;
    margin-bottom: 6px;
}

.tom {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    font-family: var(--serif);
    font-size: 16px; font-weight: 700; line-height: 1.3;
    color: var(--white);
    flex-shrink: 0;
}
.tom-lg { font-size: 24px; min-width: 52px; padding: 4px 10px; border-radius: 9px; }
.tom-muted { color: var(--text-muted); font-weight: 600; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 32px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    font-size: 12px; letter-spacing: 0.03em;
    color: var(--text-soft);
}
.chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
a.chip:hover { border-color: var(--text-muted); color: var(--white); }
a.chip:active { background: var(--surface-2); }

/* ── Filtros / busca ──────────────────────────────── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.seg {
    display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px;
}
.seg a {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 36px;
    padding: 6px 14px; border-radius: 999px;
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
    white-space: nowrap;
}
.seg a.active { background: var(--white); color: #111; font-weight: 600; }
@media (max-width: 760px) {
    .toolbar .seg { width: 100%; }
    .toolbar .seg a { flex: 1; padding: 6px 8px; }
    .toolbar input[type=search] { min-width: 0; flex-basis: 100%; }
}
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }

/* ── Formulários ──────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) {
    .form-grid > * { grid-column: 1 / -1; }
    .form-grid > .half { grid-column: auto; }
}
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.form-grid .form-group { margin-bottom: 0; }
label, .label {
    font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-muted);
}
.hint { font-size: 12px; color: var(--text-muted); letter-spacing: 0; text-transform: none; font-weight: 400; }
/* 16px: abaixo disso o iPhone dá zoom ao tocar no campo */
input[type=text], input[type=password], input[type=date], input[type=time], input[type=datetime-local],
input[type=number], input[type=url], input[type=search], select, textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    transition: border-color .15s, box-shadow .15s;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
}
input[type=date], input[type=time], input[type=datetime-local] { display: block; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--text-soft);
    box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text-soft); font-weight: 400; }
.check input { width: 20px; height: 20px; accent-color: #fff; }

/* Barra de ações fixa no rodapé (formulários no celular) */
@media (max-width: 760px) {
    .form-actions.sticky {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 55;
        margin: 0;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(20, 20, 20, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--border);
        flex-wrap: nowrap;
    }
    .form-actions.sticky .btn { flex: 1; min-height: 50px; letter-spacing: .08em; padding: 10px 12px; }
    .form-actions.sticky .btn-ghost { display: none; } /* o "← voltar" do topo já cumpre esse papel */
}

/* Seletor de tom em grade (toque em vez de menu suspenso) */
.key-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.key-picker input { position: absolute; opacity: 0; pointer-events: none; }
.key-picker label, .key-toggle label, .pill-picker label {
    display: grid; place-items: center;
    min-height: 46px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--bg-2);
    font-family: var(--serif); font-size: 21px; font-weight: 700;
    letter-spacing: 0; text-transform: none;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    transition: background .12s, color .12s, border-color .12s;
}
.key-picker input:checked + label,
.pill-picker input:checked + label { background: var(--white); color: #111; border-color: var(--white); }
.key-picker input:focus-visible + label, .pill-picker input:focus-visible + label { box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.key-picker .nenhum { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--text-muted); }
.key-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.key-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.key-toggle label { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; min-height: 40px; }
.key-toggle input:checked + label { background: var(--surface-2); border-color: var(--text-soft); color: var(--white); }
.key-preview { font-family: var(--serif); font-size: 15px; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.key-preview b { color: var(--white); font-size: 20px; }

.pill-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-picker input { position: absolute; opacity: 0; pointer-events: none; }
.pill-picker label { font-family: var(--sans); font-size: 13px; font-weight: 500; padding: 0 14px; min-height: 40px; border-radius: 999px; letter-spacing: 0; }

details.mais { border: 1px solid var(--border); border-radius: var(--radius-sm); }
details.mais > summary {
    list-style: none; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    min-height: 50px; padding: 0 14px;
    font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft);
}
details.mais > summary::-webkit-details-marker { display: none; }
details.mais > summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--text-muted); }
details.mais[open] > summary::after { content: '−'; }
details.mais > .form-grid { padding: 4px 14px 16px; }

/* Autocompletar do título da música */
.ac-wrap { position: relative; }
.ac-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    z-index: 30;
    list-style: none; margin: 0; padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 14px 30px rgba(0,0,0,.5);
    max-height: 290px; overflow-y: auto;
}
.ac-list li {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    min-height: 50px; padding: 6px 12px;
    border-radius: 8px; cursor: pointer;
}
.ac-list li:active, .ac-list li.sel { background: var(--surface); }
.ac-list small { display: block; color: var(--text-muted); font-size: 12px; }
.ac-list[hidden] { display: none; }

/* ── Auth ─────────────────────────────────────────── */
.auth-wrap { padding-top: 5vh; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 190px; }
.auth-logo p { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--text-muted); margin: 6px 0 0; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 18px; line-height: 1.8; }
.auth-switch a { color: var(--white); border-bottom: 1px solid var(--border-strong); padding: 6px 0; }

/* ── Detalhe da ministração ───────────────────────── */
.hero {
    position: relative;
    padding: 22px 18px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        radial-gradient(ellipse at top right, rgba(255,255,255,.06), transparent 60%),
        var(--surface);
    margin: 6px 0 16px;
    overflow: hidden;
}
.hero::after {
    content: 'DX';
    position: absolute; right: -10px; bottom: -48px;
    font-family: var(--serif); font-size: 190px; font-weight: 700; line-height: 1;
    color: rgba(255,255,255,.03);
    pointer-events: none;
}
.hero h1 { margin: 6px 0 4px; overflow-wrap: anywhere; }
.hero-tema { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--text-soft); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.hero-actions { margin-top: 16px; position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; }
.hero-actions .btn { padding: 10px 12px; }
.hero-actions .btn-primary { grid-column: 1 / -1; }
@media (min-width: 761px) {
    .hero { padding: 28px 24px; }
    .hero-actions { display: flex; flex-wrap: wrap; }
    .hero-actions .btn-primary { grid-column: auto; }
}

/* Abas da ministração (só no celular) */
.tabs {
    position: sticky;
    top: var(--topbar-h);
    z-index: 30;
    display: none;
    margin: 0 -16px 4px;
    padding: 8px 16px;
    background: rgba(25, 25, 25, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.tabs-inner { display: flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; }
.tabs button {
    flex: 1;
    min-height: 38px;
    border: 0; border-radius: 999px;
    background: transparent;
    font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
}
.tabs button .n { font-weight: 500; opacity: .7; margin-left: 3px; }
.tabs button.active { background: var(--white); color: #111; }
@media (max-width: 860px) {
    .tabs { display: block; }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }
    .tab-panel > .section-title:first-child { margin-top: 14px; }
}

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .layout-2 { display: block; } }

.embed {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    margin-bottom: 8px;
}
.embed iframe { display: block; width: 100%; border: 0; }
.embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-audio iframe { height: 352px; }

/* Setlist */
.setlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.song {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.song.open { border-color: var(--border-strong); }
.song-head {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    min-height: 72px;
    background: none; border: 0; text-align: left;
    cursor: pointer;
}
.song-head:active { background: rgba(255,255,255,.03); }
.song-num {
    font-size: 20px; font-weight: 500; color: var(--gray);
    width: 22px; text-align: center; flex-shrink: 0;
}
.song-main { flex: 1; min-width: 0; }
.song-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.song-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.song-sub span + span::before { content: '·'; margin: 0 5px; }
.song-flags { display: flex; gap: 6px; margin-top: 5px; color: var(--text-muted); }
.song-flags svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.song-tons { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.song-tons small { font-size: 9px; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; }
.chev { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-linecap: round; transition: transform .2s; }
.song.open .chev { transform: rotate(180deg); }
.song-body { display: none; padding: 0 14px 14px; flex-direction: column; gap: 12px; }
.song.open .song-body { display: flex; }
.song-links { display: flex; gap: 8px; flex-wrap: wrap; }
.song-links .chip { min-height: 40px; padding: 6px 14px; font-size: 13px; }
.arranjo {
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--text-soft);
    background: var(--bg-2);
    border-left: 2px solid var(--gray);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
}
.song-actions { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
.song-actions form { display: contents; }
.song-actions .grow { flex: 1; }
.icon-btn {
    width: 44px; height: 44px;
    display: inline-grid; place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    flex-shrink: 0;
}
.icon-btn:hover { color: var(--white); border-color: var(--border-strong); }
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:disabled { opacity: .25; cursor: default; }
.icon-btn.danger { color: var(--danger); }

/* Escala */
.escala { list-style: none; margin: 0; padding: 0; }
.escala li { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.escala li:last-child { border-bottom: 0; }
.escala .funcao { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.escala form { display: inline; }
.escala .icon-btn { border-color: transparent; color: var(--text-muted); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 8px; margin-top: 14px; }
.inline-form .btn { min-height: 48px; padding: 0; }

/* Comentários */
.comments { display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 12px; }
.avatar {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 50%; border: 1px solid var(--border-strong);
    display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-2);
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment-head strong { color: var(--text); font-weight: 600; font-size: 13px; }
.comment-text { white-space: pre-wrap; font-size: 15px; color: var(--text-soft); margin-top: 3px; overflow-wrap: anywhere; }
.comment-head form { margin-left: auto; }
.comment-head .icon-btn { width: 36px; height: 36px; border-color: transparent; color: var(--text-muted); }
.comment-form textarea { min-height: 80px; }

.observacoes { white-space: pre-wrap; color: var(--text-soft); font-size: 15px; }

.empty {
    text-align: center;
    padding: 40px 20px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-muted);
}
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0; }
.empty .btn { margin-top: 16px; }

/* ── Bottom sheet (menu "mais ações") ─────────────── */
dialog.sheet {
    margin: auto auto 0;
    width: 100%; max-width: 520px;
    padding: 8px 12px calc(14px + env(safe-area-inset-bottom));
    border: 1px solid var(--border-strong);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: var(--surface);
    color: var(--text);
}
dialog.sheet[open] { animation: sheet-in .22s ease-out; }
dialog.sheet::backdrop { background: rgba(0,0,0,.6); }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 761px) { dialog.sheet { margin: auto; border-radius: 20px; border-bottom: 1px solid var(--border-strong); } }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 4px auto 10px; }
.sheet-title { padding: 0 8px 8px; }
.sheet-item {
    width: 100%;
    display: flex; align-items: center; gap: 14px;
    min-height: 54px; padding: 0 10px;
    border: 0; border-radius: 12px;
    background: none;
    font-size: 15px; text-align: left;
    color: var(--text);
    cursor: pointer;
}
.sheet-item:active, .sheet-item:hover { background: var(--surface-2); }
.sheet-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
.sheet-item.danger, .sheet-item.danger svg { color: var(--danger); }
.sheet form { margin: 0; }
.sheet-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ── Listas (repertório, histórico, equipe) ───────── */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.list > li { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }

.rep-item { display: flex; gap: 12px; align-items: center; }
.rep-main { flex: 1; min-width: 0; }
.rep-main strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.rep-main .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rep-tons { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 110px; }
.rep-links { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.feed-item .feed-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.feed-item .feed-top strong { color: var(--text-soft); font-weight: 600; }
.feed-item .feed-desc { margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.feed-item .feed-desc a { color: var(--text-muted); }

.member { display: flex; gap: 12px; align-items: center; }
.member .avatar { width: 44px; height: 44px; font-size: 14px; }
.member .tag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* Histórico */
.acao {
    display: inline-block;
    font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.acao-criou { background: var(--success-bg); color: var(--success); }
.acao-editou { background: var(--warning-bg); color: var(--warning); }
.acao-excluiu { background: var(--danger-bg); color: var(--danger); }
.acao-restaurou, .acao-login { background: var(--surface-2); color: var(--text-soft); }
details.diff summary { cursor: pointer; font-size: 12px; color: var(--text-muted); margin-top: 6px; min-height: 32px; display: flex; align-items: center; }
.diff-list { margin: 6px 0 0; padding: 10px 12px; background: var(--bg-2); border-radius: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.diff-list dt { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.diff-list dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-list .old { color: var(--danger); text-decoration: line-through; text-decoration-color: rgba(224,104,94,.5); }
.diff-list .new { color: var(--success); }

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; }
.stat .l { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; }

/* ── Setlist para palco / impressão ───────────────── */
.print-page { max-width: 760px; margin: 0 auto; padding: 16px 16px 30px; }
.print-head { text-align: center; margin-bottom: 18px; }
.print-head img { width: 80px; }
.print-list { list-style: none; padding: 0; margin: 0; }
.print-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.print-list .n { font-size: 22px; font-weight: 500; width: 24px; color: var(--gray); text-align: center; flex-shrink: 0; }
.print-list .t { flex: 1; font-size: 20px; font-weight: 600; line-height: 1.25; min-width: 0; }
.print-list .a { display: block; font-size: 13px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.print-list .k { font-family: var(--serif); font-size: 38px; font-weight: 700; flex-shrink: 0; min-width: 56px; text-align: right; }
.setlist-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; margin-bottom: 16px; }
.setlist-bar .btn { min-width: 0; padding: 6px 12px; }
.set-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.set-links .chip { min-height: 34px; font-size: 12px; font-weight: 500; background: none; cursor: pointer; }
.set-aviso { font-size: 11px; font-weight: 500; color: var(--warning); }
.set-box {
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.set-box .btn { white-space: normal; text-align: center; line-height: 1.3; }
.set-box .set-ouvir { min-height: 52px; font-size: 13px; }
.set-player summary {
    list-style: none; cursor: pointer; text-align: center;
    min-height: 40px; display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px;
}
.set-player summary::-webkit-details-marker { display: none; }
.set-player[open] summary { margin-bottom: 8px; }
.set-player .embed { margin-bottom: 0; }
@media print {
    body { background: #fff; color: #000; padding: 0; }
    .no-print { display: none !important; }
    .print-list li { border-color: #ccc; }
    .print-list .n, .print-list .a { color: #666; }
    .print-head img { filter: invert(1) grayscale(1); }
}
