/*
 * 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}/* =========================================================
   jrzbk Remote - Guacamole dark theme (v3)
   Design language from pdf.jrzbk.com: space background with
   twinkling stars, glass panels, indigo/cyan neon accents.
   Glassmorphism login with icons and floating shapes.

   Guacamole markup notes:
   - .field-header is a fake placeholder positioned behind a
     transparent input; this theme aligns it with the input text
     and fades it out once the field has content.
   - The wordmark above the card and the icons are pure CSS
     (pseudo-elements + inline SVG), no markup changes possible.
   ========================================================= */

:root {
  --jz-bg-1: #0f1226;
  --jz-bg-2: #0b0e1e;
  --jz-fg: #e9ecff;
  --jz-muted: #a9b0d6;
  --jz-primary: #6c7bff;
  --jz-accent: #00e0ff;
  --jz-glass: rgba(255, 255, 255, .06);
  --jz-stroke: rgba(255, 255, 255, .15);
  --jz-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  --jz-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Page & space background ---------- */
div.login-ui {
  color: var(--jz-fg);
  font-family: var(--jz-font);
  background:
    radial-gradient(1200px 800px at 20% -10%, #414573 0%, transparent 55%),
    radial-gradient(900px 700px at 120% 0%, #06a0ff33 0%, transparent 60%),
    radial-gradient(1200px 900px at 50% 110%, #9d456466 0%, transparent 65%),
    linear-gradient(0deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .08)),
    linear-gradient(160deg, var(--jz-bg-1), var(--jz-bg-2)) !important;
}

/* Star layers (small tiled + larger bright), twinkling */
.login-ui::before,
.login-ui::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.login-ui::before {
  background-image:
    radial-gradient(1px 1px at 10px 12px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 50px 70px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 90px 25px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 140px 110px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 175px 40px, #fff8 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 20px 30px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 80px 95px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 160px 50px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 120px 150px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 35px 140px, #fff6 60%, transparent 61%);
  background-size:
    200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px,
    180px 180px, 180px 180px, 180px 180px, 180px 180px, 180px 180px;
  background-repeat: repeat;
  animation: jz-twinkle 8s ease-in-out infinite alternate;
  opacity: .9;
}

.login-ui::after {
  background-image:
    radial-gradient(2px 2px at 30px 40px, #ffff 65%, transparent 66%),
    radial-gradient(2px 2px at 120px 80px, #ffff 65%, transparent 66%),
    radial-gradient(3px 3px at 160px 20px, #ffff 65%, transparent 66%),
    radial-gradient(2px 2px at 70px 150px, #ffff 65%, transparent 66%);
  background-size: 260px 260px, 300px 300px, 360px 360px, 280px 280px;
  background-repeat: repeat;
  mix-blend-mode: screen;
  animation: jz-twinkle 12s ease-in-out infinite alternate;
  opacity: .7;
}

/* Third star layer: a few bright stars, faster cycle (like .twinkle
   on the website) - lives on the free pseudo-element of the wrapper */
.login-ui .login-dialog-middle::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 50% 70%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 70% 20%, #fff 60%, transparent 61%),
    radial-gradient(2px 2px at 90% 60%, #fff 60%, transparent 61%);
  animation: jz-twinkle 6s ease-in-out infinite alternate;
  mix-blend-mode: screen;
  opacity: .8;
}

/* opacity + scale - the scale is what makes the sky visibly "breathe" */
@keyframes jz-twinkle {
  0%   { opacity: .4; transform: scale(1); }
  50%  { opacity: 1;  transform: scale(1.2); }
  100% { opacity: .6; transform: scale(1); }
}

/* ---------- Wordmark + animated rocket above the card ---------- */
.login-ui .login-dialog-middle::before {
  content: "jrzbk.com";
  display: block;
  font-family: var(--jz-font);
  font-size: 1.5em;
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
  padding-top: 52px;
  margin-bottom: 1em;
  color: transparent;
  background-color: transparent;
  -webkit-text-fill-color: transparent;
  animation: jz-rocket-float 3.5s ease-in-out infinite;
}

/* gradient text + rocket icon share the element: icon as first
   background layer, gradient clipped to the text as second layer */
.login-ui .login-dialog-middle {
  position: relative;
}

.login-ui .login-dialog-middle::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e0ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E"),
    linear-gradient(90deg, var(--jz-accent), var(--jz-primary), var(--jz-accent));
  background-repeat: no-repeat, no-repeat;
  background-position: center 6px, center bottom;
  background-size: 38px 38px, 100% calc(100% - 48px);
  -webkit-background-clip: border-box, text;
  background-clip: border-box, text;
}

/* gentle up-and-right drift, like the rocket on the website */
@keyframes jz-rocket-float {
  0%, 100% { background-position: center 6px, center bottom; }
  50%      { background-position: calc(50% + 5px) 0px, center bottom; }
}

/* ---------- Glass login card ---------- */
.login-ui .login-dialog {
  position: relative;
  background: var(--jz-glass);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--jz-stroke);
  border-radius: 20px;
  box-shadow: var(--jz-shadow);
  padding: 2em 2.2em 1.9em;
  max-width: 400px;
  width: calc(100vw - 2em);
  box-sizing: border-box;
  font-size: 1.05em;
  animation: jz-card-in .55s cubic-bezier(.2, .8, .2, 1) both;
}

/* subtle top inner glow line, like the reference */
.login-ui .login-dialog {
  box-shadow: var(--jz-shadow), inset 0 1px 0 rgba(255, 255, 255, .18);
}

@keyframes jz-card-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.login-ui.continuation .login-dialog {
  border: 1px solid var(--jz-stroke);
  box-shadow: var(--jz-shadow);
  border-radius: 20px;
  max-width: 400px;
}

/* 2FA screen: shield icon above the card instead of the rocket */
.login-ui.continuation .login-dialog-middle::before {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e0ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"),
    linear-gradient(90deg, var(--jz-accent), var(--jz-primary), var(--jz-accent));
}

/* Welcome heading + subline inside the card (initial login only) */
.login-ui.initial .login-dialog::before {
  content: "Welcome back";
  display: block;
  text-align: center;
  font-size: 1.25em;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--jz-fg);
  margin-bottom: .25em;
}

.login-ui.initial .login-dialog .login-fields::before {
  content: "Sign in to your account to continue";
  display: block;
  text-align: center;
  font-size: .82em;
  color: var(--jz-muted);
  margin-bottom: 1.6em;
}

/* Hide the stock logo, app name and version pill (wordmark sits above) */
.login-ui .login-dialog .logo,
.login-ui .login-dialog .version {
  display: none;
}

/* ---------- Text colors (stock defaults are black on white) ---------- */
.login-ui .login-dialog,
.login-ui .login-dialog h1,
.login-ui .login-dialog h2,
.login-ui .login-dialog h3,
.login-ui .login-dialog p,
.login-ui .login-dialog div,
.login-ui .login-dialog span,
.login-ui .login-dialog li,
.login-ui .login-dialog td,
.login-ui .login-dialog dt,
.login-ui .login-dialog dd,
.login-ui .login-dialog label {
  color: var(--jz-fg);
}

.login-ui .login-dialog th {
  color: var(--jz-fg);
  text-shadow: none;
}

.login-ui .login-dialog a {
  color: var(--jz-accent);
}

.login-ui .login-dialog a:hover {
  color: #7de9ff;
}

/* QR code (TOTP enrollment) needs a light backdrop to stay scannable */
.login-ui .login-dialog img {
  background: #fff;
  padding: 8px;
  border-radius: 8px;
}

/* ---------- Fields with icons ---------- */
.login-ui .login-dialog .login-fields input,
.login-ui .login-dialog input[type="text"],
.login-ui .login-dialog input[type="password"],
.login-ui .login-dialog input[type="number"],
.login-ui .login-dialog input[type="email"] {
  font-family: var(--jz-font);
  font-size: .92em;
  font-weight: 400;
  background-color: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: #eaf0ff;
  caret-color: var(--jz-accent);
  padding: .7em .9em .7em 2.9em;
  margin: 0 0 .8em;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

/* keep translucency in the stock 'empty' and focus states */
.login-ui .login-fields .labeled-field.empty input {
  background: rgba(255, 255, 255, .05);
}

.login-ui .login-dialog input:focus,
.login-ui .login-fields .labeled-field input:focus {
  outline: none;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .38);
  box-shadow: 0 0 0 3px rgba(108, 123, 255, .18);
}

/* field icons (user / lock) via mask so they can change color on focus */
.login-ui .login-fields .labeled-field {
  position: relative;
  z-index: auto;
}

.login-ui .login-fields .labeled-field::after {
  content: "";
  position: absolute;
  left: .95em;
  top: 13px;
  width: 17px;
  height: 17px;
  background-color: var(--jz-muted);
  opacity: .8;
  pointer-events: none;
  transition: background-color .25s ease, opacity .25s ease;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.login-ui.initial .login-fields .labeled-field:has(input[type="text"])::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* 2FA code field gets a key icon (would otherwise inherit the user icon) */
.login-ui.continuation .login-fields .labeled-field::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Cpath d='m15.5 7.5 3 3L22 7l-3-3'/%3E%3C/svg%3E");
}

.login-ui .login-fields .labeled-field:has(input[type="password"])::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.login-ui .login-fields .labeled-field:focus-within::after {
  background-color: #fff;
  opacity: 1;
}

/* fake placeholder: align 1:1 with the input text, muted, fades on input */
.login-ui .login-fields .labeled-field .field-header {
  font-family: var(--jz-font);
  font-size: .92em;
  font-weight: 400;
  margin: 0;
  padding: calc(.76em + 1px) calc(.98em + 1px) calc(.76em + 1px) calc(3.15em + 1px);
  color: var(--jz-muted);
  opacity: .7;
  z-index: 1;
  pointer-events: none;
  transition: opacity .15s ease;
}

.login-ui .login-fields .labeled-field:not(.empty) .field-header {
  opacity: 0;
}

/* real placeholders (e.g. TOTP code field) */
.login-ui .login-dialog input::placeholder {
  font-family: var(--jz-font);
  font-size: 1em;
  font-weight: 400;
  color: var(--jz-muted);
  opacity: .7;
}

/* ---------- Sign-in button: neon gradient, white text, arrow icon ---------- */
.login-ui .login-dialog .buttons {
  position: relative;
  margin-top: .4em;
}

.login-ui .login-dialog input[type="submit"],
.login-ui .login-dialog button {
  font-family: var(--jz-font);
  font-size: .95em;
  font-weight: 500;
  letter-spacing: .03em;
  background: linear-gradient(90deg, var(--jz-accent), var(--jz-primary)) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px;
  padding: .75em 1.5em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(108, 123, 255, .35);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  text-shadow: 0 1px 2px rgba(10, 14, 40, .35);
}

.login-ui .login-dialog input[type="submit"]:hover,
.login-ui .login-dialog button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(108, 123, 255, .5);
  filter: brightness(1.06);
}

.login-ui .login-dialog input[type="submit"]:active,
.login-ui .login-dialog button:active {
  transform: translateY(0);
  box-shadow: 0 6px 20px rgba(108, 123, 255, .35);
}

/* animated arrow inside the sign-in button */
.login-ui.initial .login-dialog .buttons::after {
  content: "";
  position: absolute;
  right: 1.2em;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background-color: #fff;
  pointer-events: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  animation: jz-arrow 2.2s ease-in-out infinite;
}

.login-ui.initial .login-dialog .buttons:hover::after {
  animation-duration: .9s;
}

@keyframes jz-arrow {
  0%, 100% { transform: translateX(0); opacity: .85; }
  50%      { transform: translateX(5px); opacity: 1; }
}

/* ---------- Error banner (stock: fixed red bar across the top) ---------- */
.login-ui.error p.login-error {
  background: rgba(255, 90, 165, .14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 90, 165, .4);
  border-radius: 12px;
  color: #ffb3d3;
  font-size: .9em;
  max-width: 400px;
  margin: 1em auto;
  left: 1em;
  right: 1em;
}

/* =========================================================
   In-session dialogs (body.client): credential prompt,
   status modals, guac menu, file transfers
   ========================================================= */

body.client .client-status-modal guac-modal {
  background:
    radial-gradient(1200px 800px at 20% -10%, #414573 0%, transparent 55%),
    radial-gradient(900px 700px at 120% 0%, #06a0ff33 0%, transparent 60%),
    radial-gradient(1200px 900px at 50% 110%, #9d456466 0%, transparent 65%),
    linear-gradient(160deg, var(--jz-bg-1), var(--jz-bg-2)) !important;
}

/* wordmark + rocket above the credential card */
body.client .client-status-modal .modal-contents::before {
  content: "jrzbk VM";
  display: block;
  font-family: var(--jz-font);
  font-size: 1.5em;
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
  padding-top: 52px;
  margin-bottom: 1em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e0ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z'/%3E%3Cpath d='m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z'/%3E%3Cpath d='M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0'/%3E%3Cpath d='M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5'/%3E%3C/svg%3E"),
    linear-gradient(90deg, var(--jz-accent), var(--jz-primary), var(--jz-accent));
  background-repeat: no-repeat, no-repeat;
  background-position: center 6px, center bottom;
  background-size: 38px 38px, 100% calc(100% - 48px);
  -webkit-background-clip: border-box, text;
  background-clip: border-box, text;
  animation: jz-rocket-float 3.5s ease-in-out infinite;
}

body.client .client-status-modal .notification {
  font-family: var(--jz-font) !important;
  background: rgba(21, 25, 50, .94) !important;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid var(--jz-stroke) !important;
  border-radius: 20px !important;
  box-shadow: var(--jz-shadow), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
  color: var(--jz-fg) !important;
  display: inline-block !important;
  width: calc(100vw - 2em) !important;
  max-width: 400px !important;
  margin: 0 auto !important;
  padding: 2em 2.2em 1.9em !important;
  text-align: left !important;
  font-size: 1.05em;
}

body.client .client-status-modal .notification.error {
  background: rgba(42, 21, 48, .94) !important;
  border-color: rgba(255, 90, 165, .4) !important;
}

/* login-look: no section headers, no field labels - icons instead */
body.client .client-status-modal .form-header,
body.client .client-status-modal .field-header {
  display: none !important;
}

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

body.client .client-status-modal .parameters .fields {
  display: block !important;
}

body.client .client-status-modal .parameters .fields .labeled-field {
  display: block !important;
  margin: 0 0 .8em !important;
}

body.client .client-status-modal .parameters .fields .form-field {
  display: block !important;
  width: 100% !important;
  position: relative;
}

body.client .client-status-modal input[type="text"],
body.client .client-status-modal input[type="password"],
body.client .client-status-modal input[type="number"] {
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: var(--jz-font) !important;
  font-size: .92em !important;
  font-weight: 400 !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 12px !important;
  color: #eaf0ff !important;
  caret-color: var(--jz-accent);
  padding: .7em .9em .7em 2.9em !important;
  margin: 0 !important;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

body.client .client-status-modal input:focus {
  outline: none !important;
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .38) !important;
  box-shadow: 0 0 0 3px rgba(108, 123, 255, .18) !important;
}

body.client .client-status-modal .form-field::before {
  content: "";
  position: absolute;
  left: .95em;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  background-color: var(--jz-muted);
  opacity: .8;
  pointer-events: none;
  transition: background-color .25s ease, opacity .25s ease;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body.client .client-status-modal .form-field:focus-within::before {
  background-color: #fff;
  opacity: 1;
}

body.client .labeled-field-username .form-field::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

body.client .labeled-field-password .form-field::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

body.client .labeled-field-domain .form-field::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}

body.client .client-status-modal .password-field .icon.toggle-password {
  position: absolute !important;
  left: auto !important;
  right: .8em !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  filter: invert(.85);
  opacity: .8;
  cursor: pointer;
}

body.client .client-status-modal .password-field input {
  padding-right: 2.6em !important;
}

/* Continue = neon primary, Cancel = ghost - no underlines */
body.client .client-status-modal .buttons {
  display: flex !important;
  gap: .6em;
  margin: 1.4em 0 0 !important;
}

body.client .client-status-modal .buttons button {
  font-family: var(--jz-font) !important;
  font-size: .95em !important;
  font-weight: 500 !important;
  border-radius: 12px !important;
  padding: .7em 1.4em !important;
  text-decoration: none !important;
  text-shadow: none !important;
  cursor: pointer;
  transition: background .2s ease, filter .2s ease, transform .15s ease;
}

body.client .client-status-modal .buttons button:hover,
body.client .client-status-modal .buttons button:active {
  text-decoration: none !important;
}

body.client .client-status-modal .buttons button:first-of-type {
  flex: 1 1 auto;
  background: linear-gradient(90deg, var(--jz-accent), var(--jz-primary)) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(108, 123, 255, .35) !important;
}

body.client .client-status-modal .buttons button:first-of-type:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

body.client .client-status-modal .buttons button:not(:first-of-type) {
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  color: var(--jz-fg) !important;
}

body.client .client-status-modal .buttons button:not(:first-of-type):hover {
  background: rgba(255, 255, 255, .14) !important;
}


/* space gradient + twinkling stars behind the credential dialog */
body.client .client-status-modal guac-modal::before,
body.client .client-status-modal guac-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.client .client-status-modal guac-modal::before {
  background-image:
    radial-gradient(1px 1px at 10px 12px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 50px 70px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 90px 25px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 140px 110px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 175px 40px, #fff8 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 20px 30px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 80px 95px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 160px 50px, #fff6 60%, transparent 61%);
  background-size: 200px 200px;
  background-repeat: repeat;
  animation: jz-twinkle 8s ease-in-out infinite alternate;
  opacity: .9;
}

body.client .client-status-modal guac-modal::after {
  background-image:
    radial-gradient(2px 2px at 30px 40px, #ffff 65%, transparent 66%),
    radial-gradient(2px 2px at 120px 80px, #ffff 65%, transparent 66%),
    radial-gradient(3px 3px at 160px 20px, #ffff 65%, transparent 66%),
    radial-gradient(2px 2px at 70px 150px, #ffff 65%, transparent 66%);
  background-size: 260px 260px, 300px 300px, 360px 360px, 280px 280px;
  background-repeat: repeat;
  mix-blend-mode: screen;
  animation: jz-twinkle 12s ease-in-out infinite alternate;
  opacity: .7;
}

body.client .client-status-modal .modal-contents {
  position: relative;
  z-index: 1;
}

/* fake placeholders in the credential fields (login mechanics) */
body.client .client-status-modal .parameters .fields .form-field::after {
  position: absolute;
  left: 2.95em;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--jz-font);
  font-size: .92em;
  color: var(--jz-muted);
  opacity: .7;
  pointer-events: none;
  transition: opacity .15s ease;
}

body.client .labeled-field-username .form-field::after { content: "Username"; }
body.client .labeled-field-password .form-field::after { content: "Password"; }
body.client .labeled-field-domain .form-field::after { content: "Domain"; }

body.client .client-status-modal .labeled-field:not(.empty) .form-field::after {
  opacity: 0;
}

/* status-dialog buttons with icons (Reconnect / Home / Logout / Back):
   center the icon strip and give the text room */
body.client .client-status-modal .buttons button {
  position: relative;
}

body.client .client-status-modal .buttons button::before {
  left: .95em !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  transform: translateY(-50%);
  width: 1em !important;
  height: 1em !important;
  background-size: contain !important;
  background-position: center !important;
  margin: 0 !important;
  filter: invert(1) brightness(1.6);
}

body.client .client-status-modal .buttons button.reconnect,
body.client .client-status-modal .buttons button.home,
body.client .client-status-modal .buttons button.logout,
body.client .client-status-modal .buttons button.back {
  padding-left: 2.5em !important;
}

/* logged-out / rejected-login modals: dark in every context */
.logged-out-modal guac-modal,
.automatic-login-rejected-modal guac-modal {
  background: rgba(11, 14, 30, .92) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.logged-out-modal .notification,
.automatic-login-rejected-modal .notification {
  background: #151932 !important;
  border: 1px solid var(--jz-stroke) !important;
  box-shadow: var(--jz-shadow) !important;
  color: var(--jz-fg) !important;
  font-family: var(--jz-font) !important;
}

.logged-out-modal .notification p,
.automatic-login-rejected-modal .notification p {
  color: var(--jz-fg) !important;
}


/* in-session menus (guac menu, filesystem menu) */
body.client .menu .menu-content {
  background: #12152a;
  color: var(--jz-fg);
  font-family: var(--jz-font);
}

body.client .menu .menu-content .header {
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: none;
}

body.client #filesystem-menu .header.breadcrumbs {
  background: rgba(255, 255, 255, .03);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

body.client #filesystem-menu .header.breadcrumbs .breadcrumb:hover {
  background-color: rgba(108, 123, 255, .2);
}

/* file transfer dialog + connection warning */
body.client .transfer-manager {
  background: #151932;
  color: var(--jz-fg);
  border: 1px solid var(--jz-stroke);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .4);
}

body.client #connection-warning {
  background: rgba(21, 25, 50, .95);
  color: var(--jz-fg);
  border: 1px solid rgba(255, 90, 165, .4);
  border-radius: 12px;
  font-family: var(--jz-font);
}

/* =========================================================
   App v2: home, settings, menus, modals - dummypdf design.
   NOTE: extension CSS is bundled BEFORE the stock rules, so
   equal-specificity overrides lose; contested properties are
   therefore either more specific or !important.
   ========================================================= */

html {
  background:
    radial-gradient(1200px 800px at 20% -10%, #414573 0%, transparent 55%),
    radial-gradient(900px 700px at 120% 0%, #06a0ff33 0%, transparent 60%),
    radial-gradient(1200px 900px at 50% 110%, #9d456466 0%, transparent 65%),
    linear-gradient(160deg, var(--jz-bg-1), var(--jz-bg-2)) fixed !important;
}

body:not(.client) {
  background: transparent !important;
  color: var(--jz-fg);
  font-family: var(--jz-font) !important;
  font-size: 15px;
  min-height: 100vh;
}

/* twinkling star layers behind the app (between canvas and content) */
body:not(.client)::before,
body:not(.client)::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body:not(.client)::before {
  background-image:
    radial-gradient(1px 1px at 10px 12px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 50px 70px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 90px 25px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 140px 110px, #fff8 60%, transparent 61%),
    radial-gradient(1px 1px at 175px 40px, #fff8 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 20px 30px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 80px 95px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 160px 50px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 120px 150px, #fff6 60%, transparent 61%),
    radial-gradient(0.75px 0.75px at 35px 140px, #fff6 60%, transparent 61%);
  background-size:
    200px 200px, 200px 200px, 200px 200px, 200px 200px, 200px 200px,
    180px 180px, 180px 180px, 180px 180px, 180px 180px, 180px 180px;
  background-repeat: repeat;
  animation: jz-twinkle 8s ease-in-out infinite alternate;
  opacity: .9;
}

body:not(.client)::after {
  background-image:
    radial-gradient(2px 2px at 30px 40px, #ffff 65%, transparent 66%),
    radial-gradient(2px 2px at 120px 80px, #ffff 65%, transparent 66%),
    radial-gradient(3px 3px at 160px 20px, #ffff 65%, transparent 66%),
    radial-gradient(2px 2px at 70px 150px, #ffff 65%, transparent 66%);
  background-size: 260px 260px, 300px 300px, 360px 360px, 280px 280px;
  background-repeat: repeat;
  mix-blend-mode: screen;
  animation: jz-twinkle 12s ease-in-out infinite alternate;
  opacity: .7;
}

/* ---------- Text: light everywhere (dark popovers are gone) ---------- */
body:not(.client) h1,
body:not(.client) h2,
body:not(.client) h3,
body:not(.client) h4,
body:not(.client) p,
body:not(.client) div,
body:not(.client) span,
body:not(.client) li,
body:not(.client) td,
body:not(.client) th,
body:not(.client) dt,
body:not(.client) dd,
body:not(.client) label,
body:not(.client) .caption {
  color: var(--jz-fg);
}

body:not(.client) a {
  color: var(--jz-accent);
}

/* stock hardcodes black on these */
body:not(.client) .connection a,
body:not(.client) .connection a:hover,
body:not(.client) .connection a:visited,
body:not(.client) .connection-group a,
body:not(.client) .connection-group a:hover,
body:not(.client) .connection-group a:visited,
body:not(.client) .user a,
body:not(.client) .user a:hover,
body:not(.client) .user a:visited,
body:not(.client) .user-group a,
body:not(.client) .user-group a:hover,
body:not(.client) .user-group a:visited {
  color: var(--jz-fg) !important;
}

.list-item .name,
.list-item .caption,
.list-item .caption span {
  color: var(--jz-fg) !important;
}

body:not(.client) th {
  text-shadow: none !important;
}

/* ---------- Typography ---------- */
body:not(.client) h2 {
  font-weight: 500;
  font-size: 1.1em;
  letter-spacing: .04em;
}

body:not(.client) h3 {
  font-weight: 500;
}

/* ---------- Layout: contained cards like the website ---------- */
body:not(.client) .header:not(.tabbed),
body:not(.client) .header.tabbed,
body:not(.client) .page-tabs,
body:not(.client) div.settings,
body:not(.client) div.recent-connections,
body:not(.client) div.all-connections {
  max-width: 1040px;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

body:not(.client) .header.tabbed,
body:not(.client) .header:not(.tabbed) {
  background: var(--jz-glass) !important;
  border: 1px solid var(--jz-stroke) !important;
  border-radius: 12px;
  border-top: 1px solid var(--jz-stroke) !important;
  margin-top: 1.25em !important;
  padding: .45em 1.25em;
  box-shadow: var(--jz-shadow) !important;
  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
  width: auto !important;
}

body:not(.client) .header h2 {
  font-size: .82em;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--jz-muted);
}

body:not(.client) div.settings,
body:not(.client) div.recent-connections,
body:not(.client) div.all-connections {
  background: var(--jz-glass);
  border: 1px solid var(--jz-stroke);
  border-radius: 12px;
  padding: 1.6em 1.9em !important;
  margin-top: .9em !important;
  margin-bottom: 2em !important;
  box-shadow: var(--jz-shadow);
  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
}

/* ---------- Settings tabs as pill navigation ---------- */
body:not(.client) .page-tabs {
  margin-top: .9em;
  padding: 0;
}

body:not(.client) .page-tabs .page-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35em;
  padding: 0;
  margin: 0;
}

body:not(.client) .page-tabs .page-list li a,
body:not(.client) .page-tabs .page-list li a[href]:visited {
  color: var(--jz-fg) !important;
  font-size: .9em;
  padding: .5em 1.1em;
  border-radius: 8px;
  display: inline-block;
}

body:not(.client) .page-tabs .page-list li a[href]:hover {
  background: rgba(108, 123, 255, .18) !important;
}

body:not(.client) .page-tabs .page-list li a.current,
body:not(.client) .page-tabs .page-list li a.current:hover {
  background: linear-gradient(90deg, var(--jz-accent), var(--jz-primary)) !important;
  color: #0e1022 !important;
  font-weight: 500;
}

/* ---------- Home: connection tiles & lists ---------- */
body:not(.client) .recent-connections .connection {
  background: var(--jz-glass) !important;
  border: 1px solid var(--jz-stroke);
  border-radius: 12px;
  padding: 1.25em !important;
  margin: 1em !important;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}

body:not(.client) .recent-connections .connection:hover {
  background: rgba(255, 255, 255, .1) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

body:not(.client) .recent-connections .connection .thumbnail > * {
  border: 1px solid rgba(255, 255, 255, .15) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5) !important;
  border-radius: 4px;
}

/* white close-x on recent tiles (stock ships x-black.svg) */
body:not(.client) .recent-connections .connection .remove-recent {
  opacity: .45;
}

body:not(.client) .recent-connections .connection .remove-recent:hover {
  opacity: 1;
}

body:not(.client) .recent-connections .connection .remove-recent:after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9ecff' stroke-width='2.4' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") !important;
}

/* every green #cda hover becomes the site's indigo tint */
body:not(.client) .list-item:not(.selected) .caption:hover {
  background: rgba(108, 123, 255, .16) !important;
  border-radius: 6px;
}

body:not(.client) .settings table.session-list tr.session:hover {
  background: rgba(108, 123, 255, .12) !important;
}

.all-connections .caption {
  padding: .35em .4em;
}

/* dark stock icons (protocol, expand arrows, pager, sort) */
body:not(.client) .icon {
  filter: invert(.88);
}

/* pager */
body:not(.client) .pager .set-page.current {
  background: rgba(108, 123, 255, .25) !important;
  border: 1px solid rgba(108, 123, 255, .4) !important;
  color: var(--jz-fg);
}

/* ---------- Search / filter fields ---------- */
body:not(.client) .filter .search-string,
body.client .filter .search-string {
  background-color: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 8px;
  color: var(--jz-fg) !important;
  padding: .55em .9em .55em 2.5em !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b0d6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
  background-size: 1.05em !important;
  background-position: .85em 50% !important;
  background-repeat: no-repeat;
}

body:not(.client) .header .filter input {
  border-radius: 8px;
}

/* ---------- Dropdown menus: dark, like the website selects ---------- */
.menu-dropdown.open,
.menu-dropdown.open:hover {
  background: rgba(255, 255, 255, .12) !important;
}

.menu-dropdown:hover {
  background: rgba(255, 255, 255, .06);
}

.menu-dropdown .menu-title {
  color: var(--jz-fg) !important;
}

.user-menu .menu-dropdown .menu-title {
  font-weight: 500 !important;
  padding: .75em 2.4em .75em 2.3em !important;
  background-position: .8em 50% !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9ecff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
}

.menu-dropdown .menu-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9ecff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-size: .9em !important;
}

.menu-dropdown .menu-contents {
  background: #1a1d2e !important;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55) !important;
  overflow: hidden;
}

.menu-dropdown .menu-contents li a,
.menu-dropdown .menu-contents div,
.menu-dropdown .menu-contents span {
  color: var(--jz-fg) !important;
}

.menu-dropdown .menu-contents li a {
  background-image: none !important;
  position: relative;
  padding: .8em 1.3em .8em 2.7em !important;
}

.menu-dropdown .menu-contents li a:hover {
  background-color: rgba(108, 123, 255, .2) !important;
}

.menu-dropdown .menu-contents li a.danger {
  background-color: #ff5aa5 !important;
  color: #fff !important;
  font-weight: 500 !important;
}

.menu-dropdown .menu-contents li a.danger:hover {
  background-color: #e34a91 !important;
}

/* own white icons for the known menu entries */
.menu-dropdown .menu-contents li a::before {
  content: "";
  position: absolute;
  left: 1em;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  background-color: var(--jz-muted);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.menu-dropdown .menu-contents li a[href="#/"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
}

.menu-dropdown .menu-contents li a[href^="#/settings"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='4' x2='14' y2='4'/%3E%3Cline x1='10' y1='4' x2='3' y2='4'/%3E%3Cline x1='21' y1='12' x2='12' y2='12'/%3E%3Cline x1='8' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='20' x2='16' y2='20'/%3E%3Cline x1='12' y1='20' x2='3' y2='20'/%3E%3Cline x1='14' y1='2' x2='14' y2='6'/%3E%3Cline x1='8' y1='10' x2='8' y2='14'/%3E%3Cline x1='16' y1='18' x2='16' y2='22'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='4' x2='14' y2='4'/%3E%3Cline x1='10' y1='4' x2='3' y2='4'/%3E%3Cline x1='21' y1='12' x2='12' y2='12'/%3E%3Cline x1='8' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='20' x2='16' y2='20'/%3E%3Cline x1='12' y1='20' x2='3' y2='20'/%3E%3Cline x1='14' y1='2' x2='14' y2='6'/%3E%3Cline x1='8' y1='10' x2='8' y2='14'/%3E%3Cline x1='16' y1='18' x2='16' y2='22'/%3E%3C/svg%3E");
}

.menu-dropdown .menu-contents li a.logout::before,
.menu-dropdown .menu-contents li a.disconnect::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}

.user-menu .menu-dropdown .menu-contents .profile {
  width: auto !important;
  min-width: 200px;
  margin: 1em 1.25em .75em !important;
  padding-bottom: .9em !important;
  border-bottom: 1px solid rgba(255, 255, 255, .12) !important;
}

.user-menu .menu-dropdown .menu-contents .profile .full-name {
  font-weight: 600;
}

/* ---------- Modals & notifications ---------- */
body:not(.client) guac-modal {
  background: rgba(11, 14, 30, .8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body:not(.client) .logged-out-modal guac-modal,
body:not(.client) .automatic-login-rejected-modal guac-modal {
  background: rgba(11, 14, 30, .92) !important;
}

body:not(.client) .notification {
  background: #151932 !important;
  border: 1px solid var(--jz-stroke) !important;
  border-radius: 14px;
  box-shadow: var(--jz-shadow) !important;
  color: var(--jz-fg) !important;
  font-family: var(--jz-font);
}

body:not(.client) .notification .title-bar {
  background: rgba(255, 255, 255, .04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  text-transform: none !important;
  color: var(--jz-fg);
}

body:not(.client) .notification.error {
  background: #2a1530 !important;
  border-color: rgba(255, 90, 165, .4) !important;
}

.notification .body {
  margin: .75em;
}

.logged-out-modal .notification,
.automatic-login-rejected-modal .notification {
  padding: 1.8em 2em;
  border-radius: 20px !important;
  max-width: 340px !important;
  text-align: center;
}

.logged-out-modal .notification p,
.automatic-login-rejected-modal .notification p {
  margin: .3em 0 1em;
}

.logged-out-modal .notification button,
.automatic-login-rejected-modal .notification button {
  background: linear-gradient(90deg, var(--jz-accent), var(--jz-primary)) !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 500;
  border-radius: 10px !important;
  padding: .65em 1.6em !important;
  box-shadow: 0 6px 20px rgba(108, 123, 255, .3) !important;
}

.logged-out-modal .notification button:hover,
.automatic-login-rejected-modal .notification button:hover {
  filter: brightness(1.08);
}

/* ---------- Inputs, selects, buttons ---------- */
body:not(.client) input[type="text"],
body:not(.client) input[type="password"],
body:not(.client) input[type="number"],
body:not(.client) input[type="email"],
body:not(.client) textarea {
  background-color: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 8px;
  color: var(--jz-fg) !important;
  caret-color: var(--jz-accent);
  font-family: var(--jz-font);
}

body:not(.client) select {
  background-color: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 6px;
  color: var(--jz-fg) !important;
  padding: .3em .5em;
  font-family: var(--jz-font);
}

body:not(.client) select option {
  background-color: #1a1d2e !important;
  color: var(--jz-fg) !important;
}

body:not(.client) input:focus,
body:not(.client) select:focus,
body:not(.client) textarea:focus {
  outline: none !important;
  border-color: #8ea0ff !important;
  box-shadow: 0 0 0 3px rgba(108, 123, 255, .18) !important;
}

body:not(.client) input[type="checkbox"],
body:not(.client) input[type="radio"] {
  accent-color: var(--jz-primary);
}

body:not(.client) button,
body:not(.client) input[type="submit"],
body:not(.client) .button {
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  border-radius: 8px;
  color: var(--jz-fg) !important;
  text-shadow: none !important;
  box-shadow: none;
  font-family: var(--jz-font);
  font-weight: 500;
  padding: .55em 1.2em;
  transition: background .2s ease, transform .15s ease;
}

body:not(.client) button:hover,
body:not(.client) input[type="submit"]:hover,
body:not(.client) .button:hover {
  background: rgba(255, 255, 255, .14) !important;
}

body:not(.client) button[disabled],
body:not(.client) button:disabled {
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  color: rgba(233, 236, 255, .35) !important;
  box-shadow: none !important;
}

body:not(.client) button.danger,
body:not(.client) .button.danger {
  background: #ff5aa5 !important;
  border-color: #ff5aa5 !important;
  color: #fff !important;
}

/* primary actions: neon gradient */
body:not(.client) input[type="submit"]:not(:disabled),
body:not(.client) button[type="submit"]:not(:disabled),
body:not(.client) .button.primary {
  background: linear-gradient(90deg, var(--jz-accent), var(--jz-primary)) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(108, 123, 255, .3);
}

body:not(.client) input[type="submit"]:not(:disabled):hover,
body:not(.client) button[type="submit"]:not(:disabled):hover,
body:not(.client) .button.primary:hover {
  filter: brightness(1.08);
  background: linear-gradient(90deg, var(--jz-accent), var(--jz-primary)) !important;
}

/* ---------- Tables (settings) ---------- */
body:not(.client) .settings table {
  width: 100%;
  border-collapse: collapse;
}

body:not(.client) .settings th {
  background: rgba(255, 255, 255, .05) !important;
  font-weight: 500 !important;
  padding: .6em .8em;
  border: 1px solid rgba(255, 255, 255, .1) !important;
}

body:not(.client) .settings td {
  padding: .55em .8em;
  border: 1px solid rgba(255, 255, 255, .07) !important;
}

body:not(.client) .placeholder,
body:not(.client) p.placeholder {
  color: rgba(169, 176, 214, .5) !important;
}

/* ---------- Remaining stock light-on-dark leftovers ---------- */
.clipboard,
.clipboard-service-target {
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 8px;
  color: var(--jz-fg) !important;
}

#guac-menu #devices .device:hover {
  border-color: var(--jz-stroke) !important;
  background: rgba(108, 123, 255, .15) !important;
}

.transfer.in-progress .progress {
  background-color: rgba(255, 255, 255, .12) !important;
}

.redirect-field-container {
  background: var(--jz-bg-2) !important;
  color: var(--jz-fg);
}

.guac-player-text-container {
  background-color: #12152a !important;
  color: var(--jz-fg) !important;
}

.terminal-color-scheme-field .custom-color-scheme {
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid var(--jz-stroke) !important;
  color: var(--jz-fg);
}

#filesystem-menu .header.breadcrumbs .breadcrumb:hover {
  background-color: rgba(108, 123, 255, .2) !important;
}

/* =========================================================
   v2 refinements (live-verified in the browser):
   joined cards, transparent user menu, dropdown stacking,
   breathing room, button icon strips
   ========================================================= */

body:not(.client) .header:not(.tabbed),
body:not(.client) .header.tabbed {
  margin-top: 2em !important;
  position: relative;
  z-index: 30;
}

body:not(.client) div.settings,
body:not(.client) div.recent-connections,
body:not(.client) div.all-connections {
  margin-bottom: 2.5em !important;
}

/* home: the section header merges into the following card */
body:not(.client) .header:not(.tabbed) {
  border-radius: 12px 12px 0 0 !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 1.15em 1.7em .35em !important;
}

body:not(.client) .header:not(.tabbed) + div.recent-connections,
body:not(.client) .header:not(.tabbed) + div.all-connections,
body:not(.client) .header:not(.tabbed) + div.settings {
  margin-top: 0 !important;
  border-top: none !important;
  border-radius: 0 0 12px 12px !important;
}

/* user menu: fully transparent, only the chevron flips on hover/open */
.user-menu .menu-dropdown,
.user-menu .menu-dropdown:hover,
.user-menu .menu-dropdown.open,
.user-menu .menu-dropdown.open:hover {
  background: transparent !important;
}

.menu-dropdown .menu-indicator {
  transition: transform .25s ease;
}

.menu-dropdown:hover .menu-indicator,
.menu-dropdown.open .menu-indicator {
  transform: rotate(180deg);
}

.menu-dropdown .menu-contents {
  z-index: 50;
}

/* more padding for connection sections and entries */
body:not(.client) div.recent-connections,
body:not(.client) div.all-connections {
  padding: 1.2em 1.9em 1.9em !important;
}

.all-connections .caption {
  padding: .6em .65em !important;
}

body:not(.client) .recent-connections .connection {
  padding: 1.5em !important;
}

/* settings buttons: breathing room + proper icon strip
   (stock renders button icons as an absolute ::before strip) */
body:not(.client) .settings .button,
body:not(.client) .settings button {
  margin: .3em .5em .3em 0;
}

body:not(.client) .button::before {
  position: absolute !important;
  left: .7em !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 1em !important;
  height: auto !important;
  margin: 0 !important;
  display: block !important;
  background-size: 1em !important;
  background-position: center !important;
  filter: invert(.9);
}

body:not(.client) .button.back,
body:not(.client) .button.change-password,
body:not(.client) .button.home,
body:not(.client) .button.logout,
body:not(.client) .button.reconnect,
body:not(.client) .button.manage,
body:not(.client) a[class*="add-"].button {
  position: relative;
  padding-left: 2.4em !important;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .login-ui::before,
  .login-ui::after,
  .login-ui .login-dialog,
  .login-ui .login-dialog-middle::before,
  .login-ui.initial .login-dialog .buttons::after {
    animation: none;
  }
}
