/* LEMPhost operator and customer panel (stage 3, lab). Colours are the mock's variables, the layout is the mock's
   three cards. No inline styles and no outside fonts: the Content-Security-Policy allows only this file. */
:root {
  --bg: #f3f1ec; --card: #ffffff; --ink: #17202b; --muted: #5d6878; --line: #e2ddd1;
  --accent: #0f766e; --accent-ink: #0b5b55; --accent-soft: #e3f2ef;
  --warn: #8a5300; --warn-soft: #fbf0dc; --bad: #a4262c; --bad-soft: #f8e3e3;
  --ok: #1f7a45; --ok-soft: #e1f1e7; --topbar: #17202b; --note: #fff7e0;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "IBM Plex Sans", system-ui, -apple-system, sans-serif; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
h3 { font-size: 14px; margin: 18px 0 6px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 10px; }
a { color: var(--accent-ink); }
code { font-size: 13px; word-break: break-all; }
ul { padding-left: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.gap { margin-top: 18px; }

/* Top bar: brand, section tabs with an underline on the active tab, and who is signed in. */
.top { background: var(--topbar); color: #fff; height: 60px; display: flex; align-items: stretch; gap: 24px; padding: 0 20px; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; font-weight: 700; font-size: 18px; letter-spacing: .2px; white-space: nowrap; }
.brand i { display: inline-block; width: 10px; height: 10px; background: #5fd1c4; border-radius: 2px; margin-right: 9px; }
.tabs { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; }
.tabs a { display: flex; align-items: center; color: #b9c3cf; padding: 0 14px; border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; border-bottom-color: #5fd1c4; }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; color: #b9c3cf; white-space: nowrap; }
.who a { color: #b9c3cf; padding: 4px 6px; text-decoration: none; }
.who a:hover { color: #fff; }

.crumbs { padding: 14px 24px 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--accent-ink); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs b { color: var(--ink); font-weight: 600; }

/* The three cards: sub-pages or quick actions, the main content, and status with next steps. */
.grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) 290px; gap: 16px; padding: 12px 24px 32px; align-items: start; max-width: none; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.side { padding: 14px; }
.side .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; }
.side a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.side a:hover { background: #f5f3ee; }
.side a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side .inline-form { display: block; margin: 0; }
.side .side-act { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.side .side-act:hover { background: #f5f3ee; }

.head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.head .desc { color: var(--muted); margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .inline-form { display: inline; }

.btn, button:not(.btn):not(.side-act) { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; padding: 8px 14px; cursor: pointer; white-space: nowrap; text-decoration: none; font: inherit; }
.btn:hover { border-color: #c9c2b2; }
.btn.pri, button:not(.btn):not(.side-act) { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.pri:hover { background: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: #e7c4c6; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.yellow { background: #ffe27a; border-color: #e0bd3c; color: #3d2c00; }
/* The bar on every page of a Login as view: the owner must always see that he is not the client. */
.banner { background: #ffe27a; color: #3d2c00; font-weight: 500; padding: 8px 20px; display: flex; gap: 12px; align-items: center; }
.banner .btn { margin-left: auto; }
.inline-form { display: inline; margin: 0; }
.inline-form .btn { margin: 0; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }
a.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; background: #fff; font-size: 13px; color: var(--ink); text-decoration: none; }
a.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid #efebe2; vertical-align: middle; }
td a { color: var(--ink); text-decoration: none; }
td a:hover { text-decoration: underline; }
tbody tr:hover td { background: #faf9f5; }
a.more { color: var(--muted); font-size: 18px; padding: 0 6px; border-radius: 6px; text-decoration: none; }
a.more:hover { background: #f0ede6; }

.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.neutral { background: #eceae4; color: var(--muted); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.ok { background: var(--ok); }
.dot.warn { background: #c98a16; }
.dot.bad { background: var(--bad); }

progress.meter { display: block; width: 100%; height: 8px; margin: 6px 0 2px; border: 0; border-radius: 999px; background: #eceae4; appearance: none; -webkit-appearance: none; overflow: hidden; }
progress.meter::-webkit-progress-bar { background: #eceae4; border-radius: 999px; }
progress.meter::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.meter::-moz-progress-bar { background: var(--accent); }
progress.meter.warn::-webkit-progress-value { background: #c98a16; }
progress.meter.warn::-moz-progress-bar { background: #c98a16; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #efebe2; }
.row:last-child { border-bottom: 0; }
.row .right { text-align: right; }
label.row { margin: 0; cursor: pointer; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; color: var(--ink); text-decoration: none; display: block; }
a.tile:hover { border-color: var(--accent); }
.tile .big { font-size: 18px; font-weight: 600; word-break: break-all; }
.tile-foot { margin: 6px 0; }
.tile-add { border-style: dashed; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); font-weight: 600; }

.check { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.check input { margin-top: 5px; }
.check.done span { color: var(--muted); text-decoration: line-through; }
.note { background: var(--accent-soft); color: var(--accent-ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.lock { color: var(--muted); font-size: 13px; }

/* Switches: a link, a checkbox, or a fixed picture of one. */
.switch { width: 38px; height: 22px; border-radius: 999px; background: #cfc9ba; position: relative; display: inline-block; cursor: pointer; vertical-align: middle; border: 0; padding: 0; margin: 0; appearance: none; -webkit-appearance: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { left: 19px; }
span.switch { cursor: default; }

/* Dialogs: opened by ?m=name, closed by the × or Cancel. */
.overlay { position: fixed; inset: 0; background: rgba(23, 32, 43, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 20; overflow: auto; }
.dialog { background: #fff; border-radius: 16px; width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); margin: 0; }
.dialog header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 22px 8px; }
.dialog header h2 { font-size: 18px; margin: 0; }
.dialog header p { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.dialog .body { padding: 8px 22px 12px; overflow: auto; }
.dialog footer { padding: 14px 22px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); flex-wrap: wrap; }
a.x { font-size: 22px; color: var(--muted); line-height: 1; text-decoration: none; padding: 0 4px; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pair { display: flex; gap: 10px; }
.pair > .field { flex: 1; min-width: 0; }
.opts { display: grid; gap: 8px; margin: 8px 0; }
.opt { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; color: var(--ink); text-decoration: none; }
.opt.on { border-color: var(--accent); background: #f6fbfa; }
.opt b { display: block; }
.opt small { color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0; }
.steps li { counter-increment: s; display: flex; gap: 10px; padding: 6px 0; font-size: 14px; }
.steps li::before { content: counter(s); flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* Forms (dialogs and the sign-in pages). */
label { display: block; margin: .75rem 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea { display: block; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); margin-top: 4px; }
input[type=checkbox], input[type=radio] { width: auto; margin: 5px 0 0; }
.field input, .field select, .field textarea { margin-top: 0; }
.field > span + input, .field > span + select { margin-top: 0; }

/* Messages and the old sign-in pages. */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 30; max-width: 90vw; margin: 0; }
.toast.bad { background: var(--bad); }
main:not(.grid) { max-width: 26rem; margin: 2rem auto; padding: 0 16px; }
.error { color: var(--bad); border: 1px solid var(--bad); padding: .5rem; border-radius: 9px; }
.notice { color: var(--ok); border: 1px solid var(--ok); padding: .5rem; border-radius: 9px; }
.hint { color: var(--muted); font-size: .9rem; }
.codes { border: 1px solid var(--accent); border-radius: 14px; padding: .5rem 1rem; margin: 1rem 0; background: #fff; }
.codes-list { columns: 2; list-style: none; padding: 0; }
.good { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }

@media (max-width: 1180px) {
  .grid { grid-template-columns: 200px minmax(0, 1fr); }
  .grid > aside:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; padding: 12px 14px 28px; }
  .top { gap: 14px; padding: 0 12px; }
  .who .name { display: none; }
  .crumbs { padding: 12px 14px 0; }
  .pair { flex-direction: column; }
  .codes-list { columns: 1; }
}
