/*
 * DX LAB branding for Guacamole 1.6.x.
 *
 * Look: AWS-event style. Squid-ink top bar, a soft pastel gradient hero,
 * heavy navy headings with a small letter-spaced eyebrow, translucent white
 * cards, pill buttons and light-cyan chips. One accent (#8C4FFF) taken from
 * the AWS Direct Connect icon.
 *
 * CSS, HTML patches (html/*.html), translations and resources, plus small
 * scripts for preference defaults and the phone keyboard (js/*.js).
 * Icons are single-colour SVG masks so they follow currentColor.
 */

@font-face {
    font-family: "Pretendard Variable";
    font-weight: 45 920;
    font-style: normal;
    font-display: swap;
    src: url("app/ext/dxkr3-branding/fonts/PretendardVariable.woff2") format("woff2-variations"),
         url("app/ext/dxkr3-branding/fonts/PretendardVariable.woff2") format("woff2");
}

:root {
    --dx-accent: #8c4fff;
    --dx-accent-strong: #7339e6;
    --dx-accent-soft: rgba(140, 79, 255, 0.10);
    --dx-accent-ring: rgba(140, 79, 255, 0.30);

    --dx-navy: #161d26;          /* top bar (AWS squid ink, dark) */
    --dx-ink: #232f3e;           /* headings and body text */
    --dx-muted: #5f6b7a;
    --dx-faint: #8d96a3;
    --dx-line: rgba(35, 47, 62, 0.10);
    --dx-surface: #ffffff;
    --dx-glass: rgba(255, 255, 255, 0.74);
    --dx-glass-strong: rgba(255, 255, 255, 0.90);
    --dx-canvas: #f6f5fb;
    --dx-danger: #d1242f;
    --dx-danger-soft: #fdecee;

    --dx-chip-bg: #d4f5fb;       /* light cyan tag chip */
    --dx-chip-fg: #0b5f70;
    --dx-rt-bg: #efe6ff;         /* router tile */
    --dx-rt-fg: #7339e6;
    --dx-vm-bg: #e3e8ff;         /* server tile */
    --dx-vm-fg: #3b4fd8;

    --dx-gradient: linear-gradient(100deg, #ffc4b0 0%, #f9c6ef 30%, #f2c9ff 50%, #d9cdff 74%, #c3cdff 100%);
    --dx-radius: 12px;
    --dx-radius-card: 16px;
    --dx-shadow: 0 1px 2px rgba(22, 29, 38, 0.05), 0 10px 30px rgba(22, 29, 38, 0.08);
    --dx-shadow-hover: 0 2px 4px rgba(22, 29, 38, 0.06), 0 16px 40px rgba(22, 29, 38, 0.14);
    --dx-font: "Pretendard Variable", "Pretendard", "Noto Sans KR", -apple-system,
               BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --dx-i-router: url("app/ext/dxkr3-branding/images/icons/router.svg");
    --dx-i-server: url("app/ext/dxkr3-branding/images/icons/server.svg");
    --dx-i-terminal: url("app/ext/dxkr3-branding/images/icons/terminal.svg");
    --dx-i-user: url("app/ext/dxkr3-branding/images/icons/user.svg");
    --dx-i-chevron: url("app/ext/dxkr3-branding/images/icons/chevron-down.svg");
    --dx-i-home: url("app/ext/dxkr3-branding/images/icons/home.svg");
    --dx-i-settings: url("app/ext/dxkr3-branding/images/icons/settings.svg");
    --dx-i-logout: url("app/ext/dxkr3-branding/images/icons/logout.svg");
    --dx-i-menu: url("app/ext/dxkr3-branding/images/icons/menu.svg");
    --dx-i-search: url("app/ext/dxkr3-branding/images/icons/search.svg");
    --dx-i-refresh: url("app/ext/dxkr3-branding/images/icons/refresh.svg");
    --dx-i-alert: url("app/ext/dxkr3-branding/images/icons/alert.svg");
    --dx-i-arrow: url("app/ext/dxkr3-branding/images/icons/arrow-right.svg");
    --dx-i-x: url("app/ext/dxkr3-branding/images/icons/x.svg");
}

/* ---------- Base ---------- */

body {
    font-family: var(--dx-font);
    color: var(--dx-ink);
    background: var(--dx-canvas);
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: break-word;
}

a, a:visited {
    color: var(--dx-accent);
}

button,
input[type="submit"],
a.button {
    background: var(--dx-accent);
    border: none;
    border-radius: 999px;
    box-shadow: none;
    color: #fff;
    font-family: var(--dx-font);
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.65em 1.5em;
    text-shadow: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
input[type="submit"]:hover,
a.button:hover {
    background: var(--dx-accent-strong);
}

button:focus-visible,
input[type="submit"]:focus-visible,
a.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--dx-accent-ring);
}

button:disabled,
input[type="submit"]:disabled {
    background: #c9c9d3;
}

button.danger,
input[type="submit"].danger {
    background: var(--dx-danger);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
    font-family: var(--dx-font);
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius);
    background: var(--dx-surface);
    color: var(--dx-ink);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--dx-accent);
    box-shadow: 0 0 0 3px var(--dx-accent-ring);
}

