/* 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 32px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: rgba(0, 0, 0, .85); backdrop-filter: blur(12px); z-index: 5;
}
.brand { font-weight: 700; font-size: 20px; color: var(--white); letter-spacing: -.4px; }
.brand span { color: var(--dim); font-weight: 500; font-size: 13px; margin-left: 6px; }
.nav { display: flex; gap: 6px; flex: 1; }
.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); }

main { max-width: 1100px; margin: 0 auto; padding: 36px 32px 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; }

/* 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 18px; }
    .nav { order: 3; width: 100%; overflow-x: auto; }
    main { padding: 24px 16px 60px; }
    th:nth-child(n+4), td:nth-child(n+4) { display: none; }
}
