html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    min-height: 100svh;
    box-sizing: border-box;

    background-image: url("/static/img/corporate-bg.jpg") !important;
    background-position: center 42% !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;

    font-family: Arial, sans-serif;
}

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

/* =========================================================
   Dark corporate glass style — login/upload cards
   Added: dark-glass experiment
   ========================================================= */

.login-card,
.upload-card,
.auth-card,
.page-card,
.card,
.panel,
.content-card {
  background: rgba(8, 24, 44, 0.78) !important;
  color: #f4f8ff !important;
  border: 1px solid rgba(90, 160, 230, 0.48) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42) !important;
  backdrop-filter: blur(12px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(125%) !important;
}

.login-card h1,
.login-card h2,
.login-card h3,
.upload-card h1,
.upload-card h2,
.upload-card h3,
.auth-card h1,
.auth-card h2,
.auth-card h3,
.page-card h1,
.page-card h2,
.page-card h3,
.card h1,
.card h2,
.card h3,
.panel h1,
.panel h2,
.panel h3,
.content-card h1,
.content-card h2,
.content-card h3 {
  color: #ffffff !important;
}

.login-card p,
.login-card li,
.login-card label,
.login-card div,
.upload-card p,
.upload-card li,
.upload-card label,
.upload-card div,
.auth-card p,
.auth-card li,
.auth-card label,
.auth-card div,
.page-card p,
.page-card li,
.page-card label,
.page-card div,
.card p,
.card li,
.card label,
.card div,
.panel p,
.panel li,
.panel label,
.panel div,
.content-card p,
.content-card li,
.content-card label,
.content-card div {
  color: rgba(244, 248, 255, 0.92) !important;
}

.login-card a,
.upload-card a,
.auth-card a,
.page-card a,
.card a,
.panel a,
.content-card a {
  color: #8fc7ff !important;
}

.login-card input,
.upload-card input,
.auth-card input,
.page-card input,
.card input,
.panel input,
.content-card input {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(160, 205, 255, 0.42) !important;
}

.login-card input::placeholder,
.upload-card input::placeholder,
.auth-card input::placeholder,
.page-card input::placeholder,
.card input::placeholder,
.panel input::placeholder,
.content-card input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

