/* Python RPA Converter (cloud) – the desktop app's dark Python RPA palette, plus public pages and a phone layout. */
:root {
  --canvas: #192038;
  --sidebar: #161a30;
  --raise: #242b45;
  --card: #1f2741;
  --card-2: #293450;
  --line: #2e3a59;
  --line-2: #3a4a74;
  --text: #c6cee0;
  --text-2: #afb7ca;
  --muted: #8790aa;
  --accent-text: #a4cee0;
  --green: #38b43d;
  --blue: #2075a9;
  --purple: #9c27b0;
  --red: #ff4133;
  --orange: #ff6b35;
  --amber: #ffa800;
  --teal: #4b7768;
  --primary: #385b8b;
  --primary-hover: #436aa0;
  --radius: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "JetBrains Mono", "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; color: #e1e6f2; }
h1 { font-size: 22px; letter-spacing: -.01em; }
h2 { font-size: 16px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: #385b8b; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2e3a59; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3a4a74; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; gap: 6px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; color: #e7ecf7; letter-spacing: .01em; }
.brand-text small { color: var(--accent-text); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
nav a:hover { background: #1d2340; text-decoration: none; color: var(--text); }
nav a.active { background: var(--raise); color: #fff; box-shadow: inset 3px 0 0 var(--blue); }
.running { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid #2c5a37; background: #17311f; border-radius: 9px; color: #bfe8c2; font-size: 13px; }
.running:hover { text-decoration: none; border-color: var(--green); }
.running small { display: block; color: #8fc995; font-size: 11.5px; }
.sidebar-foot { margin-top: auto; padding: 8px 10px 0; color: var(--muted); font-size: 11.5px; }
.running:not([hidden]) + .sidebar-foot { margin-top: 8px; }
main { overflow: auto; min-width: 0; }
.page { padding: 26px 32px 48px; max-width: 1280px; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.crumb { color: var(--text-2); font-size: 13px; font-weight: 600; margin-bottom: 10px; display: inline-flex; gap: 6px; align-items: center; height: 28px; padding: 0 11px 0 8px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--raise); }
.crumb:hover { text-decoration: none; color: #fff; border-color: #4f7fc0; background: #2a3252; }
.crumb + .crumb { padding-left: 11px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raise); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #4a5b88; background: #2a3252; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.run { background: var(--green); border-color: var(--green); color: #fff; }
.btn.run:hover { background: #41c446; }
.btn.danger { background: transparent; border-color: #6b2d33; color: #ff8a80; }
.btn.danger:hover { background: #3a1d24; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--raise); }
.btn.big { height: 42px; padding: 0 22px; font-size: 14.5px; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; background: var(--raise); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px; font: 13.5px var(--font); outline: none; }
textarea { font-family: var(--mono); font-size: 12.5px; resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: #4f7fc0; box-shadow: 0 0 0 3px rgba(32, 117, 169, .25); }
label.field { display: flex; flex-direction: column; gap: 6px; }
label.field > span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
label.field > span em { font-style: normal; color: var(--muted); font-weight: 400; margin-left: 6px; font-family: var(--mono); font-size: 11.5px; }
.hint { color: var(--muted); font-size: 12px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: #3a4566; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #dfe5f2; transition: left .15s; }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { left: 19px; }

/* ---------------------------------------------------------------- cards, chips */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.grid.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.two { grid-template-columns: 1fr; } .grid.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; background: #2b3453; color: var(--text-2); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: none; }
.chip.dot::before { display: block; }
.chip.green { background: rgba(56, 180, 61, .15); color: #6fd873; }
.chip.red { background: rgba(255, 65, 51, .14); color: #ff7b70; }
.chip.amber { background: rgba(255, 168, 0, .14); color: #ffc34d; }
.chip.blue { background: rgba(32, 117, 169, .22); color: #7cc0ea; }
.chip.purple { background: rgba(156, 39, 176, .2); color: #d68ae4; }
.chip.orange { background: rgba(255, 107, 53, .16); color: #ff9a74; }
.chip.pulse::before { display: block; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(164, 206, 224, .25); border-top-color: var(--accent-text); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: #fff; border-bottom-color: var(--blue); }
.tabs a .count { margin-left: 6px; color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- project list */
.plist { display: flex; flex-direction: column; gap: 10px; }
.pitem { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(260px, 1.6fr) 110px minmax(150px, .9fr) 64px; gap: 22px; align-items: center; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); cursor: pointer; transition: border-color .12s, background .12s; }
.pitem:hover { border-color: var(--line-2); background: #222b47; text-decoration: none; }
.pitem .name { font-size: 15px; font-weight: 600; color: #e7ecf7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitem .meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 8px; align-items: center; overflow: hidden; white-space: nowrap; }
.pitem .chev { color: var(--muted); display: inline-flex; }
.pactions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.iconbtn span { display: inline-flex; }
.iconbtn:hover { background: var(--raise); color: var(--text); border-color: var(--line-2); }
.iconbtn.danger:hover { background: #3a1d24; color: #ff8a80; border-color: #6b2d33; }
.iconbtn:disabled { opacity: .35; cursor: default; }
.pitem .iconbtn { opacity: 0; transition: opacity .12s; }
.pitem:hover .iconbtn, .pitem .iconbtn:focus-visible { opacity: 1; }
.bars { display: grid; grid-template-columns: 82px 1fr 46px; gap: 5px 10px; align-items: center; font-size: 12px; color: var(--text-2); }
.bar { height: 6px; background: #2a3354; border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.bar.amber > i { background: var(--amber); }
.bar.red > i { background: var(--red); }
.bigcount { font-size: 20px; font-weight: 600; color: #e7ecf7; }
.bigcount small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- empty state, drop zone */
.empty { text-align: center; padding: 56px 24px; }
.empty h2 { font-size: 20px; margin: 18px 0 6px; }
.empty p { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; background: rgba(36, 43, 69, .45); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent-text); background: rgba(32, 117, 169, .12); }
.drophint { position: fixed; inset: 0; background: rgba(15, 19, 36, .78); display: grid; place-items: center; z-index: 40; pointer-events: none; }
.drophint div { border: 2px dashed var(--accent-text); border-radius: 18px; padding: 48px 64px; font-size: 18px; font-weight: 600; color: #e7ecf7; text-align: center; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.choice { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.choice:hover { border-color: #4f7fc0; background: #28304f; }
.choice b { color: #e7ecf7; font-size: 14px; }
.choice span { color: var(--muted); font-size: 12.5px; }
.choice svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-text); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }

/* ---------------------------------------------------------------- tiles */
.tile { padding: 16px 18px; }
.tile .label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tile .value { font-size: 28px; font-weight: 600; color: #eef2fa; margin: 4px 0 8px; letter-spacing: -.02em; }
.tile .value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; letter-spacing: 0; }
.tile .bar { height: 5px; }

/* ---------------------------------------------------------------- tables, lists */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--line); }
table.t td { padding: 11px 18px; border-bottom: 1px solid #262f4c; vertical-align: middle; }
table.t tr:last-child td { border-bottom: none; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #222b47; }
.list { display: flex; flex-direction: column; }
.list > div { padding: 10px 18px; border-bottom: 1px solid #262f4c; display: flex; gap: 10px; align-items: center; }
.list > div:last-child { border-bottom: none; }
.issue { padding: 12px 18px; border-bottom: 1px solid #262f4c; display: grid; grid-template-columns: 84px 1fr; gap: 4px 12px; }
.issue:last-child { border-bottom: none; }
.issue .msg { color: var(--text); }
.issue .loc { color: var(--muted); font-size: 12px; }
.issue pre { grid-column: 2; margin: 4px 0 0; padding: 8px 10px; background: #151a2e; border-radius: 6px; font: 12px var(--mono); color: var(--accent-text); white-space: pre-wrap; word-break: break-word; }
.wfhead { padding: 10px 18px; background: #1b2238; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--accent-text); position: sticky; top: 0; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fbtn { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.fbtn.on { background: var(--raise); color: #fff; border-color: #4f7fc0; }

/* ---------------------------------------------------------------- run form, log */
.argform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
@media (max-width: 900px) { .argform { grid-template-columns: 1fr; } }
.log { background: #11162a; border: 1px solid var(--line); border-radius: var(--radius); font: 12.5px/1.55 var(--mono); padding: 12px 0; overflow: auto; height: calc(100vh - 250px); min-height: 320px; }
.log div { padding: 0 16px; white-space: pre-wrap; word-break: break-word; color: #b9c2d8; }
.log div:hover { background: #171d34; }
.log .ts { color: #5f6a8a; }
.log .fields { color: #5a6585; font-size: 11.5px; }
.log .lv-INFO { color: #7cc0ea; }
.log .lv-WARNING { color: var(--amber); }
.log .lv-ERROR, .log .lv-CRITICAL { color: #ff6f63; }
.log .lv-TRACE, .log .lv-DEBUG { color: #7f88a6; }
.log .err { color: #ff8f86; }
.log .app { color: #d68ae4; }
.log .heur { color: #ffc34d; }
.log .empty-log { color: var(--muted); font-family: var(--font); }
.statusbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 14px 18px; }
.shot { border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; cursor: pointer; background: #11162a; }
.shot img { width: 100%; height: 92px; object-fit: cover; object-position: top left; display: block; }
.shot div { padding: 6px 8px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result pre { margin: 0; padding: 14px 18px; font: 12.5px var(--mono); color: #bfe8c2; white-space: pre-wrap; word-break: break-word; }

/* ---------------------------------------------------------------- modal, toast */
#overlay { position: fixed; inset: 0; background: rgba(10, 13, 26, .72); display: grid; place-items: center; z-index: 50; padding: 24px; }
.modal { background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; width: min(720px, 100%); max-height: calc(100vh - 48px); overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.modal.wide { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.modal img.full { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #2a3252; border: 1px solid var(--line-2); border-left: 4px solid var(--blue); color: var(--text); padding: 11px 14px; border-radius: 8px; max-width: 440px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-size: 13px; }
.toast.error { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
.banner { padding: 11px 14px; border-radius: 8px; background: rgba(255, 168, 0, .1); border: 1px solid rgba(255, 168, 0, .35); color: #ffd27a; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner .grow { min-width: 0; word-break: break-all; }
.banner.info { background: rgba(32, 117, 169, .12); border-color: rgba(32, 117, 169, .45); color: #a9d6f2; }
.banner.error { background: rgba(255, 65, 51, .1); border-color: rgba(255, 65, 51, .4); color: #ffaaa3; }
.converting { display: flex; gap: 14px; align-items: center; padding: 22px; }
.sec { margin-top: 18px; }

/* ================================================================ cloud additions */
input[type=email], input[type=search], input[type=file] { width: 100%; background: var(--raise); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px; font: 13.5px var(--font); outline: none; }
input[type=email]:focus { border-color: #4f7fc0; box-shadow: 0 0 0 3px rgba(32, 117, 169, .25); }
.sidebar .who { padding: 10px; border-top: 1px solid var(--line); margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.sidebar .who b { color: #e7ecf7; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .who .row { gap: 6px; }
nav .sep { margin: 14px 10px 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
nav a .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 11.5px; display: inline-grid; place-items: center; font-weight: 700; }
.quota { padding: 10px 10px 4px; font-size: 12px; color: var(--muted); }
.quota .bar { margin-top: 6px; height: 5px; }

/* public page (signed out): one centred column of limited width on any screen, sign-in card beside the text */
.public-wrap { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(1100px 520px at 12% -12%, rgba(32, 117, 169, .26), transparent 62%),
  radial-gradient(900px 480px at 92% 112%, rgba(255, 107, 53, .10), transparent 60%), var(--sidebar); }
.public-top, .public, .public-foot { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.public-top { padding-top: 28px; }
.public { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: center; padding-top: 32px; padding-bottom: 48px; }
.public-foot { padding-bottom: 24px; color: var(--muted); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hero h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; letter-spacing: -.02em; color: #f0f3fa; max-width: 640px; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero p.lead { font-size: 16px; color: var(--text-2); max-width: 600px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.step { background: rgba(31, 39, 65, .8); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; gap: 12px; }
.step .n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.step b { display: block; color: #e7ecf7; margin-bottom: 3px; }
.step span { color: var(--muted); font-size: 13px; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }
.facts b { color: #e7ecf7; font-size: 20px; display: block; }
.authbox { background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.authcard { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.authcard .tabs { margin-bottom: 4px; }
.authcard .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.authcard .check input { margin-top: 3px; }
.legal { max-width: 760px; }
.legal h2 { margin: 22px 0 8px; }
.legal p, .legal li { color: var(--text-2); }

/* project page */
.tiles4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.timeline { display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #262f4c; }
.ev:last-child { border-bottom: none; }
.ev .who { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.ev .who.client { background: var(--blue); }
.ev .who.team { background: var(--green); }
.ev .who.system, .ev .who.repo { background: #46507a; }
.ev .text { white-space: pre-wrap; word-break: break-word; }
.ev .when { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ev.internal { background: rgba(255, 168, 0, .05); }
.caseitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 13px 18px; border-bottom: 1px solid #262f4c; cursor: pointer; }
.caseitem:hover { background: #222b47; }
.caseitem:last-child { border-bottom: none; }
.caseitem .t { color: #e7ecf7; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.caseitem .s { color: var(--muted); font-size: 12.5px; }
.howto pre { margin: 6px 0 14px; padding: 12px 14px; background: #11162a; border: 1px solid var(--line); border-radius: 8px; font: 12.5px/1.6 var(--mono); color: var(--accent-text); white-space: pre-wrap; }
.howto ol { padding-left: 20px; color: var(--text-2); }
.howto li { margin-bottom: 10px; }
.notice { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 13px 18px; border-bottom: 1px solid #262f4c; }
.notice.unread { background: rgba(32, 117, 169, .08); }
.notice:last-child { border-bottom: none; }

/* phones and narrow windows */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .public-top, .public, .public-foot { padding-left: 16px; padding-right: 16px; }
  .public-top { padding-top: 18px; }
  .public { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  /* phones: headline and lead, then the sign-in card, then the details */
  .hero { display: contents; }
  .hero h1 { order: 1; } .hero p.lead { order: 2; } .authbox { order: 3; } .steps { order: 4; } .facts { order: 5; }
  .steps { grid-template-columns: 1fr; }
  .authbox { padding: 20px 18px 22px; }
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { flex-direction: row; align-items: center; padding: 10px 16px; gap: 8px; border-right: none; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .brand { padding: 0; }
  .menu-btn { display: inline-grid; margin-left: auto; }
  .sidebar nav, .sidebar .quota, .sidebar .who { display: none; width: 100%; }
  .sidebar.open nav, .sidebar.open .quota, .sidebar.open .who { display: flex; }
  .page { padding: 18px 16px 40px; }
  .tiles4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pitem { grid-template-columns: 1fr auto; gap: 10px; }
  .pitem .bars, .pitem .hide-sm { display: none; }
  table.t th, table.t td { padding: 9px 10px; }
  .hide-sm { display: none; }
}
table.t th.right, table.t td.right { text-align: right; }
.public-top .brand { padding: 0; }
/* wide screens: the working area is centred next to the sidebar instead of hugging it */
main .page { margin-left: auto; margin-right: auto; }
main .page.wide { max-width: 1600px; }
