/* Same family as Hydra Fleet: red on dark, no framework, no build step. */
:root {
  --red: #c0392b;
  --dark: #1a1a1a;
  --green: #27ae60;
  --orange: #e67e22;
  --grey: #6b7280;
  --line: #e5e7eb;
  --card: #fff;
  --bg: #f5f5f5;
  --radius: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 15px/1.5 'Segoe UI', Arial, sans-serif; color: #222; background: var(--bg); }
[hidden] { display: none !important; }   /* an author rule, or .app's display:flex wins */

.bar {
  display: flex; align-items: center; gap: 1rem;
  background: var(--dark); color: #fff; padding: .7rem 1rem;
  border-bottom: 3px solid var(--red);
}
.bar .brand { font-weight: 700; font-size: 1.05rem; }
.bar .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--red); margin-right: .5rem; }
.bar .spacer { flex: 1; }
.bar a { color: #ddd; text-decoration: none; font-size: .9rem; }
.bar a:hover { color: #fff; }
.bar .who { color: #999; font-size: .85rem; }

.wrap { max-width: 1200px; margin: 1.2rem auto; padding: 0 1rem; }
.card { background: var(--card); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card.narrow { max-width: 26rem; margin: 8vh auto; }
h2 { font-size: 1.15rem; margin-bottom: .3rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; color: var(--grey);
     margin: 1.2rem 0 .5rem; }
.sub { color: var(--grey); font-size: .9rem; margin-bottom: .8rem; }

label.f { display: block; margin: .5rem 0; font-size: .85rem; color: var(--grey); }
input, select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; background: #fff; margin-top: .2rem;
}
button {
  background: var(--red); color: #fff; border: 0; border-radius: 6px; padding: .5rem .9rem;
  font: inherit; font-weight: 600; cursor: pointer;
}
button.ghost { background: #fff; color: #333; border: 1px solid var(--line); font-weight: 500; }
button.small { padding: .25rem .55rem; font-size: .8rem; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; background: var(--dark); color: #fff; padding: .45rem .6rem; font-weight: 600; font-size: .78rem;
     text-transform: uppercase; letter-spacing: .4px; }
td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: #fafafa; }
td.right, th.right { text-align: right; }

.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem;
        font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.pill.live { background: rgba(39,174,96,.15); color: #1e7e45; }
.pill.silent { background: rgba(230,126,34,.18); color: #a85b13; }
.pill.down { background: rgba(192,57,43,.15); color: var(--red); }
.pill.unauthorised, .pill.unknown { background: rgba(107,114,128,.15); color: var(--grey); }
.pill.unreachable { background: rgba(107,114,128,.2); color: #444; }

.note { padding: .6rem .8rem; border-radius: 6px; font-size: .88rem; margin: .6rem 0; }
.note.bad { background: #fdecea; color: #8b1a1a; }
.note.good { background: #eaf7ef; color: #1e7e45; }
.note.warn { background: #fdf3e7; color: #8a4b0c; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .8rem; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; background: #fff; cursor: pointer; }
.tile:hover { border-color: var(--red); }
.tile .nm { font-weight: 700; }
.tile .mt { font-family: monospace; color: var(--grey); font-size: .85rem; }
.tile .meta { color: var(--grey); font-size: .8rem; margin-top: .4rem; }

.bars { display: flex; gap: 1px; height: 26px; align-items: stretch; margin: .4rem 0; }
.bars i { flex: 1; background: var(--line); border-radius: 1px; }
.bars i.live { background: var(--green); }
.bars i.silent { background: var(--orange); }
.bars i.down { background: var(--red); }
.bars i.unauthorised, .bars i.unreachable { background: #9ca3af; }

.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; background: #eee; color: #333;
          text-decoration: none; font-size: .9rem; }
.tabs a.on { background: var(--red); color: #fff; }
code, .mono { font-family: 'Consolas', monospace; font-size: .85rem; }
pre.conf { background: #1a1a1a; color: #eee; padding: .8rem; border-radius: 6px; overflow: auto;
           max-height: 26rem; font-size: .8rem; }
.hint { color: var(--grey); font-size: .82rem; }

/* ---- map ---- */
#mapbox { height: 65vh; min-height: 24rem; border-radius: var(--radius); }
.leaflet-container { font: inherit; }
.stationpin {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.stationpin.live { background: var(--green); }
.stationpin.silent { background: var(--orange); }
.stationpin.down { background: var(--red); }
.stationpin.unauthorised, .stationpin.unreachable, .stationpin.unknown { background: #9ca3af; }

/* ---- settings ---- */
.setgroup { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: .8rem 0; }
.setgroup > h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--grey);
                 margin-bottom: .4rem; }
.setrow { display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr; gap: .8rem; align-items: center;
          padding: .35rem 0; }
.setrow label { font-size: .9rem; color: #333; }
.setrow .hint { grid-column: 1 / -1; margin-top: -.2rem; }
textarea.conf { width: 100%; min-height: 22rem; font-family: 'Consolas', monospace; font-size: .85rem;
                white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .3rem .8rem; }
.checks label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; color: #333; }
.checks input { width: auto; margin: 0; }