.login-card button,
.upload-card button,
.auth-card button,
.page-card button,
.card button,
.panel button,
.content-card button,
input[type="submit"],
button[type="submit"] {
  background: linear-gradient(135deg, #0b66c3 0%, #1f7cff 58%, #f28c28 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(31, 124, 255, 0.28) !important;
}

.login-card code,
.upload-card code,
.auth-card code,
.page-card code,
.card code,
.panel code,
.content-card code {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.login-card .hint,
.upload-card .hint,
.auth-card .hint,
.page-card .hint,
.card .hint,
.panel .hint,
.content-card .hint {
  color: rgba(220, 235, 255, 0.78) !important;
}

/* =========================================================
   Actual production login/upload cards:
   /login  -> .wrap
   /upload -> .box
   ========================================================= */

.wrap,
.box {
  background: rgba(8, 24, 44, 0.78) !important;
  color: #f4f8ff !important;
  border: 1px solid rgba(90, 160, 230, 0.48) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42) !important;
  backdrop-filter: blur(12px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(125%) !important;
}

.wrap h1,
.wrap h2,
.wrap h3,
.box h1,
.box h2,
.box h3 {
  color: #ffffff !important;
}

.wrap p,
.wrap li,
.wrap label,
.wrap div,
.box p,
.box li,
.box label,
.box div {
  color: rgba(244, 248, 255, 0.92) !important;
}

.wrap input,
.box input {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  border: 1px solid rgba(160, 205, 255, 0.42) !important;
}

.wrap input::placeholder,
.box input::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

.wrap button,
.box button,
.wrap input[type="submit"],
.box input[type="submit"] {
  background: linear-gradient(135deg, #0b66c3 0%, #1f7cff 58%, #f28c28 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(31, 124, 255, 0.28) !important;
}

.wrap a,
.box a {
  color: #8fc7ff !important;
}

.wrap .hint,
.box .hint {
  color: rgba(220, 235, 255, 0.78) !important;
}

.wrap .divider,
.box .divider {
  border-color: rgba(255, 255, 255, 0.20) !important;
}

.box code,
.wrap code {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Upload result/error pages */
.upload-result-card {
    max-width: 720px;
    margin: 14vh auto 0;
    padding: 34px 38px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .74);
    color: #12305a;
    box-shadow: 0 18px 55px rgba(5, 26, 55, .28);
    text-align: center;
    backdrop-filter: blur(8px);
}

.upload-result-card h1 {
    margin: 0 0 18px;
    color: #0b4f9c;
    font-size: 30px;
}

.upload-result-card p {
    margin: 12px 0;
    color: #1e3558;
    line-height: 1.55;
    font-size: 17px;
}

.upload-result-card code {
    display: inline-block;
    margin: 4px 0;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(238, 246, 255, .86);
    color: #0b4f9c;
    font-size: 16px;
    font-weight: 700;
}

.upload-result-card .muted {
    margin-top: 18px;
    color: #60708a;
    font-size: 14px;
}

.upload-result-card .btn-primary {
    display: inline-block;
    margin-top: 22px;
    padding: 13px 22px;
    border-radius: 14px;
    background: #0b74d1;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
}

/* Upload result/error pages: same visual style as upload page */
.upload-result-card {
    max-width: 780px !important;
    margin: 32px auto 0 !important;
    padding: 34px 38px !important;
    border-radius: 18px !important;
    background: rgba(9, 28, 45, .90) !important;
    color: #eef6ff !important;
    border: 1px solid rgba(80, 150, 210, .45) !important;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .38) !important;
    text-align: center !important;
    backdrop-filter: blur(6px) !important;
}

.upload-result-card h1 {
    color: #ffffff !important;
    font-size: 28px !important;
}

.upload-result-card p {
    color: #dce8f5 !important;
}

.upload-result-card code {
    background: rgba(255, 255, 255, .14) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
}

.upload-result-card .muted {
    color: #b9cbe0 !important;
}

.upload-result-card .btn-primary {
    background: linear-gradient(90deg, #0575e6, #ffb347) !important;
    color: #ffffff !important;
    border: 0 !important;
}

/* Upload current files status */
.upload-status-panel {
    margin: 26px 0 26px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.10);
}

.upload-status-panel h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.meter-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 12px 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.065);
}

.meter-file-row span {
    color: #cbd9e8;
    font-size: 14px;
}

.meter-file-ok {
    border-left: 4px solid #33d17a;
}

.meter-file-missing {
    border-left: 4px solid #ffb347;
}