/* Small uppercase letter-spaced label above headings (reference "eyebrow"). */
.dx-eyebrow {
    margin: 0;
    color: var(--dx-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ---------- Login (incl. TOTP continuation) ---------- */

div.login-ui {
    background: var(--dx-gradient);
    color: var(--dx-ink);
}

.login-ui .login-dialog,
.login-ui.continuation .login-dialog {
    box-sizing: border-box;
    width: calc(100% - 2rem);
    max-width: 24rem;
    padding: 2.5rem 2.25rem 2.25rem;
    background: var(--dx-glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--dx-radius-card);
    box-shadow: var(--dx-shadow);
    font-size: 1rem;
    text-align: left;
}

.login-ui .login-dialog .logo,
.login-ui.continuation .login-dialog .logo {
    display: block;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 0 1.5rem;
    border-radius: 14px;
    background-image: url("app/ext/dxkr3-branding/images/direct-connect.svg");
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: 0 6px 18px rgba(140, 79, 255, 0.28);
}

/* Guacamole hides the brand on the TOTP step; keep it so both steps match. */
.login-ui.continuation .login-dialog .version {
    display: block;
}

.login-ui .login-dialog .version {
    padding: 0 0 1.75rem;
}

.login-ui .login-dialog .version .dx-eyebrow {
    margin-bottom: 0.45rem;
}

.login-ui .login-dialog .version .app-name {
    color: var(--dx-ink);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-align: left;
    text-transform: none;
}

/* The version badge adds noise; keep it out of the student-facing screen. */
.login-ui .login-dialog .version .version-number {
    display: none;
}

/* TOTP and other help text. */
.login-ui .login-dialog .login-form > p {
    margin: -0.75rem 0 1.25rem;
    color: var(--dx-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-ui .login-dialog .login-fields .labeled-field {
    margin-bottom: 0.75rem;
}

.login-ui .login-dialog .login-fields input {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0.8rem 1rem;
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius);
    /* Opaque: Guacamole keeps the field label behind the input once it has a value. */
    background: var(--dx-surface);
    font-family: var(--dx-font);
    font-size: 0.95rem;
}

/* Guacamole draws the field label inside the empty input; align it with the padding. */
.login-ui .login-fields .labeled-field .field-header {
    margin: 0.85rem 1.05rem;
    color: var(--dx-faint);
    opacity: 1;
    font-size: 0.95rem;
}

/* One-time code: centred, spaced digits. */
.login-ui .login-fields .totp-code input {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    font-variant-numeric: tabular-nums;
}

.login-ui .login-fields .totp-code input::placeholder {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--dx-faint);
}

.login-ui .login-dialog .totp-enroll p {
    color: var(--dx-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.login-ui .login-dialog .totp-qr-code img {
    border-radius: var(--dx-radius);
    background: #fff;
    padding: 0.5rem;
}

.login-ui .login-dialog .buttons {
    margin-top: 1.5rem;
    text-align: center;
}

.login-ui .login-dialog .buttons input[type="submit"],
.login-ui.continuation .login-dialog .buttons input[type="submit"] {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
}

/* Error: a quiet pill toast at the top. */
.login-ui.error p.login-error {
    top: 1.25rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
    margin: 0;
    padding: 0.6rem 1.1rem 0.6rem 2.6rem;
    color: var(--dx-danger);
    background: var(--dx-glass-strong);
    border: 1px solid rgba(209, 36, 47, 0.18);
    border-radius: 999px;
    box-shadow: var(--dx-shadow);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
}

.login-ui.error p.login-error::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 1.1rem;
    height: 1.1rem;
    transform: translateY(-50%);
    background-color: currentColor;
    -webkit-mask: var(--dx-i-alert) center / contain no-repeat;
    mask: var(--dx-i-alert) center / contain no-repeat;
}

/* ---------- Home: top bar + hero ---------- */

.home-view {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(246, 245, 251, 0) 0, rgba(246, 245, 251, 0) 45%, var(--dx-canvas) 100%) top / 100% 30rem no-repeat,
        var(--dx-gradient) top / 100% 30rem no-repeat,
        var(--dx-canvas);
}

.home-view .connection-list-ui {
    padding-bottom: 3rem;
}

.dx-topbar {
    position: relative;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.75rem;
    padding: 0 max(1.25rem, calc((100% - 70rem) / 2 + 1.25rem));
    background: var(--dx-navy);
    color: #fff;
}

.dx-topbar .dx-brand,
.dx-topbar .dx-brand:visited {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    text-decoration: none;
}

.dx-topbar .dx-mark {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 8px;
    background: url("app/ext/dxkr3-branding/images/direct-connect.svg") center / cover no-repeat;
}

.dx-topbar .dx-wordmark {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* User menu in the dark bar: icon + name + chevron, a rounded pill. */
.dx-topbar .user-menu .menu-dropdown {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.15s ease;
}

.dx-topbar .user-menu .menu-dropdown:hover,
.dx-topbar .user-menu .menu-dropdown.open {
    background: rgba(255, 255, 255, 0.16);
}

.dx-topbar .user-menu .menu-dropdown .menu-title {
    position: relative;
    padding: 0.5rem 2.4rem 0.5rem 2.5rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    background: none;
    cursor: pointer;
}

.dx-topbar .user-menu .menu-dropdown .menu-title::before,
.dx-topbar .user-menu .menu-dropdown .menu-indicator {
    content: "";
    position: absolute;
    top: 50%;
    width: 1.15rem;
    height: 1.15rem;
    transform: translateY(-50%);
    background: currentColor;
    color: #fff;
}

.dx-topbar .user-menu .menu-dropdown .menu-title::before {
    left: 0.95rem;
    -webkit-mask: var(--dx-i-user) center / contain no-repeat;
    mask: var(--dx-i-user) center / contain no-repeat;
}

.dx-topbar .user-menu .menu-dropdown .menu-indicator {
    left: auto;
    right: 0.9rem;
    bottom: auto;
    width: 0.95rem;
    height: 0.95rem;
    background-image: none;
    background-color: rgba(255, 255, 255, 0.75);
    -webkit-mask: var(--dx-i-chevron) center / contain no-repeat;
    mask: var(--dx-i-chevron) center / contain no-repeat;
    transition: transform 0.15s ease;
}

.dx-topbar .user-menu .menu-dropdown.open .menu-indicator {
    transform: translateY(-50%) rotate(180deg);
}

.dx-topbar .user-menu .menu-dropdown .menu-contents {
    top: calc(100% + 0.5rem);
}

/* The template's own header menus are replaced by the one in the top bar. */
.home-view .connection-list-ui > .header .user-menu {
    display: none;
}

.dx-hero {
    max-width: 70rem;
    margin: 0 auto;
    padding: 3rem 1.25rem 1.75rem;
}

.dx-hero .dx-eyebrow {
    margin-bottom: 0.6rem;
}

.dx-hero .dx-title {
    margin: 0;
    padding: 0;
    color: var(--dx-ink);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-align: left;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

/* ---------- Home: sections ---------- */

.home-view .connection-list-ui > .header {
    box-sizing: border-box;
    max-width: 70rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    align-items: center;
    border: none;
    box-shadow: none;
    background: transparent;
}

.home-view .connection-list-ui > .header h2 {
    padding: 0.75rem 0;
    color: var(--dx-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* The group label already names the list; keep only the filter on that row. */
.home-view .connection-list-ui > .header:has(> .filter) {
    justify-content: flex-end;
}

.home-view .connection-list-ui > .header:has(> .filter) h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Wide screens: lift the filter row into the hero, level with the title, so
   it does not take a row of its own above the device list. */
@media (min-width: 48rem) {
    .dx-hero {
        padding-right: calc(1.25rem + 17rem);
    }

    .home-view .connection-list-ui > .header:has(> .filter) {
        position: relative;
        z-index: 1;
        height: 2.75rem;
        margin-top: calc(-1.75rem - 2.75rem);
        margin-bottom: 2.5rem;
    }
}

/* No recent connections yet: hide the section instead of an empty panel. */
.home-view .connection-list-ui > .header:has(+ .recent-connections > .placeholder:not(.ng-hide)),
.home-view .recent-connections:has(> .placeholder:not(.ng-hide)) {
    display: none;
}

/* Filter: a pill search field with a leading icon. */
.home-view .header .filter {
    position: relative;
    padding: 0;
    flex: 0 1 16rem;
}

.home-view .header .filter::before {
    content: "";
    position: absolute;
    left: 0.9rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    z-index: 1;
    background: var(--dx-muted);
    -webkit-mask: var(--dx-i-search) center / contain no-repeat;
    mask: var(--dx-i-search) center / contain no-repeat;
    pointer-events: none;
}

.home-view .header .filter input.search-string {
    box-sizing: border-box;
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: var(--dx-glass) none;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 0.9rem;
}

.home-view .header .filter input.search-string:focus {
    border-color: var(--dx-accent);
}

.home-view div.all-connections,
.home-view div.recent-connections {
    box-sizing: border-box;
    max-width: 70rem;
    margin: 0 auto 1.5rem;
    padding: 0 1.25rem;
    background: transparent;
}

/* Recent connections: thumbnail cards. */
.home-view div.recent-connections {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: left;
}

.home-view div.recent-connections div.connection {
    margin: 0;
    padding: 0.75rem;
    max-width: 16rem;
    background: var(--dx-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--dx-radius-card);
    box-shadow: var(--dx-shadow);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.home-view .recent-connections .connection:hover {
    background: var(--dx-glass-strong);
    box-shadow: var(--dx-shadow-hover);
    transform: translateY(-2px);
}

.home-view .recent-connections .connection .thumbnail {
    margin: 0 0 0.6rem;
}

.home-view .recent-connections .connection .thumbnail > * {
    max-width: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: none;
}

.home-view .recent-connections .connection .caption .name {
    margin: 0;
    color: var(--dx-ink);
    font-size: 0.85rem;
    font-weight: 600;
}

.home-view .recent-connections .connection .caption {
    padding: 0 0.15rem;
    text-align: left;
}

.home-view .recent-connections .connection .caption .name.dx-conn {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "host pod" "addr addr";
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.1rem;
    min-width: 0;
}

.home-view .recent-connections .connection .caption .dx-host {
    font-size: 1rem;
}

.home-view .recent-connections .connection .caption .dx-addr {
    font-size: 0.82rem;
    font-weight: 400;
}

/* ---------- Open connections panel (bottom right) ---------- */

#other-connections .client-panel {
    border: none;
    border-radius: var(--dx-radius-card) 0 0 0;
    background: rgba(22, 29, 38, 0.72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--dx-shadow-hover);
}

#other-connections .client-panel-handle {
    width: 18px;
    background-color: transparent;
    -webkit-mask: var(--dx-i-chevron) center / 12px no-repeat;
    mask: var(--dx-i-chevron) center / 12px no-repeat;
    background: #fff;
    transform: rotate(-90deg);
    opacity: 0.6;
}

#other-connections .client-panel.hidden .client-panel-handle {
    transform: rotate(90deg);
}

#other-connections .client-panel-connection {
    margin: 0.6rem;
    border: none;
    border-radius: var(--dx-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0.85;
}

#other-connections .client-panel-connection .name.dx-conn,
#other-connections .client-panel-connection .name.dx-plain {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.35rem 0.6rem;
    background: rgba(22, 29, 38, 0.82);
    font-family: var(--dx-font);
    font-size: 0.75rem;
}

#other-connections .client-panel-connection .name .dx-host {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

#other-connections .client-panel-connection .name .dx-addr {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
}

#other-connections button.close-other-connection {
    top: 0.35rem;
    right: 0.35rem;
    width: 1.5rem;
    min-width: 0;
    height: 1.5rem;
    padding: 0;
    border-radius: 999px;
    background: rgba(22, 29, 38, 0.7);
    opacity: 0.8;
}

#other-connections button.close-other-connection img,
#other-connections button.close-other-connection:hover img {
    width: 0.7rem;
    max-width: none;
    height: 0.7rem;
    padding: 0;
    background: transparent;
}

