/* StreamTone dashboard — Just Radio palette: Busy Black, Groovy Gray,
   Welding White, Younger Yellow accent. */
:root {
    --black: #000;
    --gray: #1A1D20;
    --card: #15181b;
    --line: rgba(255, 255, 255, .1);
    --white: #fff;
    --dim: rgba(255, 255, 255, .55);
    --accent: #FFC600;
    --green: #27d65e;
    --red: #ff453a;
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--black);
    color: var(--white);
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
    letter-spacing: -.2px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.top {
    display: flex; align-items: center; gap: 28px;
    padding: 18px max(24px, calc((100% - 1152px) / 2)); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: rgba(0, 0, 0, .85); backdrop-filter: blur(12px); z-index: 5;
}
/* Logo: two rows — "Konzum / StreamTone" (or "StreamTone / by Just Radio") */
.brand { display: flex; flex-direction: column; line-height: 1.1; color: var(--white); }
.brand:hover { text-decoration: none; }
.brand-top { font-weight: 700; font-size: 20px; letter-spacing: -.4px; position: relative; top: 1px; }
.brand-sub { color: var(--dim); font-weight: 500; font-size: 13px; letter-spacing: -.1px; margin-top: 2px; position: relative; top: -1px; }
.nav { display: flex; gap: 6px; justify-content: center; }
.nav a { color: var(--dim); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--white); text-decoration: none; }
.nav a.on { color: var(--black); background: var(--accent); }

/* Page content: 1152px wide, 24px side spacing (also the phone/tablet spacing). */
main { box-sizing: content-box; max-width: 1152px; margin: 0 auto; padding: 36px 24px 80px; }
h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.6px; }
h2 { font-size: 19px; margin: 36px 0 12px; letter-spacing: -.3px; }
.sub { color: var(--dim); margin: 0 0 28px; }

/* Cards and tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0; }
.card.pad { padding: 22px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--dim); font-weight: 600; font-size: 13px; padding: 12px 20px; }
td { padding: 14px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
td.muted, .muted { color: var(--dim); }
.empty { color: var(--dim); padding: 22px; }

/* Forms */
form.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; font-weight: 600; }
input, select {
    background: var(--gray); color: var(--white); border: 1px solid var(--line);
    border-radius: 12px; padding: 10px 14px; font: inherit; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=file] { padding: 8px; }
.grow { flex: 1; min-width: 180px; }
.grow input, .grow select { width: 100%; }

.btn {
    background: var(--accent); color: var(--black); border: 0; border-radius: 999px;
    padding: 10px 20px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--white); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid rgba(255, 69, 58, .35); }
.inline { display: inline; }