.btn-danger {
    padding: 11px 16px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, #d93025, #ff8a65);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================
   Mobile-first dark operator UI for /upload
   ========================================================= */
body.mobile-app {
  margin: 0 !important;
  min-height: 100svh !important;
  color: #f7fbff !important;
  background:
    linear-gradient(180deg, rgba(3, 12, 24, .80), rgba(3, 12, 24, .94)),
    url("/static/img/corporate-bg.jpg") center top / cover no-repeat fixed !important;
  font-family: Arial, sans-serif !important;
}
.app-shell { width: min(100%, 520px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 28px; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.app-kicker { color: rgba(220,235,255,.70); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.app-topbar h1 { margin: 4px 0 0; font-size: 22px; line-height: 1.1; color: #fff; }
.app-logout { color: #9dccff !important; text-decoration: none; font-size: 14px; padding: 9px 12px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(160,205,255,.22); }
.status-card, .upload-panel, .info-card, .history-card { background: rgba(9,25,45,.78); border: 1px solid rgba(130,185,255,.24); border-radius: 22px; padding: 18px; margin: 14px 0; box-shadow: 0 18px 50px rgba(0,0,0,.32); backdrop-filter: blur(14px) saturate(125%); -webkit-backdrop-filter: blur(14px) saturate(125%); }
.status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.status-title { color: #77e08b; font-size: 22px; font-weight: 800; margin-top: 4px; }
.status-badge { padding: 8px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status-badge.ok { color: #b8ffc4; background: rgba(31,141,61,.22); border: 1px solid rgba(110,231,139,.22); }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-card { min-height: 70px; padding: 13px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.mini-card span, .info-list span, .muted { color: rgba(220,235,255,.68) !important; font-size: 13px; }
.mini-card b { display: block; margin-top: 8px; color: #9af0a8; font-size: 15px; }
.upload-panel h2, .info-card h2, .history-card h2 { margin: 0 0 8px; color: #fff !important; font-size: 20px; }
.upload-form { margin-top: 16px; }
.file-drop { display: flex !important; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; padding: 22px 16px; border: 1.5px dashed rgba(130,185,255,.42); border-radius: 20px; background: rgba(255,255,255,.06); text-align: center; }
.file-drop input { width: 100%; max-width: 260px; margin: 12px auto 0 !important; color: #dbeafe !important; }
.file-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; color: #fff; background: linear-gradient(135deg, #0b66c3 0%, #1f7cff 100%); font-size: 28px; font-weight: 700; }
.file-drop strong { font-size: 17px; color: #fff; }
.file-drop small { margin-top: 4px; color: rgba(220,235,255,.62); }
.primary-action { width: 100%; margin-top: 14px; padding: 15px 16px !important; border: 0 !important; border-radius: 16px !important; color: #fff !important; font-size: 16px !important; font-weight: 700 !important; background: linear-gradient(135deg, #0b66c3 0%, #1f7cff 68%, #f28c28 100%) !important; box-shadow: 0 14px 34px rgba(31,124,255,.32) !important; }
.info-list { display: grid; gap: 10px; margin-top: 14px; }
.info-list div, .file-row { padding: 13px; border-radius: 15px; background: rgba(255,255,255,.065); border: 1px solid rgba(255,255,255,.08); }
.info-list b { display: block; margin-top: 6px; color: rgba(255,255,255,.92); line-height: 1.35; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.file-row b { color: #9af0a8; font-size: 13px; }
body.mobile-app code { color: #fff !important; background: rgba(255,255,255,.10) !important; border: 1px solid rgba(255,255,255,.10); border-radius: 7px; padding: 3px 7px; }
@media (min-width: 760px) { .app-shell { width: min(100%, 820px); padding-top: 32px; } .status-grid { grid-template-columns: repeat(4, 1fr); } }

/* =========================================================
   Mobile UI fix v2 — Android/Yandex browser hardening
   ========================================================= */

body.mobile-app {
  background-attachment: scroll !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  position: relative !important;
}

body.mobile-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 12, 24, .72), rgba(3, 12, 24, .96)),
    url("/static/img/corporate-bg.jpg") center top / cover no-repeat;
  transform: translateZ(0);
}

body.mobile-app {
  background-image: none !important;
}

.app-shell {
  padding-bottom: max(34px, env(safe-area-inset-bottom)) !important;
}

.status-card,
.upload-panel,
.info-card,
.history-card {
  background: rgba(8, 24, 44, .88) !important;
  -webkit-backdrop-filter: blur(8px) saturate(115%) !important;
  backdrop-filter: blur(8px) saturate(115%) !important;
}

.file-drop {
  position: relative !important;
  overflow: hidden !important;
}

.file-drop input[type="file"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  margin: 0 !important;
  z-index: 3 !important;
}

.file-drop::after {
  content: "Нажмите, чтобы выбрать файл";
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(31, 124, 255, .28);
  border: 1px solid rgba(130, 185, 255, .30);
  font-size: 13px;
  font-weight: 700;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .status-card,
  .upload-panel,
  .info-card,
  .history-card {
    background: rgba(8, 24, 44, .94) !important;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .app-topbar h1 {
    font-size: 25px !important;
  }

  .status-grid {
    gap: 9px !important;
  }

  .mini-card {
    min-height: 74px !important;
    padding: 12px !important;
  }

  .status-card,
  .upload-panel,
  .info-card,
  .history-card {
    border-radius: 20px !important;
  }
}


/* =========================================================
   Mobile login dark UI
   ========================================================= */

body.login-mobile {
  display: block !important;
}

.login-shell {
  width: min(100%, 440px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(56px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.brand-mark {
  font-size: 34px;
  line-height: 1;
}

.brand-title {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .02em;
}

.brand-subtitle {
  color: rgba(220, 235, 255, .72);
  margin-top: 3px;
  font-size: 14px;
}

.login-panel {
  background: rgba(8, 24, 44, .88);
  border: 1px solid rgba(130, 185, 255, .28);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.44);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}

.login-panel h1 {
  margin: 0;
  text-align: center;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.1;
}

.login-panel .muted {
  margin: 10px 0 22px;
  text-align: center;
  line-height: 1.45;
}

.login-form label {
  display: block;
  margin: 14px 0 7px;
  color: rgba(244, 248, 255, .88);
  font-size: 14px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(160,205,255,.34) !important;
  color: #ffffff !important;
  outline: none;
  font-size: 16px;
}

.login-form input:focus {
  border-color: rgba(130,185,255,.72) !important;
  box-shadow: 0 0 0 3px rgba(31,124,255,.18);
}

.login-form .primary-action {
  margin-top: 22px;
}

.login-panel .err {
  min-height: 18px;
  margin-top: 14px;
  color: #fecaca !important;
  text-align: center;
  font-size: 14px;
}

.login-panel .notice {
  margin: 14px 0;
  padding: 12px;
  border-radius: 14px;
  color: #bbf7d0 !important;
  background: rgba(31, 141, 61, .18);
  border: 1px solid rgba(110, 231, 139, .24);
  font-size: 14px;
}

.ui-version {
  margin-top: 18px;
  text-align: center;
  color: rgba(220,235,255,.55);
  font-size: 12px;
}

@media (max-width: 420px) {
  .login-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-brand {
    margin-bottom: 22px;
  }

  .login-panel {
    padding: 22px 18px;
    border-radius: 22px;
  }
}


/* =========================
   UPLOAD CORPORATE DARK UI
   ========================= */

.upload-page-dark {
  margin: 0;
  min-height: 100vh;
  color: #e8f1ff;
  font-family: Arial, sans-serif;
  background:
    linear-gradient(135deg, rgba(5,14,28,.84), rgba(7,26,52,.76)),
    url('/static/img/corporate-bg.jpg') center top / cover no-repeat fixed;
}

.upload-box {
  max-width: 940px;
  margin: 32px auto;
  background: rgba(12,25,44,.90);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(125,211,252,.22);
  border-radius: 22px;
  padding: 30px;
  box-shadow: 0 22px 70px rgba(0,0,0,.42);
}

.upload-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.upload-pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14,165,233,.18);
  border: 1px solid rgba(125,211,252,.30);
  color: #dff6ff;
  font-weight: 700;
  white-space: nowrap;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

.upload-card {
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(15,31,53,.84);
  border-radius: 16px;
  padding: 16px;
  line-height: 1.5;
}

.upload-card h2,
.upload-card h3,
.upload-box h2 {
  color: #f8fbff;
}

.upload-ok {
  color: #86efac;
  font-weight: 800;
}

.upload-warn {
  color: #fbbf24;
  font-weight: 800;
}

.upload-hint {
  color: #b7c7dc;
  font-size: 14px;
  line-height: 1.55;
}

.upload-section {
  background: rgba(14,165,233,.12);
  border: 1px solid rgba(125,211,252,.30);
  border-radius: 18px;
  padding: 18px;
  margin: 18px 0;
}

.upload-btn {
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg,#1d7fe5,#278af2 58%,#f2992e);
  color: white !important;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 12px 34px rgba(29,127,229,.28);
}

.upload-btn2 {
  padding: 10px 12px;
  border: 1px solid rgba(125,211,252,.26);
  border-radius: 10px;
  background: rgba(148,163,184,.12);
  color: #e8f1ff;
  cursor: pointer;
  width: 100%;
  font-weight: 700;
}

.upload-page-dark code {
  background: rgba(2,6,23,.48);
  color: #dff6ff;
  padding: 2px 6px;
  border-radius: 6px;
}

.upload-page-dark a {
  color: #7dd3fc;
}

.upload-page-dark input[type=file] {
  color: #e8f1ff;
}

@media(max-width:760px) {
  .upload-box {
    margin: 16px;
    padding: 20px;
  }

  .upload-top,
  .upload-grid {
    display: block;
  }

  .upload-card {
    margin-bottom: 12px;
  }
}

/* Upload status visual distinction */
.upload-ok,
.upload-warn{
  display:inline-block;
  margin:10px 0 6px;
  padding:7px 11px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  letter-spacing:.01em;
}

.upload-ok{
  color:#d9ffef;
  background:rgba(36,166,107,.18);
  border:1px solid rgba(74,222,128,.35);
  box-shadow:0 0 16px rgba(36,166,107,.12);
}

.upload-warn{
  color:#fff4d6;
  background:rgba(214,148,30,.32);
  border:1px solid rgba(255,210,90,.58);
  box-shadow:
    0 0 18px rgba(255,190,60,.18),
    0 0 0 1px rgba(255,255,255,.03) inset;
}

.upload-card:has(.upload-ok){
  border-color:rgba(74,222,128,.32);
}

.upload-card:has(.upload-warn){
  border-color:rgba(251,191,36,.38);
}

.export-screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin: 16px 0 22px;
}

.export-screens figure {
  margin: 0;
}

.export-screens img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.export-screens figcaption {
  margin-top: 8px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 14px;
}

.export-screens img {
  cursor: zoom-in;
  transition: transform .16s ease, box-shadow .16s ease;
}

.export-screens img:hover {
  transform: scale(1.015);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .86);
  backdrop-filter: blur(6px);
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .45);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
  background: #fff;
  cursor: zoom-out;
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  color: #e5e7eb;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.export-screens img {
  cursor: zoom-in;
  transition: transform .16s ease, box-shadow .16s ease;
}

.export-screens img:hover {
  transform: scale(1.015);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .86);
  backdrop-filter: blur(6px);
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .45);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
  background: #fff;
  cursor: zoom-out;
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  color: #e5e7eb;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.export-screens {
  overflow: visible;
}

.export-screens figure {
  position: relative;
  z-index: 1;
}

.export-screens figure:hover {
  z-index: 20;
}

.export-screens img:hover {
  transform: scale(1.65);
  transform-origin: center center;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .65);
}

.export-screens figure:last-child img:hover {
  transform: scale(2.15);
}

.upload-card details summary {
  cursor: pointer;
  user-select: none;
}

.upload-card details summary:hover {
  color: #ffffff;
}

.upload-card details summary {
  cursor: pointer;
  user-select: none;
}

.export-screens.no-hover img:hover {
  transform: none !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28) !important;
}

/* click-zoom only: disable screenshot hover enlargement */
.export-screens img:hover,
.export-screens figure:last-child img:hover {
  transform: none !important;
}

.export-screens img {
  cursor: zoom-in;
}

/* cleanup UI experiment: keep instruction screenshots, disable hover/lightbox behavior */
.export-screens img,
.export-screens img:hover,
.export-screens figure:last-child img:hover {
  transform: none !important;
  cursor: default !important;
}

.image-lightbox,
.image-lightbox.open {
  display: none !important;
}





/* role-filter equal-width centered layout */
.upload-grid:has(> .upload-card:only-child) {
    display: block;
}

.upload-grid:has(> .upload-card:only-child) > .upload-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    text-align: center;
}

.upload-grid:has(> .upload-card:only-child) > .upload-card hr {
    margin-left: auto !important;
    margin-right: auto !important;
}

.upload-grid:has(> .upload-card:only-child) > .upload-card form {
    display: flex;
    justify-content: center;
}

.upload-grid:has(> .upload-card:only-child) > .upload-card .upload-btn2 {
    width: min(100%, 520px);
    margin-left: auto;
    margin-right: auto;
}

.upload-section {
    text-align: center;
}

.upload-section form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-section input[type="file"] {
    margin-left: auto !important;
    margin-right: auto !important;
}

.upload-section .upload-btn {
    width: min(100%, 320px);
}

.upload-card > .upload-grid:has(> div[style*="text-align:center;"]:only-child) {
    display: flex;
    justify-content: center;
}

.upload-card > .upload-grid:has(> div[style*="text-align:center;"]:only-child) > div {
    width: min(100%, 520px);
}


/* upload file input vertical layout */
.upload-card form[enctype="multipart/form-data"]{
    display:flex;
    flex-direction:column;
    gap:12px;
    align-items:center;
}

.upload-card form[enctype="multipart/form-data"] input[type=file]{
    width:auto;
    max-width:100%;
    align-self:flex-start;
}

.upload-card form[enctype="multipart/form-data"] button{
    width:100%;
    max-width:520px;
}