#other-connections button.close-other-connection:hover {
    background: var(--dx-danger);
    opacity: 1;
}

/* ---------- Home: connection groups and cards ---------- */

/* Groups with nothing in them for this user (e.g. "aws" for a lab student,
   or every group that a filter empties) show no title. */
.home-view .all-connections .list-item:has(> .connection-group.empty),
.home-view .all-connections .connection-group.empty {
    display: none;
}

.home-view .group-list-page {
    display: grid;
    gap: 2.5rem;
}

/* Group caption = section label; groups are always open on Home (html/home-groups-open.html).
   .list-item in the selector outranks the generic ".list-item .caption" reset below. */
.home-view .all-connections .list-item > .connection-group > .caption {
    padding: 0 0 1.1rem;
    cursor: default;
}

.home-view .all-connections .connection-group > .caption:hover {
    background: transparent;
}

.home-view .all-connections .connection-group > .caption .icon.expand {
    display: none;
}

.home-view .all-connections .connection-group > .caption .name {
    margin: 0;
    padding: 0;
    color: var(--dx-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.home-view .all-connections .expandable > .children,
.home-view .all-connections .connection-group > .children {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
}

/* Remove the tree connector lines. */
.home-view .all-connections .children > .list-item::before,
.home-view .all-connections .children > .list-item::after {
    display: none;
}

.home-view .all-connections .list-item .caption {
    padding: 0;
}

.home-view .all-connections .list-item:not(.selected) .connection > .caption:hover {
    background: transparent;
}

.home-view .all-connections .connection > .caption ng-include {
    display: block;
}

.home-view a.home-connection {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    box-sizing: border-box;
    min-height: 5rem;
    padding: 1rem 2.75rem 1rem 1rem;
    color: var(--dx-ink);
    background: var(--dx-glass);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--dx-radius-card);
    box-shadow: var(--dx-shadow);
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.home-view a.home-connection:hover {
    background: var(--dx-glass-strong);
    border-color: rgba(140, 79, 255, 0.35);
    box-shadow: var(--dx-shadow-hover);
    transform: translateY(-2px);
}

.home-view a.home-connection:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--dx-accent-ring), var(--dx-shadow);
}