/* Status */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #444; margin-right: 8px; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.pill { display: inline-block; background: var(--gray); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--dim); }
.flash { background: rgba(255, 198, 0, .12); border: 1px solid rgba(255, 198, 0, .35); color: var(--accent); padding: 12px 18px; border-radius: 12px; margin-bottom: 24px; }
.errors { background: rgba(255, 69, 58, .1); border: 1px solid rgba(255, 69, 58, .35); color: #ff8a82; padding: 12px 18px; border-radius: 12px; margin-bottom: 24px; }
.errors ul { margin: 0; padding-left: 18px; }
code.link { background: var(--gray); padding: 4px 8px; border-radius: 8px; font-size: 13px; color: var(--dim); }
audio { height: 34px; vertical-align: middle; }

/* Section header: title + ⓘ on the left, + on the right */
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.head.h2 { margin: 36px 0 12px; }
.head h1, .head h2 { margin: 0; }
.head-title { display: flex; align-items: center; gap: 10px; }

.icon-btn {
    display: inline-grid; place-items: center; border: 0; cursor: pointer; padding: 0;
    font: inherit; font-weight: 700; border-radius: 50%; line-height: 1;
}
.icon-btn.info { width: 22px; height: 22px; font-size: 13px; font-style: italic; font-family: Georgia, serif; background: var(--gray); color: var(--dim); border: 1px solid var(--line); }
.icon-btn.info:hover, .pop.open .icon-btn.info { color: var(--white); border-color: var(--dim); }
.icon-btn.add { width: 40px; height: 40px; font-size: 26px; font-weight: 500; background: var(--accent); color: var(--black); }
.head.h2 .icon-btn.add { width: 32px; height: 32px; font-size: 22px; }
.icon-btn.add:hover { filter: brightness(1.08); }
.pop.open .icon-btn.add { transform: rotate(45deg); }
.icon-btn.add { transition: transform .15s ease; }
.icon-btn.close { width: 28px; height: 28px; font-size: 20px; background: var(--gray); color: var(--dim); }

/* Layers */
.pop { position: relative; }
.layer {
    display: none; position: absolute; z-index: 20; top: calc(100% + 10px);
    background: #202428; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
.pop.open .layer { display: block; animation: pop-in .14s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }

.tip { left: -8px; width: 300px; padding: 14px 16px; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.tip p { margin: 0 0 10px; color: rgba(255, 255, 255, .85); }
.tip a { font-weight: 600; }

.sheet { right: 0; width: 380px; padding: 16px 18px 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 17px; }
form.stack > div { margin-bottom: 14px; }
form.stack input, form.stack select { width: 100%; }
form.stack .days input { width: auto; }
form.stack .btn { width: 100%; margin-top: 4px; }
form.stack .pair { display: flex; gap: 10px; }
form.stack .pair > div { flex: 1; }

.head-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn.tool { width: 40px; height: 40px; background: var(--gray); color: var(--dim); border: 1px solid var(--line); }
.head.h2 .icon-btn.tool { width: 32px; height: 32px; }
.icon-btn.tool:hover { color: var(--white); border-color: rgba(255, 255, 255, .3); }
code.token { font: 13px/1 Menlo, "SF Mono", monospace; background: var(--gray); border: 1px solid var(--line); padding: 5px 8px; border-radius: 8px; color: var(--white); letter-spacing: .5px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }

/* Row buttons: pencil, ×, magnifier. All the same round shape. */
.icon-btn.row-btn { width: 32px; height: 32px; background: var(--gray); color: var(--dim); border: 1px solid var(--line); }
.icon-btn.row-btn:hover { color: var(--white); border-color: rgba(255, 255, 255, .3); }
.icon-btn.row-btn.danger:hover { color: var(--red); border-color: rgba(255, 69, 58, .5); }
.row-actions { display: inline-flex; gap: 8px; justify-content: flex-end; }
.col-tools { text-align: right; width: 1%; white-space: nowrap; }
.col-status { width: 1%; padding-right: 0; }
.col-status .dot { margin: 0 4px; }
.btn.copied { color: var(--green); border-color: rgba(39, 214, 94, .5); }

/* Sortable headers */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--white); }
th.sortable::after { content: ''; display: inline-block; width: 12px; margin-left: 4px; }
th[aria-sort=ascending]::after { content: '↑'; color: var(--accent); }
th[aria-sort=descending]::after { content: '↓'; color: var(--accent); }
th.col-status.sortable::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--dim); margin: 0 0 -1px 4px; }

/* Filter layer */
.filter-pop { display: inline-block; }
.filter-pop .layer { text-align: left; font-weight: 400; color: var(--white); }
.filter-sheet { width: 320px; }
.filter-pop.active .icon-btn.filter { color: var(--black); background: var(--accent); border-color: var(--accent); }
.seg { display: flex; background: var(--gray); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; background: none; border: 0; color: var(--dim); font: inherit; font-weight: 600; font-size: 14px; padding: 7px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--black); }
.filter-count { font-size: 13px; }
tr[hidden] { display: none; }

/* Edit dialog */
dialog.edit-dialog {
    width: min(400px, 92vw); padding: 16px 18px 20px; color: var(--white);
    background: #202428; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
dialog.edit-dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }

/* Venue picker */
.pick-tools { display: flex; align-items: center; justify-content: space-between; }
.pick-tools .btn { width: auto !important; margin: 0 !important; }
.pick-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--gray); }
.pick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0; border-top: 1px solid var(--line); color: var(--white); font-size: 14px; font-weight: 500; cursor: pointer; }
.pick:first-child { border-top: 0; }
.pick[hidden] { display: none; }
.pick input { width: auto !important; accent-color: var(--accent); }
.pick span { flex: 1; }
.pick em { font-style: normal; color: var(--dim); font-size: 12px; }

/* Help page */
.help section { scroll-margin-top: 90px; margin-bottom: 34px; }
.help h2 { margin-top: 0; }
.help p, .help li { color: rgba(255, 255, 255, .8); max-width: 720px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }

@media (max-width: 700px) {
    .sheet { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; border-radius: 20px 20px 0 0; max-height: 85vh; overflow: auto; }
    .tip { width: min(300px, 80vw); }
}

/* Weekday checkboxes */
.days { display: flex; gap: 4px; }
.days label { margin: 0; }
.days input { display: none; }
.days span {
    display: inline-block; min-width: 42px; text-align: center; padding: 9px 6px; border-radius: 10px;
    background: var(--gray); border: 1px solid var(--line); color: var(--dim); cursor: pointer; font-size: 13px; font-weight: 600;
}
.days input:checked + span { background: var(--accent); color: var(--black); border-color: var(--accent); }
.pill.live { background: rgba(39, 214, 94, .12); border-color: rgba(39, 214, 94, .4); color: var(--green); margin-left: 8px; }
.pill.season { background: rgba(255, 198, 0, .12); border-color: rgba(255, 198, 0, .4); color: var(--accent); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }

/* Calendar timeline */
.timeline { overflow-x: auto; }
.tl-months { position: relative; height: 22px; margin-left: 200px; font-size: 12px; color: var(--dim); font-weight: 600; }
.tl-months div { position: absolute; top: 0; border-left: 1px solid var(--line); padding-left: 6px; white-space: nowrap; }
.tl-row { display: flex; align-items: center; min-height: 46px; border-top: 1px solid var(--line); }
.tl-name { width: 200px; flex: none; padding-right: 12px; font-weight: 600; font-size: 14px; }
.tl-name span { display: block; font-weight: 500; font-size: 12px; }
.tl-track { position: relative; flex: 1; min-width: 600px; height: 28px; background: var(--gray); border-radius: 8px; }
.tl-today { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--red); border-radius: 2px; z-index: 2; }
.tl-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; overflow: hidden; color: var(--black); font-size: 12px; font-weight: 700; }
.tl-bar span { padding: 0 8px; line-height: 22px; white-space: nowrap; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: 100%; max-width: 380px; padding: 32px; }
.login h1 { text-align: center; }
.login p { text-align: center; }
.login .field { margin-bottom: 16px; }
.login input { width: 100%; }
.login .btn { width: 100%; margin-top: 8px; padding: 13px; }

@media (max-width: 700px) {
    .top { flex-wrap: wrap; gap: 12px; padding: 14px 24px; }
    .nav { order: 3; width: 100%; overflow-x: auto; }
    main { padding: 24px 24px 60px; }
    th:nth-child(n+4), td:nth-child(n+4) { display: none; }
}

/* ---- Rework 2026-09-28: playlists, programs, venues, calendar ---- */
[hidden] { display: none !important; }
.small { font-size: 13px; }
.hint { font-size: 13px; margin: 0 0 12px; }
.col-off { display: none; }

/* Icon badges (playlists, programs) */
.ico { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px;
    color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.ico.sm { width: 22px; height: 22px; border-radius: 7px; }
.named { display: inline-flex; align-items: center; gap: 10px; color: var(--white); }
a.named:hover { text-decoration: none; }
a.named:hover strong, a.named:hover { color: var(--accent); }
.kind { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gray); border: 1px solid var(--line); color: var(--dim); }
.kind.toneover { color: var(--accent); }
td .pill.season, td .pill.live { margin-left: 0; }
.named + .pill { margin-left: 10px; }

