/* signs.geoffhatch.com — minimal modern UI */
:root {
  --bg: #0f1115;
  --bg-2: #161922;
  --panel: #1d2230;
  --line: #2a3142;
  --text: #e7eaf3;
  --muted: #8a93a8;
  --primary: #6c8cff;
  --primary-2: #4f6fe0;
  --ok: #36c780;
  --warn: #f5b13b;
  --danger: #ef5d6f;
  --off: #5b6478;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-weight: 600; }
h1 { margin: 0 0 1rem; font-size: 1.6rem; }
h2 { margin: 1.5rem 0 .75rem; font-size: 1.15rem; }
small.muted, .muted { color: var(--muted); }

main { max-width: 1100px; margin: 1.5rem auto; padding: 0 1.25rem 4rem; }
footer { text-align: center; color: var(--muted); padding: 2rem 0; }

/* Top nav */
nav.top {
  display: flex; align-items: center; gap: 1.25rem;
  padding: .8rem 1.25rem;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
nav.top a { color: var(--muted); }
nav.top a.active, nav.top a:hover { color: var(--text); }
nav.top .brand { color: var(--text); font-weight: 700; margin-right: 1rem; }
nav.top .spacer { flex: 1; }
nav.top .who { color: var(--muted); font-size: .9em; }
nav.top form.inline { display: inline; }

/* Auth */
.auth-card {
  max-width: 380px; margin: 4rem auto; padding: 2rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.auth-card h1 { margin-top: 0; }

/* Forms */
.form, form { display: flex; flex-direction: column; gap: .75rem; }
.form.inline-form, form.inline-form { flex-direction: row; align-items: center; gap: .5rem; flex-wrap: wrap; }
form.inline { display: inline; }
label { display: flex; flex-direction: column; gap: .25rem; font-size: .9em; color: var(--muted); }
input, select, textarea {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: .55rem .7rem; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
button, .btn {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: .55rem 1rem; cursor: pointer; font: inherit;
  text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--panel); }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
button.primary:hover, .btn.primary:hover { background: var(--primary-2); }
button.link { background: none; border: none; color: var(--primary); padding: 0; }
button.danger, .btn.danger, .link.danger { color: var(--danger); }
button.small, .btn.small { padding: .25rem .5rem; font-size: .85em; }
.error { background: rgba(239,93,111,.12); color: var(--danger); padding: .7rem .85rem; border-radius: 8px; }
.flash { background: rgba(108,140,255,.15); color: var(--text); padding: .7rem .85rem; border-radius: 8px; margin-bottom: 1rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.25rem; display: flex; flex-direction: column;
}
.stat .big { font-size: 2rem; font-weight: 700; }
.stat span:nth-child(2) { color: var(--muted); }
.stat small { color: var(--muted); margin-top: .25rem; }

/* Tables */
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--line); }
table.grid th { color: var(--muted); font-weight: 500; font-size: .85em; }
table.grid tr:hover td { background: rgba(255,255,255,.02); }

/* Badges */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .75em; }
.badge.ok { background: rgba(54,199,128,.15); color: var(--ok); }
.badge.warn { background: rgba(245,177,59,.18); color: var(--warn); }
.badge.off { background: rgba(91,100,120,.25); color: var(--off); }

/* Empty */
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; padding: 2rem; text-align: center; color: var(--muted); }
.empty-mini { padding: 1rem; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* Key/value */
dl.kv { display: grid; grid-template-columns: 160px 1fr; gap: .35rem .75rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 1rem; margin-top: 1rem; }
.media-grid .card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.media-grid img, .media-grid video { width: 100%; height: 130px; object-fit: cover; display: block; background: black; }
.url-thumb { width: 100%; height: 130px; display: flex; align-items: center; justify-content: center; flex-direction: column; background: linear-gradient(135deg, #2a3550, #1a2238); font-size: 2rem; }
.url-thumb small { font-size: .65rem; word-break: break-all; padding: .25rem; color: var(--muted); }
.url-thumb.small { height: 50px; width: 50px; font-size: 1.2rem; border-radius: 6px; }
.media-grid .card-body { padding: .6rem .75rem; display: flex; flex-direction: column; gap: .35rem; }
.media-grid .name { font-size: .9em; }
.media-grid .duration { display: flex; align-items: center; gap: .35rem; }
.media-grid .duration label { flex-direction: row; align-items: center; gap: .35rem; }
.media-grid .duration input { width: 70px; padding: .25rem .4rem; }

.upload-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }

/* Playlist editor */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
ul.sortable { list-style: none; padding: 0; margin: 0; }
ul.sortable li {
  display: flex; align-items: center; gap: .75rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .75rem; margin-bottom: .5rem; cursor: grab;
}
ul.sortable li.dragging { opacity: .5; }
ul.sortable .grip { color: var(--muted); cursor: grab; }
ul.sortable img, ul.sortable video { width: 50px; height: 36px; object-fit: cover; border-radius: 4px; background: black; }
ul.sortable .name { flex: 1; }
ul.sortable .dur { color: var(--muted); font-size: .85em; }

.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px,1fr)); gap: .5rem; }
.lib-item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .35rem; display: flex; flex-direction: column; gap: .25rem; align-items: center; }
.lib-item img, .lib-item video { width: 100%; height: 50px; object-fit: cover; border-radius: 4px; background: black; }

/* Schedules */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.5rem; }
.panel h2 { margin-top: 0; }
.panel .row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; margin-bottom: .5rem; }
.panel .row.days { align-items: center; gap: .75rem; }
.dayck { flex-direction: row; align-items: center; gap: .25rem; color: var(--text); }
.day { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 4px; font-size: .75em; margin-right: 2px; }
.day.on { background: var(--primary); color: white; }
.day.off { background: var(--bg-2); color: var(--muted); }
