/* Palette lifted from the "Secure. Monitor. Protect." poster: deep navy
   chrome, white content, green and cyan accents, one signature colour per
   service. */
:root {
  --navy-900: #0a1628;
  --navy-800: #0d1f38;
  --navy-700: #12253f;
  --navy-600: #1c3455;
  --navy-500: #2f4a72;

  --green: #8cc63f;
  --green-dark: #6fa32c;
  --cyan: #29abe2;
  --cyan-dark: #1b8fc0;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #dde3ea;
  --text: #16202e;
  --muted: #64748b;

  --danger: #c0392b;
  --success: #2e7d32;
  --warning: #b45309;

  /* Service signature colours, matching the poster cards */
  --grafana: #f46800;
  --syslog: #1565c0;
  --cacti: #2e7d32;
  --backup: #6a3b9a;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(10, 22, 40, .08), 0 1px 2px rgba(10, 22, 40, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--cyan-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 25px; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 30px 0 12px; }
.subtitle { color: var(--muted); margin: 0 0 24px; }

/* --- Top bar --- */
.topbar { background: var(--navy-900); color: #fff; border-bottom: 3px solid var(--green); }
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 26px; min-height: 60px; flex-wrap: wrap;
}
.brand {
  color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
.brand:hover { text-decoration: none; }
.brand .dot-g { color: var(--green); }
.brand .dot-c { color: var(--cyan); }
.brand-tag {
  display: block; font-size: 10.5px; font-weight: 500; color: #8fa3ba;
  letter-spacing: .01em; margin-top: 1px;
}
.nav { display: flex; gap: 22px; }
.nav a {
  color: #b8c9dd; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 7px;
}
.nav a:hover { color: #fff; text-decoration: none; }
.userblock .who { display: block; }
.userblock .signout { margin-top: 2px; }
.userblock .signout .btn-link {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px;
  color: var(--green); text-decoration: none;
}
.userblock .signout .btn-link:hover { text-decoration: underline; }

/* --- Split sign-in layout --------------------------------------------- */
.auth-split { display: grid; grid-template-columns: 400px minmax(0, 1fr); min-height: 100%; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } }

.auth-brandside {
  background:
    radial-gradient(700px 340px at 50% 88%, rgba(41,171,226,.20), transparent 70%),
    linear-gradient(170deg, var(--navy-900) 0%, var(--navy-700) 62%, #0c1c31 100%);
  color: #fff; padding: 36px 30px 30px; display: flex; flex-direction: column;
}
.auth-brandside .bwrap { display: flex; align-items: flex-start; gap: 12px; }
.auth-brandside .bname { font-size: 25px; font-weight: 800; line-height: 1.12; }
.auth-brandside .bname .w { color: #fff; display: block; }
.auth-brandside .bname .g { color: var(--green); display: block; }
.auth-brandside .bname .c { color: var(--cyan); display: block; }
.auth-brandside .tag { font-size: 15px; color: #cfdcea; margin: 22px 0 6px; line-height: 1.4; }

.feature { display: flex; gap: 14px; align-items: flex-start;
           padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,.10); }
.feature:last-of-type { border-bottom: none; }
.feature .fi { flex: none; color: var(--cyan); }
.feature .ft { font-size: 14px; font-weight: 700; }
.feature .fd { font-size: 12.5px; color: #a8bcd2; line-height: 1.4; margin-top: 2px; }

.badge247 {
  margin-top: auto; text-align: center; padding-top: 26px;
}
.badge247 .ring {
  width: 108px; height: 108px; margin: 0 auto; border-radius: 50%;
  border: 2px dashed rgba(41,171,226,.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.badge247 .n { font-size: 25px; font-weight: 800; line-height: 1; }
.badge247 .p { font-size: 10px; letter-spacing: .12em; color: #a8bcd2; margin-top: 3px; }
.badge247 .ribbon {
  display: inline-block; margin-top: 12px; background: var(--green); color: #10250a;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  padding: 5px 14px; border-radius: 4px; line-height: 1.35;
}

.auth-formside {
  background: #f7f9fc; padding: 44px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.auth-logo { display: flex; align-items: center; gap: 12px; justify-content: center; }
.auth-logo .n { font-size: 29px; font-weight: 800; letter-spacing: -.01em; color: var(--navy-900); }
.auth-logo .n .g { color: var(--green-dark); }
.auth-logo .n .c { color: var(--cyan-dark); }
.auth-strap {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  color: var(--muted); font-size: 13.5px; margin: 10px 0 26px; max-width: 520px;
}
.auth-strap::before, .auth-strap::after {
  content: ""; height: 1px; background: var(--border); flex: 1;
}
.auth-card {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 18px rgba(16,32,54,.07); padding: 32px; width: 100%; max-width: 520px;
}
.auth-avatar {
  width: 74px; height: 74px; border-radius: 50%; background: #eef6e6;
  color: var(--green-dark); margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.auth-card h1 { text-align: center; font-size: 26px; margin: 0 0 4px; }
.auth-card .lead { text-align: center; color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.auth-row label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 0; }
.auth-or {
  display: flex; align-items: center; gap: 14px; color: var(--muted);
  font-size: 13px; margin: 20px 0;
}
.auth-or::before, .auth-or::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.btn-wide {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px; font-size: 15px;
}
/* Specificity bumped deliberately: this block sits above the .btn rules in
   the file, and a bare .btn-outline would lose the cascade to .btn. */
.btn.btn-outline {
  background: #fff; color: var(--cyan-dark); border: 1px solid var(--border); font-weight: 700;
}
.btn.btn-outline:hover { background: #f2f7fb; color: var(--cyan-dark); }
.btn.btn-outline[disabled] { opacity: .6; cursor: not-allowed; background: #fff; }
.btn.btn-outline[disabled]:hover { background: #fff; }
.btn.btn-outline .soon {
  font-size: 10px; font-weight: 800; letter-spacing: .05em;
  background: #eef1f5; color: var(--muted); border-radius: 8px; padding: 2px 7px;
}
.auth-foot { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px;
}
.pw-toggle:hover { color: var(--text); }
.pw-wrap input { padding-right: 42px !important; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.org-name, .user-link { color: #b8c9dd; }
.user-link:hover { color: #fff; }
.org-switch select {
  background: var(--navy-600); color: #fff; border: 1px solid var(--navy-500);
  border-radius: var(--radius); padding: 6px 9px; font-size: 13px;
}
.btn-link {
  background: none; border: none; color: #b8c9dd; cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline;
}
.btn-link:hover { color: #fff; }
.inline { display: inline; }

/* --- Layout --- */
.page { max-width: 1180px; width: 100%; margin: 0 auto; padding: 30px 20px; flex: 1; }
.narrow { max-width: 460px; width: 100%; margin: 0 auto; padding: 48px 20px; flex: 1; }
.full { width: 100%; flex: 1; display: flex; flex-direction: column; }
.full > .auth-split { flex: 1; }

/* Public header for signed-out visitors */
.topbar-public .topbar-right { gap: 18px; }
.topbar-public .user-link { font-size: 14px; }
.topbar-public .btn { color: #10250a; }
.feature .ico { color: var(--cyan); flex: none; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* --- Forms --- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.req { color: var(--danger); margin-left: 2px; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=tel], .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); font: inherit; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41,171,226,.15);
}
.field input[type=checkbox] { width: auto; margin-right: 6px; }
.field-invalid input, .field-invalid select { border-color: var(--danger); }
.help { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.error { color: var(--danger); font-size: 13px; margin: 5px 0 0; }
.form-errors {
  background: #fdf1ef; border: 1px solid #f0c4bd; color: var(--danger);
  border-radius: var(--radius); padding: 11px 14px; margin-bottom: 18px;
}
.form-errors p { margin: 0; }

.btn {
  display: inline-block; background: var(--green); color: #10250a;
  border: 1px solid var(--green); padding: 10px 20px; border-radius: var(--radius);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; text-decoration: none; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-cyan { background: var(--cyan); border-color: var(--cyan); color: #04202c; }
.btn-cyan:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); font-weight: 600; }
.btn-secondary:hover { background: #eef1f5; color: var(--text); }
.btn-danger { background: #fff; color: var(--danger); border-color: #e8bdb6; font-weight: 600; }
.btn-danger:hover { background: #fdf1ef; color: var(--danger); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 22px; flex-wrap: wrap; }

/* --- Messages --- */
.messages { list-style: none; padding: 0; margin: 0 0 20px; }
/* The landing page uses a full-bleed main, so messages need their own gutter. */
.full .messages, .full .banner { max-width: 1180px; margin: 20px auto; padding-left: 20px; padding-right: 20px; }
.msg { padding: 11px 15px; border-radius: var(--radius); margin-bottom: 10px; border: 1px solid; }
.msg-success { background: #eef8ec; border-color: #b7ddb0; color: var(--success); }
.msg-error   { background: #fdf1ef; border-color: #f0c4bd; color: var(--danger); }
.msg-warning { background: #fef6e7; border-color: #f0d9a8; color: var(--warning); }
.msg-info    { background: #e9f6fd; border-color: #b3e0f5; color: var(--cyan-dark); }

.banner {
  background: #fef6e7; border: 1px solid #f0d9a8; color: var(--warning);
  padding: 11px 15px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px;
}
.banner .btn-link { color: var(--warning); }

/* The service description, on demand.

   A <details>, not a hover tooltip: hover does not exist on a touch screen,
   and an absolutely positioned bubble has to escape the card's overflow:hidden
   — which the card needs, to round its accent bar and footer — so it ends up
   sliced at the card edge. Opening in place avoids the whole problem and comes
   with keyboard and screen-reader behaviour already built in. */
.info > summary {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  list-style: none; border-radius: 4px;
}
.info > summary::-webkit-details-marker { display: none; }
.info > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.info > summary .ico { width: 15px; height: 15px; color: var(--muted);
                       flex: none; transition: transform .15s ease; }
.info > summary:hover .ico { color: var(--accent, var(--cyan)); }
.info[open] > summary .ico { transform: rotate(180deg); }
.info-text {
  margin: 9px 0 0; padding: 9px 11px; background: var(--bg);
  border-left: 3px solid var(--accent, var(--cyan)); border-radius: 0 4px 4px 0;
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
}

/* Informational, not a warning — used for the WireGuard pointer on Services. */
.banner-quiet { background: #e9f6fd; border-color: #b3e0f5; color: var(--cyan-dark); }
.banner-quiet a { color: var(--cyan-dark); font-weight: 700; white-space: nowrap; }

/* The WireGuard guide: config samples need to stay readable and must not
   push the page sideways on a phone. */
.card pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 12px 0;
}
.card pre code { background: none; padding: 0; }
.card.notice { background: #fef6e7; border-color: #f0d9a8; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border);
              border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
     font-weight: 700; background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }
.row-inactive { opacity: .5; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 700; border: 1px solid;
}
.badge-owner    { background: #e9f6fd; border-color: #b3e0f5; color: var(--cyan-dark); }
.badge-admin    { background: #f1ecf9; border-color: #cfbde8; color: var(--backup); }
.badge-operator { background: #eef8ec; border-color: #b7ddb0; color: var(--success); }
.badge-viewer   { background: #f1f5f9; border-color: var(--border); color: var(--muted); }
.badge-inactive { background: #f1f5f9; border-color: var(--border); color: var(--muted); }

/* --- Dashboard tiles --- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  border-top: 3px solid var(--cyan);
}
.tile .value { font-size: 30px; font-weight: 700; line-height: 1.15; }
.tile .label { color: var(--muted); font-size: 13px; margin-top: 3px; }

.empty { color: var(--muted); padding: 24px; text-align: center; background: var(--surface);
         border: 1px dashed var(--border); border-radius: var(--radius); }

.footer {
  background: var(--navy-900); color: #8fa3ba; padding: 22px 20px;
  font-size: 13px; text-align: center;
}
.footer a { color: var(--cyan); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  justify-content: center; margin-bottom: 10px;
}
.footer-links a { color: #cfdcea; font-weight: 500; }
.footer-links a:hover { color: #fff; }
.footer-meta { margin: 0; color: #7f93aa; }

/* --- Platform staff area ---------------------------------------------- */
.nav-staff a { color: var(--green); font-weight: 700; }
.pill {
  background: var(--green); color: #10250a; border-radius: 10px;
  font-size: 11px; font-weight: 800; padding: 1px 7px; margin-left: 5px;
}
.staff-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.staff-tabs a {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 15px; font-size: 14px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.staff-tabs a:hover { color: var(--text); text-decoration: none; }
.staff-tabs a.on { color: var(--green-dark); border-bottom-color: var(--green); }
.staff-tabs a.muted { margin-left: auto; color: #9aa8b8; font-weight: 500; }

.staff-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.staff-filter input[type=search], .staff-filter select {
  padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  font: inherit; background: #fff;
}
.staff-filter input[type=search] { min-width: 280px; }

/* --- Settings: three-column shell ------------------------------------- */
.settings-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 296px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1180px) {
  .settings-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .settings-aside { grid-column: 1 / -1; display: grid;
                    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
}
@media (max-width: 820px) {
  .settings-shell { grid-template-columns: 1fr; }
}

/* Left column: one grid item holding the nav and the 24/7 card. */
.settings-side { position: sticky; top: 18px; }
.settings-nav {
  background: var(--navy-900); border-radius: var(--radius); overflow: hidden;
}
.settings-nav .item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; color: #c6d4e6; text-decoration: none;
  border-left: 3px solid transparent;
}
.settings-nav .item:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.settings-nav .item.active {
  background: linear-gradient(90deg, rgba(140,198,63,.22), rgba(140,198,63,.04));
  border-left-color: var(--green); color: #fff;
}
.settings-nav .item.disabled { opacity: .45; cursor: default; }
.settings-nav .item.disabled:hover { background: none; color: #c6d4e6; }
.settings-nav .item .ico { flex: none; margin-top: 1px; }
.settings-nav .label { font-size: 14px; font-weight: 600; line-height: 1.25; }
.settings-nav .sub { font-size: 11.5px; color: #8fa3ba; margin-top: 2px; }
.settings-nav .soon {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; color: var(--navy-900);
  background: #8fa3ba; border-radius: 8px; padding: 1px 6px; margin-left: 6px;
}

.protect-card {
  margin-top: 18px; background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
  border: 1px solid var(--navy-600); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; color: #fff;
}
.protect-card .t { font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.protect-card .a { color: var(--green); font-size: 12.5px; margin-top: 6px; }
.protect-card .b { color: var(--cyan); font-size: 12.5px; }
.protect-card .ring {
  margin: 16px auto 0; width: 84px; height: 84px; border-radius: 50%;
  border: 2px dashed rgba(41,171,226,.45);
  display: flex; align-items: center; justify-content: center;
}

/* Panels */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px;
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.panel-head h2 { margin: 0; font-size: 15px; color: var(--green-dark); font-weight: 700; }
.panel-body { padding: 20px; }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head .subtitle { margin: 2px 0 0; font-size: 13px; }

/* Inputs with a leading icon, as in the mockup */
.input-icon { position: relative; display: flex; align-items: stretch; }
/* Direct child only — the reveal button nests its own .ico svg, which must
   not be dragged to the left edge by this rule. */
.input-icon > .ico {
  position: absolute; left: 0; top: 0; bottom: 0; width: 42px; height: auto;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--border); color: var(--muted); pointer-events: none;
}
.input-icon input, .input-icon textarea { padding-left: 54px !important; }

/* Key/value detail rows */
.detail-list { list-style: none; margin: 0; padding: 0; }
.detail-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.detail-list li:last-child { border-bottom: none; }
.detail-list .k { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy-700); }
.detail-list .v { margin-left: auto; color: var(--muted); text-align: right; }
.detail-list .v code { color: var(--text); }

/* Right column */
.tools-card {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  border-radius: var(--radius); padding: 20px; color: #fff; margin-bottom: 18px;
}
.tools-card h3 {
  margin: 0 0 4px; font-size: 15px; font-weight: 800; letter-spacing: .02em;
}
.tools-card h3 .g { color: var(--green); display: block; }
.tools-inner { background: #fff; border-radius: 6px; padding: 4px 14px; margin-top: 14px; }
.tool-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
            border-bottom: 1px solid var(--border); }
.tool-row:last-child { border-bottom: none; }
.tool-row .badge-ico {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.tool-row .n { font-size: 13px; font-weight: 800; letter-spacing: .03em; }
.tool-row .d { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tools-foot {
  display: flex; gap: 10px; align-items: center; margin-top: 14px;
  background: rgba(255,255,255,.08); border-radius: 6px; padding: 12px 14px;
  font-size: 12.5px; line-height: 1.35;
}

.glance { border: 1px solid #cfe3bd; border-radius: var(--radius);
          background: var(--surface); margin-bottom: 18px; }
.glance .glance-head { display: flex; align-items: center; gap: 9px;
                       padding: 14px 16px; border-bottom: 1px solid var(--border); }
.glance .glance-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.glance ul { list-style: none; margin: 0; padding: 6px 16px 12px; }
.glance li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13.5px; }
.glance li .n { margin-left: auto; font-weight: 700; font-size: 16px; }

.helpcard { border: 1px solid #cfe3bd; background: #f4faef; border-radius: var(--radius);
            padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.helpcard .t { font-weight: 700; font-size: 13.5px; }
.helpcard .d { font-size: 12.5px; color: var(--muted); }

/* Benefits strip */
.benefits-strip {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-top: 4px;
}
.benefits-strip .bs-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.benefits-strip .bs-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.benefits-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.benefit-item { display: flex; gap: 10px; align-items: flex-start; }
.benefit-item .t { font-size: 12.5px; font-weight: 700; color: var(--navy-700); }
.benefit-item .d { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

/* Top bar avatar block */
.userblock { display: flex; align-items: center; gap: 10px; text-align: right; }
.userblock .org { font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.2; }
.userblock .who { font-size: 12px; color: #8fa3ba; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: #e8eef5; color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.nav a.on { color: #fff; border-bottom: 2px solid var(--green); padding-bottom: 3px; }

/* Trust bar above the footer links */
.trustbar {
  background: var(--navy-800); color: #fff; padding: 18px 20px;
  display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap;
}
.trustbar .t { font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.trustbar .t .g { color: var(--green); }
.trustbar .e { font-size: 13px; color: #b8c9dd; }
.trustbar .e a { color: var(--cyan); }

/* --- Error pages --- */
.errorpage { text-align: center; background: var(--surface); border: 1px solid var(--border);
             border-radius: var(--radius); padding: 44px 30px; box-shadow: var(--shadow); }
.errorpage .code { font-size: 54px; font-weight: 800; color: var(--green); line-height: 1; }
.errorpage h1 { font-size: 22px; margin: 14px 0 8px; }
.errorpage .subtitle { margin-bottom: 0; }

/* --- Policy and contact pages --- */
.policy { max-width: 820px; margin: 0 auto; }
.policy h2 {
  font-size: 17px; margin: 30px 0 10px; padding-top: 4px;
  color: var(--navy-700); border-top: 1px solid var(--border);
}
.policy h2:first-of-type { border-top: none; }
.policy p, .policy li { color: #33445c; }
.policy ul { padding-left: 20px; }
.policy li { margin-bottom: 6px; }
.policy table { margin: 12px 0 18px; border: 1px solid var(--border);
                border-radius: var(--radius); overflow: hidden; }
.policy hr { border: none; border-top: 1px solid var(--border); margin: 34px 0 0; }
.policy .card { margin-bottom: 16px; }

.contact-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* The contact form's honeypot: present in the DOM, never shown to a person. */
#id_website, label[for="id_website"] { position: absolute; left: -9999px; }

/* --- Service cards (the four poster tools) --- */
/* 285px rather than 255: at 255 a fourth column squeezed in on a ~1150px
   window and every card came out too narrow for its own container name. */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
            gap: 20px; align-items: start; }

/* Landing page: the four tools read as one set, so keep them on a single row
   rather than letting auto-fit break them into a 2x2 block the moment the
   window narrows. Steps down to 2 then 1 only when they genuinely cannot fit. */
.services-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .services-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .services-4 { grid-template-columns: 1fr; } }
.service {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.service-head { padding: 16px 18px 12px; border-top: 4px solid var(--accent, var(--cyan)); }
.service-name { font-size: 17px; font-weight: 700; color: var(--accent, var(--cyan));
                line-height: 1.25; }
.service-kind { font-size: 11px; color: var(--muted); text-transform: uppercase;
                letter-spacing: .06em; font-weight: 700; margin-bottom: 3px; }
.service-body { padding: 0 18px 14px; flex: 1; }
.service-body p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.service-meta { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.service-meta li { display: flex; justify-content: space-between; align-items: baseline;
                   gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.service-meta li:last-child { border-bottom: none; padding-bottom: 0; }
.service-meta .k { color: var(--muted); flex: none; }
.service-meta .v { font-weight: 600; min-width: 0; text-align: right; }

/* Container names run to ~30 characters — on one line they collide with their
   own label and spill past the card. Give them the full width instead. */
.service-meta li.stacked { display: block; }
.service-meta li.stacked .v { display: block; text-align: left; margin-top: 3px; }
.service-meta li.stacked code { font-size: 12px; overflow-wrap: anywhere;
                                color: var(--ink); }

/* Flex, not a float — the old float:right on Configure took the button out of
   flow, so the footer had no height of its own and the two sides never lined
   up on the same baseline. */
.service-foot { display: flex; align-items: center; justify-content: space-between;
                gap: 12px; padding: 12px 18px; background: #f8fafc;
                border-top: 1px solid var(--border); }

.svc-grafana { --accent: var(--grafana); }
.svc-syslog  { --accent: var(--syslog); }
.svc-cacti   { --accent: var(--cacti); }
.svc-backup  { --accent: var(--backup); }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-running { background: var(--success); }
.status-stopped { background: var(--muted); }
.status-error   { background: var(--danger); }
.status-pending { background: var(--warning); }

/* --- Landing page --- */
.hero {
  background:
    radial-gradient(1100px 420px at 78% 12%, rgba(41,171,226,.20), transparent 62%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
}
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 60px 20px 54px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: 50px; line-height: 1.03; font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 18px;
}
.hero h1 .w { color: #fff; display: block; }
.hero h1 .g { color: var(--green); display: block; }
.hero h1 .c { color: var(--cyan); display: block; }
.hero .lede { font-size: 19px; color: #cfdcea; margin: 0 0 26px; max-width: 30em; }

.pillars { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; }
.pillars li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #cfdcea; }
.pillars .tick {
  width: 20px; height: 20px; border-radius: 50%; background: var(--green);
  color: var(--navy-900); font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}

.badge247 {
  display: inline-block; margin-top: 26px; background: var(--cyan);
  color: #04202c; font-weight: 800; padding: 7px 16px; border-radius: 20px;
  font-size: 13px; letter-spacing: .04em;
}

.login-panel {
  background: var(--surface); border-radius: 10px; padding: 28px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .32); color: var(--text);
}
.login-panel h2 { margin: 0 0 4px; font-size: 20px; }
.login-panel .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.section { max-width: 1180px; margin: 0 auto; padding: 54px 20px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: 27px; margin: 0 0 8px; font-weight: 800; letter-spacing: -.01em; }
.section-head h2 .g { color: var(--green-dark); }
.section-head p { color: var(--muted); margin: 0; }
.section-alt { background: #eef2f7; }

.tool { border-top: 4px solid var(--accent, var(--cyan)); }
.tool h3 { margin: 0 0 2px; font-size: 18px; color: var(--accent, var(--cyan)); }
.tool .kind { font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
              color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.tool ul { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.tool ul li { padding: 5px 0 5px 22px; position: relative; color: #33445c; }
.tool ul li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent, var(--cyan)); font-weight: 800;
}

.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 20px; }
.benefit { text-align: center; padding: 22px 16px; background: var(--surface);
           border: 1px solid var(--border); border-radius: var(--radius); }
.benefit h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase;
              letter-spacing: .03em; color: var(--navy-700); }
.benefit p { margin: 0; font-size: 13px; color: var(--muted); }

.idealfor { background: var(--navy-900); color: #fff; }
.idealfor-inner {
  max-width: 1180px; margin: 0 auto; padding: 26px 20px;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center;
}
.idealfor .label { font-weight: 800; color: var(--green); letter-spacing: .06em; font-size: 14px; }
.idealfor .items { display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: center; }
.idealfor .items span { color: #cfdcea; font-size: 14px; }

.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 22px; }
.auth-links { margin-top: 18px; font-size: 14px; text-align: center; color: var(--muted); }

/* OTP entry */
.otp-input {
  letter-spacing: .55em; font-size: 26px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 44px 20px; }
  .hero h1 { font-size: 38px; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 12px; padding: 10px 16px; }
  .topbar-right { width: 100%; margin-left: 0; }
  th, td { padding: 10px; font-size: 14px; }
  .hero h1 { font-size: 32px; }
  .closing-inner { justify-content: center; text-align: center; }
}

/* --- Architecture diagram --------------------------------------------------
   Shared by the landing page and Services. HTML rather than an SVG so it
   reflows on a phone and the text stays selectable and readable aloud.
   .arch-manual marks every step a human still has to do. */
.arch { max-width: 720px; margin: 0 auto; }
.arch-tier { display: flex; justify-content: center; }

.arch-box { width: 100%; background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 15px 17px; text-align: left; }
.arch-edge { border-left: 4px solid var(--muted); }
.arch-platform { border-left: 4px solid var(--cyan); }
.arch-k { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
          color: var(--muted); }
.arch-t { font-size: 14px; font-weight: 600; margin-top: 3px; }

.arch-link { display: flex; flex-direction: column; align-items: center; gap: 6px;
             padding: 10px 0; }
.arch-pipe { width: 2px; height: 14px; background: var(--border); }
.arch-linklabel { font-size: 12px; font-weight: 700; color: var(--cyan-dark);
                  background: #e9f6fd; border: 1px solid #b3e0f5; border-radius: 999px;
                  padding: 5px 13px; text-align: center; }

.arch-host { background: var(--bg); border: 1px dashed var(--border);
             border-radius: var(--radius); padding: 14px; }
.arch-hostlabel, .arch-netlabel {
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.arch-arrow { text-align: center; color: var(--muted); font-size: 17px; line-height: 1;
              padding: 7px 0; }

.arch-net { background: var(--surface); border: 1px dashed var(--cyan);
            border-radius: var(--radius); padding: 13px; }
.arch-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
                 gap: 10px; }
.arch-svc { border: 1px solid var(--border); border-top: 3px solid var(--accent, var(--cyan));
            border-radius: var(--radius); padding: 11px 12px; background: var(--surface); }
.arch-name { font-size: 14px; font-weight: 700; color: var(--accent, var(--cyan)); }
.arch-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

.arch-sep { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.5;
            text-align: center; }

/* Amber, and numbered — the numbers are the activation order, so the diagram
   and the Platform activation queue tell the same story. */
.arch-manual { display: flex; align-items: flex-start; gap: 7px; margin-top: 8px;
               font-size: 12px; line-height: 1.45; color: #8a5200; font-weight: 600; }
.arch-flag { flex: none; width: 17px; height: 17px; border-radius: 50%;
             background: #f0a020; color: #3d2400; font-size: 11px; font-weight: 800;
             display: inline-flex; align-items: center; justify-content: center; }
.arch-legend { display: flex; align-items: center; gap: 8px; justify-content: center;
               margin-top: 16px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 560px) {
  .arch-services { grid-template-columns: 1fr 1fr; }
}

/* --- Platform activation queue --------------------------------------------- */
.act { margin-bottom: 14px; border-left: 4px solid var(--warning); }
.act-done { border-left-color: var(--success); }
.act-failed { border-left-color: var(--danger); }
.act-head { display: flex; align-items: flex-start; justify-content: space-between;
            gap: 14px; flex-wrap: wrap; }
.act-name { font-size: 16px; font-weight: 700; }
.act-host { font-size: 12px; color: var(--muted); margin-top: 2px; }
.act-count { display: flex; align-items: center; gap: 12px; }
.act-count span { font-size: 13px; font-weight: 800; }
.act-ok { color: var(--success); }
.act-todo { color: var(--warning); }

.act-steps { list-style: none; margin: 14px 0 0; padding: 0;
             display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.act-steps li { display: grid; grid-template-columns: 20px 1fr; gap: 4px 9px;
                align-items: start; font-size: 13px; padding: 9px 11px;
                border: 1px solid var(--border); border-radius: var(--radius); }
.act-steps li.is-todo { background: #fef6e7; border-color: #f0d9a8; }
.act-steps li.is-done { background: var(--bg); color: var(--muted); }
.act-n { width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800;
         display: inline-flex; align-items: center; justify-content: center; }
.is-todo .act-n { background: #f0a020; color: #3d2400; }
.is-done .act-n { background: #dfeed6; color: var(--success); }
.act-label { font-weight: 600; }
.is-done .act-label { font-weight: 500; }
.act-hint { grid-column: 2; font-size: 11.5px; color: #8a5200; line-height: 1.45;
            overflow-wrap: anywhere; }
.pill-warn { background: #f0a020; color: #3d2400; }

/* Collapsed on Services: the operator sees it once, then wants their cards. */
.arch-wrap { margin-bottom: 22px; }
.arch-wrap > summary { cursor: pointer; font-size: 14px; font-weight: 700;
                       color: var(--cyan-dark); padding: 10px 0; list-style: none; }
.arch-wrap > summary::-webkit-details-marker { display: none; }
.arch-wrap > summary::before { content: "▸ "; }
.arch-wrap[open] > summary::before { content: "▾ "; }
.arch-wrap > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.arch-wrap[open] { background: var(--surface); border: 1px solid var(--border);
                   border-radius: var(--radius); padding: 6px 18px 20px; }