/* Icon + colour pickers */
.icon-grid, .color-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-grid label, .color-grid label { margin: 0; cursor: pointer; }
.icon-grid input, .color-grid input { display: none; }
.icon-grid span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--gray); border: 1px solid var(--line); color: var(--dim); }
.icon-grid input:checked + span { color: var(--black); background: var(--accent); border-color: var(--accent); }
.color-grid span { display: block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; outline: 1px solid var(--line); }
.color-grid input:checked + span { border-color: var(--black); outline: 2px solid var(--white); }
form.settings { max-width: 520px; }
form.settings .btn { width: auto; padding: 10px 28px; }
.sheet.wide { width: 440px; }

/* Working hours */
.hours { margin-bottom: 8px; }
.hours-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hours-day { width: 42px; font-weight: 600; font-size: 14px; }
form.stack .hours-row input[type=time] { width: 112px; }
.hours-closed { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 6px; font-size: 13px; font-weight: 500; cursor: pointer; }
form.stack .hours-closed input { width: auto; accent-color: var(--accent); }
.hours-row.is-closed input[type=time] { opacity: .3; }
.hours-form { max-width: 460px; }
.hours-form .btn { width: auto !important; padding: 10px 28px; }

/* Notes and details */
.note { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255, 198, 0, .07); border: 1px solid rgba(255, 198, 0, .25); color: rgba(255, 255, 255, .85); padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.details label { margin-bottom: 4px; }

/* Drag to reorder */
.col-drag { width: 1%; padding-right: 0; }
.drag { display: inline-grid; place-items: center; color: var(--dim); cursor: grab; padding: 4px; }
tr[draggable=true]:hover .drag { color: var(--white); }
tr.dragging { opacity: .4; }

/* Calendar: months accordion, a day per row */
.months { display: flex; flex-direction: column; gap: 10px; }
details.month { padding: 0; }
details.month summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; cursor: pointer; list-style: none; font-size: 17px; }
details.month summary::-webkit-details-marker { display: none; }
details.month .chev { color: var(--dim); transition: transform .15s ease; }
details.month[open] .chev { transform: rotate(180deg); }
.day-row { display: flex; align-items: flex-start; gap: 16px; padding: 10px 22px; border-top: 1px solid var(--line); }
.day-row.weekend { background: rgba(255, 255, 255, .02); }
.day-row.today { background: rgba(39, 214, 94, .06); }
.day-date { width: 110px; flex: none; color: var(--dim); font-size: 14px; padding-top: 3px; }
.day-date strong { color: var(--white); font-size: 16px; display: inline-block; min-width: 22px; }
.day-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--gray); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 4px; font-size: 13px; font-weight: 600; }
.chip em { font-style: normal; font-weight: 500; color: var(--dim); padding-left: 6px; }
.chip.program { background: transparent; }
.chip.extra { border-style: dashed; }

/* ---- Library tabs: pill switcher like justradio.app (44px track, 36px pill, sliding) ---- */
.tabs { margin-bottom: 28px; }
.tab-list {
    position: relative; display: inline-flex; align-items: center; height: 44px; padding: 4px;
    background: var(--gray); border-radius: 999px;
}
.tab-list::after {
    content: ""; position: absolute; top: 4px; left: 0; z-index: 0; height: 36px;
    width: var(--pill-w, 0px); transform: translateX(var(--pill-x, 4px));
    background: var(--white); border-radius: 999px; pointer-events: none;
}
.tab-list.pill-ready::after { transition: transform .45s cubic-bezier(.4, 0, .2, 1), width .45s cubic-bezier(.4, 0, .2, 1); }
.tab-list button {
    position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
    height: 36px; padding: 0 20px; border: 0; border-radius: 999px; background: none; cursor: pointer;
    font: inherit; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
    color: var(--dim); transition: color .35s ease;
}
.tab-list button[aria-selected="true"] { color: var(--black); }
.tab-list button:not([aria-selected="true"]):hover { color: var(--white); }
.tab-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tab-panel:not([hidden]) { animation: tab-fade .4s ease both; }
@keyframes tab-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Toast: confirmation on top of everything, top centre; fade in, 3 s, fade out ---- */
.toast {
    position: fixed; top: 20px; left: 50%; z-index: 1000; transform: translateX(-50%);
    max-width: min(560px, calc(100vw - 48px)); padding: 14px 22px; border-radius: 14px;
    background: var(--accent); color: var(--black); font-weight: 600; font-size: 15px; text-align: center;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .5); pointer-events: none;
    animation: toast 3.9s cubic-bezier(.4, 0, .2, 1) both;
}
@keyframes toast {
    0% { opacity: 0; transform: translate(-50%, -14px); }
    12% { opacity: 1; transform: translate(-50%, 0); }   /* ~0.45 s in */
    88% { opacity: 1; transform: translate(-50%, 0); }   /* hold 3 s */
    100% { opacity: 0; transform: translate(-50%, -14px); }
}