/* Arrow that appears on hover: "open". */
.home-view a.home-connection::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 1.1rem;
    height: 1.1rem;
    transform: translate(-4px, -50%);
    opacity: 0;
    background: var(--dx-accent);
    -webkit-mask: var(--dx-i-arrow) center / contain no-repeat;
    mask: var(--dx-i-arrow) center / contain no-repeat;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.home-view a.home-connection:hover::after,
.home-view a.home-connection:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

/* Device tile: router vs server vs generic terminal. */
.dx-kind {
    position: relative;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: #eef0f4;
    color: var(--dx-ink);
}

.dx-kind::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.45rem;
    height: 1.45rem;
    background: currentColor;
    -webkit-mask: var(--dx-i-terminal) center / contain no-repeat;
    mask: var(--dx-i-terminal) center / contain no-repeat;
}

.dx-kind.dx-kind-rt {
    background: var(--dx-rt-bg);
    color: var(--dx-rt-fg);
}

.dx-kind.dx-kind-rt::before {
    -webkit-mask-image: var(--dx-i-router);
    mask-image: var(--dx-i-router);
}

.dx-kind.dx-kind-vm {
    background: var(--dx-vm-bg);
    color: var(--dx-vm-fg);
}

.dx-kind.dx-kind-vm::before {
    -webkit-mask-image: var(--dx-i-server);
    mask-image: var(--dx-i-server);
}

