:root {
  --bg: #ffffff;
  --ink: #0d1424;
  --muted: #5b6478;
  --line: #e6e9f0;
  --soft: #f6f8fb;
  --blue: #1f6bff;
  --blue-hi: #4d8dff;
  --blue-lo: #0a47c9;
  --blue-glow: rgba(31, 107, 255, .45);
  --green: #12c95b;
  --green-hi: #3fe07f;
  --green-lo: #079442;
  --green-glow: rgba(18, 201, 91, .42);
  --amber: #f5a524;
  --red: #e5484d;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 16px; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ── shell ── */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
nav.tabs { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
nav.tabs a { padding: 7px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
nav.tabs a.on { background: var(--soft); color: var(--ink); }
.spacer { flex: 1; }
.bell { position: relative; background: none; border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; font-size: 17px; }
.bell .dot { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 80px; }
.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.page-head > div { flex: 1; }

/* ── the tactile 3D glow button ── */
.mb {
  --c: var(--blue); --hi: var(--blue-hi); --lo: var(--blue-lo); --glow: var(--blue-glow);
  appearance: none; border: 0; cursor: pointer; color: #fff; font-weight: 700; font-size: 15px;
  padding: 11px 18px; border-radius: 12px; position: relative;
  background: linear-gradient(180deg, var(--hi), var(--c) 55%, var(--lo));
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 4px 0 var(--lo), 0 6px 18px var(--glow), 0 0 22px var(--glow);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.mb:hover { filter: brightness(1.06); }
.mb:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 1px 0 var(--lo), 0 2px 10px var(--glow); }
.mb:disabled { filter: grayscale(.8) brightness(1.1); cursor: not-allowed; opacity: .7; }
.mb.green { --c: var(--green); --hi: var(--green-hi); --lo: var(--green-lo); --glow: var(--green-glow); }
.mb.ghost { background: #fff; color: var(--ink); text-shadow: none; box-shadow: 0 0 0 1px var(--line) inset, 0 3px 0 #d5dae5; }
.mb.ghost:active { box-shadow: 0 0 0 1px var(--line) inset, 0 1px 0 #d5dae5; }
.mb.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.mb.danger { --c: var(--red); --hi: #ff6b70; --lo: #b3262b; --glow: rgba(229,72,77,.35); }
.plus { width: 46px; height: 46px; padding: 0; font-size: 28px; line-height: 46px; border-radius: 14px; }

/* ── button tiles (My Buttons / Marketplace) ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.tile .key {
  align-self: flex-start; min-width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; color: #fff; padding: 0 12px;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue) 55%, var(--blue-lo));
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 4px 0 var(--blue-lo), 0 6px 18px var(--blue-glow), 0 0 26px var(--blue-glow);
}
.tile .key.green { background: linear-gradient(180deg, var(--green-hi), var(--green) 55%, var(--green-lo)); box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 4px 0 var(--green-lo), 0 6px 18px var(--green-glow), 0 0 26px var(--green-glow); }
.tile .key.off { background: linear-gradient(180deg, #cfd5e1, #b6bdcc); box-shadow: 0 4px 0 #9aa2b3; }
.tile h3 { margin: 0; }
.tile .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--soft); color: var(--muted); }
.chip.ok { background: #e3faec; color: var(--green-lo); }
.chip.trial { background: #e8f0ff; color: var(--blue-lo); }
.chip.warn { background: #fff4e0; color: #9a5b00; }
.chip.bad { background: #ffe9ea; color: #a8262b; }

/* ── cards / forms ── */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; }
.card + .card { margin-top: 16px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } nav.tabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; } .top-in { flex-wrap: wrap; } }
label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 5px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-hi); outline-offset: 0; border-color: var(--blue); }
textarea { min-height: 84px; resize: vertical; }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.err { color: var(--red); font-weight: 600; margin-top: 10px; min-height: 1em; }
.okmsg { color: var(--green-lo); font-weight: 600; margin-top: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; background: var(--soft); }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ── software picker ── */
.sw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.sw { border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; background: #fff; text-align: left; font: inherit; color: inherit; }
.sw:hover, .sw.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,107,255,.12); }
.sw b { display: block; }

/* ── auth / hero ── */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; padding: 24px 0; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: 40px; }
.hero .keys { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.price-big { font-size: 34px; font-weight: 800; }
table.calc { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.calc td { padding: 6px 0; border-bottom: 1px solid var(--line); }
table.calc td:last-child { text-align: right; font-weight: 700; }

/* ── notifications panel ── */
.panel { position: fixed; top: 60px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(13,20,36,.18); z-index: 20; }
.panel .n { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel .n.unread { background: #f3f7ff; }
.panel .n b { display: block; }
.key-box { font-family: ui-monospace, Menlo, monospace; background: var(--soft); border: 1px dashed var(--line); padding: 10px; border-radius: 10px; word-break: break-all; }
/* ── My Account (Plan & billing · Users · Connected software · My buttons · Help) ── */
.acct { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.acct .card + .card { margin-top: 0; }
.acct-sec { min-width: 0; }
#sec-users, #sec-help { grid-column: 1 / -1; }
.acct-who, .people span, .key-box, .ticket p { overflow-wrap: anywhere; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.people li > div { flex: 1; min-width: 0; }
.people li b, .people li > div > span { display: block; }
.people .row { display: flex; gap: 6px; flex-wrap: wrap; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ticket { border-top: 1px solid var(--line); padding: 10px 0; }
.ticket .reply { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.card.narrow { max-width: 460px; margin: 24px auto; }
@media (max-width: 760px) { .acct, .cols3 { grid-template-columns: 1fr; } .page-head { flex-wrap: wrap; } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 30; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 18px; }
.steps li a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 700; font-size: 13px; }
.steps li.on a { background: var(--blue); color: #fff; }
.warnbox { background: #fff4e0; border-color: #f3d29a; }
/* 2026-11-11: a button that cannot run yet is greyed, with the reason. */
.tile.inactive { opacity: .6; filter: grayscale(.6); }
.tile .why { color: #9a5b00; margin: 6px 0 0; }