/* ---- Confirm dialog (every delete / remove / ×) ---- */
dialog.confirm-dialog {
    width: min(400px, calc(100vw - 48px)); padding: 0; color: var(--white); text-align: center;
    background: #202428; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
}
dialog.confirm-dialog[open] { animation: pop-in .18s ease-out; }
dialog.confirm-dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
.confirm-body { padding: 22px; }
dialog.confirm-dialog p { margin: 16px 0 36px; font-size: 18px; line-height: 1.45; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; }

@media (prefers-reduced-motion: reduce) {
    .tab-list.pill-ready::after { transition: none; }
    .tab-panel:not([hidden]), dialog.confirm-dialog[open] { animation-duration: .01s; }
}

/* ---- Round 3 (2026-09-28): header icons, profile menu, tooltips, settings ---- */
.btn.no { background: rgba(255, 255, 255, .8); color: var(--black); }
.btn.no:hover { background: var(--white); filter: none; }

.top-icons { display: flex; align-items: center; gap: 8px; }
a.icon-btn { color: var(--dim); }
a.icon-btn:hover { text-decoration: none; }
.icon-btn.tool.on { color: var(--black); background: var(--accent); border-color: var(--accent); }

/* Tooltips on icons: data-tip, shown under the icon on hover/focus */
[data-tip] { position: relative; }
[data-tip]::after {
    content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; z-index: 30;
    transform: translate(-50%, -3px); opacity: 0; pointer-events: none; white-space: nowrap;
    background: #202428; color: var(--white); border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px;
    padding: 5px 10px; font: 500 13px/1.3 -apple-system, BlinkMacSystemFont, system-ui, sans-serif; letter-spacing: 0;
    transition: opacity .15s ease, transform .15s ease;
}
@media (hover: hover) { [data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; } }
[data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.pop.open [data-tip]::after { opacity: 0 !important; }

/* Profile menu */
.layer.menu { right: 0; width: 240px; padding: 6px; }
.menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px; }
.menu-head .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.layer.menu a, .layer.menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--white); background: none; border: 0; font: inherit; font-size: 15px; cursor: pointer; }
.layer.menu a:hover, .layer.menu button:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.layer.menu form { margin: 0; }

/* Choices (radio/checkbox pills) on Settings */
.choice { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.choice label { margin: 0; cursor: pointer; }
.choice input { display: none; }
.choice span { display: inline-block; padding: 9px 14px; border-radius: 10px; background: var(--gray); border: 1px solid var(--line); color: var(--dim); font-size: 14px; font-weight: 600; }
.choice input:checked + span { background: var(--accent); color: var(--black); border-color: var(--accent); }
.settings-form .card { margin-bottom: 8px; }
.settings-form > .btn { width: auto !important; padding: 10px 28px; margin-top: 18px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--white); font-weight: 500; font-size: 14px; margin: 6px 0 16px; cursor: pointer; }
form.stack label.check input { width: auto; accent-color: var(--accent); }
.form-sub { font-size: 16px; margin: 26px 0 4px; }