/* "[pod11|rt11] 172.20.11.1/24" -> host, address, pod chip. */
.home-view .home-connection .name.dx-conn {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "host pod" "addr addr";
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.15rem;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.dx-conn .dx-host {
    grid-area: host;
    color: var(--dx-ink);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
}

.dx-conn .dx-addr {
    grid-area: addr;
    overflow: hidden;
    color: var(--dx-muted);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dx-conn .dx-pod {
    grid-area: pod;
    justify-self: start;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    background: var(--dx-chip-bg);
    color: var(--dx-chip-fg);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.home-view .home-connection .name.dx-plain {
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--dx-ink);
    font-size: 1rem;
    font-weight: 700;
    text-overflow: ellipsis;
}

/* Someone is already connected: a small chip instead of italic text. */
.home-view .home-connection .activeUserCount {
    position: absolute;
    right: 0.9rem;
    bottom: 0.7rem;
    margin: 0;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--dx-accent-soft);
    color: var(--dx-accent-strong);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 600;
}

.home-view .home-connection.active {
    border-color: rgba(140, 79, 255, 0.45);
}

.home-view .home-connection.active .dx-host,
.home-view .home-connection.active .name.dx-plain {
    color: var(--dx-accent-strong);
}

/* Load-balancing groups render as a plain link; give them the same card. */
.home-view a.home-connection-group {
    color: var(--dx-ink);
}

/* ---------- User menu dropdown (all views) ---------- */

.menu-dropdown .menu-contents {
    min-width: 12rem;
    padding: 0.4rem;
    background: var(--dx-surface);
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius);
    box-shadow: 0 16px 40px rgba(22, 29, 38, 0.16);
    overflow: hidden;
    color: var(--dx-ink);
}

.menu-dropdown .menu-contents li a {
    border-radius: 8px;
    color: var(--dx-ink);
    font-size: 0.9rem;
}

.menu-dropdown .menu-contents li a:hover {
    background-color: var(--dx-accent-soft);
    color: var(--dx-ink);
}

.menu-dropdown .menu-contents li a.current,
.menu-dropdown .menu-contents li a.current:hover {
    opacity: 0.4;
}

.user-menu .menu-dropdown .menu-contents li a {
    position: relative;
    padding: 0.65rem 0.9rem 0.65rem 2.6rem;
    background-image: none !important;
}

.user-menu .menu-dropdown .menu-contents li a::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    top: 50%;
    width: 1.1rem;
    height: 1.1rem;
    transform: translateY(-50%);
    background: currentColor;
    -webkit-mask: var(--dx-i-terminal) center / contain no-repeat;
    mask: var(--dx-i-terminal) center / contain no-repeat;
}

.user-menu .menu-dropdown .menu-contents li a[href="#/"]::before {
    -webkit-mask-image: var(--dx-i-home);
    mask-image: var(--dx-i-home);
}

.user-menu .menu-dropdown .menu-contents li a[href^="#/settings"]::before {
    -webkit-mask-image: var(--dx-i-settings);
    mask-image: var(--dx-i-settings);
}

.user-menu .menu-dropdown .menu-contents li a.logout::before {
    -webkit-mask-image: var(--dx-i-logout);
    mask-image: var(--dx-i-logout);
}

.user-menu .menu-dropdown .menu-contents li a.disconnect::before {
    -webkit-mask-image: var(--dx-i-x);
    mask-image: var(--dx-i-x);
}

.client .user-menu .menu-contents li a.disconnect {
    background-image: none;
}

/* Logout sits after a hairline. */
.user-menu .menu-dropdown .menu-contents .page-list + .action-list {
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px solid var(--dx-line);
}

.user-menu .menu-dropdown .menu-contents .profile {
    border-bottom-color: var(--dx-line);
}

/* Other views (settings etc.): their first header becomes the dark top bar. */
.view > .header:first-child {
    box-sizing: border-box;
    min-height: 3.75rem;
    align-items: center;
    padding: 0 1.25rem;
    border: none;
    box-shadow: none;
    background: var(--dx-navy);
    color: #fff;
}

.view > .header:first-child h2 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
}

