/* Admin pages: simple, dark like the TV app. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: #0f1419;
    color: #e8edf2;
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: #7cc4ff; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { background: #161d25; border-bottom: 1px solid #243041; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 700; font-size: 19px; color: #7cc4ff; margin-right: 12px; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs a { color: #8fa3b8; text-decoration: none; padding: 8px 12px; border-bottom: 3px solid transparent; font-weight: 600; }
.tabs a.on { color: #e8edf2; border-bottom-color: #3d9bff; }
main { padding-top: 16px; padding-bottom: 40px; }
h1 { font-size: 22px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: #8fa3b8; margin: 0 0 10px; }
.card { background: #161d25; border: 1px solid #243041; border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.muted { color: #8fa3b8; }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.alert { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-ok { background: #12301f; border: 1px solid #1f6b3e; }
.alert-err { background: #3a1518; border: 1px solid #8a2b33; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.grid-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #8fa3b8; }
.grid-form .actions, .grid-form .photo-row { grid-column: 1 / -1; }
input, select, button, .btn {
    font: inherit; color: inherit; background: #0f1419; border: 1px solid #2c3a4d; border-radius: 8px; padding: 8px 10px;
}
input[type=checkbox] { width: 18px; height: 18px; padding: 0; }
button, .btn { background: #2a7de1; border-color: #2a7de1; color: #fff; cursor: pointer; text-decoration: none; display: inline-block; font-weight: 600; }
.btn-ghost { background: transparent; border-color: #2c3a4d; color: #e8edf2; }
.btn-danger { background: #8a2b33; border-color: #8a2b33; }
.btn-small { padding: 4px 10px; font-size: 14px; }
.actions { display: flex; gap: 10px; margin-top: 6px; }
.inline { display: inline; }
.inline-block { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.choice { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #243041; vertical-align: middle; }
table.list th { color: #8fa3b8; font-size: 13px; font-weight: 600; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { margin-left: 6px; }
.badge { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.thumb-small { width: 36px; height: 36px; object-fit: cover; border-radius: 50%; }
.photo-row { display: flex; align-items: center; gap: 14px; }
.pick { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pick li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #243041; border-radius: 8px; }
.pick li span { flex: 1; }
.scroll { overflow-x: auto; }
.table-edit input { width: 100%; padding: 5px 6px; }
.table-edit input.num { width: 52px; text-align: right; }
.table-edit input.id { width: 90px; }
.table-edit td { padding: 3px 4px; }
@media (max-width: 640px) {
    .row-actions { white-space: normal; }
}
