@font-face { font-family: "Poppins"; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --bg: #f2f4f6;
    --surface: #ffffff;
    --surface-2: #f7f8fa;
    --ink: #17202a;
    --ink-2: #3a4452;
    --muted: #687280;
    --line: #dde1e6;
    --line-2: #eceff2;
    --accent: #0d6b72;
    --accent-hover: #0a5a60;
    --accent-soft: #e2f0f1;
    --ok: #1d8a4e;
    --ok-soft: #e4f3ea;
    --warn: #a2650a;
    --warn-soft: #fbf0dc;
    --danger: #bf3a2b;
    --danger-soft: #fbe8e5;
    --info: #2d5ea6;
    --info-soft: #e7eef8;
    --rack: #252c35;
    --rack-rail: #343d48;
    --radius: 10px;
    --radius-sm: 7px;
    --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
    color-scheme: light;
}

*, *::before, *::after{ box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 15px/1.55 "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .5rem; color: var(--ink); line-height: 1.25; }
h1 { font-size: 1.65rem; font-weight: 600; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: .95rem; font-weight: 600; }
p{ margin: 0 0 .75rem; }
a{ color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
a:not([class]):hover { color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .88em; }
.block { display: block; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: .86rem; margin: .6rem 0 0; }
.error { color: var(--danger); font-size: .88rem; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--danger); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.icon-lg { width: 32px; height: 32px; color: var(--muted); }

/* Layout */

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }

.brand { display: flex; align-items: center; gap: .7rem; padding: .2rem .5rem 1.2rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--rack);
    color: #fff;
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .02em;
    box-shadow: inset 0 -3px 0 var(--accent);
}
.brand-text { display: flex; flex-direction: column; font-weight: 600; line-height: 1.2; }
.brand-text small { font-weight: 400; color: var(--muted); font-size: .78rem; }

.menu-check, .menu-button { display: none; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { margin: 1.1rem .65rem .35rem; font-size: .78rem; font-weight: 600; color: var(--muted); }
.nav a {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .5rem .65rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--ink-2);
    font: inherit;
    font-size: .93rem;
    text-align: left;
    cursor: pointer;
}
.nav a .icon { color: var(--muted); }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.nav a.active .icon { color: var(--accent); }

.me { display: flex; align-items: center; gap: .65rem; padding: 0 .5rem .7rem; min-width: 0; }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.me-text strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text .badge { align-self: flex-start; margin-top: .2rem; }

.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    font-size: .85rem;
}

.content { width: 100%; max-width: 1080px; padding: 2rem 2.4rem 4rem; }

.container { width: 100%; max-width: 440px; margin: 0 auto; padding: 4rem 1.25rem; }
.container.narrow { max-width: 420px; }
body.guest { background: var(--bg); }

/* Page header */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .35rem 0 0; }
.head-badges { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .4rem; font-size: .86rem; color: var(--muted); }
.back::before { content: "‹"; font-size: 1.1rem; line-height: 1; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 2.2rem 0 .8rem; }
.section-title h2 { margin: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.section-head h2 { margin: 0; }
.section-head form { margin: 0; }

/* Panels */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.1rem;
}
.card > h2:first-child { margin-bottom: .9rem; }
.card.flush { padding: 0; overflow-x: auto; }
.card.danger { border-color: #efc7c1; }
.card.danger h2 { color: var(--danger); }
.card.danger .check { margin: .5rem 0 1rem; }
.card.empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }
.card.empty p { margin: 0; max-width: 46ch; }
.card.center { text-align: center; }
.narrow-card { max-width: 520px; }
.stack { display: flex; flex-direction: column; gap: 1.1rem; }
.stack > .card { margin-bottom: 0; }
.stack-tight { display: flex; flex-direction: column; gap: .35rem; }
.stack-tight p { margin: 0; }
form.stack + .card, form.stack + form.card, .stack + section.card { margin-top: 1.8rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.grid-2 > .card { margin-bottom: 0; }
.spaced { margin-top: 1rem; display: block; }
.divider { height: 1px; background: var(--line-2); margin: 1.1rem 0; border: 0; }

/* Forms */

label { display: block; }
label:not(.check):not(.switch):not(.machine):not(.type-option):not(.color):not(.segmented label) > span:first-child { display: block; margin-bottom: .35rem; font-size: .88rem; font-weight: 500; color: var(--ink-2); }

input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=datetime-local], select, textarea {
    width: 100%;
    padding: .58rem .75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
    transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: #9aa2ad; }
select {
    appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; flex: none; }

.check { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .93rem; color: var(--ink-2); }
.check span { margin: 0; font-weight: 400; }
.check input:disabled + span { color: var(--muted); }

.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; }
.form-foot > :first-child:not(:only-child) { margin-right: auto; }
.form-foot p { margin: 0; max-width: 60ch; }

.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 .8rem; }
.inline-form input { flex: 1; min-width: 180px; }

.search { position: relative; max-width: 360px; margin-bottom: 1rem; }
.search .icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 2.3rem; }