.view > .header:first-child .user-menu .menu-dropdown {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.view > .header:first-child .user-menu .menu-dropdown:hover,
.view > .header:first-child .user-menu .menu-dropdown.open {
    background: rgba(255, 255, 255, 0.16);
}

.view > .header:first-child .user-menu .menu-dropdown .menu-title {
    position: relative;
    padding: 0.5rem 2.4rem 0.5rem 2.5rem;
    color: #fff;
    font-size: 0.9rem;
    background: none;
    cursor: pointer;
}

.view > .header:first-child .user-menu .menu-dropdown .menu-title::before,
.view > .header:first-child .user-menu .menu-dropdown .menu-indicator {
    content: "";
    position: absolute;
    top: 50%;
    width: 1.15rem;
    height: 1.15rem;
    transform: translateY(-50%);
    background: #fff;
}

.view > .header:first-child .user-menu .menu-dropdown .menu-title::before {
    left: 0.95rem;
    -webkit-mask: var(--dx-i-user) center / contain no-repeat;
    mask: var(--dx-i-user) center / contain no-repeat;
}

.view > .header:first-child .user-menu .menu-dropdown .menu-indicator {
    left: auto;
    right: 0.9rem;
    bottom: auto;
    width: 0.95rem;
    height: 0.95rem;
    background-image: none;
    background-color: rgba(255, 255, 255, 0.75);
    -webkit-mask: var(--dx-i-chevron) center / contain no-repeat;
    mask: var(--dx-i-chevron) center / contain no-repeat;
}

.view > .header:first-child .user-menu .menu-dropdown .menu-contents {
    top: calc(100% + 0.5rem);
}

/* Settings tabs: pill tabs on the canvas. */
.settings-view .page-tabs .page-list li a[href] {
    border-radius: 999px;
    color: var(--dx-muted);
}

.settings-view .page-tabs .page-list li a[href].current {
    background: var(--dx-accent-soft);
    color: var(--dx-accent-strong);
}

/* ---------- Lists: replace the default green hover/selection ---------- */

.list-item:not(.selected) .caption:hover,
.recent-connections .connection:hover {
    background: var(--dx-accent-soft);
}

.list-item.selected {
    background: var(--dx-accent-soft);
}

.list-item .name {
    color: var(--dx-ink);
}

/* Empty states: quiet, not shouting. */
.placeholder {
    color: var(--dx-muted);
    text-shadow: none;
    opacity: 1;
    font-size: 0.95em;
    font-weight: 400;
    padding: 1.5em 0;
}

/* ---------- Client: connection status / error overlay ---------- */

.client-status-modal {
    background: rgba(22, 29, 38, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.client-status-modal .notification,
.client-status-modal .notification.error {
    box-sizing: border-box;
    width: calc(100% - 2rem);
    max-width: 28rem;
    margin: 0 auto;
    padding: 2rem 1.75rem 1.5rem;
    background: var(--dx-surface);
    border: none;
    border-radius: var(--dx-radius-card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    color: var(--dx-ink);
    font-family: var(--dx-font);
    text-align: center;
}

.client-status-modal .notification .body {
    margin: 0;
}

.client-status-modal .notification.error .body::before {
    content: "";
    display: block;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--dx-danger-soft);
}

.client-status-modal .notification.error .body {
    position: relative;
}

.client-status-modal .notification.error .body::after {
    content: "";
    position: absolute;
    top: 0.75rem;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    transform: translateX(-50%);
    background: var(--dx-danger);
    -webkit-mask: var(--dx-i-alert) center / contain no-repeat;
    mask: var(--dx-i-alert) center / contain no-repeat;
}

.client-status-modal .notification .text {
    margin: 0 0 0.5rem;
    color: var(--dx-ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.55;
}

.client-status-modal .notification .countdown-text {
    margin: 0;
    color: var(--dx-muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.client-status-modal .notification .progress {
    margin: 0.75rem 0 0;
    border: none;
    border-radius: 999px;
    background: var(--dx-accent-soft);
    color: var(--dx-ink);
}

.client-status-modal .notification .progress .bar {
    border-radius: 999px;
    background: var(--dx-accent);
    box-shadow: none;
}

.client-status-modal .notification .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
}

.client-status-modal .notification .buttons button,
.client-status-modal .notification .button {
    position: relative;
    margin: 0;
    padding: 0.6rem 1.1rem 0.6rem 2.5rem;
    border: 1px solid var(--dx-line);
    border-radius: 999px;
    background: var(--dx-surface);
    color: var(--dx-ink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.client-status-modal .notification .buttons button:hover {
    background: #f1f2f6;
    text-decoration: none;
}

.client-status-modal .notification .buttons button.reconnect {
    border-color: transparent;
    background: var(--dx-accent);
    color: #fff;
}

.client-status-modal .notification .buttons button.reconnect:hover {
    background: var(--dx-accent-strong);
}

.client-status-modal .notification .buttons button::before {
    content: "";
    position: absolute;
    left: 0.95rem;
    top: 50%;
    width: 1.05rem;
    height: 1.05rem;
    transform: translateY(-50%);
    background: currentColor;
    -webkit-mask: var(--dx-i-arrow) center / contain no-repeat;
    mask: var(--dx-i-arrow) center / contain no-repeat;
}

.client-status-modal .notification .buttons button.home::before {
    -webkit-mask-image: var(--dx-i-home);
    mask-image: var(--dx-i-home);
}

.client-status-modal .notification .buttons button.reconnect::before {
    -webkit-mask-image: var(--dx-i-refresh);
    mask-image: var(--dx-i-refresh);
}

.client-status-modal .notification .buttons button.logout::before {
    -webkit-mask-image: var(--dx-i-logout);
    mask-image: var(--dx-i-logout);
}

/* Buttons without a known icon class: no icon, symmetric padding. */
.client-status-modal .notification .buttons button:not(.home):not(.reconnect):not(.logout) {
    padding-left: 1.1rem;
}

.client-status-modal .notification .buttons button:not(.home):not(.reconnect):not(.logout)::before {
    display: none;
}

/* Credential prompts inside the overlay (e.g. missing username). */
.client-status-modal .notification .parameters input[type="text"],
.client-status-modal .notification .parameters input[type="password"],
.client-status-modal .notification .parameters input[type="number"],
.client-status-modal .notification .parameters input[type="email"],
.client-status-modal .notification .parameters textarea {
    border: 1px solid var(--dx-line);
    background: var(--dx-surface);
    color: var(--dx-ink);
}

/* ---------- Client: top bar (home, connection, menu) ---------- */

.client-view {
    --dx-bar-h: 2.75rem;
}

/* [menu][home]  name  [spacer]: equal side columns keep the name centred. */
.dx-client-bar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    height: var(--dx-bar-h);
    padding: 0 0.5rem;
    background: var(--dx-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--dx-font);
    font-size: 0.9rem;
}

.dx-client-bar .dx-client-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dx-client-bar .dx-client-name {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}

.dx-client-bar .dx-addr {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Icon-only round buttons; the name lives in title / aria-label. */
.dx-icon-button,
.dx-icon-button:visited {
    flex: 0 0 auto;
    position: relative;
    display: inline-block;
    width: 2.25rem;
    min-width: 0;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.dx-icon-button:hover,
.dx-icon-button.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.dx-icon-button::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.2rem;
    height: 1.2rem;
    background: currentColor;
}

.dx-icon-button.dx-home::before {
    -webkit-mask: var(--dx-i-home) center / contain no-repeat;
    mask: var(--dx-i-home) center / contain no-repeat;
}

.dx-icon-button.dx-menu::before {
    -webkit-mask: var(--dx-i-menu) center / contain no-repeat;
    mask: var(--dx-i-menu) center / contain no-repeat;
}

.dx-icon-button.dx-menu.active::before {
    background: var(--dx-accent);
}

/* Guacamole menu opens below the bar, so the same button closes it. */
.client #guac-menu {
    top: var(--dx-bar-h, 2.75rem);
    height: calc(100% - var(--dx-bar-h, 2.75rem));
}

/* ---------- Client: text input bar (phone keyboard) ---------- */

.client-view .text-input {
    gap: 0.4rem;
    padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom));
    background: var(--dx-navy);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--dx-font);
}

.client-view .text-input .text-input-field {
    display: flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.client-view .text-input .text-input-field:focus-within {
    box-shadow: 0 0 0 2px var(--dx-accent-ring);
}

.client-view .text-input .target,
.client-view .text-input .target:focus {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: #fff;
    caret-color: var(--dx-accent);
    font-family: var(--dx-font);
    font-size: 16px;            /* 16px or more: iOS does not zoom on focus */
    line-height: 2.25rem;
}

.client-view .text-input .sent-history .sent-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.client-view .text-input .text-input-buttons {
    display: flex;
    gap: 0.3rem;
}

.client-view .text-input .text-input-buttons button {
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0 0.8rem;
    height: 2.25rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--dx-font);
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.client-view .text-input .text-input-buttons button:hover {
    background: rgba(255, 255, 255, 0.16);
}

.client-view .text-input .text-input-buttons button:active {
    background: var(--dx-accent-strong);
    color: #fff;
}

/* Sticky Ctrl / Alt while held for the next key. */
.client-view .text-input .text-input-buttons button.pressed {
    background: var(--dx-accent);
    color: #fff;
}

/* ---------- Client: Guacamole menu (opened from the top bar) ---------- */

.client #guac-menu {
    width: 24rem;
    background: var(--dx-canvas);
    box-shadow: 1px 0 0 var(--dx-line), 12px 0 40px rgba(22, 29, 38, 0.18);
    font-family: var(--dx-font);
    color: var(--dx-ink);
}

.client #guac-menu,
.client #guac-menu.closed {
    left: -24rem;
}

.client #guac-menu.open {
    left: 0;
}

/* Header: connection picker and user menu as two quiet pills. */
.client #guac-menu .menu-content > .header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 0;
    padding: 0.6rem 0.75rem;
    background: var(--dx-surface);
    border-bottom: 1px solid var(--dx-line);
    box-shadow: none;
}

