/* datahub console — classic dark forum skin (vBulletin/phpBB-era, 2014-19 vibe) */
:root {
  --page: #131519;
  --wrap: #181b21;
  --panel: #1d212a;
  --row: #1b1f27;
  --row-alt: #181b22;
  --row-hover: #232934;
  --cat-a: #353d4a;   /* category bar top */
  --cat-b: #262c36;   /* category bar bottom */
  --sub-a: #2a313c;
  --sub-b: #222731;
  --line: #2c323d;
  --line-dark: #0e1115;
  --line-light: #39414e;
  --txt: #c4c9d2;
  --txt-dim: #888f9b;
  --txt-faint: #5d6470;
  --link: #e35a4f;
  --link-hov: #ff7d72;
  --ok: #79c48d;
  --warn: #d8b452;
  --danger: #d96b61;
  --btn-a: #3a4250;
  --btn-b: #2a313b;
  --pri-a: #c2473d;
  --pri-b: #93352c;
  --sans: Tahoma, Verdana, Geneva, "DejaVu Sans", sans-serif;
  --mono: Consolas, "Courier New", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: var(--sans);
  background: var(--page);
  color: var(--txt);
  font-size: 12px;
  line-height: 1.45;
  background-image: linear-gradient(180deg, #1a1d24 0, var(--page) 220px);
  min-height: 100vh;
}
a, .link { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover, .link:hover { color: var(--link-hov); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ---------- buttons (beveled) ---------- */
.btn, #login-btn {
  background: linear-gradient(180deg, var(--pri-a), var(--pri-b));
  color: #fbeae9; border: 1px solid #6e241d; border-top-color: #d06a60;
  padding: 7px 14px; border-radius: 3px; font-size: 12px; font-weight: 700;
  text-shadow: 0 -1px 0 rgba(0,0,0,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.btn:hover, #login-btn:hover { filter: brightness(1.12); }
.btn:active, #login-btn:active { filter: brightness(.95); box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.btn.small { padding: 4px 10px; font-size: 11px; }
.btn.ghost {
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  color: var(--txt); border: 1px solid var(--line-light); border-top-color: #4c5564; text-shadow: 0 -1px 0 rgba(0,0,0,.4);
}
.btn.ghost:hover { filter: brightness(1.15); color: #fff; }
.btn.danger {
  background: linear-gradient(180deg, #7a3a37, #5e2b29); border: 1px solid #5e2b29; border-top-color: #a05650; color: #f3c9c5;
}
.btn.danger:hover { filter: brightness(1.15); }
.btn-group { display: flex; gap: 6px; align-items: center; }

/* ---------- inputs ---------- */
input, select {
  background: #10131800; background-color: #0f1217; border: 1px solid var(--line-dark);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.5); color: var(--txt); padding: 7px 9px; border-radius: 2px; font-size: 12px; outline: none;
}
input:focus, select:focus { border-color: var(--link); box-shadow: inset 0 1px 2px rgba(0,0,0,.5), 0 0 0 2px rgba(227,90,79,.28); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--txt-dim); font-weight: 700; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 1px 0 var(--line-light) inset, 0 14px 40px -14px #000; overflow: hidden; }
.login-card .brand { background: linear-gradient(180deg, var(--cat-a), var(--cat-b)); border-bottom: 1px solid var(--line-dark); padding: 22px 24px; text-align: center; }
.brand-mark { color: var(--link); }
.brand h1 { font-size: 24px; font-weight: 700; color: #e4e8ee; text-shadow: 0 -1px 0 #000; }
.cursor { color: var(--link); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tagline { color: var(--txt-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; }
#login-form { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
#login-btn { padding: 9px; }
.login-foot { text-align: center; color: var(--txt-faint); font-size: 10px; padding: 0 24px 18px; }
.error { color: var(--danger); font-size: 12px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; max-width: 1180px; margin: 0 auto; background: var(--wrap); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.sidebar { background: #15181e; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 0; }
.logo { background: linear-gradient(180deg, var(--cat-a), var(--cat-b)); border-bottom: 1px solid var(--line-dark); padding: 14px 16px; font-size: 15px; font-weight: 700; color: #e4e8ee; text-shadow: 0 -1px 0 #000; }
.logo .brand-mark { margin-right: 6px; }
nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }
.nav { background: none; border: none; border-bottom: 1px solid #1c2027; color: var(--link); text-align: left; padding: 9px 16px; font-size: 12px; font-weight: 700; }
.nav:hover { background: #1f242c; color: var(--link-hov); }
.nav.active { background: #232a34; color: #e4e8ee; box-shadow: inset 3px 0 0 var(--link); }
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.who { font-size: 11px; color: var(--txt-faint); }
.logout { background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); border: 1px solid var(--line-light); color: var(--txt-dim); padding: 6px; border-radius: 2px; font-size: 11px; }
.logout:hover { color: var(--danger); border-color: #5e2b29; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: linear-gradient(180deg, var(--cat-a), var(--cat-b)); border-bottom: 1px solid var(--line-dark); }
#view-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #e4e8ee; font-weight: 700; text-shadow: 0 -1px 0 #000; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--txt-dim); background: #181b21; border: 1px solid var(--line-dark);
  border-top-color: var(--line-light); box-shadow: inset 0 1px 2px rgba(0,0,0,.45);
  padding: 4px 9px; border-radius: 2px; text-shadow: none;
}
.status .led {
  width: 7px; height: 7px; border-radius: 1px; background: var(--ok);
  box-shadow: 0 0 5px rgba(121,196,141,.55), inset 0 0 0 1px rgba(0,0,0,.25);
}
.content { padding: 16px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.card { background: linear-gradient(180deg, #20252e, #1a1e25); border: 1px solid var(--line); border-top-color: var(--line-light); border-radius: 3px; padding: 12px 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.card .k { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--txt-faint); font-weight: 700; }
.card .v { font-size: 26px; font-weight: 700; margin-top: 4px; color: #e4e8ee; }
.card.warn .v { color: var(--warn); }
.card.bad .v { color: var(--danger); }

/* ---------- help banner ---------- */
.help { background: #1d212a; border: 1px solid var(--line); border-left: 3px solid var(--link); color: var(--txt-dim); padding: 10px 13px; border-radius: 3px; font-size: 12px; margin-bottom: 16px; line-height: 1.5; }
.help b { color: var(--txt); }

/* ---------- panels (forum category boxes) ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; margin-bottom: 16px; box-shadow: 0 1px 0 var(--line-light) inset; }
.panel-head { background: linear-gradient(180deg, var(--sub-a), var(--sub-b)); border-bottom: 1px solid var(--line-dark); padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.panel-head h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #cfd4dc; font-weight: 700; text-shadow: 0 -1px 0 #000; }
.panel-body { padding: 14px 12px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; background: linear-gradient(180deg, var(--sub-a), var(--sub-b)); color: #aeb4be; font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: .5px; padding: 7px 10px; border: 1px solid var(--line-dark); }
td { padding: 7px 10px; border: 1px solid var(--line); color: var(--txt); vertical-align: middle; }
tbody tr { background: var(--row); }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr:hover { background: var(--row-hover); }
.mono-id { font-family: var(--mono); color: var(--link); font-size: 11.5px; }
.muted { color: var(--txt-faint); }
.empty { color: var(--txt-faint); padding: 22px; text-align: center; }

/* ---------- tags / badges ---------- */
.tag { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 10px; text-transform: uppercase; font-weight: 700; border: 1px solid var(--line-light); background: #1a1e25; }
.tag.source { color: var(--ok); border-color: #2f5e3f; }
.tag.consumer { color: var(--warn); border-color: #6b5a1f; }
.tag.ok { color: var(--ok); border-color: #2f5e3f; }
.tag.revoked { color: var(--danger); border-color: #6b2f2b; }
.tag.bad { color: var(--danger); border-color: #6b2f2b; }
.tag.warn { color: var(--warn); border-color: #6b5a1f; }
.tag.muted { color: var(--txt-faint); border-color: var(--line-light); }
.tag-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- forms / filters ---------- */
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.row-actions { display: flex; gap: 6px; }
.checkbox { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; color: var(--txt); }
.checkbox input { width: auto; box-shadow: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; }
.filters label { flex: 1; min-width: 130px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(5,7,10,.7); display: grid; place-items: center; padding: 24px; z-index: 50; }
.modal-card { width: 100%; max-width: 540px; background: var(--panel); border: 1px solid var(--line-light); border-radius: 3px; max-height: 86vh; overflow: auto; box-shadow: 0 24px 70px -20px #000; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; background: linear-gradient(180deg, var(--cat-a), var(--cat-b)); border-bottom: 1px solid var(--line-dark); position: sticky; top: 0; }
.modal-head h3 { font-size: 12px; text-transform: uppercase; color: #cfd4dc; font-weight: 700; }
.icon-btn { background: none; border: none; color: var(--txt-dim); font-size: 15px; }
.icon-btn:hover { color: var(--danger); }
.modal-body { padding: 16px; }
.secret-label { font-size: 10px; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 4px; font-weight: 700; }
.secret-box { background: #0f1217; border: 1px solid var(--line-dark); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); border-radius: 2px; padding: 9px; margin: 4px 0 12px; word-break: break-all; font-family: var(--mono); font-size: 12px; color: var(--ok); }
.copy { margin-top: 4px; }
.callout { border: 1px solid #6b5a1f; background: rgba(216,180,82,.08); padding: 8px 12px; font-size: 11.5px; color: var(--warn); border-radius: 2px; margin-bottom: 14px; }
.callout .tips { margin: 6px 0 0 18px; }
.callout .tips li { margin-bottom: 5px; line-height: 1.45; }
pre.json { background: #0f1217; border: 1px solid var(--line-dark); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); border-radius: 2px; padding: 12px; overflow: auto; font-family: var(--mono); font-size: 12px; color: var(--txt); max-height: 50vh; }
pre.code { background: #0d1014; border: 1px solid var(--line-dark); border-left: 3px solid var(--acc); border-radius: 3px; padding: 12px 14px; overflow: auto; margin: 6px 0 4px; box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
pre.code code { font-family: var(--mono); font-size: 12px; color: #cdd6df; white-space: pre; display: block; line-height: 1.5; }
.panel-body ol { margin: 0 0 0 20px; } .panel-body ol li { margin-bottom: 7px; }
.panel-body > p { margin-bottom: 10px; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line-light); border-left: 3px solid var(--ok); color: var(--txt); padding: 10px 16px; border-radius: 3px; font-size: 12px; z-index: 100; box-shadow: 0 16px 40px -16px #000; max-width: 90vw; }
.toast.bad { border-left-color: var(--danger); }

/* ---------- monitor bar ---------- */
.mon-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mon-row:last-child { border-bottom: none; }
.mon-name { font-weight: 700; font-size: 13px; color: #e4e8ee; min-width: 100px; }
.mon-bar-wrap { flex: 1; height: 8px; background: #0f1217; border: 1px solid var(--line-dark); border-radius: 2px; box-shadow: inset 0 1px 2px rgba(0,0,0,.5); overflow: hidden; }
.mon-bar { height: 100%; border-radius: 1px; transition: width .6s ease; }
.mon-bar.green { background: linear-gradient(90deg, #4a9e5e, #79c48d); box-shadow: 0 0 6px rgba(121,196,141,.3); }
.mon-bar.yellow { background: linear-gradient(90deg, #a08a2e, #d8b452); box-shadow: 0 0 6px rgba(216,180,82,.3); }
.mon-bar.red { background: linear-gradient(90deg, #8b3a35, #d96b61); box-shadow: 0 0 6px rgba(217,107,97,.3); }
.mon-status { font-size: 11px; color: var(--txt-dim); min-width: 140px; text-align: right; white-space: nowrap; }
.mon-status .dot { display: inline-block; width: 6px; height: 6px; border-radius: 1px; margin-right: 5px; }
.mon-status .dot.green { background: var(--ok); box-shadow: 0 0 5px rgba(121,196,141,.55); }
.mon-status .dot.yellow { background: var(--warn); box-shadow: 0 0 5px rgba(216,180,82,.55); }
.mon-status .dot.red { background: var(--danger); box-shadow: 0 0 5px rgba(217,107,97,.55); }

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { } nav { flex-direction: row; flex-wrap: wrap; }
}
