/* The console shares one palette and one list treatment. */
html:root {
  --bg:#f5f5f7;--bg-muted:#f5f5f7;--bg-elevated:#fff;--bg-sidebar:#fafafa;--bg-input:#fff;
  --surface:#fff;--line:#dcdce0;--line-strong:#a2bddd;--text:#1d1d1f;--muted:#5d6068;
  --accent:#0064ce;--primary:#0064ce;--accent-soft:#005ab9;--accent-contrast:#fff;
  --surface-hover:#eff1f5;--body-gradient:var(--bg);--selection:#e5effc;
  --shadow:none;--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="dark"] {
  --bg:#161618;--bg-muted:#1d1d20;--bg-elevated:#242426;--bg-sidebar:#1c1c1e;--bg-input:#2b2b2e;
  --surface:#242426;--line:#39393d;--line-strong:#65768d;--text:#f5f5f7;--muted:#b5b5bd;
  --accent:#78b4ff;--primary:#0064ce;--accent-soft:#84baff;--surface-hover:#303034;--selection:#23354f;
}
.app-shell .console-layout {background:var(--bg);color:var(--text)}
.console-layout .sidebar {background:var(--bg-sidebar);gap:24px;box-shadow:none;backdrop-filter:none}
.sidebar .sidebar__tab {border:1px solid transparent;border-radius:9px;min-height:40px;font-size:15px}
.sidebar .sidebar__tab--active {background:var(--selection);color:var(--accent-soft);border-color:transparent}
.sidebar .sidebar__tab:focus-visible,.console-layout :is(button,a,[role="button"]):focus-visible {outline:2px solid var(--accent);outline-offset:2px}
.main-panel .page-header {align-items:center;gap:12px;margin-bottom:22px}
.main-panel .page-header__title {color:var(--text);letter-spacing:-.035em;font-size:clamp(26px,2.5vw,34px);font-weight:680;line-height:1.18}
.devices-view .page-header__eyebrow,.devices-view .page-header__meta,
.settings-page .page-header__eyebrow,.settings-page .page-header__meta,
.devices-view .page-header__actions>.status-pill,.auth-card-shell__brand-mobile strong+span {display:none}
.main-panel .panel-header__add-device {width:36px;height:36px;color:var(--accent);background:var(--bg-elevated);border:1px solid var(--line)}
.devices-view .page-header,.settings-page .page-header,.devices-view .devices-view__gallery-wrap {width:100%;max-width:860px}
.devices-view .device-gallery {
  display:flex;flex-direction:column;align-items:stretch;gap:0;
  margin:0;padding:0;max-width:860px;border-radius:16px;
  background:var(--bg-elevated);box-shadow:inset 0 0 0 1px var(--line);
}
.devices-view .device-gallery > :is(.rustdesk-device,.device-card) {
  position:relative;box-sizing:border-box;width:100%;min-width:0;min-height:84px;
  padding:14px 20px;align-items:center;align-content:center;
  border:0;border-radius:0;background:transparent;backdrop-filter:none;box-shadow:none;
}
.device-gallery > :first-child {border-top-left-radius:16px;border-top-right-radius:16px}
.device-gallery > :last-child {border-bottom-left-radius:16px;border-bottom-right-radius:16px}
.device-gallery > :is(.rustdesk-device,.device-card)+article {border-top:1px solid var(--line)}
.device-gallery > .rustdesk-device {
  display:grid;grid-template-columns:46px minmax(0,1fr) auto;column-gap:16px;row-gap:3px;
}
.device-gallery .rustdesk-device::before {
  content:"";grid-column:1;grid-row:1 / span 2;justify-self:center;width:21px;height:34px;
  box-sizing:border-box;border:2px solid var(--accent);border-radius:6px;
  background:linear-gradient(var(--accent),var(--accent)) center bottom 3px / 7px 2px no-repeat;
}
.device-gallery .rustdesk-device>strong {grid-column:2;grid-row:1;font-size:17px;align-self:end}
.device-gallery .rustdesk-device>span {grid-column:2;overflow-wrap:anywhere;color:var(--muted);font-size:14px}
.devices-view .device-gallery .rustdesk-device>a {grid-column:3;grid-row:1 / span 2;align-self:center;
  background:var(--primary);color:white;border-radius:18px;text-decoration:none;padding:8px 14px;font-size:14px;white-space:nowrap}
.device-gallery > .device-card {display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:16px;overflow:visible}
.device-gallery .device-card:hover {transform:none;background:var(--surface-hover);box-shadow:none}
.device-gallery .device-card__preview {width:46px;height:52px;background:transparent;border:0;overflow:visible}
.device-gallery .device-card__preview img {height:100%;object-fit:contain;border-radius:5px;background:transparent}
.device-gallery .device-card__placeholder {min-height:100%;display:grid;place-content:center}
.device-gallery .device-card__placeholder span,.device-gallery .device-card__subtitle,.device-gallery .device-card__facts {display:none}
.device-gallery .device-card__meta {display:block;padding:0}
.device-gallery .device-card__title {font-size:17px}
.device-gallery .device-card__status {position:static;padding:0;background:none;border:0;font-size:14px;line-height:1.4;color:var(--muted)}
.device-gallery .device-card__preview {position:static;display:contents}
.device-gallery .device-card__preview :is(img,.device-card__placeholder) {grid-area:1 / 1 / 3 / 2;width:46px;height:50px;min-height:0}
.device-gallery .device-card__preview .device-card__status {grid-area:2 / 2;justify-self:start;align-self:start}
.device-gallery .device-card__meta {grid-area:1 / 2;align-self:end}
.device-gallery .device-card {row-gap:3px}
.device-gallery .device-card__control {position:static;grid-area:3 / 2;justify-self:start}
.device-gallery .device-card::after {content:"";grid-area:1 / 3 / 3 / 4;justify-self:end;width:8px;height:8px;margin-right:9px;border-top:2px solid var(--muted);border-right:2px solid var(--muted);transform:rotate(45deg)}
.group-control-view .group-control-slot__chrome--footer,.group-control-view .group-control-cast__idle-hint {display:none}
.group-control-view .group-control-action-bar__btn {background:var(--bg-elevated);border-color:var(--line);border-radius:9px}
.group-control-view .group-control-slot__chrome--selected {background:var(--selection);color:var(--text)}
.group-control-view .group-control-slot--selected .group-control-slot__card {border-color:var(--accent)}
.group-control-view .remote-tile,.group-control-view .group-control-slot__card {border-radius:14px;box-shadow:none}
.settings-page .shell-form-rows {display:grid;gap:0;padding:0;border-radius:13px;overflow:visible;background:var(--bg-elevated);border:1px solid var(--line)}
.settings-page .shell-form-row {border:0;padding:12px 16px;background:transparent;border-radius:0;min-height:46px}
.settings-page .shell-form-row+.shell-form-row {border-top:1px solid var(--line)}
.settings-page .settings-page__tabs {max-width:860px}
.settings-page .shell-form-actions {width:fit-content;max-width:100%}
.settings-page .shell-form-actions button {min-height:36px}
.auth-card-shell .auth-card__eyebrow {display:none}
@media(max-width:600px) {
  .device-gallery > :is(.rustdesk-device,.device-card) {padding:12px;column-gap:9px}
  .main-panel .page-header {margin-bottom:14px}
  .device-gallery .rustdesk-device>a {padding:8px 10px}
}