.client #guac-menu .menu-content > .header h2 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.client #guac-menu .menu-content > .header .menu-dropdown {
    border: none;
    border-radius: 999px;
    background: var(--dx-accent-soft);
    color: var(--dx-ink);
}

.client #guac-menu .menu-content > .header .menu-dropdown .menu-title {
    padding: 0.45rem 2rem 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.client #guac-menu .menu-content > .header .user-menu {
    flex: 0 0 auto;
    min-width: 0;
}

.client #guac-menu .menu-content > .header h2.connection-select-menu {
    overflow: hidden;
}

.client #guac-menu .menu-content > .header .connection-select-menu .menu-dropdown {
    max-width: 100%;
}

.client #guac-menu .menu-content > .header .connection-select-menu .menu-dropdown .menu-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* The connection list opens below the pill and must not be clipped. */
.client #guac-menu .menu-content > .header h2.connection-select-menu:has(.menu-dropdown.open) {
    overflow: visible;
}

.client #guac-menu .menu-content > .header .user-menu .menu-dropdown .menu-title {
    padding-left: 0.9rem;
}

.client #guac-menu .menu-content > .header .user-menu .menu-dropdown .menu-title {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    background-image: none;
}

.client #guac-menu .menu-content > .header .user-menu .menu-dropdown .menu-title::before {
    display: none;
}

/* Connection parameters the protocol does not expose (SSH): no empty card. */
.client #guac-menu #connection-settings:not(:has(input, select, textarea)) {
    display: none;
}

/* Body: one white card per section with a small eyebrow title. */
.client #guac-menu .menu-body {
    gap: 0.75rem;
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
}

.client #guac-menu .menu-section {
    margin: 0;
    padding: 1rem;
    border-radius: var(--dx-radius-card);
    background: var(--dx-surface);
    box-shadow: var(--dx-shadow);
}