details.more summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin-top: .4rem; }
details.more summary:hover { color: var(--ink); }

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .55rem .95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, border-color .12s;
}
.button:hover { background: var(--surface-2); border-color: #cdd2d9; text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.danger { color: var(--danger); border-color: #efc7c1; }
.button.danger:hover { background: var(--danger-soft); }
.button.disabled, .button:disabled { opacity: .5; cursor: not-allowed; }
.button .icon { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: .92rem; cursor: pointer; }
.link:hover { text-decoration: none; color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
.danger-link { color: var(--danger); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* Badges and status */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .12rem .5rem;
    border-radius: 5px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}
.badge.ok, .badge.owner { background: var(--ok-soft); border-color: #c6e4d2; color: var(--ok); }
.badge.off { background: var(--danger-soft); border-color: #efc7c1; color: var(--danger); }
.badge.warn { background: var(--warn-soft); border-color: #ecd6ab; color: var(--warn); }
.badge.role-orange { background: #fdeee4; border-color: #f2cfb7; color: #a34d17; }
.badge.role-blue { background: var(--info-soft); border-color: #c9d7ee; color: var(--info); }
.badge.role-green { background: var(--ok-soft); border-color: #c6e4d2; color: var(--ok); }
.badge.role-violet { background: #f1eafb; border-color: #dccbf2; color: #6b3fb0; }
.badge.role-rose { background: #fbe9ef; border-color: #f0c8d6; color: #a52d5a; }
.badge.role-slate { background: #eef1f4; border-color: #d8dde3; color: #4b5563; }

.status { display: inline-flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #b5bcc5; flex: none; }
.status-online { color: var(--ok); }
.status-online i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-offline { color: var(--danger); }
.status-offline i { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.status-unknown i { background: #b5bcc5; }

.from-role { font-size: .76rem; color: var(--info); white-space: nowrap; }

/* Alerts */

.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); margin-bottom: 1.1rem; font-size: .93rem; }
.alert p { margin: 0 0 .3rem; }
.alert p:last-child { margin: 0; }
.alert.success { background: var(--ok-soft); border-color: #c6e4d2; color: #145f37; }
.alert.warning { background: var(--warn-soft); border-color: #ecd6ab; color: #7a4b05; }
.alert.error { background: var(--danger-soft); border-color: #efc7c1; color: #8f2a1f; }
form > .alert { grid-column: 1 / -1; }
.alert.info { background: var(--info-soft); border-color: #c9d7ee; color: #234a84; }
.secret { font-family: var(--mono); font-size: 1.05rem; background: var(--surface); border: 1px dashed var(--line); padding: .5rem .7rem; border-radius: var(--radius-sm); margin: .4rem 0; user-select: all; word-break: break-all; }
.inline-secret { display: inline-block; margin: 0; padding: .2rem .55rem; font-size: .95rem; }

/* Rack (portal services) */

.rack {
    padding: 14px 26px;
    border-radius: 12px;
    background:
        linear-gradient(90deg, var(--rack-rail) 0 14px, transparent 14px calc(100% - 14px), var(--rack-rail) calc(100% - 14px)),
        var(--rack);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.unit {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 1.3rem;
    background: var(--surface);
    border-radius: 6px;
}
.unit::before, .unit::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #c8ced5;
}
.unit::before { left: -17px; }
.unit::after { right: -17px; }
.led { width: 10px; height: 10px; border-radius: 50%; background: #b5bcc5; }
.led.on { background: #26b765; box-shadow: 0 0 0 3px rgba(38, 183, 101, .18), 0 0 8px rgba(38, 183, 101, .6); }
.led.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.unit-body { min-width: 0; }
.unit-body h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.unit-body p { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.unit-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; font-size: .84rem; color: var(--muted); text-align: right; }
.unit .button { min-width: 7.5rem; }
.unit.is-off { opacity: .8; }

.no-access { padding: 2.6rem 1.5rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.no-access h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.no-access p { margin: 0 auto; max-width: 46ch; color: var(--muted); }

.summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.summary a { padding: .9rem 1.1rem; color: var(--ink); border-left: 1px solid var(--line-2); }
.summary a:first-child { border-left: 0; }
.summary a:hover { background: var(--surface-2); text-decoration: none; }
.summary span { display: block; font-size: .8rem; color: var(--muted); }
.summary strong { display: block; font-size: 1.3rem; font-weight: 600; margin-top: .1rem; }
.summary strong small { font-size: .85rem; font-weight: 400; color: var(--muted); }

/* Stats */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1.05rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
a.stat:hover { border-color: #c6ccd3; text-decoration: none; }
.stat-label { font-size: .8rem; color: var(--muted); }
.stat-value { font-size: 1.45rem; font-weight: 600; line-height: 1.25; }
.stat-value small { font-size: .82rem; font-weight: 400; color: var(--muted); }
.stat-value.ok { color: var(--ok); }
.stat-value.warn { color: var(--warn); }
.stat-value.bad { color: var(--danger); }
.small-value { font-size: 1.02rem !important; word-break: break-all; }
.overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.4rem; margin: 0 0 .5rem; font-size: .93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.node-facts { grid-template-columns: max-content 1fr max-content 1fr; margin-top: .4rem; }

.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1.6rem; margin: 1rem 0 .4rem; }
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.usage-item { padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.usage-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .84rem; color: var(--muted); margin-bottom: .4rem; }
.usage-head strong { color: var(--ink); font-weight: 500; }
.meter { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; }
.meter-fill.full { background: var(--danger); }
.p-10 { width: 10%; } .p-20{ width: 20%; } .p-30{ width: 30%; } .p-40{ width: 40%; } .p-50{ width: 50%; } .p-60{ width: 60%; }
.p-70 { width: 70%; } .p-80{ width: 80%; background: var(--warn); } .p-90{ width: 90%; background: var(--warn); } .p-100{ width: 100%; }

.temp-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line-2); }
.temp-row:first-of-type { border-top: 0; }
.temp-bar { flex: 1; max-width: 160px; }

/* Tables and lists */

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-size: .8rem; font-weight: 500; color: var(--muted); padding: .7rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .8rem 1.1rem; border-top: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
.list tbody tr:hover { background: #fafbfc; }
.list td strong + small { display: block; color: var(--muted); }
.row-actions { text-align: right; white-space: nowrap; }
.error-row td { padding-top: 0; border-top: 0; }

.person { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.person > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.person:hover { text-decoration: none; }
.person:hover strong { color: var(--accent); }
.person small { color: var(--muted); }

.service-icons { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.service-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--surface-2); color: #b0b7c0; }
.service-dot .icon { width: 15px; height: 15px; }
.service-dot.on { background: var(--accent-soft); color: var(--accent); }

.device { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.device:first-of-type { border-top: 0; }
.device-name { display: flex; flex-direction: column; gap: .1rem; }
.device-name .badge { align-self: flex-start; }
.device form { margin: 0; }

.history-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--line-2); font-size: .9rem; }
.history-row:first-of-type { border-top: 0; }

.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line-2); color: var(--ink); }
.mini-row:first-child { border-top: 0; }
.mini-row:hover { background: #fafbfc; text-decoration: none; }
.mini-row .grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mini-row .grow small { color: var(--muted); }
.mini-row.flat { padding: .65rem 0; }
.mini-row.flat:hover { background: none; }
.mini-row.flat:hover strong { color: var(--accent); }
.grow { flex: 1; min-width: 0; }

.confirm summary { list-style: none; cursor: pointer; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm[open] form { display: flex; flex-direction: column; align-items: flex-end; gap: .55rem; margin-top: .6rem; }
.confirm summary.link { color: var(--danger); }

/* Permission form */

.services { display: flex; flex-direction: column; gap: 1rem; }
fieldset.service { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; min-width: 0; }
fieldset.service legend {
    float: left;
    width: 100%;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .75rem 1rem;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line-2);
}
fieldset.service legend + * { clear: both; }
fieldset.service > p.muted { padding: .7rem 1rem 0; margin: 0; font-size: .88rem; clear: both; }
.service-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); flex: none; }
.service-icon .icon { width: 16px; height: 16px; }
.legend-title { font-weight: 600; }
.switch { display: flex; align-items: center; gap: .55rem; font-weight: 600; cursor: pointer; flex: 1; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .1rem 1.4rem; padding: .7rem 1rem .9rem; }
.options .check { padding: .35rem 0; align-items: flex-start; }
.options .check input { margin-top: .2rem; }
.options .check .from-role { margin-left: auto; padding-left: .5rem; }
fieldset.service > .segmented, fieldset.service > .scope-picker { margin: .8rem 1rem 1rem; }
.card > fieldset.service:only-child { border: 0; }
.card > fieldset.service:only-child > legend { background: none; padding: 0 0 .6rem; border: 0; }
.card > fieldset.service:only-child > p.muted { padding: 0; }
.card > fieldset.service:only-child > .segmented, .card > fieldset.service:only-child > .scope-picker { margin: .8rem 0 0; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 8px; background: var(--line-2); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: .38rem .85rem; border-radius: 6px; font-size: .88rem; color: var(--ink-2); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(23, 32, 42, .12); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

.scope-picker { display: none; flex-direction: column; gap: 1rem; }
.service:has(input[name=scope_mode][value=selected]:checked) .scope-picker { display: flex; }
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.machine { display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; }
.machine:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.machine-id { color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.machine-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.type-option { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.type-option input { margin-top: .2rem; }
.type-option span { display: flex; flex-direction: column; gap: .15rem; }
.type-option small { color: var(--muted); }
.card:has(input[name=type][value=lxc]:checked) .template-qemu,
.card:has(input[name=type][value=qemu]:checked) .template-lxc { display: none; }

.colors { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }
.colors .label { font-size: .88rem; color: var(--ink-2); font-weight: 500; margin-right: .3rem; }
.color { cursor: pointer; }
.color input { position: absolute; opacity: 0; pointer-events: none; }
.color span { display: block; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--surface); outline: 2px solid transparent; }
.color input:checked + span { outline-color: var(--ink); }
.color input:focus-visible + span { outline-color: var(--accent); }
.color-orange span { background: #d9732f; }
.color-blue span { background: #2d5ea6; }
.color-green span { background: #1d8a4e; }
.color-violet span { background: #7a4cc2; }
.color-rose span { background: #c23d6e; }
.color-slate span { background: #64707e; }

.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.role-card { display: flex; flex-direction: column; gap: .6rem; margin: 0; color: var(--ink); border-left-width: 4px; }
.role-card:hover { text-decoration: none; border-color: #c6ccd3; }
.role-card p { margin: 0; }
.role-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.role-head h2 { margin: 0; }
.role-card.role-orange { border-left-color: #d9732f; }
.role-card.role-blue { border-left-color: #2d5ea6; }
.role-card.role-green { border-left-color: #1d8a4e; }
.role-card.role-violet { border-left-color: #7a4cc2; }
.role-card.role-rose { border-left-color: #c23d6e; }
.role-card.role-slate { border-left-color: #64707e; }

/* Charts */

.ranges { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--line-2); }
.ranges a { padding: .32rem .75rem; border-radius: 6px; color: var(--ink-2); font-size: .84rem; white-space: nowrap; }
.ranges a:hover { color: var(--ink); text-decoration: none; }
.ranges a.active { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(23, 32, 42, .12); }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: .8rem 0; }
.chart-card { margin: 0; padding: .9rem 1rem .6rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); }
.chart-card figcaption { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .5rem; }
.chart-card figcaption strong { font-size: .9rem; font-weight: 600; }
.chart-legend { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; color: var(--muted); }
.legend-item b { color: var(--ink); font-weight: 600; }
.legend-item small { color: var(--muted); }
.legend-item i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: .35rem; background: currentColor; }
.chart { display: block; width: 100%; height: 120px; }
.chart-grid { stroke: rgba(23, 32, 42, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-area { stroke: none; opacity: .12; }
.chart-empty text { fill: var(--muted); font-size: 14px; }
.chart-axis { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: .25rem; }
.c-orange { color: #c9611f; stroke: #c9611f; fill: #c9611f; }
.c-blue { color: #2d5ea6; stroke: #2d5ea6; fill: #2d5ea6; }
.c-green { color: #1d8a4e; stroke: #1d8a4e; fill: #1d8a4e; }
.c-violet { color: #7a4cc2; stroke: #7a4cc2; fill: #7a4cc2; }
.c-rose { color: #c23d6e; stroke: #c23d6e; fill: #c23d6e; }
.legend-item.c-orange, .legend-item.c-blue, .legend-item.c-green, .legend-item.c-violet, .legend-item.c-rose { fill: none; stroke: none; }

/* Status page */

.service-list { display: flex; flex-direction: column; }
.service-row { display: flex; align-items: center; gap: .8rem; padding: .65rem 0; border-top: 1px solid var(--line-2); }
.service-row:first-child { border-top: 0; }
.service-row strong { flex: 1; font-weight: 500; }
.node h2 { display: flex; align-items: center; gap: .5rem; }

/* Monitors */

.monitor-list { display: flex; flex-direction: column; gap: .8rem; }
.monitor { display: flex; flex-direction: column; gap: .75rem; margin: 0; color: var(--ink); }
.monitor:hover { text-decoration: none; border-color: #c6ccd3; }
.monitor-main { display: flex; align-items: center; gap: .8rem; }
.monitor-main .grow { display: flex; flex-direction: column; }
.beats { display: flex; gap: 3px; height: 24px; }
.beat { flex: 1; max-width: 9px; border-radius: 3px; background: var(--line-2); }
.beat.up { background: #5cc08a; }
.beat.down { background: var(--danger); }
.monitor-stats { display: flex; gap: 2rem; flex-wrap: wrap; font-size: .9rem; }
.monitor-stats span { display: flex; flex-direction: column; }
.monitor-stats small { color: var(--muted); font-size: .78rem; }

/* VPN */

.vpn-options { display: grid; gap: .9rem; margin-top: .8rem; max-width: 520px; }
.vpn-options .custom-dns { display: none; }
.vpn-options:has(select[name=dns] option[value=custom]:checked) .custom-dns { display: block; }
pre.config { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem; font-family: var(--mono); font-size: .8rem; overflow-x: auto; white-space: pre; user-select: all; }
.qr { display: flex; justify-content: center; padding: .6rem; }
.qr svg { width: 240px; height: 240px; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--line); }
.credentials { border-color: #c9d7ee; }

/* Auth pages */

.auth-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.6rem; color: var(--ink); font-weight: 600; }
.auth-brand:hover { text-decoration: none; }
body.guest .card { padding: 1.8rem; }
body.guest h1 { font-size: 1.4rem; }
.or { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; color: var(--muted); font-size: .84rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { margin-top: 1.2rem; text-align: center; font-size: .9rem; color: var(--muted); }

.pager { display: flex; gap: .3rem; justify-content: center; margin-top: 1rem; }

/* Mobile */

@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .summary a:nth-child(4) { border-left: 0; }
    .summary a:nth-child(n+4) { border-top: 1px solid var(--line-2); }
    .node-facts { grid-template-columns: max-content 1fr; }
}

@media (max-width: 760px) {
    body { font-size: 15px; }
    .shell { grid-template-columns: 1fr; }
    
    .brand { padding: 0; }
    .menu-button {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        padding: .45rem .8rem;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        font-size: .9rem;
        font-weight: 500;
        cursor: pointer;
        background: var(--surface);
    }
    .nav { display: none; grid-column: 1 / -1; }
    .menu-check:checked ~ .nav { display: flex; }
    .menu-check:checked ~ .nav { padding-top: .6rem; }
    .content { padding: 1.3rem 1rem 3rem; }
    h1 { font-size: 1.35rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary a { border-left: 0; border-top: 1px solid var(--line-2); }
    .summary a:nth-child(-n+2) { border-top: 0; }
    .summary a:nth-child(even) { border-left: 1px solid var(--line-2); }
    .stat-grid, .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .stat-value { font-size: 1.2rem; }
    .card { padding: 1.1rem; }
    .rack { padding: 10px 18px; }
    .unit { grid-template-columns: auto minmax(0, 1fr); gap: .6rem .9rem; padding: .9rem 1rem; }
    .unit::before { left: -13px; }
    .unit::after { right: -13px; }
    .unit-meta { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; gap: .5rem; }
    .unit .button { grid-column: 1 / -1; width: 100%; }
    .page-head .actions, .page-head > .button { width: 100%; }
    .page-head .actions .button, .page-head > .button { flex: 1; }
    .ranges { width: 100%; }
    .ranges a { flex: 1; text-align: center; padding: .35rem .2rem; font-size: .78rem; }
    .charts { grid-template-columns: 1fr; }
    .list th:nth-child(3), .list td:nth-child(3), .list th:nth-child(4), .list td:nth-child(4) { display: none; }
    th, td { padding: .7rem .8rem; }
    .history-row { grid-template-columns: 70px minmax(0, 1fr); }
    .history-row > :last-child { grid-column: 2; }
    .options { grid-template-columns: 1fr; }
    .monitor-stats { gap: 1rem; }
    .inline-form input { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *{ transition: none !important; }
}
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.button.block { display: flex; width: 100%; }
@media (max-width: 760px) { .summary a:last-child:nth-child(odd){ grid-column: 1 / -1; border-left: 0; } }

/* Search and palette */

kbd { display: inline-block; padding: .05rem .35rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--muted); font: 500 .72rem/1.4 var(--mono); }
.nav a .count { margin-left: auto; min-width: 20px; padding: 0 .4rem; border-radius: 10px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 600; text-align: center; line-height: 20px; }

.palette { width: min(560px, calc(100vw - 2rem)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgba(10, 15, 20, .25); }
.palette::backdrop { background: rgba(15, 20, 26, .45); }
.palette form { margin: 0; }
.palette input[type=search] { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem; font-size: 1rem; box-shadow: none; }
.palette ul { list-style: none; margin: 0; padding: .4rem; max-height: 50vh; overflow-y: auto; }
.palette ul:empty { display: none; }
.palette li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 .8rem; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--ink); }
.palette li a small { grid-column: 1; color: var(--muted); }
.palette li a .badge { grid-row: 1 / span 2; grid-column: 2; }
.palette li a.active, .palette li a:hover { background: var(--accent-soft); text-decoration: none; }
.palette-foot { margin: 0; padding: .55rem 1rem; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .78rem; }

/* New pieces */

input[type=time], input[type=date], input[type=url], input[type=file] {
    width: 100%;
    padding: .55rem .75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
}
input[type=time] { width: auto; }
.narrow-input { max-width: 110px; flex: none !important; min-width: 0 !important; }
.input-suffix { display: flex; flex: 1; min-width: 220px; }
.input-suffix input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; min-width: 0 !important; }
.input-suffix span { display: flex; align-items: center; padding: 0 .7rem; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); font-size: .9rem; white-space: nowrap; }

.days { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.day { position: relative; cursor: pointer; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day span { display: inline-block; min-width: 46px; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; font-size: .86rem; color: var(--ink-2); }
.day input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { display: flex; flex-direction: column; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.chip small { color: var(--muted); }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.active { border-color: var(--accent); background: var(--accent-soft); }

.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: .8rem; align-items: end; }
.filters-actions { display: flex; gap: .5rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat-row span { display: flex; flex-direction: column; padding: .7rem .8rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); }
.stat-row small { color: var(--muted); font-size: .8rem; }
.stat-row b { font-size: 1.2rem; font-weight: 600; }

.scroll-x { overflow-x: auto; margin: 0 -.2rem; }
fieldset.plain { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
fieldset.plain legend { padding: 0; margin-bottom: .45rem; font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.notice-link { display: flex; flex-wrap: wrap; gap: .3rem 1rem; text-decoration: none; }
.notice-link:hover { text-decoration: none; filter: brightness(.98); }
form:has(input[name=template_id]:checked:not([value=""])) .custom-request { display: none; }
.no-access .button { margin-top: .6rem; }

@media (max-width: 900px) {
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters-actions { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    
    
    
    .list.keep th, .list.keep td { display: table-cell; }
    .palette { margin-top: 1rem; }
}

/* Dark theme */

:root[data-theme=dark] {
    --bg: #12171d;
    --surface: #1a2027;
    --surface-2: #212830;
    --ink: #e6eaee;
    --ink-2: #c3cad2;
    --muted: #8d97a3;
    --line: #2d3540;
    --line-2: #262d36;
    --accent: #3fb3ba;
    --accent-hover: #5cc3c9;
    --accent-soft: #173a3d;
    --ok: #4cc584;
    --ok-soft: #173326;
    --warn: #e0a84a;
    --warn-soft: #3a2d15;
    --danger: #ef7a6c;
    --danger-soft: #3d1f1b;
    --info: #79a6ea;
    --info-soft: #1b2a40;
    --rack: #0d1115;
    --rack-rail: #20262e;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme=system] {
        --bg: #12171d;
        --surface: #1a2027;
        --surface-2: #212830;
        --ink: #e6eaee;
        --ink-2: #c3cad2;
        --muted: #8d97a3;
        --line: #2d3540;
        --line-2: #262d36;
        --accent: #3fb3ba;
        --accent-hover: #5cc3c9;
        --accent-soft: #173a3d;
        --ok: #4cc584;
        --ok-soft: #173326;
        --warn: #e0a84a;
        --warn-soft: #3a2d15;
        --danger: #ef7a6c;
        --danger-soft: #3d1f1b;
        --info: #79a6ea;
        --info-soft: #1b2a40;
        --rack: #0d1115;
        --rack-rail: #20262e;
        color-scheme: dark;
    }
}

:root[data-theme=dark] .list tbody tr:hover, :root[data-theme=dark] .mini-row:hover { background: var(--surface-2); }
:root[data-theme=dark] input::placeholder { color: #66717d; }
:root[data-theme=dark] .button:hover { border-color: var(--line); }
:root[data-theme=dark] .card.danger, :root[data-theme=dark] .button.danger, :root[data-theme=dark] .badge.off, :root[data-theme=dark] .alert.error { border-color: #5a2b25; }
:root[data-theme=dark] .badge.ok, :root[data-theme=dark] .badge.owner, :root[data-theme=dark] .badge.role-green, :root[data-theme=dark] .alert.success { border-color: #255238; }
:root[data-theme=dark] .badge.warn, :root[data-theme=dark] .alert.warning { border-color: #5a4520; }
:root[data-theme=dark] .badge.role-blue, :root[data-theme=dark] .alert.info, :root[data-theme=dark] .credentials { border-color: #2b4266; }
:root[data-theme=dark] .alert.success { color: #8fdcb1; }
:root[data-theme=dark] .alert.warning { color: #f0c987; }
:root[data-theme=dark] .alert.error { color: #f6a99f; }
:root[data-theme=dark] .alert.info { color: #a9c6f2; }
:root[data-theme=dark] .badge.role-orange { background: #3a2617; border-color: #5c3a20; color: #f0a46b; }
:root[data-theme=dark] .badge.role-violet { background: #2b2140; border-color: #45346a; color: #b99bf0; }
:root[data-theme=dark] .badge.role-rose { background: #3a1c28; border-color: #5d2c40; color: #f08bb0; }
:root[data-theme=dark] .badge.role-slate { background: #252c34; border-color: #36404b; color: #b3bdc8; }
:root[data-theme=dark] .status i, :root[data-theme=dark] .status-unknown i, :root[data-theme=dark] .led { background: #4a5460; }
:root[data-theme=dark] .led.on { background: #26b765; }
:root[data-theme=dark] .service-dot { color: #5d6875; }
:root[data-theme=dark] .chart-grid { stroke: rgba(230, 234, 238, .08); }
:root[data-theme=dark] .segmented input:checked + span, :root[data-theme=dark] .ranges a.active { box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
:root[data-theme=dark] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d97a3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme=dark] a.stat:hover, :root[data-theme=dark] .role-card:hover, :root[data-theme=dark] .monitor:hover { border-color: #3a4450; }

@media (prefers-color-scheme: dark) {
    :root[data-theme=system] .list tbody tr:hover, :root[data-theme=system] .mini-row:hover { background: var(--surface-2); }
    :root[data-theme=system] input::placeholder { color: #66717d; }
    :root[data-theme=system] .button:hover { border-color: var(--line); }
    :root[data-theme=system] .card.danger, :root[data-theme=system] .button.danger, :root[data-theme=system] .badge.off, :root[data-theme=system] .alert.error { border-color: #5a2b25; }
    :root[data-theme=system] .badge.ok, :root[data-theme=system] .badge.owner, :root[data-theme=system] .badge.role-green, :root[data-theme=system] .alert.success { border-color: #255238; }
    :root[data-theme=system] .badge.warn, :root[data-theme=system] .alert.warning { border-color: #5a4520; }
    :root[data-theme=system] .badge.role-blue, :root[data-theme=system] .alert.info, :root[data-theme=system] .credentials { border-color: #2b4266; }
    :root[data-theme=system] .alert.success { color: #8fdcb1; }
    :root[data-theme=system] .alert.warning { color: #f0c987; }
    :root[data-theme=system] .alert.error { color: #f6a99f; }
    :root[data-theme=system] .alert.info { color: #a9c6f2; }
    :root[data-theme=system] .badge.role-orange { background: #3a2617; border-color: #5c3a20; color: #f0a46b; }
    :root[data-theme=system] .badge.role-violet { background: #2b2140; border-color: #45346a; color: #b99bf0; }
    :root[data-theme=system] .badge.role-rose { background: #3a1c28; border-color: #5d2c40; color: #f08bb0; }
    :root[data-theme=system] .badge.role-slate { background: #252c34; border-color: #36404b; color: #b3bdc8; }
    :root[data-theme=system] .status i, :root[data-theme=system] .status-unknown i, :root[data-theme=system] .led { background: #4a5460; }
    :root[data-theme=system] .led.on { background: #26b765; }
    :root[data-theme=system] .service-dot { color: #5d6875; }
    :root[data-theme=system] .chart-grid { stroke: rgba(230, 234, 238, .08); }
    :root[data-theme=system] .segmented input:checked + span, :root[data-theme=system] .ranges a.active { box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
    :root[data-theme=system] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d97a3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
    :root[data-theme=system] a.stat:hover, :root[data-theme=system] .role-card:hover, :root[data-theme=system] .monitor:hover { border-color: #3a4450; }
}

/* Structure: dark rail, areas and tabs */

.area-tabs { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; margin: -.4rem 0 1.4rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.area-name { margin-right: .7rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.area-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .75rem; border-radius: var(--radius-sm); color: var(--ink-2); font-size: .9rem; }
.area-tabs a:hover { background: var(--surface-2); text-decoration: none; }
.area-tabs a.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.area-tabs .count { min-width: 18px; padding: 0 .35rem; border-radius: 9px; background: var(--accent); color: #fff; font-size: .72rem; text-align: center; line-height: 18px; }
.crumb { margin: 0 0 .15rem; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.terminal { border: 1px solid #0e1216; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 8px 24px rgba(10, 15, 20, .18); }
.terminal iframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 420px; border: 0; background: #000; }
.terminal.screen iframe { height: calc(100vh - 210px); }

@media (max-width: 760px) {
    .area-tabs { margin-top: 0; overflow-x: auto; flex-wrap: nowrap; }
    .area-tabs a { white-space: nowrap; }
    .area-name { display: none; }
    .terminal iframe { height: 70vh; min-height: 320px; }
}

/* ===== Control room design ===== */

:root, :root[data-theme=light] {
    --bg: #eef1f4;
    --surface: #ffffff;
    --surface-2: #f5f7f9;
    --ink: #121820;
    --ink-2: #344050;
    --muted: #6b7684;
    --line: #dce1e7;
    --line-2: #e9edf1;
    --accent: #0b7a80;
    --accent-hover: #09656a;
    --accent-soft: #dcf0f0;
    --rail: #0b0e12;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 32, .06);
    color-scheme: light;
}

:root[data-theme=dark] {
    --bg: #0b0e12;
    --surface: #11161c;
    --surface-2: #171d24;
    --ink: #e6ebf0;
    --ink-2: #c1cad4;
    --muted: #7f8b98;
    --line: #222a33;
    --line-2: #1b222a;
    --accent: #3cc8bf;
    --accent-hover: #5fd6ce;
    --accent-soft: rgba(60, 200, 191, .12);
    --ok: #3ccf7f;
    --ok-soft: rgba(60, 207, 127, .12);
    --warn: #e8b04b;
    --warn-soft: rgba(232, 176, 75, .12);
    --danger: #f0705f;
    --danger-soft: rgba(240, 112, 95, .12);
    --info: #6fa3ef;
    --info-soft: rgba(111, 163, 239, .12);
    --rail: #07090c;
    --rack: #07090c;
    --shadow: none;
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme=system] {
        --bg: #0b0e12;
        --surface: #11161c;
        --surface-2: #171d24;
        --ink: #e6ebf0;
        --ink-2: #c1cad4;
        --muted: #7f8b98;
        --line: #222a33;
        --line-2: #1b222a;
        --accent: #3cc8bf;
        --accent-hover: #5fd6ce;
        --accent-soft: rgba(60, 200, 191, .12);
        --rail: #07090c;
        --shadow: none;
        color-scheme: dark;
    }
}

body { background: var(--bg); color: var(--ink); font-size: 14.5px; }
h1 { font-size: 1.45rem; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1rem; font-weight: 600; }

.shell { grid-template-columns: 236px minmax(0, 1fr); }

.content { padding: 0 2rem 3rem; max-width: 1480px; }

.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--ink); border-color: var(--muted); }

.area-tabs { margin: -.3rem 0 1.3rem; }

.page-head { margin-bottom: 1.3rem; align-items: flex-end; }
.page-head h1 { margin: 0; }

.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.button { border-radius: var(--radius-sm); font-size: .88rem; padding: .48rem .85rem; background: var(--surface); border-color: var(--line); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme=dark] .button.primary { color: #062320; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.small { padding: .3rem .65rem; font-size: .82rem; }
.button .icon { width: 16px; height: 16px; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.kpi:hover { border-color: var(--accent); text-decoration: none; }
.kpi-label { font-size: .74rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font: 600 1.6rem/1.1 var(--mono); letter-spacing: -.02em; }
.kpi-value small { font-size: .9rem; color: var(--muted); font-weight: 500; margin-left: .1rem; }
.kpi-value.kpi-text { font-size: 1.1rem; padding-top: .35rem; }
.kpi-value.warn { color: var(--warn); }
.kpi-value.bad { color: var(--danger); }

meter.bar { display: block; width: 100%; height: 6px; border: 0; border-radius: 3px; background: var(--line-2); appearance: none; -webkit-appearance: none; }
meter.bar::-webkit-meter-bar { background: var(--line-2); border: 0; border-radius: 3px; height: 6px; }
meter.bar::-webkit-meter-optimum-value { background: var(--accent); border-radius: 3px; }
meter.bar::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 3px; }
meter.bar::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 3px; }
meter.bar::-moz-meter-bar { background: var(--accent); border-radius: 3px; }
meter.bar:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn); }
meter.bar:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }

.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: 1 / -1; }
.panel { padding: 1rem 1.1rem; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.1rem 0 .8rem; }
.panel-head h2 { margin: 0; font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.panel-head h2 small { margin-left: .35rem; font-family: var(--mono); }
.panel-head a { font-size: .84rem; }
.flush-panel { padding: 1rem 0 .3rem; }
.flush-panel .panel-head { padding: 0 1.1rem; }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); vertical-align: middle; margin-right: .45rem; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

.node-row { padding: .75rem 0; border-top: 1px solid var(--line-2); }
.node-row:first-of-type { border-top: 0; padding-top: 0; }
.node-name { display: flex; align-items: center; gap: .1rem .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.node-name strong { font-family: var(--mono); }
.gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.gauge { display: flex; flex-direction: column; gap: .35rem; }
.gauge span { display: flex; justify-content: space-between; gap: .5rem; font-size: .76rem; color: var(--muted); }
.gauge b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.node-cpu { margin: .55rem 0 0; }

.service-row { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--line-2); color: var(--ink); }
.service-row:first-of-type { border-top: 0; padding-top: 0; }
a.service-row:hover { text-decoration: none; }
a.service-row:hover strong { color: var(--accent); }
.service-row .grow { display: flex; flex-direction: column; min-width: 0; }
.service-row small { font-size: .8rem; }

.feed-row { display: flex; gap: .7rem; padding: .45rem 0; border-top: 1px solid var(--line-2); }
.feed-row:first-of-type { border-top: 0; padding-top: 0; }

.grid-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.grid-table th { padding: .5rem 1.1rem; text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.grid-table td { padding: .65rem 1.1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table tbody tr:hover { background: var(--surface-2); }
.grid-table td small { margin-left: .35rem; }
.cell-bar { min-width: 150px; }
.cell-bar meter { margin-top: .3rem; }

.machine-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.machine-card { display: flex; flex-direction: column; gap: .45rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); }
.machine-card:hover { border-color: var(--accent); text-decoration: none; }
.machine-card-head { display: flex; align-items: center; }
.machine-card-specs { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.machine-card-specs b { color: var(--ink); font-family: var(--mono); font-weight: 500; }

.list th { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.badge { border-radius: 5px; font-size: .74rem; }
.alert { border-radius: var(--radius); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=datetime-local], input[type=time], input[type=date], input[type=url], input[type=file], select, textarea { background: var(--surface); border-color: var(--line); color: var(--ink); border-radius: var(--radius-sm); }
:root[data-theme=dark] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8b98' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

body.guest { background: radial-gradient(1200px 600px at 50% -10%, rgba(60, 200, 191, .12), transparent 60%), var(--bg); }

@media (max-width: 1200px) {
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .span-7, .span-5 { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .span-4 { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .content { padding: 0 1rem 3rem; }
    
    
    
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .gauges { grid-template-columns: 1fr; gap: .6rem; }
    .kpi-value { font-size: 1.35rem; }
    .grid-table th:nth-child(2), .grid-table td:nth-child(2), .grid-table th:nth-child(5), .grid-table td:nth-child(5) { display: none; }
}

/* ===== Top navigation layout ===== */

body:not(.guest) { display: block; }

.appbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.appbar-inner { display: flex; align-items: center; gap: 1rem; max-width: 1320px; height: 60px; margin: 0 auto; padding: 0 1.5rem; }
.appbar .brand { padding: 0; gap: .6rem; color: var(--ink); flex: none; }
.appbar .brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--rail); color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.appbar .brand-text { font-weight: 600; font-size: .95rem; }
.appbar .menu-check, .appbar .menu-button { display: none; }

.topnav { display: flex; align-items: center; gap: .15rem; flex: 1; min-width: 0; }
.topnav-link { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .75rem; border-radius: 8px; color: var(--ink-2); font-size: .92rem; font-weight: 500; cursor: pointer; list-style: none; white-space: nowrap; }
.topnav-link::-webkit-details-marker { display: none; }
.topnav-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.topnav-link.active { color: var(--accent); background: var(--accent-soft); }
.topnav-cta { margin-left: auto; background: var(--accent); color: #fff; }
.topnav-cta:hover { background: var(--accent); color: #fff; filter: brightness(1.08); }
.topnav-cta .icon { width: 15px; height: 15px; }
.topnav-link .chevron { width: 14px; height: 14px; opacity: .6; transition: transform .15s; }
.topnav-menu { position: relative; }
.topnav-menu[open] > summary .chevron { transform: rotate(180deg); }
.topnav-dropdown { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; display: flex; flex-direction: column; gap: 1px; min-width: 230px; padding: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(8, 12, 16, .18); }
.topnav-dropdown.right { left: auto; right: 0; }
.topnav-dropdown a, .topnav-dropdown button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: .92rem; text-align: left; cursor: pointer; }
.topnav-dropdown a .icon, .topnav-dropdown button .icon { width: 17px; height: 17px; color: var(--muted); }
.topnav-dropdown a:hover, .topnav-dropdown button:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.topnav-dropdown a.active { background: var(--accent-soft); color: var(--accent); }
.topnav-dropdown a.active .icon { color: var(--accent); }
.topnav-dropdown form { margin: 0; }
.topnav-dropdown .nav-external { width: 13px; height: 13px; margin-left: auto; }
.topnav .count, .subnav .count, .topnav-dropdown .count { min-width: 18px; padding: 0 .35rem; border-radius: 9px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 600; text-align: center; line-height: 18px; }
:root[data-theme=dark] .topnav .count, :root[data-theme=dark] .subnav .count, :root[data-theme=dark] .topnav-dropdown .count { color: #062320; }
.topnav-dropdown .count { margin-left: auto; }

.appbar-tools { display: flex; align-items: center; gap: .5rem; flex: none; }
.appbar-tools form { margin: 0; }

.me-summary { list-style: none; cursor: pointer; }
.me-summary::-webkit-details-marker { display: none; }
.me-summary .avatar { width: 34px; height: 34px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.me-head { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; margin: 0 0 .3rem; padding: .5rem .7rem .7rem; border-bottom: 1px solid var(--line-2); }
.me-head small { font-size: .8rem; }

.subnav { border-top: 1px solid var(--line-2); }
.subnav-inner { display: flex; gap: 1.4rem; max-width: 1320px; margin: 0 auto; padding: 0 1.5rem; overflow-x: auto; }
.subnav a { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem 0 .6rem; border-bottom: 2px solid transparent; color: var(--muted); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.active { color: var(--ink); border-bottom-color: var(--accent); }

.page { max-width: 1320px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page .page-head { margin-bottom: 1.6rem; }
.page h1 { font-size: 1.7rem; }
.page .card, .page .panel { border-radius: 14px; }
.page .panel { padding: 1.2rem 1.3rem; }
.page .kpi { border-radius: 14px; padding: 1.1rem 1.2rem; }
.page .kpi-value { font-size: 1.9rem; }
.page .board { gap: 1.1rem; }
.terminal iframe { height: calc(100vh - 260px); }

@media (max-width: 900px) {
    .appbar-inner { flex-wrap: wrap; height: auto; padding: .6rem 1rem; gap: .6rem; }
    .appbar .menu-button { display: grid; place-items: center; order: 3; width: 36px; height: 36px; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
    .appbar-tools { order: 2; margin-left: auto; }
    
    .topnav { order: 4; display: none; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: .4rem 0 .6rem; }
    .menu-check:checked ~ .topnav { display: flex; }
    .topnav-link { justify-content: space-between; padding: .6rem .7rem; }
    .topnav-cta { margin: .4rem 0 0; justify-content: center; }
    .topnav-dropdown { position: static; min-width: 0; margin: 2px 0 6px .6rem; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; padding: 0 0 0 .4rem; }
    .topnav-dropdown.right { position: absolute; top: calc(100% + 8px); right: 0; min-width: 230px; margin: 0; padding: .4rem; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(8, 12, 16, .18); }
    .subnav-inner { padding: 0 1rem; gap: 1.1rem; }
    .page { padding: 1.3rem 1rem 3rem; }
    .page h1 { font-size: 1.4rem; }
}

.terminal.vnc { position: relative; height: calc(100vh - 260px); min-height: 420px; display: flex; align-items: center; justify-content: center; }
.terminal.vnc:fullscreen { height: 100vh; border-radius: 0; }
.terminal.vnc > div { width: 100%; height: 100%; }
.console-error { color: #f0a49a; font-family: var(--mono); font-size: .9rem; padding: 1rem; }
.console-state { align-self: center; }
.rule-form { display: grid; grid-template-columns: 120px 140px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: .5rem; margin: .8rem 0; }
.narrow-select { width: auto; flex: none; }
@media (max-width: 900px) { .rule-form{ grid-template-columns: 1fr 1fr; } }

body.desktop-view { display: flex; flex-direction: column; height: 100vh; margin: 0; background: #000; color: #e6ebf0; overflow: hidden; }
.desktop-bar { display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem; background: #0b0e12; border-bottom: 1px solid #1b222a; font-size: .88rem; }
.desktop-bar .grow { flex: 1; }
.desktop-bar .button { background: #171d24; border-color: #2a323c; color: #e6ebf0; }
.desktop-screen { flex: 1; min-height: 0; height: calc(100vh - 46px); background: #000; }
.desktop-screen:fullscreen { height: 100vh; }
.desktop-screen > div { width: 100%; height: 100%; }

.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1.2rem; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.tabs a { padding: .5rem .9rem; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.tabs a.active { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 760px) { .tabs{ flex-wrap: nowrap; overflow-x: auto; } }

/* ===== Polished components ===== */

.button, input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=datetime-local], input[type=time], input[type=date], input[type=url], select { min-height: 36px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=time], input[type=date], input[type=url], select { padding-top: .42rem; padding-bottom: .42rem; font-size: .92rem; }
.button { gap: .4rem; font-weight: 500; }
.button.small { min-height: 30px; }
.button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button.ghost:hover { background: var(--surface-2); color: var(--ink); }
.button.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.button.danger-solid:hover { filter: brightness(1.06); background: var(--danger); }
.button.icon-only { padding: 0; width: 36px; }
:root[data-theme=dark] .button.danger-solid { color: #1a0906; }
.inline-form { align-items: center; margin: 0; }
.inline-form .check { white-space: nowrap; }
.actions .inline-form { flex: 1; }

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.card-head p { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; max-width: 68ch; }
.card-head > .actions, .card-head > form, .card-head > .badge { flex: none; }
.card-head form { margin: 0; }
.card > :last-child { margin-bottom: 0; }

.setting-list { display: flex; flex-direction: column; margin: 0 -1.5rem; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: .95rem 1.5rem; border-top: 1px solid var(--line-2); }
.setting:first-child { border-top: 0; padding-top: .2rem; }
.setting:last-child { padding-bottom: .2rem; }
.setting-text { min-width: 0; }
.setting-text strong { display: block; font-weight: 500; }
.setting-text p, .setting-text small { display: block; margin: .15rem 0 0; color: var(--muted); font-size: .86rem; max-width: 62ch; }
.setting > form, .setting > .actions, .setting > details { flex: none; margin: 0; }
.setting > form.inline-form { flex: none; flex-wrap: nowrap; }
.setting.is-danger .setting-text strong { color: var(--danger); }

.toggle { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 500; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.toggle i { position: relative; flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line); transition: background .15s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle input:disabled + i { opacity: .55; }

details.menu, details.confirm { position: relative; }
details.menu > summary, details.confirm > summary { list-style: none; }
details.menu > summary::-webkit-details-marker, details.confirm > summary::-webkit-details-marker { display: none; }
.menu-panel, details.confirm > form, details.confirm > .menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: max-content;
    min-width: 220px;
    max-width: min(340px, 90vw);
    padding: .8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(8, 12, 16, .18);
    text-align: left;
}
.confirm[open] form { align-items: stretch; margin-top: 0; }
details.confirm > form p { margin: 0; font-size: .86rem; color: var(--muted); white-space: normal; }
details.confirm > form .button { width: 100%; }
.menu-panel.list { gap: 1px; padding: .35rem; }
.menu-panel.list form { margin: 0; }
.menu-panel.list button, .menu-panel.list a { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .65rem; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.menu-panel.list button:hover, .menu-panel.list a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.menu-panel.list .danger-item { color: var(--danger); }
.menu-panel.list .danger-item:hover { background: var(--danger-soft); color: var(--danger); }
.menu-panel.list button:disabled { opacity: .45; cursor: not-allowed; background: none; }

.item-list { display: flex; flex-direction: column; margin: 0 -1.5rem; }
.item { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.5rem; border-top: 1px solid var(--line-2); min-height: 56px; }
.item:first-child { border-top: 0; }
.item-main { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.item-main strong { font-weight: 500; overflow-wrap: anywhere; }
.item-main small { color: var(--muted); font-size: .82rem; }
.item-actions { display: flex; align-items: center; gap: .4rem; flex: none; }
.item-actions form { margin: 0; }
.empty-note { margin: 0; padding: 1.2rem 0 .3rem; color: var(--muted); font-size: .9rem; text-align: center; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; padding: .7rem; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.toolbar input[type=text], .toolbar input[type=number], .toolbar select { flex: 1; min-width: 140px; width: auto; }
.toolbar .narrow { flex: 0 0 110px; min-width: 0; }
.toolbar .input-suffix { flex: 2; min-width: 220px; }

.machine-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.machine-title { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.machine-title h1 { margin: 0; }
.machine-meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .45rem 0 0; color: var(--muted); font-size: .88rem; }
.machine-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.machine-meta b { color: var(--ink-2); font-weight: 500; }
.machine-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.machine-actions form { margin: 0; }
.machine-actions .sep { width: 1px; height: 24px; background: var(--line); margin: 0 .2rem; }

.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .22rem .7rem .22rem .6rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: .8rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.pill.off { color: var(--muted); }
.pill.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.pill.bad { color: var(--danger); background: var(--danger-soft); border-color: transparent; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.1rem; }
.tile { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.tile-label { font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tile-value { font: 600 1.35rem/1.15 var(--mono); letter-spacing: -.01em; overflow-wrap: anywhere; }
.tile-value small { font-size: .82rem; font-weight: 500; color: var(--muted); }
.tile-value.text { font-family: inherit; font-size: 1rem; font-weight: 500; }
.tile .meter { margin-top: auto; }
.tile .badge { align-self: flex-start; }

.tabs { gap: .2rem; padding: .25rem; border-radius: 12px; overflow-x: auto; flex-wrap: nowrap; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .48rem .85rem; }
.tabs a .icon { width: 16px; height: 16px; }

.danger-card { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-card .card-head h2 { color: var(--danger); }

.form-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; margin: 0 -.2rem; padding: .8rem 1rem; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -6px 20px rgba(8, 12, 16, .08); }
.form-bar p { margin: 0 auto 0 0; color: var(--muted); font-size: .86rem; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.perm { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.perm:has(.perm-head input:checked) { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.perm-head { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; }
.perm-head .service-icon { width: 32px; height: 32px; border-radius: 8px; }
.perm-title { flex: 1; min-width: 0; }
.perm-title strong { display: block; font-weight: 600; font-size: .93rem; }
.perm-title small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.perm-options { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .9rem .75rem; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.perm-options .check { padding: .25rem 0; font-size: .88rem; align-items: flex-start; }
.perm-options .check input { margin-top: .2rem; }
.perm-options .from-role { margin-left: auto; padding-left: .5rem; }
.perm:not(:has(.perm-head input:checked)) .perm-options { opacity: .75; }

.section-label { margin: 1.6rem 0 .7rem; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.section-label:first-child { margin-top: 0; }

@media (max-width: 760px) {
    .setting { flex-direction: column; align-items: stretch; gap: .7rem; }
    .setting > form.inline-form { flex-wrap: wrap; }
    .setting-list, .item-list { margin: 0 -1.1rem; }
    .setting, .item { padding-left: 1.1rem; padding-right: 1.1rem; }
    .item { flex-wrap: wrap; }
    .machine-actions { width: 100%; }
    .machine-actions .button { flex: 1; }
    .machine-actions .sep { display: none; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-panel, details.confirm > form { right: auto; left: 0; }
    .setting details.confirm > form, .item details.confirm > form { left: auto; right: 0; }
}
.panel-box { padding: 1rem 1.1rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); gap: .8rem; }
.panel-box h3 { margin: 0; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.form-row small { max-width: 52ch; }
.form-row .button { flex: none; }
.toolbar .days { margin: 0; }
.toolbar input[type=time] { flex: 0 0 auto; width: auto; }
.spaced-check { margin-top: .55rem; font-size: .86rem; }
.machine-head .back { margin-bottom: .5rem; }
details.confirm > form label > span:first-child { font-size: .84rem; }
@media (max-width: 760px) { .form-row{ flex-direction: column; align-items: stretch; } }
select {
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7684' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    background-size: 12px;
    padding-right: 2.1rem;
}
:root[data-theme=dark] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f8b98' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.toolbar select, .inline-form select { background-color: var(--surface); }
.toolbar .day span { display: grid; place-items: center; min-height: 36px; padding: 0 .55rem; background: var(--surface); }
.toolbar .day input:checked + span { background: var(--accent-soft); }
@media (max-width: 760px) {
    .machine-actions form { flex: 1; }
    .machine-actions form .button { width: 100%; }
    .machine-actions details .button { flex: none; }
}
@media (max-width: 760px) {
    details.confirm > form, .setting details.confirm > form, .item details.confirm > form { position: static; width: 100%; max-width: none; margin-top: .6rem; box-shadow: none; }
    .item-actions:has(details.confirm[open]) { flex-wrap: wrap; width: 100%; }
}
.perm-wide { grid-column: 1 / -1; }
.perm-wide .perm-options { opacity: 1 !important; }
.perm-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .1rem 1.4rem; }
.perm-head { cursor: pointer; }
.perm-wide .perm-head { cursor: default; }
.role-row { max-width: 360px; }
.narrow-field { max-width: 360px; }
.narrow-field small { display: block; margin-top: .35rem; }
.avatar-lg { width: 40px; height: 40px; font-size: 1rem; background: var(--accent-soft); color: var(--accent); }
a.item-link { color: var(--ink); }
a.item-link:hover { background: var(--surface-2); text-decoration: none; }
a.item-link:hover strong { color: var(--accent); }
.item-arrow { color: var(--muted); width: 16px; height: 16px; }
.item .service-icon { width: 34px; height: 34px; border-radius: 9px; }
.card-head + .device, .card-head + .hint { border-top: 0; padding-top: 0; }

.attention { margin-bottom: 1.2rem; }
.attention-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .7rem; }
.attention-item { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--surface); color: var(--ink); }
.attention-item:hover { text-decoration: none; background: var(--surface-2); }
.attention-item > .icon { width: 20px; height: 20px; flex: none; }
.attention-item span { display: flex; flex-direction: column; min-width: 0; }
.attention-item strong { font-weight: 600; }
.attention-item small { color: var(--muted); font-size: .82rem; }
.attention-item.bad { border-left-color: var(--danger); }
.attention-item.bad > .icon { color: var(--danger); }
.attention-item.warn { border-left-color: var(--warn); }
.attention-item.warn > .icon { color: var(--warn); }
.attention-item.info { border-left-color: var(--accent); }
.attention-item.info > .icon { color: var(--accent); }
.all-good { display: flex; align-items: center; gap: .3rem; margin-bottom: 1.2rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); font-weight: 500; }

.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-sub { color: var(--muted); font-size: .82rem; }
.page .kpi-value.kpi-text { font-family: inherit; font-size: 1.3rem; letter-spacing: -.01em; padding-top: .2rem; }
.svc-foot { display: flex; align-items: center; gap: .35rem; margin-top: .2rem; padding-top: .6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.svc-foot .icon { width: 14px; height: 14px; }
.svc-foot.warn { color: var(--warn); }
.span-8 { grid-column: span 8; }
.board-side { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.board-side .panel { margin: 0; }
.item-list.flush { margin: 0; }
.item-list.flush .item { padding-left: 1.3rem; padding-right: 1.3rem; }
.item .dot { margin-right: 0; }
.mini-gauge { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: .1rem .4rem; width: 110px; flex: none; }
.mini-gauge small { font-size: .7rem; font-weight: 600; letter-spacing: .05em; color: var(--muted); }
.mini-gauge b { justify-self: end; font: 500 .82rem var(--mono); }
.mini-gauge meter { grid-column: 1 / -1; }

@media (max-width: 1100px) {
    .span-8 { grid-column: 1 / -1; }
    .board-side { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpis.kpis-3 { grid-template-columns: 1fr 1fr; }
    .kpis.kpis-3 .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .mini-gauge { width: 70px; }
    .item-list.flush .item { flex-wrap: nowrap; }
}
.page .flush-panel { padding: 1.1rem 0 .4rem; }
.page .flush-panel .panel-head { padding: 0 1.3rem; }
.board { align-items: start; }

.shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.shortcut { display: flex; align-items: center; gap: .85rem; padding: .95rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); min-width: 0; }
.shortcut:hover { border-color: var(--accent); text-decoration: none; }
.shortcut-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.shortcut-icon .icon { width: 20px; height: 20px; }
.shortcut-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.shortcut-text strong { display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.shortcut-text strong .dot { margin: 0; width: 7px; height: 7px; }
.shortcut-text small { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shortcut-ext { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 1100px) { .shortcuts{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
    .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .shortcut { padding: .75rem; gap: .6rem; }
    .shortcut-icon { width: 34px; height: 34px; }
    .shortcut-text small, .shortcut-ext { display: none; }
}
.panel-foot { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .3rem; padding: .7rem 1rem .3rem; border-top: 1px solid var(--line-2); font-size: .88rem; font-weight: 500; }
.panel-foot .icon { width: 15px; height: 15px; }
.item-list.flush .item { min-height: 50px; padding-top: .55rem; padding-bottom: .55rem; }
.toolbar input.narrow, .toolbar select.narrow { flex: 0 0 110px; min-width: 0; width: 110px; }
form.inline { display: inline-flex; margin: 0; }
td.row-actions > * { margin-left: .3rem; vertical-align: middle; }
.attention-item .attention-action { margin-left: auto; flex: none; }
div.attention-item:hover { background: var(--surface); }
.access-table td, .access-table th { white-space: nowrap; }
.access-table th.center, .access-table td.center { text-align: center; }
.access-table tr.is-inactive td { opacity: .55; }
.access-table .person small { display: flex; gap: .3rem; align-items: center; margin-top: .15rem; }
.access-mark { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 .45rem; border-radius: 6px; font-size: .8rem; font-weight: 600; }
.access-mark.yes { background: var(--ok-soft); color: var(--ok); }
.access-mark.partial { background: var(--warn-soft); color: var(--warn); }
.access-mark.no { color: var(--muted); }
.chip-list { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
a.badge:hover { text-decoration: none; border-color: var(--accent); }

/* Accent colours */

:root[data-accent=blue] { --accent: #2563c9; --accent-hover: #1f50a3; --accent-soft: #e3ecfa; }
:root[data-accent=violet] { --accent: #6d48c2; --accent-hover: #5a39a3; --accent-soft: #ece6f8; }
:root[data-accent=orange] { --accent: #b4500f; --accent-hover: #9a440c; --accent-soft: #fbeadf; }
:root[data-accent=rose] { --accent: #c2366b; --accent-hover: #a32a59; --accent-soft: #f9e3ec; }
:root[data-accent=green] { --accent: #1a7d44; --accent-hover: #146637; --accent-soft: #e1f2e8; }
:root[data-theme=dark][data-accent=blue] { --accent: #6aa2f2; --accent-hover: #8ab6f5; --accent-soft: rgba(106, 162, 242, .14); }
:root[data-theme=dark][data-accent=violet] { --accent: #a98bef; --accent-hover: #bda5f3; --accent-soft: rgba(169, 139, 239, .14); }
:root[data-theme=dark][data-accent=orange] { --accent: #f0975a; --accent-hover: #f4ad7b; --accent-soft: rgba(240, 151, 90, .14); }
:root[data-theme=dark][data-accent=rose] { --accent: #ef7aa3; --accent-hover: #f397b7; --accent-soft: rgba(239, 122, 163, .14); }
:root[data-theme=dark][data-accent=green] { --accent: #4cc98a; --accent-hover: #6fd6a2; --accent-soft: rgba(76, 201, 138, .14); }
@media (prefers-color-scheme: dark) {
    :root[data-theme=system][data-accent=blue] { --accent: #6aa2f2; --accent-hover: #8ab6f5; --accent-soft: rgba(106, 162, 242, .14); }
    :root[data-theme=system][data-accent=violet] { --accent: #a98bef; --accent-hover: #bda5f3; --accent-soft: rgba(169, 139, 239, .14); }
    :root[data-theme=system][data-accent=orange] { --accent: #f0975a; --accent-hover: #f4ad7b; --accent-soft: rgba(240, 151, 90, .14); }
    :root[data-theme=system][data-accent=rose] { --accent: #ef7aa3; --accent-hover: #f397b7; --accent-soft: rgba(239, 122, 163, .14); }
    :root[data-theme=system][data-accent=green] { --accent: #4cc98a; --accent-hover: #6fd6a2; --accent-soft: rgba(76, 201, 138, .14); }
}
.accent-picker { display: flex; gap: .7rem; flex-wrap: wrap; }
.accent-swatch { position: relative; cursor: pointer; }
.accent-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.accent-swatch span { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); outline: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.accent-swatch input:checked + span { outline-color: var(--ink); }
.accent-swatch input:focus-visible + span { outline-color: var(--accent); }
.accent-teal span { background: #0b7a80; }
.accent-blue span { background: #2563c9; }
.accent-violet span { background: #6d48c2; }
.accent-orange span { background: #b4500f; }
.accent-rose span { background: #c2366b; }
.accent-green span { background: #1a7d44; }

.stack-fields { display: flex; flex-direction: column; gap: .8rem; }
.setting input.setting-input { width: min(360px, 100%); flex: none; }
.field-end { display: flex; align-items: flex-end; justify-content: flex-end; }
.section-gap { margin-top: 1.8rem; }
.toolbar .grow-2 { flex: 2; min-width: 200px; }
.toolbar select.medium { flex: 0 0 160px; width: 160px; min-width: 0; }

.announcement { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .55rem 1.5rem; font-size: .9rem; font-weight: 500; text-align: center; }
.announcement .icon { width: 17px; height: 17px; flex: none; }
.announcement.info { background: var(--accent-soft); color: var(--accent); }
.announcement.warning { background: var(--warn-soft); color: var(--warn); }

body.compact { font-size: 13.5px; }
body.compact .page { padding-top: 1.3rem; }
body.compact .page .card, body.compact .page .panel { padding: 1rem 1.1rem; }
body.compact .page .page-head, body.compact .page .machine-head { margin-bottom: 1rem; }
body.compact .stack, body.compact .board, body.compact .grid-2 { gap: .8rem; }
body.compact .card { margin-bottom: .8rem; }
body.compact .setting { padding-top: .65rem; padding-bottom: .65rem; }
body.compact .setting-list, body.compact .item-list { margin-left: -1.1rem; margin-right: -1.1rem; }
body.compact .setting, body.compact .item { padding-left: 1.1rem; padding-right: 1.1rem; }
body.compact .item { min-height: 46px; padding-top: .5rem; padding-bottom: .5rem; }
body.compact .kpi, body.compact .tile, body.compact .shortcut { padding: .75rem .9rem; }
body.compact .page .kpi-value { font-size: 1.5rem; }

.board-side.wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.1rem; }
.home-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; }
.home-block { display: flex; align-items: flex-start; gap: .7rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.home-block-cards { display: flex; flex-direction: column; gap: .35rem; padding-top: .3rem; }
.home-block-cards strong { font-weight: 500; font-size: .93rem; }
.position-select { width: 70px; flex: none; }
.setting-list.spaced { display: flex; margin-top: 1.2rem; border-top: 1px solid var(--line-2); padding-top: .4rem; }
fieldset.plain.spaced { display: flex; margin-top: 1.1rem; }

@media (max-width: 760px) {
    .machine-actions details.menu .menu-panel { left: auto; right: 0; }
    .back { min-height: 32px; }
    .panel-head a, .card-head > a { display: inline-flex; align-items: center; min-height: 32px; }
    .list.access-table th, .list.access-table td { display: table-cell; }
    .list.access-table th:nth-child(6), .list.access-table td:nth-child(6), .list.access-table th:nth-child(7), .list.access-table td:nth-child(7) { display: none; }
    .access-table th, .access-table td { padding: .6rem .5rem; }
    .access-table .person .avatar { display: none; }
}
@media (max-width: 760px) {
    .machines-table .col-resources, .machines-table .col-actions { display: none !important; }
    .machines-table td.row-actions:not(.col-actions) { white-space: normal; }
    .machines-table td.row-actions:not(.col-actions) > * { margin: .2rem 0 0; }
}
:root, :root[data-theme=light] { --warn: #8f5a08; }
@media (max-width: 760px) {
    .access-table td:nth-child(5) { white-space: normal; min-width: 110px; }
    .access-table .person small { flex-wrap: wrap; }
    .access-mark { min-width: 24px; padding: 0 .3rem; }
}
.only-mobile { display: none; }
@media (max-width: 760px) {
    .only-mobile { display: inline; font-weight: 500; }
    .access-table .chip-list { display: none; }
    .access-table td:nth-child(5) { min-width: 0; text-align: center; }
}
@media (max-width: 760px) {
    .access-table th { font-size: .64rem; letter-spacing: .02em; }
    .access-table th, .access-table td { padding: .55rem .35rem; }
    .access-table th:first-child, .access-table td:first-child { padding-left: .8rem; }
}
@media (max-width: 760px) {
    .form-bar { padding: .6rem; border-radius: 10px; }
    .form-bar p { display: none; }
    .form-bar .button { flex: 1; }
    .tile-value { font-size: 1.1rem; }
    .tile-value small { font-size: .74rem; }
}

/* ===== Sign-in screen ===== */

body.guest {
    min-height: 100vh;
    background:
        radial-gradient(900px 520px at 12% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
        radial-gradient(800px 520px at 92% 96%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
        radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.6px) 0 0 / 24px 24px,
        var(--bg);
}
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 2rem; width: 100%; max-width: 1180px; min-height: 100vh; margin: 0 auto; padding: 2rem 2.5rem; }
.auth-art { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.auth-illustration { display: block; width: 100%; max-width: 540px; height: auto; }
.auth-tagline { display: flex; flex-direction: column; gap: .35rem; text-align: center; max-width: 40ch; }
.auth-tagline strong { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 650; line-height: 1.08; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.auth-tagline span { color: var(--muted); }
.auth-main { width: 100%; max-width: 420px; justify-self: center; }
.auth-main .card { padding: 2rem; border-radius: 18px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(6, 10, 14, .28); }
.auth-main h1 { font-size: 1.5rem; margin-bottom: .3rem; }
.auth-lead { margin: 0 0 1.4rem; font-size: .92rem; }
.auth-main .auth-brand { margin-bottom: 1.4rem; }
.auth-main .brand-mark { width: 38px; height: 38px; border-radius: 10px; background: #0b0e12; color: #fff; box-shadow: inset 0 -3px 0 var(--accent), 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.auth-main .button.block { min-height: 42px; margin-top: .3rem; font-size: .95rem; }
.auth-main input[type=text], .auth-main input[type=password], .auth-main input[type=email] { min-height: 42px; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; gap: 0; align-content: start; min-height: 100vh; padding: 1.4rem 1.1rem 2rem; }
    .auth-art { order: 2; gap: .8rem; margin-top: 1.6rem; }
    .auth-illustration { max-width: 300px; }
    .auth-tagline strong { font-size: 1.35rem; }
    .auth-tagline span { font-size: .85rem; }
    .auth-main { order: 1; max-width: 460px; }
    .auth-main .card { padding: 1.5rem 1.3rem; }
}
.auth-main .brand-text { font-size: 1.05rem; }
.auth-main .brand-text small { font-size: .8rem; }

.sub-head { margin: 1.4rem 0 .6rem; font-size: .88rem; font-weight: 600; color: var(--ink); }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 2rem; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .42rem 0; border-top: 1px solid var(--line-2); font-size: .88rem; }
.rank li:first-child { border-top: 0; }
.rank-plain li { grid-template-columns: minmax(0, 1fr) auto; }
.rank-name { display: flex; align-items: center; gap: .5rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name > span:last-child:not(.flag) { display: flex; flex-direction: column; min-width: 0; }
.rank-name small { font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
.rank-value { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-weight: 500; }
.rank-alert { color: var(--danger); font-size: .72rem; font-weight: 500; }
.rank .meter-fill[class*="p-"] { background: var(--accent); min-width: 3px; }
.flag { font-size: 1rem; line-height: 1; }
.events td { white-space: nowrap; }
.events .truncate { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; }
    .rank li { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr) auto; gap: .6rem; }
    .rank-plain li { grid-template-columns: minmax(0, 1fr) auto; }
}
.events .flag { margin-right: .4rem; }

.member-row { padding-top: .7rem; padding-bottom: .7rem; }
.member-who { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.member-who .avatar { width: 32px; height: 32px; flex: none; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.member-actions { display: flex; align-items: flex-start; gap: .5rem; flex: none; }
.member-actions form { margin: 0; }
.member-edit { position: relative; }
.member-edit summary { list-style: none; }
.member-edit summary::-webkit-details-marker { display: none; }
.member-panel { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; display: flex; flex-direction: column; gap: .55rem; width: 300px; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(10, 16, 24, .18); }
.member-panel .button { align-self: flex-end; margin-top: .3rem; }
@media (max-width: 760px) {
    .member-row { flex-direction: column; align-items: stretch; }
    .member-actions .member-edit, .member-actions > form { flex: 1; }
    .member-actions .button { width: 100%; justify-content: center; }
    .member-panel { left: 0; right: auto; width: min(300px, calc(100vw - 3rem)); }
}

.kanban { display: flex; align-items: flex-start; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x proximity; }
.kanban-list { flex: 0 0 290px; display: flex; flex-direction: column; gap: .6rem; padding: .85rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius); scroll-snap-align: start; max-height: calc(100vh - 220px); }
.kanban-list h2 { display: flex; justify-content: space-between; margin: 0 .15rem; font-size: .92rem; font-weight: 600; }
.kanban-list h2 .muted { font-weight: 500; font-variant-numeric: tabular-nums; }
.kanban-cards { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding: 0; list-style: none; overflow-y: auto; min-height: 0; }
.kanban-card { display: flex; flex-direction: column; gap: .45rem; padding: .7rem .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 1px 0 rgba(10, 16, 24, .04); }
.kanban-title { color: var(--ink); font-size: .9rem; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.kanban-title:hover { color: var(--accent); }
.kanban-labels { display: flex; flex-wrap: wrap; gap: .25rem; }
.tl { display: inline-block; min-width: 2.2rem; max-width: 100%; height: 1.15rem; padding: 0 .45rem; border-radius: 4px; font-size: .7rem; font-weight: 600; line-height: 1.15rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl:empty { height: .45rem; min-width: 2.4rem; padding: 0; }
.tl-green { background: #1f845a; } .tl-yellow{ background: #b38600; } .tl-orange{ background: #c25100; } .tl-red{ background: #c9372c; }
.tl-purple { background: #6e5dc6; } .tl-blue{ background: #0c66e4; } .tl-sky{ background: #227d9b; } .tl-lime{ background: #4c6b1f; }
.tl-pink { background: #ae4787; } .tl-black{ background: #44546f; } .tl-none{ background: var(--line); color: var(--ink); }
.kanban-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .76rem; color: var(--muted); }
.kanban-meta .icon { width: 13px; height: 13px; }
.kanban-due { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .35rem; border-radius: 4px; }
.kanban-due.late { background: var(--danger-soft); color: var(--danger); }
.kanban-due.done, .kanban-check.done { background: var(--ok-soft); color: var(--ok); border-radius: 4px; padding: .05rem .35rem; }
.kanban-people { display: flex; margin-left: auto; }
.kanban-people .avatar { width: 24px; height: 24px; margin-left: -6px; font-size: .64rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 2px var(--surface); }

.kanban-add { display: flex; gap: .4rem; margin: 0; }
.kanban-add input { flex: 1; min-width: 0; min-height: 36px; font-size: .86rem; }
.kanban-add .button { flex: none; width: 36px; min-height: 36px; padding: 0; justify-content: center; }

@media (max-width: 760px) {
    .kanban { margin: 0 -1rem; padding: 0 1rem 1rem; }
    .kanban-list { flex-basis: 82vw; max-height: none; }
}

/* Trello in the top bar */
.tasks-menu { position: relative; }
.tasks-summary { display: flex; align-items: center; gap: .5rem; max-width: 280px; height: 36px; padding: 0 .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: .88rem; cursor: pointer; list-style: none; }
.tasks-summary::-webkit-details-marker { display: none; }
.tasks-summary:hover, .tasks-menu[open] .tasks-summary { border-color: var(--accent); color: var(--ink); }
.tasks-summary .icon { width: 16px; height: 16px; flex: none; color: var(--accent); }
.tasks-next { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tasks-dropdown { width: 320px; }
.tasks-head { margin: 0; padding: .35rem .7rem .45rem; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tasks-mini { margin: 0 0 .3rem; padding: 0; list-style: none; }
.tasks-mini li + li { border-top: 1px solid var(--line-2); }
.topnav-dropdown .tasks-mini a { align-items: stretch; gap: .65rem; padding: .5rem .7rem; }
.tasks-mini li.tasks-empty { padding: .5rem .7rem; }
.tasks-bars { display: flex; gap: 3px; flex: none; }
.tasks-bars i { width: 4px; border-radius: 2px; }
.tasks-late { color: var(--danger); font-weight: 500; }
.tasks-body { display: flex; flex-direction: column; min-width: 0; }
.tasks-body strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; font-weight: 500; color: var(--ink); }
.tasks-body small { font-size: .8rem; }
.tasks-empty { font-size: .88rem; }
.topnav-dropdown .tasks-open { border-top: 1px solid var(--line-2); border-radius: 0 0 8px 8px; color: var(--accent); }
.topnav-dropdown .menu-kbd { margin-left: auto; font-size: .72rem; }
@media (max-width: 1100px) { .tasks-summary{ max-width: 200px; } }
@media (max-width: 900px) {
    .tasks-summary { width: 36px; padding: 0; justify-content: center; }
    .tasks-next { display: none; }
    .topnav-dropdown.right.tasks-dropdown { position: fixed; top: 62px; left: 1rem; right: 1rem; width: auto; min-width: 0; }
    .topnav-dropdown .menu-kbd { display: none; }
}

/* Personal menu */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.4rem; }
.menu-rows { display: flex; flex-direction: column; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.menu-row { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.menu-row .check { margin: 0; }
.menu-row small { margin-left: auto; font-size: .78rem; }
.menu-row.is-pin { border-style: dashed; }
.menu-row-name { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; }
.menu-row-name .icon { width: 14px; height: 14px; color: var(--accent); }
.menu-pins { display: flex; flex-direction: column; gap: .7rem; }
.menu-pins > strong { font-size: .9rem; }
.menu-pin-group { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.menu-pin-group small { flex: 0 0 100%; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.menu-pin-group .check { margin: 0; }
@media (max-width: 760px) { .menu-layout{ grid-template-columns: 1fr; } }

.kanban-list h2 { align-items: center; }
.kanban-list h2 form { margin: 0; }

/* Dragging cards */
.kanban-card[data-card] { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kanban-card[data-card]:hover { border-color: var(--accent); }
.kanban-card.is-dragging { display: none; }
.kanban-card.is-saving { opacity: .6; }
.kanban-placeholder { flex: none; border: 2px dashed var(--accent); border-radius: var(--radius-sm); background: var(--accent-soft); list-style: none; }
.kanban-ghost { position: fixed; top: 0; left: 0; z-index: 100; margin: 0; pointer-events: none; cursor: grabbing; box-shadow: 0 14px 30px rgba(8, 12, 16, .28); list-style: none; }
body.kanban-dragging, body.kanban-dragging * { cursor: grabbing !important; }
.kanban-cards { min-height: 8px; }

/* Trello look */
.trello-frame { --t-ink: #172b4d; --t-sub: #44546f; --t-list: #f1f2f4; --t-card: #fff; --t-hover: #091e420f;
    margin: -.6rem -.4rem 0; border-radius: 14px; background: #0c66e4; overflow: hidden; }
:root[data-theme=dark] .trello-frame { --t-ink: #b6c2cf; --t-sub: #9fadbc; --t-list: #101204; --t-card: #22272b; --t-hover: #a6c5e229; }
.trello-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem; background: rgba(0, 0, 0, .24); backdrop-filter: blur(4px); }

.trello-bar h1 { margin: 0; color: #fff; font-size: 1.1rem; font-weight: 700; }

.trello-bar-actions { display: flex; align-items: center; gap: .4rem; }
.trello-bar-actions form { margin: 0; }

.trello-bar-button { display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 .7rem; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .2); color: #fff; font: inherit; font-size: .86rem; font-weight: 500; cursor: pointer; text-decoration: none; }
.trello-bar-button:hover { background: rgba(255, 255, 255, .32); color: #fff; text-decoration: none; }
.trello-bar-button.solid { background: #dcdfe4; color: #172b4d; }
.trello-bar-button.solid:hover { background: #fff; color: #172b4d; }
.trello-bar-button .icon { width: 14px; height: 14px; }

.trello-frame .kanban { gap: .75rem; padding: .75rem; min-height: calc(100vh - 230px); }
.trello-frame .kanban-list { flex: 0 0 272px; gap: .5rem; padding: .5rem; border: 0; border-radius: 12px; background: var(--t-list); box-shadow: 0 1px 1px #091e4240, 0 0 1px #091e424f; color: var(--t-ink); }
.trello-frame .kanban-list h2 { display: flex; align-items: center; gap: .25rem; margin: 0; padding: .3rem .25rem .1rem .5rem; color: var(--t-ink); font-size: .875rem; font-weight: 600; }
.trello-frame .kanban-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.trello-frame .kanban-count { color: var(--t-sub); font-weight: 400; font-size: .8rem; font-variant-numeric: tabular-nums; margin-right: .2rem; }
.kanban-tool { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--t-sub); cursor: pointer; list-style: none; }
.kanban-tool::-webkit-details-marker { display: none; }
.kanban-tool .icon { width: 15px; height: 15px; }
.kanban-tool:hover { background: var(--t-hover); color: var(--t-ink); }
.kanban-tool.on { color: #0c66e4; background: #e9f2ff; }
.trello-frame .kanban-list h2 form { margin: 0; }
.kanban-colors { position: relative; }
.kanban-swatches { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: .55rem; width: 220px; margin: 0; padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(8, 12, 16, .22); color: var(--ink); font-weight: 400; }
.kanban-swatches strong { font-size: .8rem; color: var(--muted); }
.kanban-swatches div { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.swatch { height: 28px; padding: 0; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.swatch.on { border-color: var(--ink); }
.swatch-none { padding: .35rem; border: 0; border-radius: 4px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .82rem; cursor: pointer; }

.trello-frame .kanban-cards { gap: .5rem; padding: 0 .1rem .1rem; }
.trello-frame .kanban-card { position: relative; gap: .35rem; padding: .5rem .75rem; border: 0; border-radius: 8px; background: var(--t-card); box-shadow: 0 1px 1px #091e4240, 0 0 1px #091e424f; color: var(--t-ink); }
.trello-frame .kanban-card[data-card]:hover { border-color: transparent; box-shadow: inset 0 0 0 2px #388bff; }
.trello-frame .kanban-card.has-cover { padding-top: 2.6rem; }
.kanban-cover { position: absolute; top: 0; left: 0; right: 0; height: 2rem; border-radius: 8px 8px 0 0; }
.trello-frame .kanban-title { color: var(--t-ink); font-size: .875rem; }
.trello-frame .kanban-title:hover { color: var(--t-ink); text-decoration: none; }
.trello-frame .kanban-meta { color: var(--t-sub); }
.trello-frame .kanban-placeholder { border: 0; border-radius: 8px; background: #091e4224; }
.trello-frame .tl { height: 16px; min-width: 40px; padding: 0 .5rem; border-radius: 4px; font-size: .72rem; line-height: 16px; color: #172b4d; }
.trello-frame .tl:empty { height: 8px; min-width: 40px; }
.trello-frame .tl-black { color: #fff; }

.kanban-add-wrap { margin: 0; }
.kanban-add-open { display: flex; align-items: center; gap: .45rem; padding: .4rem .5rem; border-radius: 8px; color: var(--t-sub); font-size: .875rem; font-weight: 500; cursor: pointer; list-style: none; }
.kanban-add-open::-webkit-details-marker { display: none; }
.kanban-add-open .icon { width: 16px; height: 16px; }
.kanban-add-open:hover { background: var(--t-hover); color: var(--t-ink); }
.kanban-add-wrap[open] .kanban-add-open { display: none; }
.trello-frame .kanban-add { flex-direction: column; align-items: flex-start; gap: .5rem; }
.trello-frame .kanban-add textarea { width: 100%; min-height: 0; padding: .5rem .75rem; border: 0; border-radius: 8px; background: var(--t-card); box-shadow: 0 1px 1px #091e4240, 0 0 1px #091e424f; color: var(--t-ink); font: inherit; font-size: .875rem; resize: none; }
.kanban-add-button { height: 32px; padding: 0 .8rem; border: 0; border-radius: 4px; background: #0c66e4; color: #fff; font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; }
.kanban-add-button:hover { background: #0055cc; }

/* Trello list colours (light, then dark) */
.tlist-green { --t-list: #baf3db; } .tlist-yellow{ --t-list: #f8e6a0; } .tlist-orange{ --t-list: #fedec8; } .tlist-red{ --t-list: #ffd5d2; } .tlist-purple{ --t-list: #dfd8fd; }
.tlist-blue { --t-list: #cce0ff; } .tlist-sky{ --t-list: #c6edfb; } .tlist-lime{ --t-list: #d3f1a7; } .tlist-pink{ --t-list: #fdd0ec; } .tlist-black{ --t-list: #dcdfe4; }
:root[data-theme=dark] .tlist-green { --t-list: #164b35; } :root[data-theme=dark] .tlist-yellow{ --t-list: #533f04; } :root[data-theme=dark] .tlist-orange{ --t-list: #702e00; }
:root[data-theme=dark] .tlist-red { --t-list: #5d1f1a; } :root[data-theme=dark] .tlist-purple{ --t-list: #352c63; } :root[data-theme=dark] .tlist-blue{ --t-list: #09326c; }
:root[data-theme=dark] .tlist-sky { --t-list: #164555; } :root[data-theme=dark] .tlist-lime{ --t-list: #37471f; } :root[data-theme=dark] .tlist-pink{ --t-list: #50253f; } :root[data-theme=dark] .tlist-black{ --t-list: #454f59; }
.swatch[class*=tlist-] { background: var(--t-list); }

/* Trello label colours */
.trello-frame .tl-green { background: #4bce97; } .trello-frame .tl-yellow{ background: #f5cd47; } .trello-frame .tl-orange{ background: #fea362; } .trello-frame .tl-red{ background: #f87168; }
.trello-frame .tl-purple { background: #9f8fef; } .trello-frame .tl-blue{ background: #579dff; } .trello-frame .tl-sky{ background: #6cc3e0; } .trello-frame .tl-lime{ background: #94c748; }
.trello-frame .tl-pink { background: #e774bb; } .trello-frame .tl-black{ background: #8590a2; }
@media (max-width: 900px) { .trello-frame{ margin: -.3rem -1rem 0; border-radius: 0; } .trello-frame .kanban-list{ flex-basis: 82vw; } }
.trello-frame .kanban { scroll-padding-inline: .75rem; scroll-snap-type: none; }

/* The board takes the whole screen under the top bar, like Trello */
.page:has(.trello-frame) { max-width: none; padding: 0; }
.page:has(.trello-frame) > .alert, .page:has(.trello-frame) > .flash { margin: .6rem 1rem; }
.trello-frame { display: flex; flex-direction: column; margin: 0; border-radius: 0; height: calc(100vh - var(--appbar-h, 61px)); height: calc(100dvh - var(--appbar-h, 61px)); }
.trello-frame .kanban { flex: 1; min-height: 0; align-items: flex-start; padding-bottom: 1rem; }
.trello-frame .kanban-list { max-height: 100%; }
.trello-frame .kanban-cards { overflow-y: auto; }
@media (max-width: 900px) { .trello-frame{ margin: 0; } }
@media (max-width: 900px) { .trello-frame .kanban{ margin: 0; padding: .75rem .75rem 1rem; } }

/* Own task board */
.trello-frame .kanban { overflow-x: auto; }
.kanban-name { flex: 1; min-width: 0; margin: 0; }
.kanban-name input { width: 100%; min-height: 28px; padding: .15rem .35rem; border: 2px solid transparent; border-radius: 6px; background: transparent; color: var(--t-ink); font: inherit; font-weight: 600; font-size: .875rem; cursor: pointer; box-shadow: none; }
.kanban-name input:focus { border-color: #388bff; background: var(--t-card); cursor: text; outline: none; }
.trello-frame .kanban-list h2 { padding-left: .1rem; cursor: grab; }
.kanban-swatches form { display: flex; flex-direction: column; gap: .55rem; margin: 0; }
.kanban-list-placeholder { flex: 0 0 272px; border-radius: 12px; background: rgba(0, 0, 0, .18); }
.kanban-ghost.kanban-list { display: flex; overflow: hidden; }
.kanban-card[data-card] { cursor: pointer; }
.kanban-card:focus-visible { outline: 2px solid #388bff; outline-offset: 1px; }
.trello-frame .kanban-title { pointer-events: none; }
.kanban-meta span { display: inline-flex; align-items: center; gap: .2rem; }
.kanban-due.soon { background: #f5cd47; color: #172b4d; }
.kanban-due.late { background: #c9372c; color: #fff; }
.kanban-due.done { background: #1f845a; color: #fff; }
.kanban-check.done { background: #1f845a; color: #fff; }
.trello-frame .kanban-people .avatar { box-shadow: 0 0 0 2px var(--t-card); }
.kanban-add-actions { display: flex; align-items: center; gap: .25rem; }
.kanban-new-list { flex: 0 0 272px; border-radius: 12px; background: rgba(255, 255, 255, .24); color: #fff; }
.kanban-new-list > summary { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; font-size: .875rem; font-weight: 500; cursor: pointer; list-style: none; }
.kanban-new-list > summary::-webkit-details-marker { display: none; }
.kanban-new-list > summary .icon { width: 16px; height: 16px; }
.kanban-new-list:hover { background: rgba(255, 255, 255, .32); }
.kanban-new-list[open] { padding: .5rem; background: var(--t-list); color: var(--t-ink); }
.kanban-new-list[open] > summary { display: none; }
.kanban-new-list input { width: 100%; min-height: 34px; padding: .4rem .6rem; border: 2px solid #388bff; border-radius: 6px; background: var(--t-card); color: var(--t-ink); font: inherit; font-size: .875rem; }
.kanban-new-list .kanban-add { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }

/* Board menu */
.board-menu { position: relative; }
.board-menu > summary { list-style: none; }
.board-menu > summary::-webkit-details-marker { display: none; }
.board-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; display: flex; flex-direction: column; gap: 1rem; width: 320px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(8, 12, 16, .28); color: var(--ink); }
.board-menu-panel section { display: flex; flex-direction: column; gap: .5rem; }
.board-menu-panel strong { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bg-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; margin: 0; }
.bg-swatch { height: 34px; padding: 0; border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.bg-swatch.on { border-color: var(--ink); }
.bg-blue { background: linear-gradient(135deg, #0c66e4, #09326c); } .bg-sky{ background: linear-gradient(135deg, #1d7afc, #6cc3e0); }
.bg-purple { background: linear-gradient(135deg, #6e5dc6, #e774bb); } .bg-green{ background: linear-gradient(135deg, #1f845a, #4bce97); }
.bg-orange { background: linear-gradient(135deg, #c25100, #f5cd47); } .bg-red{ background: linear-gradient(135deg, #ae2e24, #f87168); }
.bg-dark { background: linear-gradient(135deg, #1d2125, #454f59); }
.label-admin { display: flex; flex-direction: column; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.label-admin li { display: flex; align-items: center; gap: .3rem; }
.label-admin li > form:first-child { flex: 1; }
.label-row { display: flex; align-items: center; gap: .3rem; margin: 0; }
.label-row select { flex: 0 0 96px; min-height: 30px; padding: .1rem .4rem; font-size: .8rem; }
.label-row select.label-color { color: #172b4d; font-weight: 600; border: 0; }
.label-row input { flex: 1; min-width: 0; min-height: 30px; padding: .2rem .5rem; font-size: .85rem; }
.icon-mini { display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.icon-mini:hover { background: var(--surface-2); color: var(--ink); }
.icon-mini .icon { width: 15px; height: 15px; }
.archived-row { display: flex; align-items: center; gap: .5rem; font-size: .86rem; }
.archived-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archived-row form { margin: 0; }
.archived-row .icon { width: 13px; height: 13px; vertical-align: -2px; }
.link-button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .84rem; cursor: pointer; }
.link-button.danger { color: var(--danger); }
.link-button:hover { text-decoration: none; filter: brightness(.9); }

/* Card window */
.card-dialog { width: min(768px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0; border: 0; border-radius: 12px; background: #f1f2f4; color: #172b4d; box-shadow: 0 20px 60px rgba(9, 30, 66, .35); }
:root[data-theme=dark] .card-dialog { background: #323940; color: #b6c2cf; }
.card-dialog::backdrop { background: rgba(9, 30, 66, .55); }
.card-dialog [data-card-body].is-saving { opacity: .7; pointer-events: none; }
.cd { --cd-ink: #172b4d; --cd-sub: #44546f; --cd-btn: #091e420f; --cd-btn-hover: #091e4224; --cd-field: #fff; position: relative; padding-bottom: 1.4rem; }
:root[data-theme=dark] .cd { --cd-ink: #b6c2cf; --cd-sub: #9fadbc; --cd-btn: #a1bdd914; --cd-btn-hover: #a6c5e229; --cd-field: #22272b; }
.cd-loading { padding: 3rem; text-align: center; }
.cd-cover { height: 116px; border-radius: 12px 12px 0 0; }
.cd-close { position: absolute; top: .6rem; right: .6rem; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--cd-btn); color: var(--cd-ink); cursor: pointer; }
.cd-close:hover { background: var(--cd-btn-hover); }
.cd-close .icon { width: 18px; height: 18px; }
.cd-head { padding: 1.1rem 3.5rem .4rem 1.4rem; }
.cd-head form { margin: 0; }
.cd-title { display: block; width: 100%; min-height: 0; padding: .2rem .4rem; margin-left: -.4rem; border: 2px solid transparent; border-radius: 6px; background: transparent; color: var(--cd-ink); font: inherit; font-size: 1.25rem; font-weight: 600; line-height: 1.35; resize: none; overflow: hidden; }
.cd-title:focus { border-color: #388bff; background: var(--cd-field); outline: none; }
.cd-in-list { display: flex; align-items: center; gap: .4rem; font-size: .85rem; }
.cd-in-list select { width: auto; min-height: 28px; padding: .1rem 1.8rem .1rem .5rem; border: 0; background-color: var(--cd-btn); color: var(--cd-ink); font-size: .85rem; font-weight: 500; }
.cd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 1.2rem; padding: .6rem 1.4rem 0; }
.cd-main { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.cd-facts { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; }
.cd-facts h4, .cd-side h4 { margin: 0 0 .35rem; color: var(--cd-sub); font-size: .75rem; font-weight: 600; }
.cd-people, .cd-labels { display: flex; flex-wrap: wrap; gap: .3rem; }
.cd .tl { display: inline-block; min-width: 48px; height: 32px; padding: 0 .75rem; border-radius: 4px; color: #172b4d; font-size: .85rem; font-weight: 500; line-height: 32px; }
.cd .tl-black { color: #fff; }
.cd .avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #0c66e4; color: #fff; font-size: .85rem; font-weight: 600; }
.cd-due { display: flex; align-items: center; gap: .4rem; height: 32px; margin: 0; padding: 0 .6rem; border-radius: 4px; background: var(--cd-btn); font-size: .88rem; }
.cd-due .check { margin: 0; }
.due-pill { padding: 0 .35rem; border-radius: 3px; font-size: .75rem; font-weight: 600; }
.due-pill.done { background: #1f845a; color: #fff; } .due-pill.late{ background: #c9372c; color: #fff; } .due-pill.soon{ background: #f5cd47; color: #172b4d; }
.cd-section h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .6rem; color: var(--cd-ink); font-size: 1rem; font-weight: 600; }
.cd-section h3 .icon { width: 20px; height: 20px; color: var(--cd-sub); }
.cd-right { margin: 0 0 0 auto; }
.cd textarea, .cd input[type=text], .cd input[type=date], .cd input[type=datetime-local], .cd select { border: 1px solid #091e4224; background-color: var(--cd-field); color: var(--cd-ink); }
.cd-desc { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin: 0; }
.cd-desc textarea { width: 100%; padding: .6rem .75rem; border-radius: 6px; font: inherit; font-size: .9rem; resize: vertical; }
.cd-button { display: flex; align-items: center; gap: .45rem; width: 100%; height: 32px; padding: 0 .65rem; border: 0; border-radius: 4px; background: var(--cd-btn); color: var(--cd-ink); font: inherit; font-size: .875rem; font-weight: 500; text-align: left; cursor: pointer; list-style: none; }
.cd-button::-webkit-details-marker { display: none; }
.cd-button:hover { background: var(--cd-btn-hover); }
.cd-button .icon { width: 15px; height: 15px; flex: none; }
.cd-button.danger { background: #c9372c; color: #fff; }
.cd-button.wide { justify-content: center; margin-top: .5rem; }
.cd-right .cd-button, .cd-inline .cd-button { width: auto; }
.cd-progress { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; font-size: .75rem; color: var(--cd-sub); }
.cd-progress span { width: 2.2rem; }
.cd-progress meter { flex: 1; height: 8px; }
.cd-items { display: flex; flex-direction: column; margin: 0 0 .5rem; padding: 0; list-style: none; }
.cd-items li { display: flex; align-items: center; gap: .4rem; padding: .3rem .3rem .3rem 0; border-radius: 6px; }
.cd-items li:hover { background: var(--cd-btn); }
.cd-items li form:first-child { flex: 1; margin: 0; }
.cd-items li form { margin: 0; }
.cd-items .check { margin: 0; align-items: center; }
.struck { text-decoration: line-through; color: var(--cd-sub); }
.cd-inline { display: flex; align-items: center; gap: .4rem; margin: 0; }
.cd-inline input[type=text] { flex: 1; min-width: 0; min-height: 32px; padding: .3rem .6rem; border-radius: 4px; font-size: .875rem; }
.cd-inline select { flex: 0 0 auto; width: auto; min-height: 32px; font-size: .8rem; }
.cd-comment-form { display: grid; grid-template-columns: 32px 1fr; gap: .3rem .6rem; align-items: start; margin: 0; }
.cd-comment-form textarea { padding: .55rem .75rem; border-radius: 8px; font: inherit; font-size: .9rem; resize: vertical; }
.cd-comment-form .kanban-add-button { grid-column: 2; justify-self: start; }
.cd-comments { display: flex; flex-direction: column; gap: .9rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.cd-comments li { display: grid; grid-template-columns: 32px 1fr; gap: .6rem; }
.cd-comments form { margin: .2rem 0 0; }
.cd-comment-head { margin: 0 0 .25rem; font-size: .85rem; }
.cd-comment-body { margin: 0; padding: .55rem .75rem; border-radius: 8px; background: var(--cd-field); box-shadow: 0 1px 1px #091e4240; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cd-created p { margin: .4rem 0 0; font-size: .82rem; }
.cd-side { display: flex; flex-direction: column; gap: .5rem; }
.cd-side h4:not(:first-child) { margin-top: .8rem; }
.cd-side form { margin: 0; }
.cd-pop { position: relative; }
.cd-pop-body { position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; display: flex; flex-direction: column; gap: .3rem; width: 280px; padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(9, 30, 66, .3); color: var(--ink); }
.cd-pop-body form { margin: 0; }
.cd-pick { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 34px; padding: .2rem .4rem; border: 0; border-radius: 4px; background: none; color: var(--ink); font: inherit; font-size: .875rem; text-align: left; cursor: pointer; }
.cd-pick:hover { background: var(--surface-2); }
.cd-pick .avatar { width: 28px; height: 28px; font-size: .75rem; }
.cd-pick-label { flex: 1; height: 32px; }
.cd-pick-check { width: 16px; height: 16px; margin-left: auto; color: #0c66e4; }
.cd-stack { display: flex; flex-direction: column; gap: .5rem; }
.cd-stack label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); }
.cd-stack .kanban-add-button { align-self: flex-start; }
.cd-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.cd-swatches .swatch { height: 32px; }
@media (max-width: 700px) {
    .card-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .cd-grid { grid-template-columns: 1fr; }
    .cd-side { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
    .cd-side h4 { grid-column: 1 / -1; }
    .cd-pop-body { position: fixed; left: 1rem; right: 1rem; top: auto; bottom: 1rem; width: auto; }
}
.card-dialog:focus, .card-dialog:focus-visible { outline: none; }
.cd-title:not(:focus) { background: transparent; }
.cd textarea.cd-title { border: 2px solid transparent; background: transparent; box-shadow: none; }
.cd textarea.cd-title:focus { border-color: #388bff; background: var(--cd-field); }

/* Attachments */
.trello-frame .kanban-card.has-image { padding-top: 0; overflow: hidden; }
.kanban-cover-image { display: block; width: calc(100% + 1.5rem); max-height: 180px; margin: 0 -.75rem .35rem; object-fit: cover; border-radius: 8px 8px 0 0; pointer-events: none; }
.cd-cover-image { height: auto; max-height: 220px; overflow: hidden; display: flex; justify-content: center; background: #091e420f; }
.cd-cover-image img { max-height: 220px; max-width: 100%; object-fit: contain; }
.cd-files { display: flex; flex-direction: column; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.cd-files li { display: flex; gap: .8rem; align-items: center; }
.cd-file-thumb { display: grid; place-items: center; flex: none; width: 112px; height: 80px; overflow: hidden; border-radius: 4px; background: var(--cd-btn); color: var(--cd-sub); font-weight: 700; text-decoration: none; }
.cd-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cd-file-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.cd-file-info > a { color: var(--cd-ink); overflow-wrap: anywhere; }
.cd-file-info small { font-size: .78rem; }
.cd-file-actions { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.cd-file-actions form { margin: 0; }
.cd input[type=file] { font-size: .85rem; }

/* Filters */
.board-filter .board-menu-panel input[type=search] { width: 100%; min-height: 34px; }
.board-filter .check { margin: 0; }
.filter-label { min-width: 70px; }
.filter-count { min-width: 18px; padding: 0 .35rem; border-radius: 9px; background: #fff; color: #0c66e4; font-size: .72rem; text-align: center; line-height: 18px; }
.kanban.is-filtered .kanban-card[hidden] { display: none; }

/* Language switch on the sign-in pages */
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.auth-main .auth-top .auth-brand { margin-bottom: 0; }
.auth-lang { display: flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.auth-lang button { min-width: 38px; height: 28px; padding: 0 .55rem; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; letter-spacing: .04em; cursor: pointer; }
.auth-lang button:hover { color: var(--ink); }
.auth-lang button.on { background: var(--accent); color: #fff; }
:root[data-theme=dark] .auth-lang button.on { color: #062320; }
@media (max-width: 900px) { .auth-lang{ top: .8rem; right: .8rem; } }

/* Copied sites */
.site-copies { display: flex; flex-direction: column; margin: 0 0 1rem; padding: 0; list-style: none; }
.site-copies li { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line-2); }
.site-copies li:first-child { border-top: 0; }
.site-copy-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.site-copy-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-copy-state { display: flex; align-items: center; gap: .5rem; }
.site-copies form { margin: 0; }
.site-copy-add > summary { list-style: none; width: max-content; }
.site-copy-add > summary::-webkit-details-marker { display: none; }
.site-copy-add[open] > summary { margin-bottom: .9rem; }
@media (max-width: 700px) { .site-copies li { flex-wrap: wrap; } .site-copy-state { order: 3; width: 100%; } }

/* Small dialogs (resources of machines made outside the panel) */
.machines-table td.row-actions:not(.col-actions) > .mini-dialog, td.row-actions > .mini-dialog, .mini-dialog { width: min(640px, calc(100vw - 2rem)); margin: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgba(10, 15, 20, .25); text-align: left; white-space: normal; }
.mini-dialog::backdrop { background: rgba(15, 20, 26, .45); }
.mini-dialog h2 { margin: 0; font-size: 1.05rem; }
.mini-dialog label small { display: block; margin-top: .25rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }

/* Error pages */
.error-page { margin: 0; padding: 12vh 1rem 2rem; background: var(--bg); }
.error-box { width: min(480px, 100%); margin: 0 auto; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.error-code { display: block; font-size: 3rem; font-weight: 600; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.error-box h1 { margin: .75rem 0 .5rem; font-size: 1.35rem; }
.error-box p { margin: 0 0 .75rem; color: var(--ink-2); }
.error-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.25rem !important; }

/* Blocks: the way into the sections of a page */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; margin: 0 0 1.5rem; }
.hub-tile { position: relative; display: flex; flex-direction: column; gap: .7rem; min-height: 148px; padding: 1rem 1.1rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.hub-tile:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(15, 25, 35, .08); transform: translateY(-2px); text-decoration: none; }
.hub-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hub-tile.has-art { padding-top: 0; overflow: hidden; }
.hub-art { display: block; margin: 0 -1.1rem; padding: .3rem 0 0; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.hub-art .art { width: 100%; max-width: 190px; margin: 0 auto; }
.hub-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); }
.hub-icon .icon { width: 21px; height: 21px; }
.hub-tile:hover .hub-icon { color: var(--accent); border-color: var(--accent); }
.hub-text { display: flex; flex-direction: column; gap: .25rem; }
.hub-text strong { font-size: 1rem; font-weight: 600; }
.hub-text small { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.hub-meta { margin-top: auto; align-self: flex-start; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: .78rem; font-variant-numeric: tabular-nums; }
.hub-ext { position: absolute; top: .8rem; right: .8rem; width: 15px; height: 15px; color: var(--muted); }
.hub-group { margin: 0 0 1.4rem; }
.hub-group h2 { margin: 0 0 .7rem; font-size: .95rem; font-weight: 600; color: var(--ink-2); }
@media (max-width: 720px) {
    .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .hub-tile { min-height: 0; padding: 0 .8rem .8rem; gap: .5rem; }
    .hub-tile:not(.has-art) { padding-top: .8rem; }
    .hub-art { margin: 0 -.8rem; }
    .hub-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hub-tile, .hub-tile:hover { transition: none; transform: none; } }

/* The slim bar inside a section */
.hub-bar { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.2rem; padding: .35rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hub-back { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .45rem .75rem; border-radius: 8px; background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.hub-back:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.icon.flip { transform: scaleX(-1); }
.hub-switch { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; }
.hub-switch a { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .45rem .7rem; border-radius: 8px; color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.hub-switch a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.hub-switch a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.hub-switch .icon { width: 17px; height: 17px; }
@media (max-width: 720px) {
    .hub-switch span { display: none; }
    .hub-switch a.active span { display: inline; }
    .hub-back span { display: none; }
}

/* People who share a machine */
.share-add { display: flex; align-items: flex-end; gap: .6rem; margin: 0 0 1rem; padding: .9rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.share-add label { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.share-add .grow { flex: 1; min-width: 0; }
.field-error { margin: -.5rem 0 1rem; color: var(--danger); font-size: .88rem; }
.people-list { list-style: none; margin: 0; padding: 0; }
.share-person { display: flex; align-items: center; gap: .8rem; padding: .85rem 0; border-top: 1px solid var(--line-2); }
.share-person:first-child { border-top: 0; }
.share-person .avatar { width: 38px; height: 38px; flex: none; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.share-person-text { display: flex; flex: 1; flex-direction: column; gap: .2rem; min-width: 0; }
.share-person-text small { color: var(--muted); }
.perm-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.perm-chip { padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: .76rem; }
@media (max-width: 720px) {
    .share-add { flex-direction: column; align-items: stretch; }
    .share-person { flex-wrap: wrap; }
    .share-person .member-actions { width: 100%; justify-content: flex-end; }
}

/* Home of a user: one big card per service */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.svc-card { --tone: var(--accent); display: flex; flex-direction: column; gap: .45rem; min-height: 210px; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.svc-card:hover { border-color: var(--tone); box-shadow: 0 8px 22px rgba(15, 25, 35, .09); transform: translateY(-2px); text-decoration: none; }
a.svc-card:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
.svc-card.is-off { opacity: .65; }
.svc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .45rem; }
.svc-name { font-size: 1.12rem; font-weight: 600; overflow-wrap: anywhere; }
.svc-sub { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.svc-specs { display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--muted); font-size: .85rem; }
.svc-specs b { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .svc-grid { grid-template-columns: 1fr; } .svc-card { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .svc-card, a.svc-card:hover { transition: none; transform: none; } }
.share-person .member-actions { display: flex; flex-direction: row; align-items: center; gap: .5rem; }
.secret-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.secret.is-hidden { filter: blur(6px); user-select: none; }
@media print { .credentials { display: none; } }

/* Drawings (x-art): isometric, in the style of the login picture */
.art { display: block; height: auto; }
.svc-top { position: relative; display: block; margin: -1.2rem -1.2rem .8rem; padding: .6rem 1rem 0; border-bottom: 1px solid var(--line-2); border-radius: 16px 16px 0 0; background: var(--surface-2); }
.svc-top .pill { position: absolute; top: .7rem; right: .7rem; }
.svc-art { width: 100%; max-width: 200px; margin: 0 auto; }
.empty-art { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.5rem 1rem 1rem; text-align: center; }
.empty-art h3 { margin: .4rem 0 0; font-size: 1.05rem; }
.empty-art p { max-width: 520px; margin: 0; color: var(--muted); }
.empty-art-img { width: 180px; height: 124px; margin: 0 auto; }
.no-access .empty-art-img { margin-bottom: .6rem; }
.system-name { font-weight: 600; color: var(--ink-2); }
.empty-art.compact { padding: 1rem .5rem .5rem; }
.empty-art.compact .empty-art-img { width: 140px; height: 96px; }
.empty-art.compact p { font-size: .92rem; }

/* File manager */
.file-path { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; padding: .5rem .6rem; margin-bottom: .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-family: var(--mono); font-size: .9rem; }
.file-path a { padding: .15rem .35rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.file-path a:hover { background: var(--accent-soft); color: var(--accent); }
.file-path a.current { color: var(--ink); font-weight: 600; }
.file-root { display: inline-flex; }
.file-root .icon { width: 16px; height: 16px; }
.file-sep { color: var(--muted); }
.file-go { display: flex; gap: .4rem; margin-left: auto; }
.file-go input { width: 220px; padding: .3rem .5rem; font-size: .85rem; }
.file-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: .9rem; }
.file-tools small { margin-left: auto; }
.file-upload { margin: 0; }
.file-upload label { cursor: pointer; }
.file-new { position: relative; }
.file-new summary { list-style: none; }
.file-new summary::-webkit-details-marker { display: none; }
.file-new-form { position: absolute; z-index: 20; top: calc(100% + .4rem); left: 0; display: flex; gap: .4rem; width: 320px; padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 16px 40px rgba(10, 16, 24, .18); }
.file-new-form input { flex: 1; min-width: 0; }
.file-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.file-list li { display: flex; align-items: center; border-top: 1px solid var(--line-2); }
.file-list li:first-child { border-top: 0; }
.file-list li:hover { background: var(--surface-2); }
.file-item { display: flex; flex: 1; align-items: center; gap: .7rem; min-width: 0; padding: .55rem .8rem; color: var(--ink); text-decoration: none; }
.file-item:hover { text-decoration: none; }
.file-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.file-icon.folder { background: var(--accent-soft); color: var(--accent); }
.file-icon .icon { width: 17px; height: 17px; }
.icon.turn-up { transform: rotate(-90deg); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { flex: none; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.file-del { margin: 0 .5rem 0 0; opacity: 0; }
.file-list li:hover .file-del, .file-del:focus-within { opacity: 1; }
@media (max-width: 720px) {
    .file-go { width: 100%; margin-left: 0; }
    .file-go input { flex: 1; width: auto; }
    .file-meta { display: none; }
    .file-del { opacity: 1; }
    .file-tools small { margin-left: 0; }
}

/* Machine invitations */
.invite-form { flex-direction: column; align-items: stretch; gap: .7rem; }
.invite-row { display: flex; align-items: flex-end; gap: .6rem; }
.invite-perms { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0; padding: 0; border: 0; }
.invite-perms legend { margin-bottom: .45rem; padding: 0; font-weight: 600; font-size: .9rem; }
.sub-title { margin: 1.1rem 0 .2rem; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.avatar.pending { display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.avatar.pending .icon { width: 18px; height: 18px; }
.invite-card { display: flex; align-items: center; gap: 1.1rem; margin: 0 0 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: var(--surface); }
.invite-art { flex: none; width: 96px; height: 66px; }
.invite-text { display: flex; flex: 1; flex-direction: column; gap: .25rem; min-width: 0; }
.invite-text small { color: var(--muted); }
.invite-actions { display: flex; gap: .5rem; flex: none; }
@media (max-width: 720px) {
    .invite-row { flex-direction: column; align-items: stretch; }
    .invite-card { flex-wrap: wrap; }
    .invite-art { display: none; }
    .invite-actions { width: 100%; justify-content: flex-end; }
}
.invite-perms .check { display: inline-flex; flex-direction: row; align-items: center; gap: .45rem; margin: 0; font-weight: 400; }
.file-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .6rem; }
.file-count { color: var(--muted); font-size: .86rem; }
.file-filter { width: 220px; margin-left: auto; padding: .35rem .6rem; font-size: .88rem; }
.file-hidden-toggle { font-size: .86rem; }
.file-list li[data-filtered] { display: none; }
.file-size { flex: none; width: 90px; color: var(--muted); font-size: .82rem; text-align: right; font-variant-numeric: tabular-nums; }
.file-date { flex: none; width: 130px; color: var(--muted); font-size: .82rem; text-align: right; font-variant-numeric: tabular-nums; }
.file-list li[data-hidden] .file-name { color: var(--muted); }
.file-link { display: inline-block; width: 13px; height: 13px; margin-left: .35rem; vertical-align: -1px; color: var(--muted); }
.file-item.is-broken { cursor: not-allowed; opacity: .6; }
.file-icon.kind-image { background: var(--info-soft); color: var(--info); }
.file-icon.kind-archive { background: var(--warn-soft); color: var(--warn); }
.file-icon.kind-code { background: var(--ok-soft); color: var(--ok); }
.file-del { width: 38px; display: flex; justify-content: center; }
@media (max-width: 720px) {
    .file-filter { width: 100%; margin-left: 0; }
    .file-date { display: none; }
    .file-size { width: auto; }
}
.file-list.hide-hidden li[data-hidden] { display: none; }
.file-icon.kind-folder { background: var(--accent-soft); color: var(--accent); }
.file-bar .file-filter { flex: 0 0 240px; width: 240px; margin-left: auto; }
.file-bar .file-hidden-toggle { flex: none; }
@media (max-width: 720px) { .file-bar .file-filter { flex: 1 1 100%; width: 100%; } }

/* Activity: earlier months as a summary */
.keep-note { margin: .8rem 0 0; }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.month-card { margin: 0; }
.month-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.month-head strong { text-transform: capitalize; }
.month-list { list-style: none; margin: 0; padding: 0; }
.month-list li { display: flex; justify-content: space-between; gap: .8rem; padding: .3rem 0; border-top: 1px solid var(--line-2); font-size: .9rem; }
.month-list li:first-child { border-top: 0; }
.month-list b { font-variant-numeric: tabular-nums; }
.sftp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem 1.2rem; margin: 0 0 1rem; }
.sftp-facts div { display: flex; flex-direction: column; gap: .2rem; }
.sftp-facts dt { color: var(--muted); font-size: .82rem; }
.sftp-facts dd { margin: 0; }
.sftp-steps { margin: 0 0 .8rem; padding-left: 1.2rem; color: var(--ink-2); }
.sftp-steps li { margin: .25rem 0; }

/* Admin user picker */
.user-picker { position: relative; display: flex; flex-direction: column; gap: .35rem; }
.user-picker > label { font-weight: 600; font-size: .9rem; }
.picker-search { position: relative; display: block; }
.picker-search .icon { position: absolute; left: .7rem; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.picker-search input { width: 100%; padding-left: 2.2rem; }
.picker-list { position: absolute; z-index: 30; top: 100%; left: 0; right: 0; max-height: 280px; margin: .3rem 0 0; padding: .3rem; overflow-y: auto; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 16px 40px rgba(10, 16, 24, .18); }
.picker-list li[data-id] { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; border-radius: 8px; cursor: pointer; }
.picker-list li[data-id]:hover, .picker-list li.active { background: var(--accent-soft); }
.picker-list .avatar { width: 30px; height: 30px; flex: none; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.picker-text { display: flex; flex-direction: column; min-width: 0; }
.picker-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-none { padding: .55rem; color: var(--muted); }



/* Home: services as a short list, each with its drawing */
.home-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; }
.home-service { display: flex; align-items: center; gap: .9rem; padding: .6rem 1rem .6rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.home-service.is-off { opacity: .6; }
.home-service-art { flex: none; width: 92px; padding: .2rem; border-radius: 10px; background: var(--surface-2); }
.home-service-text { display: flex; flex: 1; flex-direction: column; gap: .35rem; min-width: 0; }
.home-service-text strong { font-size: 1rem; }
.home-service-state { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.home-service .button .icon { width: 14px; height: 14px; }

.machine-head.has-art { align-items: center; }
.machine-head.has-art > div:first-of-type { flex: 1; min-width: 0; }
.machine-art { flex: none; width: 104px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
@media (max-width: 720px) { .machine-art { display: none; } }

/* ===== Store ===== */
.shop-bar { border-bottom: 1px solid var(--line); background: var(--surface); }
.shop-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 1180px; margin: 0 auto; padding: .8rem 1.5rem; }
.shop-bar .brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 600; text-decoration: none; }
.shop-bar-links { display: flex; align-items: center; gap: 1rem; }
.shop-page { max-width: 1180px; }
.shop-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: center; gap: 2rem; margin: .5rem 0 2.4rem; }
.shop-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; }
.shop-hero-art { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .shop-hero { grid-template-columns: 1fr; } .shop-hero-art { max-width: 320px; margin: 0 auto; } }
.shop-page .shop-hero h1, .shop-hero h1 { margin: 0 0 .6rem; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.shop-hero p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.shop-kind { margin-bottom: 2.4rem; }
.shop-kind-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.shop-kind-head h2 { margin: 0; font-size: 1.25rem; }
.shop-kind-head p { margin: .15rem 0 0; color: var(--muted); }
.shop-kind-art { width: 84px; height: 58px; flex: none; }
.shop-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.shop-plan { display: flex; flex-direction: column; gap: .7rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.shop-plan h3 { margin: 0; font-size: 1.05rem; }
.shop-plan-summary { margin: -.3rem 0 0; color: var(--muted); font-size: .88rem; }
.shop-plan .button.block { margin-top: auto; }
.shop-plan.is-sold { opacity: .7; }
.shop-price { margin: 0; color: var(--muted); font-size: .88rem; }
.shop-price b { color: var(--ink); font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.shop-specs { display: flex; flex-direction: column; gap: .3rem; margin: 0; padding: .7rem 0; list-style: none; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); color: var(--muted); font-size: .9rem; }
.shop-specs b { color: var(--ink); font-weight: 600; }
.shop-terms-link { margin-top: 1rem; font-size: .88rem; }
.shop-terms { max-width: 72ch; }
.auth-switch { margin: 1.1rem 0 0; text-align: center; color: var(--muted); font-size: .9rem; }

.shop-verify { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.shop-order { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.shop-order-plan h2 { margin: .6rem 0 .2rem; }
.shop-order-plan .shop-specs { margin: .9rem 0; }
.shop-order-art { width: 100%; max-width: 220px; margin: 0 auto; }

.shop-section { margin-bottom: 2rem; }
.shop-section-title { margin: 0 0 .7rem; font-size: 1.05rem; }
.shop-row-art { width: 54px; height: 38px; flex: none; }
.shop-row-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.shop-cancel { position: relative; }
.shop-cancel summary { list-style: none; cursor: pointer; }
.shop-cancel summary::-webkit-details-marker { display: none; }
/* Cancelling opens inside the service's own row, full width, so it never covers the rows below. */
.shop-service { flex-wrap: wrap; }
.shop-cancel[open] { flex-basis: 100%; order: 10; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.shop-cancel .when-open { display: none; }
.shop-cancel[open] .when-open { display: inline; color: var(--muted); }
.shop-cancel[open] .when-closed { display: none; }
.shop-cancel-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1rem; width: 100%; padding: .9rem 1rem; border: 1px solid #efc7c1; border-radius: 10px; background: var(--danger-soft); }
.shop-cancel-form .check { flex: 1 1 18rem; }
.shop-overdue { color: var(--danger); font-weight: 600; }
.shop-pay-cell { min-width: 12rem; }
.shop-pay summary { list-style: none; display: inline-flex; cursor: pointer; }
.shop-pay summary::-webkit-details-marker { display: none; }
.shop-pay-options { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.shop-pay-option { display: flex; gap: .4rem; }
.shop-pay-option input { width: 9.5rem; }
.shop-payment { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .5rem; font-size: .88rem; }
.shop-instructions { white-space: pre-line; color: var(--muted); }

.shop-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1.2rem; padding: .25rem; width: fit-content; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shop-tabs a { padding: .45rem .95rem; border-radius: 9px; color: var(--muted); font-weight: 500; text-decoration: none; }
.shop-tabs a:hover { color: var(--ink); background: var(--surface-2); }
.shop-tabs a.active { color: var(--accent); background: var(--accent-soft); }
.shop-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.shop-limit { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shop-limit > span { display: flex; flex-direction: column; min-width: 0; }
.shop-limit small { color: var(--muted); font-size: .8rem; }
.shop-limit-art { width: 46px; height: 32px; flex: none; }
.shop-cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.2rem; }
.shop-budget { max-width: 26rem; }
.shop-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.shop-kind-pick { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.shop-kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.shop-kind-pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.shop-kind-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.shop-kind-pick small { color: var(--muted); font-size: .8rem; }
.shop-kind-pick-art { width: 74px; height: 50px; margin-bottom: .2rem; }
.shop-template { grid-column: span 1; }
.shop-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem 1.2rem; }
.shop-sort { max-width: 12rem; }
.shop-remove { margin-top: 1rem; }

@media (max-width: 760px) {
    .shop-order { grid-template-columns: 1fr; }
    .shop-bar-inner { padding: .7rem 1rem; }
    .shop-kind-art { width: 64px; height: 44px; }
}
.grid-2.spaced, .grid-3.spaced { display: grid; }
@media (max-width: 760px) { .grid-2.spaced, .grid-3.spaced { grid-template-columns: 1fr; } }
.shop-server-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.shop-server { display: flex; flex-direction: column; gap: .2rem; padding: .8rem .9rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); font-size: .88rem; color: var(--muted); }
.shop-server strong { color: var(--ink); font-size: .95rem; margin-bottom: .2rem; }
.shop-server b { color: var(--ink); font-weight: 600; }
.shop-sellable { display: flex; flex-direction: column; gap: .2rem; margin: 1rem 0 0; font-weight: 500; }
.shop-sellable .muted { font-weight: 400; font-size: .88rem; }
.shop-servers { margin-bottom: 1.2rem; }
.shop-price-fields { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem minmax(0, 8rem); gap: .6rem; align-items: end; }
.shop-act { position: relative; }
.shop-act summary { list-style: none; cursor: pointer; }
.shop-act summary::-webkit-details-marker { display: none; }
.shop-act-form { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 5; display: flex; flex-direction: column; gap: .6rem; width: 260px; padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 14px 34px rgba(15, 25, 35, .14); text-align: left; }
.shop-act-row { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .5rem; align-items: end; }
.shop-terms { text-align: justify; hyphens: auto; }
.shop-terms h2 { margin: 1.4rem 0 .5rem; font-size: 1.02rem; text-align: left; }
.shop-terms p, .shop-terms li { line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.shop-price-fields .sr-only + select, .shop-act-row .sr-only + select { margin-top: 0; }
.shop-closed { display: flex; flex-direction: column; align-items: center; gap: .6rem; max-width: 640px; margin: 3rem auto; text-align: center; }
.shop-closed h1 { margin: .4rem 0 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.02em; }
.shop-closed p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.shop-closed-art { width: 220px; height: auto; }
.shop-countdown { display: flex; gap: .7rem; margin: .6rem 0; }
.shop-countdown span { display: flex; flex-direction: column; align-items: center; min-width: 4.6rem; padding: .8rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.shop-countdown b { font-size: 2rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
.shop-countdown small { color: var(--muted); font-size: .78rem; }
.shop-reopen { max-width: 18rem; }
@media (max-width: 480px) { .shop-countdown span { min-width: 3.8rem; } .shop-countdown b { font-size: 1.5rem; } }
.shop-left { margin: 0; font-size: .86rem; font-weight: 500; color: var(--ok); }
.shop-left.is-low { color: var(--warn); }
.shop-peek summary { cursor: pointer; color: var(--accent); font-size: .88rem; list-style: none; }
.shop-peek summary::-webkit-details-marker { display: none; }
.shop-peek[open] summary { margin-bottom: .6rem; }
.shop-peek .shop-preview h2 { display: none; }
.shop-preview { margin-top: 1.4rem; }
.shop-preview h2 { margin: 0 0 .8rem; font-size: 1.05rem; }
.shop-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.shop-peek .shop-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.shop-preview-tile { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; font-size: .84rem; font-weight: 500; }
.shop-preview-tile small { color: var(--muted); font-size: .72rem; font-weight: 400; }
.shop-preview-tile.is-off { opacity: .45; filter: grayscale(1); }
.shop-preview-art { width: 70px; height: 48px; }
.shop-peek .shop-preview-art { width: 48px; height: 34px; }
.shop-autofill { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--warn-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 480px) {
    .shop-bar .brand-text { display: none; }
    .shop-bar-links { gap: .6rem; }
    .shop-bar-links .button { padding-inline: .7rem; }
}
/* The panel preview opens over the card, so the cards next to it keep their size. */
.shop-peek { position: relative; }
.shop-peek .shop-preview { position: absolute; left: -.6rem; top: calc(100% + .3rem); z-index: 6; width: min(300px, 80vw); margin: 0; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 16px 40px rgba(15, 25, 35, .18); }

.shop-quick { margin-bottom: 1rem; }
.shop-quick-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: .7rem; align-items: end; }
@media (max-width: 900px) { .shop-quick-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shop-quick-form .button { grid-column: 1 / -1; } }
.shop-switch { min-width: 6.5rem; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: .82rem; font-weight: 500; cursor: pointer; }
.shop-switch.on { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.shop-switch:disabled { cursor: not-allowed; background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.shop-servers summary { cursor: pointer; list-style: none; }
.shop-servers summary::-webkit-details-marker { display: none; }
.shop-servers[open] summary { margin-bottom: 1rem; }
.shop-more summary { cursor: pointer; list-style: none; }
.shop-more summary::-webkit-details-marker { display: none; }
.shop-more summary::after { content: ' +'; color: var(--muted); }
.shop-more[open] summary::after { content: ' −'; }

/* Store front page */
.shop-hero-lead { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.shop-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.shop-hero-actions .button { min-height: 44px; padding-inline: 1.2rem; font-size: .95rem; }
.shop-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: .4rem 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.shop-facts li { display: inline-flex; align-items: center; gap: .45rem; }
.shop-facts .icon { width: 18px; height: 18px; color: var(--accent); }
.shop-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2.2rem; }
.shop-jump a { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .4rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font-weight: 500; text-decoration: none; }
.shop-jump a:hover { border-color: var(--accent); color: var(--accent); }
.shop-jump-art { width: 38px; height: 28px; }
.shop-kind { scroll-margin-top: 1.5rem; }
.shop-plan { transition: border-color .15s, box-shadow .15s; }
.shop-plan:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 10px 28px rgba(15, 25, 35, .08); }
.shop-included { margin: 1rem 0 2.5rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.shop-included h2 { margin: 0 0 1.1rem; font-size: 1.15rem; }
.shop-included ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.shop-included li { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; font-size: .9rem; font-weight: 500; }
.shop-included-art { width: 92px; height: 64px; }
.shop-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.4rem 0 .5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.shop-footer-brand { display: inline-flex; align-items: center; gap: .6rem; }
.shop-footer-brand .brand-mark { width: 28px; height: 28px; font-size: .72rem; }
.shop-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.shop-footer a { color: var(--muted); }
.shop-footer a:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .shop-plan { transition: none; } }

/* Sign-in pages */
.password-field { position: relative; display: block; }
.password-field input { width: 100%; padding-right: 2.8rem; }
.password-reveal { position: absolute; top: 50%; right: .35rem; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-reveal:hover { background: var(--surface-2); color: var(--ink); }
.password-reveal[aria-pressed="true"] { color: var(--accent); }
.password-reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.label-link { font-size: .84rem; font-weight: 400; }
input[aria-invalid="true"] { border-color: var(--danger); }
.auth-main .check { font-size: .9rem; }
.stack label > span.label-row, label > span.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.user-more > summary { display: block; cursor: pointer; list-style: none; margin-bottom: 0; }
.user-more > summary::-webkit-details-marker { display: none; }
.user-more[open] > summary { margin-bottom: 1rem; }

.time-options { display: flex; flex-direction: column; gap: .55rem; }
.time-add { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.time-add input[type=number] { width: 5.5rem; }
.time-add select, .time-add input[type=datetime-local] { width: auto; min-width: 9rem; }
.time-add .price-input { width: 7rem; }

/* Store: one kind at a time */
.shop-facts-line { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.shop-spec-line { margin: 0; color: var(--ink-2); font-size: .92rem; }
.shop-plans { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 600px) { .shop-hero-art { max-width: 210px; } .shop-hero { gap: 1rem; } }
@media (max-width: 640px) {
    .shop-plan-row { flex-wrap: wrap; }
    .shop-plan-row .shop-row-art { display: none; }
    .shop-plan-row .grow { flex: 1 1 100%; }
    .shop-plan-row .shop-row-price { margin-right: auto; }
    .shop-tabs { width: 100%; }
    .shop-tabs a { flex: 1 1 auto; text-align: center; }
    .row-actions { white-space: normal; }
    .shop-act-form { right: auto; left: 0; }
    /* Services on a phone: picture and name on top, state and buttons on a line below. */
    .shop-service .shop-row-art { width: 40px; height: 28px; }
    .shop-service .grow { flex: 1 1 calc(100% - 60px); }
    .shop-service > .pill { margin-left: 52px; }
    .shop-cancel-form .button { width: 100%; }
}

/* Text terminal (containers) and clipboard notes */
.console-wrap { position: relative; }
.terminal.xterm-host { height: calc(100vh - 260px); min-height: 420px; background: #0b1018; padding: 8px 4px 8px 10px; }
.terminal.xterm-host:fullscreen { height: 100vh; border-radius: 0; }
.terminal.xterm-host .xterm { height: 100%; }
.console-note { position: absolute; top: 12px; right: 14px; z-index: 5; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(20, 30, 45, .92); color: #e6ebf0; font-size: 13px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
body.desktop-view .console-note { position: fixed; top: 56px; }
@media (max-width: 700px) {
    .terminal.xterm-host { height: 65vh; min-height: 300px; }
}

/* Clients' network (admin store, security) */
.net-server { display: block; }
.net-server summary { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; cursor: pointer; list-style: none; }
.net-server summary::-webkit-details-marker { display: none; }
.net-server summary .status { margin-left: auto; }
.net-script { position: relative; margin-top: .6rem; }
.net-script .button { position: absolute; top: .5rem; right: .5rem; }
.net-script pre { max-height: 320px; overflow: auto; margin: 0; padding: .9rem 1rem; border-radius: 10px; background: #0b1018; color: #d7dde8; font-size: .78rem; line-height: 1.45; }

/* Store home: kinds and steps */
.shop-home-title { margin: 0 0 1rem; font-size: 1.2rem; letter-spacing: -.01em; }
.shop-kinds-home { margin-bottom: 2.6rem; }
.shop-kind-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.shop-kind-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 1.2rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.shop-kind-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.shop-kind-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shop-kind-card-art { width: 96px; height: 66px; margin-bottom: .4rem; }
.shop-kind-card strong { font-size: 1.08rem; }
.shop-kind-card-hint { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.shop-kind-card-from { margin-top: auto; padding-top: .7rem; color: var(--muted); font-size: .88rem; }
.shop-kind-card-from b { color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.shop-kind-card-go { color: var(--accent); font-size: .88rem; font-weight: 600; }
.shop-steps { margin-bottom: 2.6rem; }
.shop-steps ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.shop-steps li { display: flex; flex-direction: column; gap: .3rem; padding-left: 2.6rem; position: relative; counter-increment: step; }
.shop-steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.shop-steps span { color: var(--muted); font-size: .92rem; line-height: 1.5; }

/* Store: plans of one kind */
.plans-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .6rem; margin: .4rem 0 2rem; }
.plans-kind { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem .55rem .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.plans-kind:hover { border-color: var(--accent); }
.plans-kind.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plans-kind span { display: flex; flex-direction: column; min-width: 0; }
.plans-kind small { color: var(--muted); font-size: .8rem; }
.plans-kind-art { width: 52px; height: 36px; flex: none; }
.plans-head { margin-bottom: 1.2rem; }
.plans-head h1 { margin: 0 0 .3rem; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.02em; }
.plans-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.plans-compare { margin-bottom: 2.8rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.plans-scroll { overflow-x: auto; }
.plans-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
.plans-table th, .plans-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line-2); text-align: center; vertical-align: middle; }
.plans-table tbody th { text-align: left; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.plans-table thead th { padding-top: 1.3rem; padding-bottom: 1.1rem; vertical-align: top; border-bottom: 1px solid var(--line); }
.plans-table thead th, .plans-table td { min-width: 150px; }
.plans-table .plans-label, .plans-table tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 190px; }
.plans-name { display: block; font-size: 1.02rem; font-weight: 650; }
.plans-price { display: block; margin-top: .35rem; color: var(--muted); font-size: .85rem; font-weight: 400; }
.plans-price b { display: block; color: var(--ink); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plans-summary { display: block; margin-top: .4rem; color: var(--muted); font-size: .82rem; font-weight: 400; }
.plans-table thead th.is-sold { opacity: .6; }
.plans-table td b { font-weight: 650; font-variant-numeric: tabular-nums; }
.plans-yes { color: var(--ok); font-weight: 700; }
.plans-no { color: var(--muted); }
.plans-actions td, .plans-actions th { border-bottom: 0; padding-top: 1rem; padding-bottom: 1.2rem; }
.plans-actions td { vertical-align: top; }
.plans-actions .shop-left { display: block; margin-bottom: .4rem; }
.plans-panel { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 2rem; align-items: start; margin-bottom: 2.8rem; }
.plans-panel h2 { margin: 0 0 .4rem; font-size: 1.25rem; }
.plans-panel-text > p { margin: 0 0 1.1rem; color: var(--muted); line-height: 1.55; }
.plans-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.plans-blocks li { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .65rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: .86rem; font-weight: 500; }
.plans-blocks small { color: var(--muted); font-size: .76rem; font-weight: 400; }
.plans-blocks li.is-none { opacity: .5; }
.plans-blocks li.is-some small { color: var(--warn); }
.plans-block-art { width: 44px; height: 30px; }
.mock-window { margin: 0; border-radius: 14px; overflow: hidden; background: #0e141d; box-shadow: 0 24px 60px rgba(10, 20, 35, .22); }
.mock-bar { display: flex; align-items: center; gap: .4rem; padding: .6rem .8rem; background: #182131; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a465a; }
.mock-bar span { margin-left: .6rem; overflow: hidden; color: #8d9ab0; font-size: .76rem; white-space: nowrap; text-overflow: ellipsis; }
.mock-tabs { display: flex; gap: .2rem; overflow-x: auto; padding: .5rem .6rem 0; border-bottom: 1px solid #222d3f; }
.mock-tabs span { padding: .35rem .7rem; border-radius: 7px 7px 0 0; color: #8d9ab0; font-size: .78rem; white-space: nowrap; }
.mock-tabs span.is-on { background: #0b1018; color: #e6ebf0; }
.mock-console { display: flex; flex-direction: column; min-height: 230px; padding: 1rem 1.1rem 1.2rem; background: #0b1018; color: #c9d2df; font-family: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.65; }
.mock-line { white-space: pre-wrap; word-break: break-word; }
.mock-prompt { color: #7fb2ff; }
.mock-ok { color: #6fd39b; }
.mock-cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: text-bottom; background: #c9d2df; animation: mock-blink 1.1s steps(1) infinite; }
@keyframes mock-blink { 50% { opacity: 0; } }
.mock-window figcaption { padding: .55rem .9rem; background: #0e141d; color: #8d9ab0; font-size: .76rem; }
@media (max-width: 860px) { .plans-panel { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .plans-kinds { grid-template-columns: 1fr 1fr; }
    .plans-kind-art { width: 40px; height: 28px; }
    .plans-table .plans-label, .plans-table tbody th { min-width: 130px; white-space: normal; }
    .plans-table thead th, .plans-table td { min-width: 132px; padding-inline: .7rem; }
}
@media (prefers-reduced-motion: reduce) { .mock-cursor { animation: none; } .shop-kind-card { transition: none; } .shop-kind-card:hover { transform: none; } }
.plans-compare, .plans-scroll, .plans-panel > * { min-width: 0; max-width: 100%; }
.plans-table thead th { background: var(--surface-2); color: var(--ink); }
.plans-table thead .plans-label { background: var(--surface-2); }
.plans-common { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding: 1rem 1.1rem 1.2rem; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .88rem; }
.plans-common strong { font-weight: 600; }
.plans-common ul { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.plans-common li { padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); }
.plans-common li::before { content: '✓ '; color: var(--ok); font-weight: 700; }

/* Maintenance page */
body.maintenance-page { min-height: 100vh; margin: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #18263a 0%, #0b1018 60%); color: #e6ebf0; }
.maintenance { display: flex; flex-direction: column; align-items: center; gap: .7rem; max-width: 560px; padding: 2rem 1.4rem; text-align: center; }
.maintenance h1 { margin: 0; color: #f2f5f9; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; }
.maintenance-brand { margin: 0; color: #7fb2ff; font-weight: 600; }
.maintenance-text { margin: 0; color: #a9b4c4; font-size: 1.02rem; line-height: 1.55; }
.maintenance .shop-countdown b { color: #e6ebf0; }
.maintenance .shop-countdown span { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.maintenance .shop-countdown small { color: #8d9ab0; }
.maintenance-loader { position: relative; width: 150px; height: 150px; margin-bottom: 1rem; }
.maintenance-ring { position: absolute; inset: 0; border: 3px solid rgba(127, 178, 255, .14); border-top-color: #7fb2ff; border-radius: 50%; animation: maint-spin 1.4s linear infinite; }
.maintenance-ring.is-inner { inset: 18px; border-top-color: transparent; border-right-color: #6fd39b; animation-duration: 2.2s; animation-direction: reverse; }
.maintenance-rack { position: absolute; inset: 46px 52px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.maintenance-rack i { display: block; height: 12px; border-radius: 3px; background: #223049; position: relative; }
.maintenance-rack i::after { content: ''; position: absolute; right: 6px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: #6fd39b; animation: maint-led 1.2s infinite; }
.maintenance-rack i:nth-child(2)::after { animation-delay: .3s; }
.maintenance-rack i:nth-child(3)::after { animation-delay: .6s; }
.maintenance-dots { margin: 1rem 0 0; color: #8d9ab0; font-size: .86rem; }
.maintenance-dots span { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: 50%; background: currentColor; animation: maint-led 1.2s infinite; }
.maintenance-dots span:nth-child(2) { animation-delay: .2s; }
.maintenance-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes maint-spin { to { transform: rotate(360deg); } }
@keyframes maint-led { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .maintenance-ring, .maintenance-rack i::after, .maintenance-dots span { animation: none; } }
.maintenance-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.maintenance-banner form { margin: 0; }

/* Store bar stays on top while scrolling */
.shop-bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }

/* Uploaded logo in place of the initials */
img.brand-logo { display: block; object-fit: contain; background: transparent !important; box-shadow: none !important; border-radius: 8px; }
.logo-preview { width: 56px; height: 56px; flex: none; }
span.logo-preview { font-size: 1.1rem; }

/* Hero title: a drawn cloud in place of the word */
.shop-hero-title .hero-cloud { display: inline-block; vertical-align: -0.42em; margin: 0 -.06em 0 .05em; }
.shop-hero-title .hero-cloud img { display: block; width: 1.7em; height: auto; margin: -.16em 0; animation: hero-float 5s ease-in-out infinite; }
.shop-hero-title .hero-line { display: block; }
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .shop-hero-title .hero-cloud img { animation: none; } }

/* Free machines */
.free-slots { display: flex; flex-direction: column; gap: .8rem; margin: 0 0 1.4rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.free-slots-count p { margin: 0 0 .5rem; font-size: 1rem; }
.free-slots-count b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.free-slots-count span { color: var(--muted); }
.free-slots-bar { display: block; width: 100%; height: 10px; border: 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.free-slots-bar::-webkit-meter-bar { background: var(--surface-2); border: 0; border-radius: 99px; height: 10px; }
.free-slots-bar::-webkit-meter-optimum-value, .free-slots-bar::-webkit-meter-suboptimum-value, .free-slots-bar::-webkit-meter-even-less-good-value { background: var(--accent); border-radius: 99px; }
.free-slots-bar::-moz-meter-bar { background: var(--accent); border-radius: 99px; }
.free-warning { margin: 0; }
.free-wait { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.free-wait p { margin: 0; font-weight: 500; }
.free-wait form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0; }
.free-notice { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.free-notice > div { display: flex; flex-direction: column; gap: .2rem; }
.free-notice details form { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.free-actions { display: flex; align-items: flex-start; gap: .5rem; }
.free-actions form { margin: 0; }

/* Store hero title: the logo's typeface, a little larger */
.shop-page .shop-hero h1.shop-hero-title, .shop-hero h1.shop-hero-title { font-family: "Poppins", "Plex", system-ui, sans-serif; font-weight: 600; font-size: clamp(2.1rem, 4.4vw, 3.15rem); line-height: 1.12; letter-spacing: -.03em; }

/* "New": the free machine stands out */
.shop-news { display: inline-flex; align-items: center; gap: .6rem; padding: .3rem .85rem .3rem .3rem; border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line)); border-radius: 99px; background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none; }
.shop-news:hover { border-color: var(--ok); }
.shop-news span { padding: .15rem .6rem; border-radius: 99px; background: var(--ok); color: #fff; font-size: .78rem; font-weight: 600; }
.shop-kind-card { position: relative; }
.shop-kind-card.is-new { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); box-shadow: 0 0 0 3px var(--ok-soft); }
.shop-new-badge { position: absolute; top: .9rem; right: .9rem; padding: .18rem .6rem; border-radius: 99px; background: var(--ok); color: #fff; font-size: .74rem; font-weight: 600; font-style: normal; }
.shop-new-badge.is-inline { position: static; margin-left: .35rem; padding: .08rem .45rem; font-size: .68rem; vertical-align: 1px; }

/* With an uploaded logo: the picture carries the name, so it is bigger and the written name is only for screen readers */
img.brand-logo { width: auto !important; height: 44px !important; max-width: 160px; border-radius: 0; }
.appbar img.brand-logo { height: 40px !important; }
.shop-bar img.brand-logo { height: 46px !important; }
.auth-main img.brand-logo { height: 56px !important; }
.shop-footer-brand img.brand-logo { height: 32px !important; }
.logo-preview img.brand-logo, img.brand-logo.logo-preview { height: 56px !important; }
img.brand-logo + .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Store bar: the cloud sits on the bar's bottom edge, half inside, half hanging below */
.shop-bar { overflow: visible; }
.shop-bar .brand { position: relative; z-index: 2; align-self: flex-start; align-items: flex-start; height: 44px; }
.shop-bar img.brand-logo { height: 84px !important; max-width: 220px; margin-top: -8px; filter: drop-shadow(0 10px 16px rgba(42, 95, 199, .32)) drop-shadow(0 2px 3px rgba(15, 26, 44, .18)); transition: transform .2s ease; }
.shop-bar .brand:hover img.brand-logo { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .shop-bar img.brand-logo { transition: none; } .shop-bar .brand:hover img.brand-logo { transform: none; } }
.shop-bar-links a { white-space: nowrap; }
@media (max-width: 600px) { .shop-bar .brand { height: 40px; } .shop-bar img.brand-logo { height: 62px !important; margin-top: -4px; } .shop-bar-links { gap: .6rem; } }
@media (max-width: 480px) { .shop-bar-links .shop-admin-link { display: none; } .shop-bar-links { min-width: 0; } .shop-bar-links a.button { white-space: normal; text-align: center; line-height: 1.15; padding-block: .4rem; font-size: .85rem; max-width: 9.5rem; } }

/* Support tickets */
.ticket-row .badge { flex: none; }
.ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin: .4rem 0 0; color: var(--muted); font-size: .9rem; }
.ticket-thread { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.2rem; }
.ticket-message { max-width: 780px; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ticket-message.is-staff { margin-left: auto; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.ticket-message header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; font-size: .88rem; }
.ticket-message time { color: var(--muted); }
.ticket-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.ticket-files { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.ticket-files img { display: block; width: 140px; height: 100px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.ticket-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.ticket-actions p { margin: 0; }
.inline-form.password-set { flex-wrap: wrap; }
.inline-form.password-set small, .inline-form.password-set .error { flex-basis: 100%; }

/* Machine being created */
.creating-card { display: flex; align-items: center; gap: 1rem; }
.creating-card h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.creating-card p { margin: 0; }
.creating-spinner { flex: none; width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: maint-spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .creating-spinner { animation: none; } }
.free-notice { padding: .75rem 1rem; }
.free-notice strong { font-size: .95rem; }
.free-notice span { font-size: .88rem; }
.net-chevron { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.net-server[open] .net-chevron { transform: rotate(90deg); }

/* Machines list: search and the admin's filter side by side. */
.machines-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.machines-tools .search { margin-bottom: 0; flex: 1 1 18rem; max-width: 26rem; }
.machines-tools .shop-tabs { margin: 0; }
.machines-table td > .badge { margin-left: .35rem; vertical-align: 1px; }
.nowrap { white-space: nowrap; }

/* Ports open to the internet, on the machine's network page. */
.port-list { margin: 0 -1.25rem 1rem; }
.port-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem 1rem; }
.port-form label { display: flex; flex-direction: column; gap: .3rem; flex: 1 1 9rem; }
.port-form label span { font-size: .82rem; color: var(--muted); }
.port-form .button { flex: none; }


/* ---------- "What do you want to host?": pick a kind, see only its plans, go back. ---------- */
.pick { margin: 2.5rem 0 3rem; }
.pick [hidden] { display: none !important; }
.pick-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.pick-tile { position: relative; display: flex; flex-direction: column; min-height: 15.5rem; padding: 0 1.1rem 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.pick-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 6.6rem; background: var(--accent-soft); transition: background .25s; }
.pick-tile-art { position: relative; width: 104px; height: 72px; margin: 1.2rem 0 1.5rem; transition: transform .25s; }
.pick-tile-name { position: relative; font-family: "Poppins", "Plex", system-ui, sans-serif; font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em; }
.pick-tile-hint { position: relative; margin-top: .3rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.pick-tile-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .9rem; font-size: .88rem; color: var(--muted); }
.pick-tile-foot b { color: var(--ink); font-weight: 600; }
.pick-tile-arrow { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); transition: transform .2s, background .2s, color .2s, border-color .2s; }
.pick-tile:hover, .pick-tile:focus-visible { border-color: var(--accent); box-shadow: 0 12px 28px -18px rgba(13, 107, 114, .55); transform: translateY(-3px); }
.pick-tile:hover::before, .pick-tile:focus-visible::before { background: var(--accent); }
.pick-tile:hover .pick-tile-art, .pick-tile:focus-visible .pick-tile-art { transform: translateY(-2px) scale(1.04); }
.pick-tile:hover .pick-tile-arrow, .pick-tile:focus-visible .pick-tile-arrow { transform: translateX(3px); background: var(--accent); border-color: var(--accent); color: #fff; }
.pick-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pick-tile.is-soon::before { background: var(--surface-2, #f1f3f4); }
.pick-soon { display: inline-block; padding: .15rem .55rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .76rem; font-weight: 600; }

/* The chosen kind: a header with the way back, then its plans. */
.pick-head { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-radius: 16px; background: var(--accent); color: #fff; }
.pick-head h3 { margin: 0; font-family: "Poppins", "Plex", system-ui, sans-serif; font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; }
.pick-head p { margin: .15rem 0 0; color: rgba(255, 255, 255, .82); font-size: .9rem; }
.pick-head-art { width: 76px; height: 52px; flex: none; }
.pick-back { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.pick-back:hover, .pick-back:focus-visible { background: rgba(255, 255, 255, .16); border-color: #fff; }
.pick-back:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pick-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .9rem; margin-top: 1rem; }
.pick-plan { display: flex; flex-direction: column; gap: .7rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pick-plan header { display: flex; flex-direction: column; gap: .15rem; }
.pick-plan-kind { color: var(--muted); font-size: .78rem; }
.pick-plan h4 { margin: 0; font-size: 1.02rem; }
.pick-plan-price { margin: 0; color: var(--muted); font-size: .9rem; }
.pick-plan-price b { color: var(--ink); font-family: "Poppins", "Plex", system-ui, sans-serif; font-weight: 600; font-size: 1.7rem; letter-spacing: -.02em; }
.pick-plan-specs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.pick-plan-specs li { padding: .25rem .55rem; border-radius: 8px; background: var(--accent-soft); font-size: .82rem; color: var(--ink); }
.pick-plan-specs b { font-weight: 600; }
.pick-plan-summary { margin: 0; color: var(--muted); font-size: .86rem; }
.pick-plan .button { margin-top: auto; }
.pick-plan.is-free { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.pick-plan.is-out { opacity: .7; }
.pick-plan .button.is-disabled { pointer-events: none; color: var(--muted); }
.pick-more { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0 0; font-size: .9rem; }
.pick-empty { margin-top: 1rem; padding: 1.4rem; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.pick-empty p { margin: 0; }
.pick-empty-links { display: flex; gap: 1.2rem; margin-top: .7rem !important; font-weight: 600; }

/* One orchestrated move: the chosen tile becomes the header; the plans come in after it. */
.pick-tile[data-pick-open="web"], .pick-panel[data-pick-panel="web"] .pick-head { view-transition-name: pick-web; }
.pick-tile[data-pick-open="vps"], .pick-panel[data-pick-panel="vps"] .pick-head { view-transition-name: pick-vps; }
.pick-tile[data-pick-open="machines"], .pick-panel[data-pick-panel="machines"] .pick-head { view-transition-name: pick-machines; }
.pick-tile[data-pick-open="bot"], .pick-panel[data-pick-panel="bot"] .pick-head { view-transition-name: pick-bot; }
::view-transition-group(*) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
.pick.is-open .pick-plan { animation: pick-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.pick.is-open .pick-plan:nth-child(2) { animation-delay: .05s; }
.pick.is-open .pick-plan:nth-child(3) { animation-delay: .1s; }
.pick.is-open .pick-plan:nth-child(4) { animation-delay: .15s; }
.pick.is-open .pick-plan:nth-child(n+5) { animation-delay: .2s; }
@keyframes pick-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .pick-tile, .pick-tile-art, .pick-tile-arrow { transition: none; }
    .pick.is-open .pick-plan { animation: none; }
}

@media (max-width: 1000px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    .pick-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .pick-tile { min-height: 0; padding: 0 .9rem .85rem; }
    .pick-tile::before { height: 5.2rem; }
    .pick-tile-art { width: 80px; height: 56px; margin: .9rem 0 1.1rem; }
    .pick-tile-hint { display: none; }
    .pick-tile-name { font-size: 1rem; }
    .pick-tile-foot { font-size: .8rem; }
    .pick-tile-arrow { display: none; }
    .pick-head { flex-wrap: wrap; gap: .7rem; }
    .pick-head-art { display: none; }
    .pick-head > div { flex: 1 1 100%; order: 2; }
}
@media (max-width: 340px) { .pick-grid { grid-template-columns: 1fr; } }

/* Websites: own domains on the machine page, the gateway on the admin security page. */
.own-domain { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.own-domain h3, .web-gateway h3 { margin: 0 0 .25rem; font-size: 1rem; }
.own-domain .toolbar { margin-top: .8rem; flex-wrap: wrap; }
.dns-steps { margin-top: 1rem; padding: .9rem 1rem; border-radius: 10px; background: var(--accent-soft); display: flex; flex-direction: column; gap: .5rem; }
.dns-table { border-collapse: collapse; font-size: .88rem; }
.dns-table th { text-align: left; font-weight: 600; color: var(--muted); padding: .2rem 1.4rem .2rem 0; }
.dns-table td { padding: .2rem 1.4rem .2rem 0; }
.web-gateway { margin: 1.2rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .7rem; }
.web-gateway .mini-row { padding: 0; border: 0; }

/* Command boxes: one line that scrolls, the buttons beside it. */
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.copy-row code { flex: 1 1 22rem; min-width: 0; overflow-x: auto; white-space: nowrap; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: .8rem; }

/* Website panel of a web server. */
.site-address { font-size: 1rem; font-weight: 600; }
.site-new { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.site-new h3 { margin: 0 0 .6rem; font-size: 1rem; }
.site-name-form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.site-name-input { display: flex; align-items: stretch; flex: 1 1 22rem; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.site-name-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.site-name-input input { flex: 1 1 8rem; min-width: 0; border: 0; border-radius: 0; box-shadow: none; padding: .6rem .75rem; font-family: var(--mono, monospace); }
.site-name-input input:focus { outline: none; box-shadow: none; }
.site-name-input select, .site-zone { flex: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--accent-soft); padding: .6rem .75rem; font-family: var(--mono, monospace); color: var(--ink); }
.site-check { flex: 1 1 100%; margin: 0; min-height: 1.2em; font-size: .88rem; color: var(--muted); }
.site-check.is-free { color: var(--ok); }
.site-check.is-taken { color: var(--danger); }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.site-grid .card { margin: 0; }
.zone-picks { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }

/* Website panel: its parts, files, editor, database and logs. */
.site-parts { margin-bottom: 1rem; flex-wrap: wrap; }
.file-actions { display: flex; align-items: center; gap: .15rem; margin-right: .5rem; }
.file-actions .file-del { margin: 0; opacity: 1; }
.file-rename { position: relative; }
.file-rename > summary { list-style: none; cursor: pointer; }
.file-rename > summary::-webkit-details-marker { display: none; }
.file-rename[open] .file-new-form { position: absolute; right: 0; top: 100%; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem; box-shadow: 0 6px 18px rgba(23, 32, 42, .14); white-space: nowrap; }
.site-editor { display: grid; gap: .7rem; justify-items: start; }
.site-editor textarea { width: 100%; font-size: .82rem; line-height: 1.5; tab-size: 4; resize: vertical; }
.site-log { max-height: 34rem; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; font-family: var(--mono); font-size: .76rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.db-rows td, .db-rows th { font-size: .8rem; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.redirect-form { display: grid; gap: .6rem; justify-items: start; }
.redirect-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.redirect-row input { min-width: 16rem; }

/* ---- Store home, second pass: quieter tiles with line drawings, a calm category head, smooth opening. ---- */
.kind-art { display: block; color: var(--ink); }
.kind-art .ka-paper { fill: var(--surface); }
.kind-art .ka-soft { fill: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.kind-art .ka-accent { fill: var(--accent); stroke: none; }
.kind-art .ka-accent-fill { fill: var(--accent); }
.kind-art .ka-accent-line { stroke: var(--accent); stroke-width: 2; }
.kind-art .ka-dot { fill: var(--line); stroke: none; }
.kind-art .ka-ink { fill: currentColor; stroke: none; }
.kind-art .ka-hole { fill: var(--surface); stroke: none; }
.kind-art .ka-ribs { stroke-width: 1.2; opacity: .55; }
.kind-art .ka-accent-fill + .ka-ribs, .kind-art .ka-accent-fill ~ path.ka-ribs { stroke: currentColor; }

.pick-tile { padding: 0; min-height: 0; border-radius: 14px; transition: border-color .2s, box-shadow .25s, transform .25s cubic-bezier(.2, .8, .2, 1); }
.pick-tile::before { content: none; }
.pick-tile-stage { display: grid; place-items: center; height: 8.4rem; margin: .45rem .45rem 0; border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--surface-2, #f3f5f7)); transition: background .25s; }
.pick-tile-art { width: 132px; height: 92px; margin: 0; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.pick-tile-name { margin: 1rem 1.1rem 0; }
.pick-tile-hint { margin: .3rem 1.1rem 0; }
.pick-tile-foot { margin: auto 1.1rem 0; padding: 1rem 0 1rem; }
.pick-tile:hover, .pick-tile:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 14px 30px -22px rgba(13, 50, 60, .55); transform: translateY(-2px); }
.pick-tile:hover .pick-tile-stage, .pick-tile:focus-visible .pick-tile-stage { background: color-mix(in srgb, var(--accent) 13%, var(--surface-2, #f3f5f7)); }
.pick-tile:hover .pick-tile-art, .pick-tile:focus-visible .pick-tile-art { transform: translateY(-3px); }
.pick-tile.is-soon .pick-tile-stage { background: var(--surface-2, #f3f5f7); }
.pick-tile.is-soon .pick-tile-art { opacity: .55; filter: grayscale(1); }
.pick-tile-arrow { font-size: .95rem; }

.pick-head { gap: 1rem; padding: .75rem 1.1rem .75rem .75rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.pick-head p { color: var(--muted); }
.pick-head-art { width: 72px; height: 50px; padding: .2rem; border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--surface-2, #f3f5f7)); }
.pick-back { border-color: var(--line); color: var(--ink); background: var(--surface); }
.pick-back:hover, .pick-back:focus-visible { background: var(--surface-2, #f3f5f7); border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.pick-back:focus-visible { outline-color: var(--accent); }
.pick-plan { transition: border-color .2s, box-shadow .25s; }
.pick-plan:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 12px 26px -22px rgba(13, 50, 60, .5); }

/* Opening a kind: the tiles fade back, its plans come in from below; the section keeps its height meanwhile. */
.pick.is-switching { overflow: hidden; }
.pick-panel.is-entering .pick-head { animation: pick-head-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.pick-grid.is-entering .pick-tile { animation: pick-in .38s cubic-bezier(.2, .8, .2, 1) both; }
.pick-grid.is-entering .pick-tile:nth-child(2) { animation-delay: .03s; }
.pick-grid.is-entering .pick-tile:nth-child(3) { animation-delay: .06s; }
.pick-grid.is-entering .pick-tile:nth-child(4) { animation-delay: .09s; }
.pick.is-open .pick-plan:nth-child(2) { animation-delay: .04s; }
.pick.is-open .pick-plan:nth-child(3) { animation-delay: .08s; }
.pick.is-open .pick-plan:nth-child(4) { animation-delay: .12s; }
@keyframes pick-head-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .pick-panel.is-entering .pick-head, .pick-grid.is-entering .pick-tile, .pick.is-open .pick-plan { animation: none; }
    .pick-tile, .pick-tile-art { transition: none; }
}

/* Hero without the floating picture in the title. */
.shop-news { padding: .35rem .8rem; border-color: var(--line); color: var(--muted); font-size: .88rem; font-weight: 500; }
.shop-news::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.shop-news:hover { color: var(--ink); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }

/* Store bar: the name sits level with the mark (only without an uploaded logo, which hangs below the bar). */
.shop-bar .brand:not(:has(img.brand-logo)) { align-items: center; }
.shop-bar .brand:not(:has(img.brand-logo)) .brand-text { justify-content: center; line-height: 1; }

/* Language: a small neutral switch, the chosen one raised. */
.auth-lang { gap: 0; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, #f3f5f7); }
.auth-lang button { min-width: 34px; height: 26px; padding: 0 .5rem; border-radius: 6px; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .06em; transition: color .15s, background .15s, box-shadow .15s; }
.auth-lang button:hover { color: var(--ink); }
.auth-lang button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 32, .14), 0 0 0 1px rgba(16, 24, 32, .04); }
:root[data-theme=dark] .auth-lang button.on { background: color-mix(in srgb, var(--ink) 14%, var(--surface)); color: var(--ink); }
.auth-lang button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pick { scroll-margin-top: 5.5rem; }
.pick-tile-art { width: 168px; height: 118px; }
@media (max-width: 900px) { .pick-tile-art { width: 140px; height: 98px; } }
@media (max-width: 600px) { .pick-tile-stage { height: 6.4rem; } .pick-tile-art { width: 112px; height: 78px; } }

/* Each kind its own colour, on a paper grain (an SVG noise, so no image to load). */
.pick-tile-stage, .pick-head-art {
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.16 0 0 0 0 0.23 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
    background-image: var(--grain);
    background-color: var(--stage, #eef2f4);
}
[data-pick-open="web"] .pick-tile-stage, [data-pick-panel="web"] .pick-head-art { --stage: #fbecc9; }
[data-pick-open="vps"] .pick-tile-stage, [data-pick-panel="vps"] .pick-head-art { --stage: #d8ecf7; }
[data-pick-open="machines"] .pick-tile-stage, [data-pick-panel="machines"] .pick-head-art { --stage: #fde0d6; }
[data-pick-open="bot"] .pick-tile-stage, [data-pick-panel="bot"] .pick-head-art { --stage: #e7e1fb; }
:root[data-theme=dark] [data-pick-open="web"] .pick-tile-stage, :root[data-theme=dark] [data-pick-panel="web"] .pick-head-art { --stage: #3a3220; }
:root[data-theme=dark] [data-pick-open="vps"] .pick-tile-stage, :root[data-theme=dark] [data-pick-panel="vps"] .pick-head-art { --stage: #1d3340; }
:root[data-theme=dark] [data-pick-open="machines"] .pick-tile-stage, :root[data-theme=dark] [data-pick-panel="machines"] .pick-head-art { --stage: #3d2620; }
:root[data-theme=dark] [data-pick-open="bot"] .pick-tile-stage, :root[data-theme=dark] [data-pick-panel="bot"] .pick-head-art { --stage: #2c2742; }
.pick-tile:hover .pick-tile-stage, .pick-tile:focus-visible .pick-tile-stage { background-color: var(--stage, #eef2f4); filter: saturate(1.15); }
.pick-tile.is-soon .pick-tile-art { opacity: 1; filter: none; }
.pick-tile.is-soon .pick-tile-stage { background-color: var(--stage); }
.pick-tile:hover .pick-tile-art, .pick-tile:focus-visible .pick-tile-art { transform: translateY(-3px) rotate(-1.5deg); }

/* Corporate pass: one cool paper for every kind, the drawings carry the colour. */
[data-pick-open] .pick-tile-stage, [data-pick-panel] .pick-head-art { --stage: #e6ecf1; }
[data-pick-open="vps"] .pick-tile-stage, [data-pick-panel="vps"] .pick-head-art { --stage: #e2e9f0; }
[data-pick-open="machines"] .pick-tile-stage, [data-pick-panel="machines"] .pick-head-art { --stage: #e3ecee; }
:root[data-theme=dark] [data-pick-open] .pick-tile-stage, :root[data-theme=dark] [data-pick-panel] .pick-head-art { --stage: #222b35; }
.pick-tile:hover .pick-tile-stage, .pick-tile:focus-visible .pick-tile-stage { filter: none; background-color: color-mix(in srgb, var(--accent) 6%, var(--stage)); }
.pick-tile:hover .pick-tile-art, .pick-tile:focus-visible .pick-tile-art { transform: translateY(-3px); }
.pick-tile-stage, .pick-head-art { background-image: none; }
.pick-tile-stage { height: 9.6rem; background-color: var(--stage); background-image: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%); }
.pick-tile-art { width: 200px; height: 140px; }
@media (max-width: 900px) { .pick-tile-art { width: 160px; height: 112px; } }
@media (max-width: 600px) { .pick-tile-stage { height: 7rem; } .pick-tile-art { width: 124px; height: 87px; } }
.svc-top .kind-art.svc-art { width: 100%; max-width: 230px; height: auto; aspect-ratio: 160 / 112; }
.machine-kind { display: grid; place-items: center; padding: .3rem; } .machine-kind .kind-art { width: 100%; height: auto; aspect-ratio: 160 / 112; }

/* Store bar: an uploaded logo hangs over the bar's bottom edge, half inside and half below.
   The link keeps a fixed small height so the bar never grows with the logo. */
.shop-bar .brand { align-self: stretch; align-items: center; height: auto; padding: 0; }
.shop-bar .brand:has(img.brand-logo) { position: relative; width: 150px; }
.shop-bar img.brand-logo { position: absolute; left: 0; top: 100%; transform: translateY(-50%); height: 84px !important; max-width: 220px; margin: 0; }
.shop-bar .brand:hover img.brand-logo { transform: translateY(calc(-50% - 2px)); }
@media (max-width: 600px) { .shop-bar .brand:has(img.brand-logo) { width: 110px; } .shop-bar img.brand-logo { height: 62px !important; } }

/* Invoice-receipts to issue, in the store's payments. */
.receipts { margin-bottom: 1.2rem; }
.receipt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; padding: 1rem 0; border-top: 1px solid var(--line-2); }
.receipt-row > form:last-child { grid-column: 2; justify-self: start; margin-top: -.6rem; }
.receipt-facts { margin: 0; }
.receipt-form { display: grid; gap: .6rem; }
.receipt-form label { display: grid; gap: .25rem; font-size: .88rem; }
.billing-details .grid-3 { margin: .6rem 0; }
@media (max-width: 800px) { .receipt-row { grid-template-columns: 1fr; } .receipt-row > form:last-child { grid-column: 1; margin-top: 0; } }

/* Language menu with flags. */
.lang-menu { position: relative; }
.lang-menu > summary { display: inline-flex; align-items: center; gap: .45rem; height: 34px; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .82rem; font-weight: 600; letter-spacing: .03em; cursor: pointer; list-style: none; user-select: none; transition: border-color .15s, background .15s; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.lang-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-menu .flag { width: 20px; height: 14px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16, 24, 32, .12); }
.lang-chevron { width: 12px; height: 12px; color: var(--muted); transition: transform .15s; }
.lang-menu[open] .lang-chevron { transform: rotate(180deg); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 170px; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 14px 34px -12px rgba(10, 16, 24, .28); }
.lang-list button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.lang-list button:hover, .lang-list button:focus-visible { background: var(--surface-2); outline: none; }
.lang-list button.on { font-weight: 600; }
.lang-list button span { flex: 1; }
.lang-check { width: 14px; height: 14px; color: var(--accent); }
.lang-menu[open] .lang-list { animation: lang-in .14s ease-out both; }
@keyframes lang-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lang-menu[open] .lang-list { animation: none; } }


.queue-card .queue-position { display: flex; align-items: baseline; gap: .6rem; margin: .2rem 0 .6rem; }
.queue-card .queue-position b { font-size: 2.4rem; line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.queue-card .queue-position span { color: var(--muted); }
.queue-card form { margin-top: .8rem; }

.mc-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.4rem; align-items: center; }
.mc-label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: .35rem; }
.mc-host { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.mc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0; }
.mc-facts > div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.mc-facts dt { font-size: .78rem; color: var(--muted); }
.mc-facts dd { margin: .2rem 0 0; font-size: 1.1rem; font-weight: 600; }
.mc-facts dd small { font-weight: 400; color: var(--muted); }
.mc-players { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.mc-group { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .7rem .8rem; min-width: 0; }
.mc-group h3 { display: flex; align-items: center; justify-content: space-between; font-size: .9rem; margin: 0 0 .5rem; }
.mc-count { min-width: 1.6rem; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: center; }
.mc-group ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.mc-group li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; padding: .3rem 0; border-top: 1px solid var(--line-2); }
.mc-group li:first-child { border-top: 0; }
.mc-group li form { margin: 0; }
.mc-group li .button.small { min-height: 26px; padding: .15rem .5rem; font-size: .78rem; }
.mc-face { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: hsl(var(--hue, 210) 70% 92%); color: hsl(var(--hue, 210) 55% 32%); font-size: .8rem; font-weight: 700; }
.mc-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mc-none { margin: 0 0 .7rem; color: var(--muted); font-size: .86rem; }
.mc-roster [hidden] { display: none !important; }
.mc-roster-bar { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.mc-filter { flex: 1; max-width: 280px; }
.mc-live { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; color: var(--muted); font-size: .8rem; }
.mc-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 3px rgba(47, 166, 106, .18); }
.mc-live.off::before { background: #b9c2c9; box-shadow: none; }
.mc-tag { flex: none; padding: .05rem .45rem; border-radius: 999px; background: #fff3d6; color: #8a5a00; font-size: .72rem; font-weight: 600; }
.mc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2fa66a; }
.mc-group li.busy { opacity: .5; pointer-events: none; }
.mc-acts { display: flex; gap: .2rem; margin-left: auto; }
.mc-add { display: flex; gap: .4rem; margin: auto 0 0; padding-top: .7rem; border-top: 1px solid var(--line-2); }
.mc-add input { flex: 1; min-width: 0; }
.mc-add .button { flex: none; }
.mc-toast { margin: .8rem 0 0; padding: .5rem .75rem; border-radius: var(--radius-sm); background: #e6f6ee; color: #1d6b45; font-size: .86rem; }
.mc-toast.failed { background: var(--danger-soft); color: var(--danger); }
.mc-group .button.ghost.danger:hover { color: var(--danger); background: var(--danger-soft); }
.mc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.steps-list > li { border-left: 3px solid var(--line); padding: .2rem 0 .2rem .9rem; display: grid; gap: .45rem; }
.steps-list > li.done { border-left-color: var(--ok); }
.steps-list > li > strong { font-size: .95rem; }
@media (max-width: 720px) {
    .mc-hero, .mc-players, .mc-grid { grid-template-columns: 1fr; }
    .mc-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
}

.guest-sound { display: inline-flex; align-items: center; gap: .45rem; }
.guest-sound-dot { width: 28px; height: 16px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.guest-sound-dot::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.guest-sound[aria-checked="true"] .guest-sound-dot { background: var(--ok); }
.guest-sound[aria-checked="true"] .guest-sound-dot::after { transform: translateX(12px); }
@media (prefers-reduced-motion: reduce) { .guest-sound-dot, .guest-sound-dot::after { transition: none; } }
.guest-choice { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1.1rem; display: grid; gap: .6rem; }
.guest-choice h2 { font-size: 1.05rem; margin: 0; }
.guest-choice ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .92rem; }
@media (max-width: 720px) {
}
.guest-choice.first { border-top: 0; margin-top: .4rem; padding-top: 0; }
.guest-or { font-size: 1.05rem; margin: 1.4rem 0 .8rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.steps-list > li { justify-items: start; }
.steps-list > li > form { justify-self: stretch; }
.mc-reply { margin: .8rem 0 0; padding: .6rem .8rem; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); white-space: pre-wrap; font-size: .85rem; }
.bot-log { max-height: 26rem; overflow: auto; }
.bot-actions { justify-content: flex-start; gap: .5rem; flex-wrap: wrap; }

.mail-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: .75rem; align-items: end; }
.mail-new label { display: grid; gap: .3rem; }
.mail-delete { display: inline-block; vertical-align: top; }
.mail-delete > summary { list-style: none; cursor: pointer; }
.mail-delete > summary::-webkit-details-marker { display: none; }
.mail-delete[open] > form { display: grid; gap: .5rem; width: min(300px, 70vw); margin-top: .5rem; padding: .8rem; text-align: left; white-space: normal; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.mail-quota { flex-wrap: nowrap; }
.mail-quota select { width: auto; min-width: 9rem; }
.mail-delete label { display: grid; gap: .3rem; font-size: .88rem; }
@media (max-width: 760px) { .mail-new { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .6rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 1.02rem; }
.contact-list li svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.contact-list a { font-weight: 600; word-break: break-all; }
button[aria-busy="true"] { opacity: .7; cursor: progress; }
input:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.locked-field { position: relative; display: block; }
.locked-field .icon { position: absolute; left: .75rem; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.locked-field input { padding-left: 2.3rem; }
.feedback-dialog { width: min(460px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(10, 16, 24, .45); }
.feedback-dialog::backdrop { background: rgba(10, 16, 24, .55); }
.feedback-form { display: grid; gap: .8rem; padding: 1.5rem; }
.feedback-form h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.feedback-form p { margin: 0; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; margin: .2rem 0; padding: 0; border: 0; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 2.1rem; line-height: 1; color: color-mix(in srgb, var(--muted) 45%, transparent); cursor: pointer; transition: color .12s, transform .12s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #f2b01e; }
.stars label:hover { transform: scale(1.08); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.feedback-comment { display: grid; gap: .3rem; }
.feedback-comment textarea { resize: vertical; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.guest-bar.ended form[data-guest-renew], .guest-bar.ended [data-guest-end] { display: none; }
@media (prefers-reduced-motion: reduce) { .stars label { transition: none; } .stars label:hover { transform: none; } }
.pick-layout.has-reviews { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); gap: .9rem; align-items: stretch; }
.pick-layout.has-reviews .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pick.is-open .reviews { display: none; }
.reviews { display: flex; flex-direction: column; min-height: 0; padding: 1rem 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.reviews-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .8rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.reviews-head h2 { margin: 0; font-size: 1rem; }
.reviews-score { margin: 0; font-size: .9rem; }
.reviews-stars, .review-stars { color: #f2b01e; }
.reviews-window { position: relative; flex: 1; min-height: 240px; overflow: hidden; mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.reviews-track { position: absolute; inset: 0 0 auto; }
.reviews-track.is-moving { animation: reviews-down var(--reviews-time, 40s) linear infinite; }
.reviews:hover .reviews-track, .reviews:focus-within .reviews-track { animation-play-state: paused; }
@keyframes reviews-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.reviews-list { list-style: none; margin: 0; padding: .7rem 0 0; display: grid; gap: .7rem; }
.review { display: grid; gap: .35rem; padding: .8rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; }
.review p { margin: 0; overflow-wrap: anywhere; }
.review-stars { font-size: .95rem; letter-spacing: .05em; }
.review-stars-off { color: color-mix(in srgb, var(--muted) 35%, transparent); }
.review-meta { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .82rem; }
@media (max-width: 1000px) {
    .pick-layout.has-reviews { grid-template-columns: 1fr; }
    .pick-layout.has-reviews .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reviews-window { flex: none; height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
    .reviews-track.is-moving { animation: none; }
    .reviews-track { position: static; }
    .reviews-track [aria-hidden="true"] { display: none; }
    .reviews-window { overflow-y: auto; mask-image: none; }
}
@media (max-width: 340px) { .pick-layout.has-reviews .pick-grid { grid-template-columns: 1fr; } }
.mc-log { margin: 0; height: 340px; overflow: auto; padding: .8rem 1rem; background: #0e1419; color: #d6e2e8; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-log .mc-mine { color: #8fd3ff; }
.mc-log .mc-warn { color: #f2c46d; }
.mc-log .mc-error { color: #ff9a8f; }
.mc-command { display: flex; align-items: center; gap: .5rem; padding: .55rem; background: #151d24; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.mc-command input { flex: 1; min-width: 0; background: #0e1419; color: #e9f1f5; border-color: #2a3640; }
.mc-command input::placeholder { color: #6d7d87; }
.mc-prompt { color: #6d7d87; padding-left: .3rem; }
.shop-hero-lead { margin: .2rem 0 1.4rem; max-width: 34rem; font-size: 1.05rem; line-height: 1.6; color: var(--muted); }
.shop-faq { margin: 0 0 2.6rem; display: grid; gap: .6rem; }
.shop-faq details { padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.shop-faq summary { cursor: pointer; font-weight: 600; }
.shop-faq details p { margin: .6rem 0 0; color: var(--muted); line-height: 1.6; }

p code, li code, .hint code, .alert code { overflow-wrap: anywhere; }
.mc-motd { margin: -.2rem 0 .2rem; padding: .55rem .8rem; border-radius: var(--radius-sm); background: #1d1d1f; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; min-height: 2.3rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-test { margin-top: .6rem; }
.mc-test-steps { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.mc-test-steps li { display: grid; grid-template-columns: 1.2rem 1fr; gap: .1rem .5rem; align-items: start; font-size: .88rem; }
.mc-test-steps li::before { content: "…"; grid-row: span 2; text-align: center; font-weight: 700; color: var(--muted); }
.mc-test-steps li.ok::before { content: "✓"; color: #1d8a55; }
.mc-test-steps li.bad::before { content: "✕"; color: var(--danger); }
.mc-test-steps small { grid-column: 2; color: var(--muted); overflow-wrap: anywhere; }
.mc-copies { list-style: none; margin: 0 0 .6rem; padding: 0; }
.mc-copies li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; padding: .5rem 0; border-top: 1px solid var(--line-2); }
.mc-copies li:first-child { border-top: 0; }
.mc-copy-when { font-weight: 500; }
.mc-copy-actions { display: flex; gap: .3rem; margin-left: auto; }
.mc-copy-actions form { margin: 0; }
.health-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.health-pill { padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.health-pill.bad { background: var(--danger-soft); color: var(--danger); }
.health-pill.warn { background: #fff3d6; color: #8a5a00; }
.health-pill.ok { background: #e6f6ee; color: #1d6b45; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.health-card h2 { display: flex; align-items: center; gap: .55rem; font-size: 1rem; margin: 0 0 .6rem; }
.health-light { width: 12px; height: 12px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 4px rgba(47, 166, 106, .15); }
.health-light.warn { background: #e0a100; box-shadow: 0 0 0 4px rgba(224, 161, 0, .18); }
.health-light.bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.health-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.health-card li { position: relative; padding-left: 1.4rem; font-size: .88rem; line-height: 1.4; }
.health-card li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.health-card li.ok::before { content: "✓"; color: #1d8a55; }
.health-card li.warn::before { content: "!"; color: #b07a00; }
.health-card li.bad::before { content: "✕"; color: var(--danger); }
.health-card li.info::before { content: "·"; color: var(--muted); }
.health-card li.bad { color: var(--danger); }
.bell-summary { position: relative; list-style: none; }
.bell-summary::-webkit-details-marker { display: none; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; line-height: 16px; text-align: center; }
.bell-dropdown { width: min(360px, calc(100vw - 2rem)); padding: .4rem; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: .4rem .5rem .5rem; }
.bell-head form { margin: 0; }
.bell-item { display: grid; gap: .15rem; padding: .55rem .6rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.bell-item:hover { background: var(--surface-2); }
.bell-item.unread { background: var(--accent-soft); }
.bell-item.unread .bell-text { font-weight: 600; }
.bell-text { font-size: .88rem; }
.bell-detail { font-size: .8rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bell-empty { padding: .6rem; margin: 0; font-size: .86rem; }
.topnav-dropdown.bell-dropdown a.bell-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem; align-items: start; }
.health-card li.ok, .health-card li.warn, .health-card li.info { color: var(--ink); }

.guest-bar { display: grid; gap: .9rem; margin-bottom: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--info-soft), var(--surface)); }
.guest-bar-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.guest-bar-text { display: grid; gap: .2rem; max-width: 46ch; }
.guest-bar-text strong { font-size: 1.02rem; }
.guest-bar-text span:not(.guest-bar-tag) { color: var(--ink-2); font-size: .88rem; }
.guest-bar-tag { justify-self: start; padding: .1rem .5rem; border-radius: 999px; background: var(--info); color: #fff; font-size: .72rem; font-weight: 600; }
.guest-bar-time { display: grid; justify-items: end; gap: .25rem; min-width: 150px; }
.guest-bar-label { font-size: .76rem; color: var(--muted); }
.guest-bar-clock { font-size: 1.9rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.guest-bar-meter { width: 100%; height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.guest-bar-meter span { display: block; height: 100%; border-radius: inherit; background: var(--info); transition: width 1s linear; }
.guest-bar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.guest-bar-keep { display: flex; flex-wrap: wrap; gap: .5rem; }
.guest-bar-keep form { margin: 0; }
.guest-bar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; }
.guest-bar-tools form { margin: 0; }
.guest-bar-tools .link-button { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-2); }
.guest-bar-tools .link-button:hover { color: var(--accent); }
.guest-bar-tools .link-button.danger { color: var(--danger); }
.guest-bar-tools .icon { width: 15px; height: 15px; }
.guest-sound { display: inline-flex; align-items: center; gap: .45rem; }
.guest-sound-dot { width: 28px; height: 16px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.guest-sound-dot::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.guest-sound[aria-checked="true"] .guest-sound-dot { background: var(--ok); }
.guest-sound[aria-checked="true"] .guest-sound-dot::after { transform: translateX(12px); }
.guest-bar.soon { background: linear-gradient(135deg, var(--warn-soft), var(--surface)); border-color: var(--warn); }
.guest-bar.soon .guest-bar-clock { color: var(--warn); }
.guest-bar.soon .guest-bar-meter span { background: var(--warn); }
.guest-bar.ended .guest-bar-meter span { width: 0 !important; }
@media (prefers-reduced-motion: reduce) { .guest-sound-dot, .guest-sound-dot::after, .guest-bar-meter span { transition: none; } }
@media (max-width: 720px) {
    .guest-bar-time { justify-items: start; width: 100%; }
    .guest-bar-keep { width: 100%; }
    .guest-bar-keep > * { flex: 1; }
    .guest-bar-keep .button { width: 100%; text-align: center; justify-content: center; }
}
.guest-resume { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; display: flex; align-items: center; gap: .8rem; max-width: calc(100vw - 2.4rem); padding: .75rem .9rem .75rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(15, 30, 60, .18); color: var(--ink); text-decoration: none; }
.guest-resume:hover { border-color: var(--accent); }
.guest-resume > span:nth-child(2) { display: grid; gap: .1rem; min-width: 0; }
.guest-resume strong { font-size: .92rem; }
.guest-resume small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-resume-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2fa66a; box-shadow: 0 0 0 4px rgba(47, 166, 106, .2); }
.guest-resume-go { flex: none; padding: .4rem .75rem; border-radius: 8px; background: var(--accent); color: #fff; font-size: .85rem; font-weight: 600; }
@media (max-width: 520px) { .guest-resume { left: .8rem; right: .8rem; bottom: .8rem; } }
.guest-renew-hint { align-self: center; padding: .3rem .6rem; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: .82rem; font-weight: 500; }
.guest-renew-hint[hidden] { display: none; }
.field-block { display: grid; gap: .35rem; }
.field-label { font-size: .9rem; font-weight: 500; }
.mc-motd-locked { display: flex; align-items: center; gap: .55rem; margin: 0; cursor: not-allowed; }
.mc-motd-locked .icon { flex: none; width: 15px; height: 15px; color: #8d97a3; }
.mc-c-0 { color: #000000; }
.mc-c-1 { color: #0000aa; }
.mc-c-2 { color: #00aa00; }
.mc-c-3 { color: #00aaaa; }
.mc-c-4 { color: #aa0000; }
.mc-c-5 { color: #aa00aa; }
.mc-c-6 { color: #ffaa00; }
.mc-c-7 { color: #aaaaaa; }
.mc-c-8 { color: #555555; }
.mc-c-9 { color: #5555ff; }
.mc-c-a { color: #55ff55; }
.mc-c-b { color: #55ffff; }
.mc-c-c { color: #ff5555; }
.mc-c-d { color: #ff55ff; }
.mc-c-e { color: #ffff55; }
.mc-c-f { color: #ffffff; }
.mc-s-l { font-weight: 700; }
.mc-s-m { text-decoration: line-through; }
.mc-s-n { text-decoration: underline; }
.mc-s-o { font-style: italic; }
.mc-s-m.mc-s-n { text-decoration: underline line-through; }
.mc-motd.mc-motd-locked { min-height: 0; padding: .58rem .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; }
.mc-motd-locked .icon { color: var(--muted); }
.mc-motd-locked [class^="mc-c-"] { text-shadow: 1px 1px 0 rgba(0, 0, 0, .45); }
.mc-icon-preview { display: grid; justify-items: center; gap: .3rem; margin: 0; }
.mc-icon-preview img { width: 64px; height: 64px; image-rendering: pixelated; border-radius: 4px; background: #1d1d1f; padding: 6px; box-sizing: content-box; }
