:root {
  /* Palette sampled from the Hosted Companies Ltd logo (green padlock,
     teal-to-blue cloud, blue "companies" wordmark). */
  --ink: #16202a;
  --muted: #5b6b78;
  --border: #d7dee4;
  --panel: #ffffff;
  --bg: #f4f8f8;
  --brand: #00a4e4;
  --brand-dark: #076a94;
  --brand-green: #43b14f;
  --brand-teal: #14b8a6;
  --danger: #b3261e;
  --ok: #2f9e4f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 2rem 1.2rem; }
.narrow { max-width: 460px; }

h1, h2, h3 { line-height: 1.2; }

a { color: var(--brand); }

.topbar {
  background: var(--brand-dark);
  color: #fff;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-weight: 700; color: #fff; text-decoration: none; }
.topbar nav a { color: #dbe6f2; text-decoration: none; margin-left: 1.1rem; font-size: 0.92rem; }
.topbar nav a:hover { color: #fff; }
.topbar button {
  background: transparent; border: 1px solid #6f8bab; color: #fff;
  border-radius: var(--radius); padding: 0.35rem 0.8rem; cursor: pointer;
}

.nav-dropdown { position: relative; display: inline-block; margin-left: 1.1rem; }
.topbar .nav-dropdown-toggle {
  background: transparent; border: none; color: #fff; cursor: pointer;
  font-size: 0.92rem; font-weight: 600; padding: 0; font-family: inherit;
  appearance: none; -webkit-appearance: none; opacity: 1;
}
.topbar .nav-dropdown-toggle:hover { color: #fff; text-decoration: underline; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.4rem; min-width: 170px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); z-index: 20;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; color: var(--ink); text-decoration: none;
  padding: 0.4rem 0.6rem; border-radius: 6px; font-size: 0.88rem;
}
.nav-dropdown-menu a:hover { background: var(--bg); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}

.form-row { margin-bottom: 0.9rem; }
.form-row label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 0.55rem 0.65rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.95rem; background: #fff; color: var(--ink);
}

button.primary, input[type="submit"] {
  background: var(--brand); color: #fff; border: none; border-radius: 8px;
  padding: 0.6rem 1.1rem; font-size: 0.95rem; cursor: pointer; font-weight: 600;
}
button.primary:hover { background: var(--brand-dark); }
button.secondary {
  background: #fff; color: var(--brand); border: 1px solid var(--brand);
  border-radius: 8px; padding: 0.55rem 1rem; font-size: 0.9rem; cursor: pointer;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.02em; }

.message { padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.9rem; margin-bottom: 1rem; }
.message.error { background: #fbe9e7; color: var(--danger); }
.message.ok { background: #e6f4ea; color: var(--ok); }

.badge {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; background: #e6edf4; color: var(--brand-dark);
}

.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