.client #guac-menu .menu-section h3,
.client #guac-menu .menu-section ~ .menu-section h3 {
    margin: 0 0 0.6rem;
    padding: 0;
    color: var(--dx-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.client #guac-menu .menu-section .description,
.client #guac-menu .menu-section .caption {
    margin: 0.2rem 0 0;
    color: var(--dx-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Clipboard */
.client #guac-menu .clipboard-editor {
    margin-top: 0.6rem;
    border: 1px solid var(--dx-line);
    border-radius: var(--dx-radius);
    background: var(--dx-canvas);
    overflow: hidden;
}

.client #guac-menu .clipboard-editor textarea.clipboard {
    width: 100%;
    min-height: 5.5rem;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
}

/* Input method and mouse mode: compact radio rows, no pictures. */
.client #guac-menu #keyboard-settings .choice,
.client #guac-menu #mouse-settings .choice {
    margin: 0;
    padding: 0.55rem 0.25rem;
    text-align: left;
}

.client #guac-menu #keyboard-settings .choice + .choice,
.client #guac-menu #mouse-settings .choice + .choice {
    border-top: 1px solid var(--dx-line);
}

.client #guac-menu .choice label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.client #guac-menu .choice .caption,
.client #guac-menu .choice .caption label {
    margin: 0.15rem 0 0 1.65rem;
    color: var(--dx-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.client #guac-menu .choice .caption label {
    display: inline;
    margin: 0;
}

.client #guac-menu input[type="radio"],
.client #guac-menu input[type="checkbox"] {
    accent-color: var(--dx-accent);
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
}

.client #guac-menu #keyboard-settings .figure {
    display: none;
}

/* Mouse mode has no text name, only a picture: radio + small picture + caption. */
.client #guac-menu #mouse-settings .choice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.client #guac-menu #mouse-settings .figure {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: auto;
    max-width: none;
    margin: 0;
}

.client #guac-menu #mouse-settings .figure img {
    width: 2.75rem;
    max-width: none;
    margin: 0;
    opacity: 0.8;
}

.client #guac-menu #mouse-settings .figure .caption {
    margin: 0;
    text-align: left;
}

/* Zoom: - [100%] + as one pill. */
.client #guac-menu .client-zoom-editor {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: var(--dx-canvas);
}

.client #guac-menu .client-zoom-out,
.client #guac-menu .client-zoom-in {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--dx-surface);
    box-shadow: 0 1px 2px rgba(22, 29, 38, 0.08);
    cursor: pointer;
}

.client #guac-menu .client-zoom-out img,
.client #guac-menu .client-zoom-in img {
    width: 0.9rem;
    height: 0.9rem;
    opacity: 0.7;
}

.client #guac-menu .client-zoom-state {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.client #guac-menu .client-zoom-state input {
    width: 4rem;
    font-size: 0.9rem;
    padding: 0.2rem;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.client #guac-menu .client-zoom-autofit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    font-size: 0.85rem;
}

@media (max-width: 30rem) {
    .client #guac-menu {
        width: 100%;
    }

    .client #guac-menu,
    .client #guac-menu.closed {
        left: -100%;
    }
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
    .login-ui .login-dialog,
    .login-ui.continuation .login-dialog {
        padding: 2rem 1.5rem 1.75rem;
    }

    .login-ui .login-dialog .version .app-name {
        font-size: 2rem;
    }

    .home-view {
        background-size: 100% 22rem, 100% 22rem, auto;
    }

    .dx-topbar {
        height: 3.5rem;
        padding: 0 1rem;
    }

    .dx-hero {
        padding: 2rem 1rem 1.25rem;
    }

    .home-view .connection-list-ui > .header,
    .home-view div.all-connections,
    .home-view div.recent-connections {
        padding: 0 1rem;
    }

    .home-view .header .filter {
        flex-basis: 100%;
    }

    .home-view .all-connections .expandable > .children,
    .home-view .all-connections .connection-group > .children {
        grid-template-columns: 1fr;
    }
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Label/tag denoting the user that shared a connection */
.jdbc-share-tag {

    background: #0095ff;
    padding: 0.25em;

    -moz-border-radius:    0.25em;
    -webkit-border-radius: 0.25em;
    -khtml-border-radius:  0.25em;
    border-radius:         0.25em;

    color: white;
    font-size: 0.75em;
    font-weight: bold;

}
.totp-enroll p,.totp-details{font-size:.8em}.totp-qr-code{text-align:center}.totp-qr-code img{margin:1em;border:1px solid rgba(0,0,0,0.25);box-shadow:1px 1px 2px rgba(0,0,0,0.25);cursor:pointer}h3.totp-details-header{font-size:.8em}h3.totp-details-header::before{content:'▸ '}.totp-details-visible h3.totp-details-header::before{content:'▾ '}.totp-details,.totp-hide-details{display:none}.totp-details-visible .totp-details{display:table}.totp-details-visible .totp-hide-details{display:inline}.totp-details-visible .totp-show-details{display:none}.totp-hide-details,.totp-show-details{color:blue;text-decoration:underline;cursor:pointer;margin:0 .25em;font-weight:normal}.totp-details{margin:0 auto}.totp-details th{padding-right:.25em;text-align:left}.totp-details td{font-family:monospace}.totp-detail{display:inline-block;margin:0 .25em}