/* Upgrade */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.plan h2 { margin: 0 0 10px; }
.price { font-size: 34px; font-weight: 700; letter-spacing: -.8px; margin-bottom: 10px; }
.price span { font-size: 15px; font-weight: 500; color: var(--dim); letter-spacing: 0; }
.head.h2 .icon-btn.add svg { width: 16px; height: 16px; }

/* Top bar: logo left, main nav centred, icons right */
.top { display: grid; grid-template-columns: 1fr auto 1fr; }
.top .brand { justify-self: start; }
.top .top-icons { justify-self: end; }
@media (max-width: 900px) {
    .top { display: flex; flex-wrap: wrap; }
    .top .top-icons { margin-left: auto; }
    .nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
}

/* ---- Dashboard: cards with big numbers, tags and short lists ---- */
.dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-card { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-card.span-2 { grid-column: span 2; }
.dash-title { color: var(--white); font-weight: 700; font-size: 17px; letter-spacing: -.3px; display: flex; justify-content: space-between; }
.dash-title span { color: var(--dim); transition: transform .2s ease, color .2s ease; }
.dash-title:hover { text-decoration: none; }
.dash-title:hover span { color: var(--accent); transform: translateX(3px); }
.dash-row { display: flex; gap: 36px; flex-wrap: wrap; }
.big-stat { display: flex; flex-direction: column; }
.big-stat strong { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.big-stat strong.ok { color: var(--green); }
.big-stat span { color: var(--dim); font-size: 14px; margin-top: 6px; }
.meter { height: 10px; border-radius: 999px; background: #2a2e33; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 999px; min-width: 4px; }
.meter-legend { display: flex; gap: 18px; color: var(--dim); font-size: 13px; margin-top: -8px; }
.meter-legend .dot { width: 8px; height: 8px; margin-right: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags .pill { margin: 0; }
.dash-list h4 { margin: 0 0 6px; color: var(--dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }
.dash-list h4:not(:first-child) { margin-top: 14px; }
.dash-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.dash-item:first-of-type, h4 + .dash-item { border-top: 0; }
.dash-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-item small { color: var(--dim); font-weight: 500; }
.dash-item.stack-item > span { white-space: normal; color: rgba(255, 255, 255, .85); }
.dash-card.span-2 .dash-list { columns: 2; column-gap: 28px; }
.dash-card.span-2 .dash-list h4 { column-span: all; }
.dash-card.span-2 .dash-item { break-inside: avoid; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .dash { grid-template-columns: 1fr; } .dash-card.span-2 { grid-column: auto; } .dash-card.span-2 .dash-list { columns: 1; } }

/* Record count after a title: same pill as the ⓘ, larger, centred on the lowercase letters */
.head .count {
    display: inline-grid; place-items: center; height: 26px; min-width: 26px; padding: 0 9px; border-radius: 999px;
    background: var(--gray); border: 1px solid var(--line); color: var(--dim);
    font-size: 14px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0;
    position: relative; top: 2px;
}
.head.h2 .count { height: 22px; min-width: 22px; padding: 0 7px; font-size: 12px; top: 1px; }
.head .count.filtered { color: var(--black); background: var(--accent); border-color: var(--accent); }

/* A name that opens its edit window: looks like a yellow link */
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }

/* Preview: our own round play button (no browser player). Yellow while playing. */
.preview { display: inline-flex; align-items: center; gap: 10px; }
.preview .i-stop { display: none; }
.preview.playing .i-play, .preview.loading .i-play { display: none; }
.preview.playing .i-stop, .preview.loading .i-stop { display: block; }
.preview-btn .i-play { margin-left: 2px; }
.preview.playing .preview-btn, .preview.loading .preview-btn { background: var(--accent); border-color: var(--accent); color: var(--black); }
.preview.loading .preview-btn { animation: preview-wait 1s ease-in-out infinite; }
@keyframes preview-wait { 50% { opacity: .55; } }
.preview-state { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.preview-state .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .3; } }
