﻿
/* ─── Visitor Card Container ──────────────────────────── */

.visitor-card-container {
  position: relative;
  width: 100%;
  opacity: 1;
  transition: opacity var(--transition-base);
}

.visitor-card-container.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* ─── Visitor Countdown Timer Chip ───────────────────────
   Sits top-right of visitor badge card (replaces NFC icon)
   ─────────────────────────────────────────────────────── */

.vc-timer-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 10px;
  padding: 3px 8px 3px 3px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  flex-shrink: 0;
  box-shadow:
    0 2px 10px rgba(0, 0, 0, .25),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.vc-chip-ring-svg {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
}

#visitorTimerRing {
  transition: stroke-dashoffset 1s linear;
}

.vc-chip-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
}

.vc-chip-time {
  font-family: "Space Grotesk", monospace;
  font-size: clamp(.52rem, 2vw, .72rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
}

.vc-chip-label {
  font-size: clamp(.3rem, 1.1vw, .42rem);
  color: rgba(255, 255, 255, .5);
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1;
}

/* Warning state (< 15 min) */
.vc-timer-chip.timer-warning {
  background: rgba(253, 224, 71, .14);
  border-color: rgba(253, 224, 71, .32);
}

.vc-timer-chip.timer-warning #visitorTimerRing {
  stroke: #fde047;
}

.vc-timer-chip.timer-warning .vc-chip-time {
  color: #fde047;
  text-shadow: 0 0 8px rgba(253, 224, 71, .35);
}

/* Critical state (< 5 min) */
.vc-timer-chip.timer-critical {
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .38);
  animation: vcChipCritical .7s ease-in-out infinite;
}

.vc-timer-chip.timer-critical #visitorTimerRing {
  stroke: #ef4444;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, .7));
}

.vc-timer-chip.timer-critical .vc-chip-time {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, .4);
}

@keyframes vcChipCritical {
  0%, 100% { box-shadow: 0 2px 10px rgba(239, 68, 68, .18), inset 0 1px 0 rgba(255,255,255,.08); }
  50%       { box-shadow: 0 4px 18px rgba(239, 68, 68, .45), inset 0 1px 0 rgba(255,255,255,.08); }
}

/* ─── Visitor Card Preset  ────────────────────────────── */
/* A unique deep-indigo gradient, distinct from worker presets
   but at the same quality level. Gold top stripe marks it
   instantly as a visitor pass.                           */

.wallet-card.preset-visitor {
  background: linear-gradient(135deg, #0b0d1a 0%, #1a1c42 44%, #070810 100%);
  box-shadow:
    0 56px 104px rgba(30, 20, 100, .48),
    0 14px 38px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(160, 150, 255, .18),
    inset 0 1px 0 rgba(200, 190, 255, .12);
}

.wallet-card.preset-visitor::before {
  background: linear-gradient(90deg, #b8860b 0%, #f4c430 48%, #b8860b 100%);
  box-shadow: 0 0 22px rgba(244, 196, 48, .52), 0 2px 8px rgba(244, 196, 48, .28);
}

.wallet-card.preset-visitor .wc-brand-mark {
  background: linear-gradient(135deg, #4a3d8f, #6a59c8);
  box-shadow: 0 3px 10px rgba(74, 61, 143, .55);
}

.wallet-card.preset-visitor .wc-qr-frame {
  background: linear-gradient(135deg, #1a1440 0%, #3a2e90 24%, #8070e0 44%, #4535b0 64%, #120e38 100%);
  border-color: rgba(128, 112, 224, .44);
  box-shadow:
    0 14px 28px rgba(40, 30, 120, .40),
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -1px 0 rgba(0, 0, 60, .48);
}

/* ─────────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════
   SUPPIX Mitarbeiter-App – Wallet-Card Redesign
   ═══════════════════════════════════════════════════════ */

/* Theme tokens and global mode styles moved to worker-theme.css */

.app-backdrop,
.backdrop-orb,
.backdrop-grid {
  display: none !important;
}

.orb-one {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(56, 189, 248, .24) 0%, rgba(56, 189, 248, 0) 72%);
}

.orb-two {
  width: 260px;
  height: 260px;
  left: -110px;
  bottom: 120px;
  background: radial-gradient(circle, rgba(99, 102, 241, .18) 0%, rgba(99, 102, 241, 0) 72%);
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 156, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 156, 255, .18) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .22;
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, .9), rgba(0, 0, 0, .1) 65%, transparent 100%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, .9), rgba(0, 0, 0, .1) 65%, transparent 100%);
}

.app-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 26px 16px 38px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* Login phase: remove wrapper padding so login fills viewport */
body:not(.worker-loaded) .app-shell {
  padding: 0;
  gap: 0;
  max-width: none;
}

/* iPhone standalone wallet mode: focus only the pass card */
body.wallet-immersive .top-panel,
body.wallet-immersive:not(.wallet-immersive-sections-open) #workerMenuCard,
body.wallet-immersive #workerPageNav,
body.wallet-immersive #actionsPanel,
body.wallet-immersive #sessionInfoCard,
body.wallet-immersive #leaveRequestCard,
body.wallet-immersive #leaveRequestCard,
body.wallet-immersive #timesheetCard,
body.wallet-immersive #documentsCard,
body.wallet-immersive #routeCard,
body.wallet-immersive #workerQuickMenu {
  display: none !important;
}

body.wallet-immersive.wallet-immersive-sections-open #sessionInfoCard,
body.wallet-immersive.wallet-immersive-sections-open #actionsPanel,
body.wallet-immersive.wallet-immersive-sections-open #leaveRequestCard,
body.wallet-immersive.wallet-immersive-sections-open #timesheetCard,
body.wallet-immersive.wallet-immersive-sections-open #documentsCard,
body.wallet-immersive.wallet-immersive-sections-open #workerMenuCard,
body.wallet-immersive.wallet-immersive-sections-open #routeCard {
  display: grid !important;
}

/* Respect runtime hidden state even in immersive expanded mode. */
body.wallet-immersive.wallet-immersive-sections-open .below-card.hidden,
body.wallet-immersive.wallet-immersive-sections-open #workerMenuCard.hidden {
  display: none !important;
}

body.wallet-immersive .app-shell {
  max-width: 100%;
  padding: max(12px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  gap: 12px;
}

body.wallet-immersive .worker-pass {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.worker-quick-menu {
  position: sticky;
  top: 6px;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.quick-menu-btn {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: #1a1f24;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 12px;
  white-space: nowrap;
}

.quick-menu-btn.active {
  background: var(--accent, #d95d39);
  color: var(--accent-on, #fff);
  border-color: transparent;
}

.quick-menu-btn:active {
  transform: translateY(1px);
}

html {
  scroll-behavior: smooth;
}

html.baupass-local-dev {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.baupass-local-dev body::after {
  content: "Lokal · " attr(data-local-url);
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  z-index: 99999;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #0f3d2e;
  background: rgba(167, 243, 208, 0.95);
  border: 1px solid rgba(16, 120, 87, 0.35);
  pointer-events: none;
}

/* ── Shared Typography ─────────────────────────── */
.top h1, .card h2 { margin: 0; font-family: "Space Grotesk", sans-serif; }

.card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--accent);
  font-size: .75rem;
}

/* Old .top-panel replaced by .sparkasse-top-bar */
.top-panel {
  display: none !important;
}

.top-copy {
  display: grid;
  gap: 8px;
}

.brand-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .12);
}

.brand-chip-platform {
  background: rgba(255, 247, 241, .12);
  color: #fff7f1;
}

.brand-chip-operator {
  background: rgba(217, 93, 57, .18);
  color: #ffd9c8;
}

.top-panel .eyebrow {
  color: var(--accent-soft);
}

.top-panel h1 {
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  line-height: .96;
  letter-spacing: -.04em;
}

.top-lead {
  margin: 0;
  max-width: 32ch;
  color: rgba(255, 247, 241, .78);
  font-size: .98rem;
  line-height: 1.45;
}

.top-actions {
  display: grid;
  gap: 13px;
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.top-stat-card {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 22px rgba(0,0,0,.09);
}

.top-stat-card strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  color: #fff7f1;
}

.top-stat-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 247, 241, .62);
}

/* ── Language Option (under Standort) ── */
.lang-option-block {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(22, 94, 216, .2);
  background: rgba(22, 94, 216, .08);
  display: grid;
  gap: 6px;
}

.lang-option-label {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}

.lang-option-select {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(18, 19, 24, .16);
  background: #fff;
  color: #101418;
  font-size: .95rem;
  font-weight: 700;
  padding: 8px 10px;
}

.lang-option-select:focus-visible {
  outline: 2px solid rgba(22, 94, 216, .45);
  outline-offset: 1px;
}

/* RTL layout for Arabic */
html[dir="rtl"] .top-panel {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .lang-option-block,
html[dir="rtl"] .lang-option-label,
html[dir="rtl"] .lang-option-select {
  text-align: right;
}

html[dir="rtl"] .login-tips {
  direction: rtl;
}

html[dir="rtl"] .grid label {
  text-align: right;
}

html[dir="rtl"] input {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .worker-bottom-nav {
  left: 0;
  right: 0;
  transform: none;
  direction: ltr;
}

html[dir="rtl"] .worker-bottom-nav .nav-label {
  direction: rtl;
  unicode-bidi: plaintext;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[dir="rtl"] .wc-brand {
  flex-direction: row-reverse;
}
/* ── End Language Switcher ── */

.install-cta {
  min-height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fffaf6;
  border-color: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.force-refresh-cta {
  border-color: rgba(243, 146, 86, .55);
  background: linear-gradient(135deg, rgba(243, 146, 86, .34), rgba(217, 93, 57, .26));
}

.platform-hint {
  margin: 0;
  color: rgba(255, 247, 241, .72);
  font-size: .88rem;
  line-height: 1.4;
}

.build-badge {
  margin: 0;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(9, 18, 30, .26);
  color: rgba(255, 249, 242, .92);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.connection-banner {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.connection-banner.online {
  background: rgba(22, 163, 74, .2);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, .35);
}

.connection-banner.offline {
  background: rgba(220, 38, 38, .22);
  color: #fecaca;
  border: 1px solid rgba(254, 202, 202, .35);
}

/* Login card and Sparkasse login styles extracted to worker-login.css */

button {
  border: 0;
  border-radius: 16px;
  min-height: 54px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease, filter var(--transition-fast) ease, background var(--transition-base) ease;
}

button:hover,
.site-map-link:hover {
  transform: translateY(-1px);
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, #df623d, #a63b22 68%, #7f2918 100%);
  box-shadow: 0 16px 30px rgba(166, 59, 34, .24);
}

.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(23, 23, 23, .08);
  box-shadow: 0 10px 24px rgba(32, 19, 11, .08);
}

.small-btn {
  min-height: 50px;
  padding: 10px 16px;
  font-size: .85rem;
}

.actions button {
  min-height: 56px;
  font-size: .95rem;
}

.geolocation-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -4px;
  font-size: .8rem;
  color: #6b7280;
  opacity: .85;
}

.geolocation-hint.hidden {
  display: none;
}

.login-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-resume-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid rgba(196, 178, 158, .35);
}

.login-resume-copy {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
}

.login-resume-row .ghost {
  width: 100%;
}

.login-tip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(217, 93, 57, .08);
  color: #8e3b1f;
  font-size: .8rem;
  font-weight: 700;
}

.worker-panel-grid {
  display: grid;
  gap: 14px;
}

.worker-hub-toggle-row {
  display: none !important;
}

.worker-hub-toggle {
  display: none !important;
}

.worker-hub-panel {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  gap: 0;
  display: grid;
}

.worker-hub-panel .below-card {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.worker-hub-panel .below-card + .below-card,
.worker-hub-panel .notification-permission-banner {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.worker-hub-panel #workerQuickMenu {
  display: none !important;
}

body.worker-loaded.worker-feature-tab-active .worker-hub-panel #workerPageNav:not(.hidden),
body.worker-loaded.worker-page-focus .worker-hub-panel #workerPageNav:not(.hidden),
body.wallet-immersive.wallet-immersive-sections-open #workerPageNav:not(.hidden) {
  display: grid !important;
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--corp-bg, #f4f7fb);
  padding: 8px 0 6px;
  margin-bottom: 4px;
}

.worker-menu-card {
  display: grid;
  gap: 0;
}

.worker-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  animation: featureSlideIn 0.8s ease 1.5s both;
}

@media (min-width: 380px) {
  .worker-menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.worker-menu-btn {
  min-height: 140px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  color: #1a1a1a;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 24px 16px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.worker-menu-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 20px;
}

.worker-menu-btn:hover {
  background: linear-gradient(135deg, #fcfcfc 0%, #f5f5f5 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.worker-menu-btn:hover::before {
  opacity: 1;
}

.worker-menu-btn:active {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.worker-menu-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(217, 93, 57, 0.1), rgba(22, 94, 216, 0.08));
  border: 1px solid rgba(217, 93, 57, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.worker-menu-svg {
  width: 56px;
  height: 56px;
  display: block;
  stroke-width: 1.8;
  stroke: currentColor;
  fill: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.worker-menu-btn:hover .worker-menu-icon {
  background: linear-gradient(135deg, rgba(217, 93, 57, 0.16), rgba(22, 94, 216, 0.14));
  border-color: rgba(217, 93, 57, 0.3);
  box-shadow: 0 4px 12px rgba(217, 93, 57, 0.12);
  transform: scale(1.05);
}

.worker-menu-btn:hover .worker-menu-svg {
  transform: scale(1.15) rotate(3deg);
}

.worker-menu-label {
  line-height: 1.3;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text);
  max-width: 16ch;
  min-height: 2.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.25s ease;
}

.worker-menu-btn:hover .worker-menu-label {
  color: var(--accent);
  font-weight: 600;
}

.worker-menu-btn:focus-visible {
  outline: 2px solid rgba(22, 94, 216, 0.45);
  outline-offset: 2px;
}

.worker-page-nav {
  display: grid;
  gap: 8px;
  margin-top: -4px;
}

.worker-page-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.worker-page-active {
  border-color: rgba(22, 94, 216, 0.3);
  box-shadow: 0 14px 34px rgba(22, 94, 216, 0.12);
}

body.worker-loaded .top-panel {
  display: none;
}

body.worker-loaded .app-shell {
  max-width: 520px;
  padding-top: 12px;
}

/* ═══════════════════════════════════════════════
   WALLET CARD
   ═══════════════════════════════════════════════ */

.wallet-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  aspect-ratio: 85.6 / 56;
  min-height: 272px;
  border-radius: 32px;
  padding: 5.6% 6.2%;
  background: linear-gradient(
    135deg,
    #0a1218 0%,
    #1a3844 42%,
    #070f18 100%
  );
  box-shadow:
    0 56px 112px rgba(0, 0, 0, .62),
    0 16px 42px rgba(0, 0, 0, .38),
    0 0 0 1px rgba(255, 255, 255, .14),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  -webkit-user-select: none;
  user-select: none;
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}

body.worker-loaded .wallet-card {
  margin-top: 8px;
}

/* ─── CARD ENTRANCE ANIMATION ─── */
@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes cardExpand {
  0% {
    max-width: 430px;
    padding: 4.8% 5.4%;
  }
  50% {
    max-width: 100%;
    padding: 6% 8%;
  }
  100% {
    max-width: 100%;
    padding: 6% 8%;
  }
}

@keyframes cardTooltipShow {
  0% {
    opacity: 0;
    transform: translateY(-12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes featureSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.worker-loaded .wallet-card {
  animation: cardEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wallet-card.card-expanded {
  max-width: 100%;
  padding: 6% 8%;
  animation: cardExpand 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.wallet-card.card-expanded::after {
  content: 'اسحب لأسفل لعرض المزيد';
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  animation: cardTooltipShow 0.6s ease 1.2s forwards;
  opacity: 0;
}

/* Card returns to top after delay */
.wallet-card.card-shrink {
  animation: cardShrinkBack 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cardShrinkBack {
  0% {
    max-width: 100%;
    padding: 6% 8%;
  }
  100% {
    max-width: 430px;
    padding: 4.8% 5.4%;
  }
}

.wallet-card:active {
  transform: scale(0.98);
}

/* Farbstreifen oben */
.wallet-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(255, 188, 132, .99) 0%,
    #f08a50 44%,
    rgba(255, 210, 162, .98) 100%
  );
  height: 5px;
  bottom: auto;
  box-shadow: 0 0 22px rgba(240, 138, 80, .52), 0 2px 8px rgba(240, 138, 80, .3);
}

.wallet-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, .18), transparent 20%),
    radial-gradient(circle at 84% 22%, rgba(120, 185, 255, .10), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 16%, transparent 84%, rgba(0, 0, 0, .14));
  pointer-events: none;
}

.wallet-card.branding-custom {
  background: linear-gradient(
    145deg,
    var(--worker-card-primary-dark, #081018) 0%,
    var(--worker-card-primary, #183243) 48%,
    var(--worker-card-primary-dark, #081018) 100%
  ) !important;
  box-shadow:
    0 56px 104px color-mix(in srgb, var(--worker-card-primary, #183243) 36%, transparent),
    0 14px 38px rgba(0, 0, 0, .42),
    0 0 0 1px color-mix(in srgb, var(--worker-card-accent, #f08a50) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.wallet-card.branding-custom::before {
  background: linear-gradient(
    90deg,
    var(--worker-card-accent, #f08a50) 0%,
    var(--worker-card-primary-light, #f0b27a) 50%,
    var(--worker-card-accent, #f08a50) 100%
  ) !important;
}

.wallet-card.branding-custom .wc-brand-mark {
  background: linear-gradient(135deg, var(--worker-card-primary, #183243), var(--worker-card-accent, #f08a50));
  box-shadow: 0 3px 10px color-mix(in srgb, var(--worker-card-accent, #f08a50) 45%, transparent);
}

.wallet-card.branding-custom .wc-brand-mark .wc-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.wallet-card.branding-custom .wc-qr-frame {
  background: linear-gradient(
    135deg,
    var(--worker-card-primary-dark, #183243) 0%,
    var(--worker-card-accent, #f08a50) 42%,
    var(--worker-card-primary-light, #f0b27a) 100%
  );
  border-color: color-mix(in srgb, var(--worker-card-accent, #f08a50) 46%, transparent);
}

/* QR flow: /worker.html?view=card&badge=BP-... */
body.worker-card-install.worker-loaded #loginCard {
  display: none !important;
}

body.worker-card-install.worker-loaded #workerDashboard {
  display: none !important;
}

body.worker-card-install.worker-loaded #badgeCard,
body.worker-loaded.worker-feature-tab-active #badgeCard,
body.worker-loaded.worker-page-focus #badgeCard {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

body.worker-card-install.worker-loaded #badgeCard,
body.worker-loaded.worker-feature-tab-active #badgeCard {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

body.worker-loaded.worker-feature-tab-active #badgeCard .pass-stage,
body.worker-loaded.worker-feature-tab-active #visitorCardContainer,
body.worker-loaded.worker-feature-tab-active #badgeCard .worker-hub-toggle-row,
body.worker-loaded.worker-feature-tab-active #workerMenuCard,
body.worker-loaded.worker-feature-tab-active #smartWorkHubCard,
body.worker-loaded.worker-feature-tab-active #routeCard,
body.worker-loaded.worker-feature-tab-active #sessionInfoCard,
body.worker-loaded.worker-feature-tab-active #companyModeCard,
body.worker-loaded.worker-feature-tab-active #dailyInsightsCard,
body.worker-loaded.worker-feature-tab-active #actionsPanel,
body.worker-loaded.worker-feature-tab-active #incidentCard {
  display: none !important;
}

body.worker-card-install.worker-loaded #workerBottomNav {
  display: flex !important;
}

body.worker-card-install.worker-loaded #leaveRequestCard:not(.hidden),
body.worker-card-install.worker-loaded #timesheetCard:not(.hidden),
body.worker-card-install.worker-loaded #documentsCard:not(.hidden) {
  display: block !important;
}

body.worker-card-install.worker-loaded #workerHubPanel:not(.hidden) {
  display: block !important;
}

body.worker-loaded.worker-feature-tab-active #workerHubPanel:not(.hidden),
body.worker-loaded.worker-page-focus #workerHubPanel:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}

body.worker-loaded.worker-feature-tab-active #leaveRequestCard:not(.hidden),
body.worker-loaded.worker-feature-tab-active #timesheetCard:not(.hidden),
body.worker-loaded.worker-feature-tab-active #documentsCard:not(.hidden),
body.worker-loaded.worker-feature-tab-active #deploymentPlanCard:not(.hidden),
body.worker-loaded.worker-page-focus #leaveRequestCard:not(.hidden),
body.worker-loaded.worker-page-focus #timesheetCard:not(.hidden),
body.worker-loaded.worker-page-focus #documentsCard:not(.hidden),
body.worker-loaded.worker-page-focus #deploymentPlanCard:not(.hidden),
body.worker-loaded.worker-feature-tab-active #chatCard.worker-feature-chat-card:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 0 !important;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.worker-loaded.worker-feature-tab-active #chatCard.worker-feature-chat-card:not(.hidden),
body.worker-loaded.worker-page-focus #chatCard.worker-feature-chat-card:not(.hidden) {
  overflow: hidden;
}

body.worker-loaded.worker-feature-tab-active #chatCard .worker-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  margin-bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.worker-loaded.worker-feature-tab-active #chatCard .worker-chat-compose {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: block !important;
  margin: 0;
  padding: 8px 10px max(8px, env(safe-area-inset-bottom, 0px));
  background: var(--corp-surface, #fff);
  border-top: 1px solid var(--corp-border, rgba(60, 94, 139, 0.22));
  box-shadow: 0 -4px 18px rgba(8, 28, 54, 0.07);
}

body.worker-loaded.worker-feature-tab-active #chatCard .worker-chat-compose-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

body.worker-loaded.worker-feature-tab-active #chatCard .worker-chat-compose-bar textarea {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  max-height: 120px;
  width: auto;
}

.worker-panel-error {
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.45;
}

.nav-tab.nav-tab-locked {
  opacity: 0.55;
}

.nav-tab.nav-tab-locked::after {
  content: "🔒";
  font-size: 0.65rem;
  margin-left: 4px;
}

body.worker-card-install.worker-loaded .worker-menu-card,
body.worker-card-install.worker-loaded #smartWorkHubCard {
  display: block !important;
}

body.worker-card-install.worker-loaded #workerMenuCard.hidden {
  display: block !important;
}

body.worker-card-install.worker-loaded #installButton {
  display: inline-flex !important;
}

.wallet-card.preset-construction {
  background: linear-gradient(135deg, #0b1520 0%, #183243 44%, #081018 100%);
}

.wallet-card.preset-construction::before {
  background: linear-gradient(90deg, #d95d39 0%, #f08a50 48%, #d95d39 100%);
}

.wallet-card.preset-construction .wc-brand-mark {
  background: linear-gradient(135deg, #d95d39, #b94a2a);
  box-shadow: 0 3px 10px rgba(217, 93, 57, .52);
}

.wallet-card.preset-construction .wc-qr-frame {
  background: linear-gradient(135deg, #6a3d18 0%, #c07c35 24%, #e8c886 44%, #d49344 64%, #774519 100%);
  border-color: rgba(240, 190, 120, .46);
  box-shadow: 0 14px 28px rgba(122, 76, 33, .38), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(65, 38, 15, .48);
}

.wallet-card.preset-industry {
  background: linear-gradient(135deg, #241005 0%, #663c15 42%, #261206 100%);
  box-shadow:
    0 56px 104px rgba(110, 58, 20, .44),
    0 14px 38px rgba(0, 0, 0, .4),
    0 0 0 1px rgba(220, 150, 80, .26),
    inset 0 1px 0 rgba(255, 220, 160, .16);
}

.wallet-card.preset-industry::before {
  background: linear-gradient(90deg, #c06e22 0%, #e2ad62 50%, #c06e22 100%);
}

.wallet-card.preset-industry .wc-brand-mark {
  background: linear-gradient(135deg, #bc6f2d, #d6964e);
  box-shadow: 0 3px 10px rgba(146, 90, 40, .45);
}

.wallet-card.preset-industry .wc-qr-frame {
  background: linear-gradient(135deg, #6a3d18 0%, #c07c35 24%, #e8c886 44%, #d49344 64%, #774519 100%);
  border-color: rgba(240, 190, 120, .46);
  box-shadow: 0 14px 28px rgba(122, 76, 33, .38), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(65, 38, 15, .48);
}

.wallet-card.preset-premium {
  background: linear-gradient(135deg, #000a18 0%, #083878 42%, #000812 100%);
  box-shadow:
    0 56px 104px rgba(0, 40, 160, .54),
    0 14px 38px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(100, 170, 255, .20),
    inset 0 1px 0 rgba(140, 200, 255, .14);
}

.wallet-card.preset-premium::before {
  background: linear-gradient(90deg, #1565c0 0%, #42a5f5 48%, #1565c0 100%);
}

.wallet-card.preset-premium .wc-brand-mark {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  box-shadow: 0 3px 10px rgba(21, 101, 192, .55);
}

.wallet-card.preset-premium .wc-qr-frame {
  background: linear-gradient(135deg, #081e58 0%, #1565d0 24%, #52aeff 44%, #1a80e0 64%, #061840 100%);
  border-color: rgba(82, 174, 255, .48);
  box-shadow: 0 14px 28px rgba(0, 60, 170, .40), inset 0 1px 0 rgba(255, 255, 255, .4), inset 0 -1px 0 rgba(0, 20, 80, .48);
}

/* Holographischer Shimmer */
.wc-shimmer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 30%,
    rgba(217, 93, 57, .10) 38%,
    rgba(255, 200, 100, .08) 46%,
    rgba(217, 93, 57, .06) 54%,
    transparent 62%,
    transparent 100%
  );
  background-size: 220% 220%;
  animation: holo 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes holo {
  0%   { background-position: 200% 200%; }
  50%  { background-position:   0%   0%; }
  100% { background-position: 200% 200%; }
}

/* Punkt-Raster Textur */
.wc-grid {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

/* ── Top Row ────────────────────────────────────── */
.wc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  margin-top: -2px;
}

.wc-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.wc-brand-mark {
  width: clamp(26px, 7%, 32px);
  height: clamp(26px, 7%, 32px);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 93, 57, .52), 0 0 16px rgba(217, 93, 57, .2);
  flex-shrink: 0;
}

.wc-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
}

.wc-brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(.58rem, 2.35vw, .84rem);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.12;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  max-width: 100%;
}

.wc-brand-sub {
  font-size: clamp(.37rem, 1.45vw, .52rem);
  color: rgba(255, 255, 255, .52);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.14;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
  max-width: 100%;
}

.wc-nfc {
  opacity: .75;
  flex-shrink: 0;
}

/* ── Middle Row ─────────────────────────────────── */
.wc-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
  margin-top: 1px;
}

/* Visitor card: keep QR/photo a bit higher so bottom data remains visible */
#visitorCardContainer .wc-middle {
  align-items: flex-start;
  margin-top: 12px;
  margin-bottom: 14px;
}

/* QR-Chip */
.wc-qr-holder {
  position: relative;
  width: clamp(82px, 32%, 132px);
  height: clamp(82px, 32%, 132px);
  flex-shrink: 0;
}

#visitorCardContainer .wc-qr-holder {
  height: clamp(94px, 36%, 146px);
  transform: translateY(8px);
}

#visitorCardContainer #visitorQr {
  object-fit: contain;
}

.dqr-countdown {
  position: absolute;
  right: -8px;
  top: -8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(9, 15, 22, 0.62);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.dqr-ring {
  position: absolute;
  inset: 2px;
}

#dqrCountdownRing {
  transition: stroke-dashoffset 1s linear;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}

.dqr-countdown-text {
  position: relative;
  z-index: 4;
  font-family: "Space Grotesk", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.wc-qr-frame {
  position: absolute;
  -webkit-backdrop-filter: blur(4px);
  inset: -7px;
  border-radius: 16px;
  background: linear-gradient(135deg, #b88628 0%, #efd26b 26%, #fff2a5 45%, #d09b2f 62%, #8d6420 100%);
  border: 1px solid rgba(255, 220, 140, .42);
  box-shadow: 0 12px 24px rgba(212, 168, 67, .4), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(96, 61, 12, .48);
}

.wc-qr-frame::before {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 10px;
  border: 1px solid rgba(129, 86, 10, .38);
  background-image:
    linear-gradient(rgba(129, 86, 10, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 86, 10, .14) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
}

#dashboardQr,
#workerQr,
#visitorQr {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  position: relative;
  z-index: 2;
  display: block;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: opacity .35s ease, transform .35s ease;
}

/* Mitarbeiterfoto */
.wc-photo {
  width: clamp(68px, 21%, 96px);
  height: clamp(68px, 21%, 96px);
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .34);
  flex-shrink: 0;
}

#visitorCardContainer .wc-photo {
  height: clamp(76px, 24%, 108px);
  transform: translateY(10px);
}

/* Visitor QR should always use a premium gold frame (independent of card preset). */
#visitorCardContainer .wc-qr-frame {
  background: linear-gradient(135deg, #b88628 0%, #efd26b 26%, #fff2a5 45%, #d09b2f 62%, #8d6420 100%);
  border-color: rgba(255, 220, 140, .42);
  box-shadow: 0 12px 24px rgba(212, 168, 67, .4), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(96, 61, 12, .48);
}

#visitorCardContainer .wc-qr-frame::before {
  border-color: rgba(129, 86, 10, .38);
  background-image:
    linear-gradient(rgba(129, 86, 10, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 86, 10, .14) 1px, transparent 1px);
}

/* Safety: never show dynamic countdown chip on visitor QR area. */
#visitorCardContainer .dqr-countdown,
#visitorCardContainer .vc-timer-chip {
  display: none !important;
}

/* ── Bottom Row ─────────────────────────────────── */
.wc-bottom {
  position: relative;
  z-index: 1;
  margin-top: clamp(2px, 1vw, 6px);
}

#visitorCardContainer .wc-bottom {
  margin-top: clamp(14px, 2.6vw, 22px);
}

.wc-name {
  margin: 0 0 1px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(.58rem, 2.3vw, .85rem);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.wc-role-text {
  margin: 0 0 3px;
  font-size: clamp(.42rem, 1.6vw, .58rem);
  color: rgba(255, 255, 255, .55);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.wc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.wc-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wc-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wc-field-label {
  font-size: clamp(.32rem, 1.2vw, .44rem);
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
  letter-spacing: .12em;
  line-height: 1.05;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.wc-field-value {
  font-family: "Space Grotesk", monospace;
  font-size: clamp(.44rem, 1.6vw, .62rem);
  font-weight: 600;
  color: rgba(255, 255, 255, .98);
  letter-spacing: .04em;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

.wc-field.wc-field-badge .wc-field-value {
  font-size: clamp(.56rem, 2vw, .78rem);
  font-weight: 800;
  color: #ffe9a6;
  letter-spacing: .07em;
}

.wc-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.wc-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(.32rem, 1.2vw, .48rem);
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1;
}

.wc-status[data-status="gesperrt"],
.wc-status[data-status="inaktiv"] {
  color: #ffb3b3;
}

.wc-status[data-status="gesperrt"]::before,
.wc-status[data-status="inaktiv"]::before {
  background: #ff6b6b;
  box-shadow: 0 0 7px rgba(255, 107, 107, .7);
}

.wc-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 7px rgba(74, 222, 128, .7);
  flex-shrink: 0;
}

.wc-company {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(.42rem, 1.5vw, .6rem);
  color: rgba(255, 255, 255, .93);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.12;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wc-subcompany {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(.36rem, 1.3vw, .54rem);
  color: rgba(255, 255, 255, .72);
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wc-subcompany.hidden {
  display: none;
}

.wallet-card.preset-construction .wc-field-label,
.wallet-card.preset-industry .wc-field-label,
.wallet-card.preset-premium .wc-field-label {
  color: rgba(230, 238, 255, .72);
}

.wallet-card.preset-construction .wc-field-value,
.wallet-card.preset-industry .wc-field-value,
.wallet-card.preset-premium .wc-field-value {
  color: rgba(245, 249, 255, .98);
}

.wallet-card.preset-construction .wc-field.wc-field-badge .wc-field-value,
.wallet-card.preset-industry .wc-field.wc-field-badge .wc-field-value,
.wallet-card.preset-premium .wc-field.wc-field-badge .wc-field-value {
  color: #fff2c4;
}

/* Keep wallet card footer legible regardless of OS/theme auto darkening. */
@media (prefers-color-scheme: dark) {
  .wallet-card .wc-field-label {
    color: rgba(235, 243, 255, .84) !important;
  }

  .wallet-card .wc-field-value {
    color: rgba(250, 252, 255, .99) !important;
  }

  .wallet-card .wc-field.wc-field-badge .wc-field-value {
    color: #ffe9a8 !important;
  }
}

@media (prefers-color-scheme: light) {
  .wallet-card .wc-field-label {
    color: rgba(225, 235, 250, .78) !important;
  }

  .wallet-card .wc-field-value {
    color: rgba(247, 251, 255, .99) !important;
  }

  .wallet-card .wc-field.wc-field-badge .wc-field-value {
    color: #ffe6a0 !important;
  }
}

[data-theme="dark"] .wallet-card .wc-field-label {
  color: rgba(235, 243, 255, .84) !important;
}

[data-theme="dark"] .wallet-card .wc-field-value {
  color: rgba(250, 252, 255, .99) !important;
}

[data-theme="dark"] .wallet-card .wc-field.wc-field-badge .wc-field-value {
  color: #ffe9a8 !important;
}

[data-theme="light"] .wallet-card .wc-field-label {
  color: rgba(225, 235, 250, .78) !important;
}

[data-theme="light"] .wallet-card .wc-field-value {
  color: rgba(247, 251, 255, .99) !important;
}

[data-theme="light"] .wallet-card .wc-field.wc-field-badge .wc-field-value {
  color: #ffe6a0 !important;
}

/* ═══════════════════════════════════════════════
   Below-Card Info
   ═══════════════════════════════════════════════ */

.below-card {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 244, 239, .96));
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(68, 41, 25, .09), inset 0 1px 0 rgba(255, 255, 255, .72);
}

/* ── Pass-Header (Titel + Status-Banner) ── */
.pass-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.pass-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

/* ── Session Info Card ── */
.session-info-card {
  display: grid;
  gap: 10px;
}

/* ── Actions Panel ── */
.actions-panel {
  display: grid;
  gap: 12px;
}

.actions-gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.actions-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.logout-btn {
  color: #b91c1c !important;
  border-color: rgba(185, 28, 28, .18) !important;
}

.logout-btn:hover {
  background: rgba(185, 28, 28, .08) !important;
}

.status-banner-hidden {
  display: none !important;
}

.gate-btn-icon {
  flex-shrink: 0;
}

/* ── Quick Gate FAB ── */
.quick-gate-fab {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 800;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c85b3e, #86351f);
  color: #fff;
  border: none;
  display: none !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(134, 53, 31, .38), 0 2px 8px rgba(0,0,0,.18);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}

.quick-gate-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 34px rgba(134, 53, 31, .46), 0 4px 12px rgba(0,0,0,.22);
}

.quick-gate-fab:active {
  transform: scale(0.96);
}



.route-card {
  display: grid;
  gap: 14px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.info-icon { font-size: .9rem; }

.info-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.info-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-left: auto;
  text-align: right;
}

.site-inline-link {
  text-decoration: none;
  color: #0f4a8a;
}

.site-inline-link:hover,
.site-inline-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-inline-link[aria-disabled="true"] {
  color: var(--text);
  pointer-events: none;
  text-decoration: none;
}

.site-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1f6feb, #1147a6);
  box-shadow: 0 10px 24px rgba(17, 71, 166, .22);
}

.force-hidden {
  display: none !important;
}

.hidden-control {
  display: none;
}

.daily-insights-card {
  display: grid;
  gap: 12px;
}

.daily-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-insight-item {
  border-radius: 14px;
  border: 1px solid rgba(196, 178, 158, .56);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(244, 238, 230, .96));
  box-shadow: 0 4px 12px rgba(75, 48, 31, .1), inset 0 1px 0 rgba(255, 255, 255, .92);
  padding: 10px 12px;
}

.daily-insight-label {
  margin: 0;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.daily-insight-item strong {
  display: block;
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  color: var(--text);
}

.company-mode-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(196, 178, 158, .56);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(244, 238, 230, .96));
}

.company-mode-lead {
  margin: 0;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--text);
}

.company-mode-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.company-mode-feature-list li {
  position: relative;
  padding-left: 20px;
  font-size: .86rem;
  line-height: 1.4;
  color: var(--muted);
}

.company-mode-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c78652;
  box-shadow: 0 0 0 3px rgba(199, 134, 82, .18);
}

[data-company-mode="construction"] .company-mode-card {
  border-color: rgba(199, 134, 82, .5);
}

[data-company-mode="industry"] .company-mode-card {
  border-color: rgba(192, 124, 53, .55);
  background: linear-gradient(180deg, rgba(255, 250, 238, .97), rgba(248, 236, 212, .95));
}

[data-company-mode="industry"] .company-mode-feature-list li::before {
  background: #d49344;
  box-shadow: 0 0 0 3px rgba(212, 147, 68, .22);
}

[data-company-mode="premium"] .company-mode-card {
  border-color: rgba(82, 174, 255, .48);
  background: linear-gradient(180deg, rgba(244, 250, 255, .97), rgba(231, 242, 255, .96));
}

[data-company-mode="premium"] .company-mode-feature-list li::before {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
}

.camera-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.camera-video {
  max-width: 90vw;
  max-height: 40vh;
  border-radius: 12px;
  background: #222;
}

.camera-preview-wrap {
  margin-top: 16px;
  display: none;
  flex-direction: column;
  align-items: center;
}

.camera-canvas {
  max-width: 90vw;
  max-height: 30vh;
  border: 2px solid #fff;
  border-radius: 8px;
}

.camera-preview-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.camera-main-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.gate-qr-stage {
  position: relative;
  display: inline-block;
  margin: 16px 0;
}

.gate-qr-frame-glow {
  position: absolute;
  inset: -12px;
  border: 2px dashed rgba(240, 132, 74, 0.4);
  border-radius: 20px;
  animation: scannerGlow 2s ease-in-out infinite;
}

.gate-status-feedback {
  margin: 8px 0 0;
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
  height: 20px;
}

/* ═══════════════════════════════════════════════
   QR-Code
   ═══════════════════════════════════════════════ */

.qr-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}

.scanner-card {
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(250, 246, 241, .92));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .64);
  box-shadow: 0 16px 35px rgba(68, 41, 25, .09);
}

.scanner-head {
  width: 100%;
  grid-template-columns: 1fr auto;
  align-items: start;
}

.qr-label {
  margin: 0;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.qr-countdown {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  color: #1147a6;
  letter-spacing: .03em;
}

.qr-countdown.hidden {
  display: none;
}

.qr-countdown.ok {
  color: #166534;
}

.qr-countdown.warn {
  color: #b45309;
}

.qr-countdown.critical {
  color: #b91c1c;
}

.qr-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(88vw, 330px);
  aspect-ratio: 1;
}

.qr-frame {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 2px dashed rgba(17, 71, 166, .25);
  background:
    linear-gradient(135deg, rgba(22, 94, 216, .08), rgba(217, 93, 57, .05));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
  pointer-events: none;
}

.qr-fullscreen-button {
  width: min(43vw, 160px);
  min-height: 44px;
  border-radius: 14px;
  font-weight: 700;
}

.qr-controls {
  width: min(88vw, 330px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qr-contrast-button {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 700;
}

.qr-setting-toggle {
  width: min(88vw, 330px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  -webkit-user-select: none;
  user-select: none;
}

.qr-setting-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #165ed8;
}

body.qr-high-contrast #workerQr,
body.qr-high-contrast #visitorQr,
body.qr-high-contrast #gateQr {
  background: #fff;
  border-color: rgba(0, 0, 0, .35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 6px rgba(0, 0, 0, .6), 0 12px 24px rgba(0, 0, 0, .35);
  filter: contrast(1.24) saturate(0.88) brightness(1.03);
}

.qr-fallback {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .03em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions > * {
  flex: 1 1 140px;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: radial-gradient(circle at top, rgba(217, 93, 57, .28), rgba(8, 12, 18, .99) 52%);
  display: grid;
  place-items: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.gate-panel {
  width: min(520px, 100%);
  background: rgba(10, 16, 24, .97);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  padding: 20px 18px;
  color: #f6f3ef;
  text-align: center;
  box-shadow: 0 32px 72px rgba(0, 0, 0, .65);
  display: grid;
  gap: 4px;
  transition: box-shadow .22s ease, border-color .22s ease;
}

.gate-overlay.is-ready .gate-panel {
  border-color: rgba(87, 200, 140, .35);
  box-shadow: 0 32px 72px rgba(0, 0, 0, .65), 0 0 0 2px rgba(87, 200, 140, .14);
}

.gate-overlay.is-refresh .gate-panel {
  border-color: rgba(86, 180, 255, .4);
  box-shadow: 0 32px 72px rgba(0, 0, 0, .65), 0 0 0 2px rgba(86, 180, 255, .16);
  animation: gateFeedbackPulse .45s ease;
}

.gate-overlay.is-error .gate-panel {
  border-color: rgba(255, 106, 106, .45);
  box-shadow: 0 32px 72px rgba(0, 0, 0, .65), 0 0 0 2px rgba(255, 106, 106, .18);
}

#gateStatusFeedback {
  transition: color .2s ease, transform .2s ease, opacity .2s ease;
}

.gate-overlay.is-refresh #gateStatusFeedback {
  transform: translateY(-1px);
}

@keyframes gateFeedbackPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.008); }
  100% { transform: scale(1); }
}

.gate-panel h2 {
  margin: 0;
  font-size: 1.4rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -.01em;
}

.gate-sub {
  margin: 6px 0 12px;
  color: rgba(255, 255, 255, .6);
  font-size: .88rem;
}

.gate-brightness-hint {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(240, 132, 74, .55);
  background: rgba(240, 132, 74, .12);
  color: #ffd9c9;
  font-size: .82rem;
  font-weight: 700;
}

#gateQr {
  width: min(85vw, 380px);
  aspect-ratio: 1;
  border-radius: 20px;
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, .22);
  background: #fff;
  animation: qrPulse 2s ease-in-out infinite;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}

.gate-badge-id {
  margin: 10px 0 2px;
  color: rgba(255, 255, 255, .82);
  letter-spacing: .12em;
  font-family: "Space Grotesk", monospace;
  font-size: 1rem;
  font-weight: 700;
}

@keyframes qrPulse {
  0% { transform: scale(1); box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 0 rgba(217, 93, 57, .4); }
  70% { transform: scale(1.015); box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 24px rgba(217, 93, 57, 0); }
  100% { transform: scale(1); box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 0 rgba(217, 93, 57, 0); }
}

@keyframes scannerGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(240, 132, 74, 0.5), inset 0 0 8px rgba(240, 132, 74, 0.12); }
  50% { box-shadow: 0 0 22px rgba(240, 132, 74, 0.75), inset 0 0 16px rgba(240, 132, 74, 0.22); }
}

@keyframes cardFloat {
  0% { 
    opacity: 0; 
    transform: translateY(30px) scale(0.95);
  }
  50% {
    transform: translateY(-4px) scale(1.01);
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

@keyframes menuButtonReveal {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ════════════════════════════════════════════════════════════════
   PROFESSIONAL CARD ENTRANCE ANIMATION
   البطاقة تظهر بتأثير احترافي ثم تنتقل للأعلى
   ════════════════════════════════════════════════════════════════ */

@keyframes cardEntrancePulse {
  0% {
    transform: scale(0.85) translateY(60px);
    opacity: 0;
    filter: blur(2px);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes cardTransitionToTop {
  0% {
    transform: translateY(0) scale(1);
    position: relative;
  }
  100% {
    transform: translateY(-40vh) scale(0.95);
  }
}

@keyframes featureFadeInStagger {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply entrance animation when card loads */
.wallet-card.card-entrance-active {
  animation: cardEntrancePulse 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}

/* Transition card to top */
.wallet-card.card-transition-top {
  animation: cardTransitionToTop 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 24px);
  max-width: 360px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Feature sections fade in with stagger */
.leaveRequestCard.feature-fade-in,
.timesheetCard.feature-fade-in,
.documentsCard.feature-fade-in,
.worker-menu-grid.feature-fade-in {
  animation: featureFadeInStagger 0.8s ease-out forwards;
}

.worker-menu-btn {
  animation: menuButtonReveal 0.5s ease forwards;
}

.worker-menu-btn:nth-child(1) { animation-delay: 0s; }
.worker-menu-btn:nth-child(2) { animation-delay: 0.05s; }
.worker-menu-btn:nth-child(3) { animation-delay: 0.1s; }
.worker-menu-btn:nth-child(4) { animation-delay: 0.15s; }
.worker-menu-btn:nth-child(5) { animation-delay: 0.2s; }
.worker-menu-btn:nth-child(6) { animation-delay: 0.25s; }

@media (max-width: 520px) {
  .app-shell {
    padding: 14px 12px 24px;
    /* respect iPhone notch / Dynamic Island */
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(92px, calc(env(safe-area-inset-bottom) + 72px));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .top-panel {
    padding: 18px 16px;
  }

  .wallet-card {
    max-width: 100%;
    aspect-ratio: 85.6 / 57;
    min-height: 248px;
  }

  .dashboard-featured-card {
    max-width: 100%;
    border-radius: 18px;
  }

  .wc-middle {
    gap: 10px;
    align-items: center;
  }

  .wc-qr-holder {
    width: clamp(74px, 28vw, 112px);
    height: clamp(74px, 28vw, 112px);
  }

  .wc-photo {
    width: clamp(58px, 19vw, 82px);
    height: clamp(58px, 19vw, 82px);
    border-radius: 12px;
  }

  .wc-bottom {
    margin-top: 2px;
  }

  .wc-name {
    letter-spacing: 0.05em;
  }

  .wc-footer {
    gap: 8px;
  }

  .wc-field,
  .wc-company,
  .wc-status {
    font-size: 0.72rem;
  }

  .worker-pass {
    padding: 14px;
  }

  .worker-quick-menu {
    position: fixed;
    top: auto;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    margin: 0;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.92);
  }

  .worker-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Very small phones (≤360px) */
@media (max-width: 360px) {
  .wc-name {
    font-size: .7rem;
  }
  .wc-brand-name {
    font-size: .5rem;
  }
  .wallet-card {
    aspect-ratio: 85.6 / 62;
    min-height: 278px;
  }
  .wc-field.wc-field-badge .wc-field-value {
    font-size: .66rem;
  }
  .wc-field-value {
    font-size: .52rem;
  }
  .app-shell {
    padding: 10px 8px 20px;
  }
  button {
    min-height: 48px;
  }

  .worker-menu-btn {
    min-height: 146px;
    padding: 12px 7px 9px;
    gap: 8px;
  }

  .home-compact-info {
    gap: 6px;
  }

  .home-info-item {
    padding: 9px 7px;
  }

  .worker-menu-icon,
  .worker-menu-svg {
    width: 62px;
    height: 62px;
  }

  .worker-menu-label {
    font-size: .95rem;
    min-height: 2.2em;
  }
}

@media (max-width: 420px) {
  .actions-secondary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .worker-hub-panel {
    padding: 14px;
  }

  .worker-menu-grid {
    gap: 10px;
  }
}

@media (min-width: 700px) {
  .worker-panel-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════════ */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #1c2128 0%, #0f1923 55%, #141920 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  padding: 24px;
  /* CSS-only auto-hide after 9.2 s as failsafe when JS does not run */
  animation: splashAutoHide .8s 9.2s ease forwards;
  transition: opacity .55s cubic-bezier(.4, 0, .6, 1), transform .55s cubic-bezier(.4, 0, .6, 1);
}

.splash-screen.splash-done {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.splash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: splashEnter .65s cubic-bezier(.22, 1, .36, 1) both;
}

.splash-icon {
  width: 100px;
  height: 100px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--corp-primary, #0a57c0) 0%, #1e2833 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 0 rgba(10, 87, 192, .35),
    0 24px 48px rgba(0, 0, 0, .55);
  animation: splashPulse 2.2s ease-in-out infinite;
}

.splash-icon .wc-brand-initials {
  font-size: 2rem;
  letter-spacing: 0.06em;
}

.splash-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.splash-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.04em;
  line-height: 1;
}

.splash-sub {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .4);
  letter-spacing: .24em;
  text-transform: uppercase;
}

.splash-loader {
  display: flex;
  gap: 10px;
  animation: splashEnter .65s .22s cubic-bezier(.22, 1, .36, 1) both;
}

.splash-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(217, 93, 57, .65);
}

.splash-dot:nth-child(1) { animation: splashDot 1.1s 0s   ease-in-out infinite; }
.splash-dot:nth-child(2) { animation: splashDot 1.1s .18s ease-in-out infinite; }
.splash-dot:nth-child(3) { animation: splashDot 1.1s .36s ease-in-out infinite; }

@keyframes splashEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes splashPulse {
  0%,  100% { box-shadow: 0 0 0  0px rgba(217, 93, 57, .55), 0 24px 48px rgba(0, 0, 0, .55); }
  50%       { box-shadow: 0 0 0 24px rgba(217, 93, 57,  0),  0 24px 48px rgba(0, 0, 0, .55); }
}

@keyframes splashDot {
  0%, 80%, 100% { transform: scale(.72); opacity: .32; }
  40%           { transform: scale(1);   opacity: 1; }
}

@keyframes splashAutoHide {
  to { opacity: 0; pointer-events: none; }
}

/* ── Card entrance triggered when JS adds body.splash-released ── */

body.splash-released .top-panel {
  animation: cardEnter .55s cubic-bezier(.22, 1, .36, 1) both;
}

body.splash-released .login-card {
  animation: cardEnter .55s .1s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════
   PIN-Lock Modal: Sicherung gegen Telefon-Diebstahl
   ═══════════════════════════════════════════════════════ */

.pin-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 18, 0.88);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pin-lock-card {
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.pin-lock-header {
  margin-bottom: 16px;
  text-align: center;
}

.pin-lock-header .eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.5);
}

.pin-lock-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.pin-lock-message {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.5;
  margin-bottom: 24px;
  text-align: center;
}

.pin-lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pin-lock-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.pin-lock-form input {
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 0.2em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.6);
}

.pin-lock-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 93, 57, 0.1);
  background: #fff;
}

.pin-lock-form button {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pin-lock-form .primary {
  background: var(--accent);
  color: var(--accent-on, #fff);
}

.pin-lock-form .primary:active {
  transform: scale(0.98);
}

.pin-lock-form .ghost {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  font-weight: 500;
}

.pin-lock-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.85rem;
  text-align: center;
}

.pin-lock-error.hidden {
  display: none;
}

/* Enforced light coffee theme to match Control-App interior */
:root {
  --bg: #f6efe2;
  --card: rgba(255, 252, 247, 0.86);
  --card-strong: rgba(255, 251, 246, 0.94);
  --text: #1f1b16;
  --muted: #6f645a;
  --accent: #c78652;
  --accent-dark: #a66a3d;
  --accent-soft: #f0c39b;
  --blue: #06b6d4;
  --shadow: 0 20px 52px rgba(88, 60, 36, 0.14);
}

body {
  background: linear-gradient(145deg, #fbf6ef 0%, #f4eadc 50%, #eadcc8 100%);
}

.top-panel {
  background: linear-gradient(135deg, #ecd9c4 0%, #d8b999 100%);
  color: #2f241c;
  border: 1px solid rgba(116, 80, 52, 0.18);
}

.top-panel .eyebrow,
.top-lead,
.platform-hint {
  color: #4b3a2d;
}

.lang-option-block {
  border: 1px solid rgba(120, 84, 56, 0.22);

@media (max-width: 420px) {
  .top-stats {
    grid-template-columns: 1fr;
  }
}
  background: rgba(248, 237, 225, 0.92);
}

.orb-two {
  background: radial-gradient(circle, rgba(199, 134, 82, 0.2) 0%, rgba(199, 134, 82, 0) 72%);
}

/* ── Neue UI-Komponenten ───────────────────────────────────────────────── */

/* Theme Toggle Button */
.theme-toggle-btn {
  font-size: 1.1rem;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--card);
  border-color: var(--accent);
}

/* SUPPIX AI (worker assistant) */
.worker-ai-card .helper-text {
  font-size: 0.85rem;
  color: var(--muted, #64748b);
  margin: 0 0 0.65rem;
}
.worker-ai-log {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.worker-ai-msg-user,
.worker-ai-msg-bot {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-size: 0.88rem;
  white-space: pre-wrap;
}
.worker-ai-msg-user { background: rgba(15, 76, 92, 0.12); }
.worker-ai-msg-bot { background: rgba(244, 196, 0, 0.15); }
.worker-ai-form { display: flex; flex-direction: column; gap: 0.5rem; }
.worker-ai-input-row { display: flex; gap: 0.35rem; align-items: stretch; }
.worker-ai-input-row textarea {
  flex: 1;
  resize: vertical;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line, #d1d5db);
  padding: 0.5rem;
  font-family: inherit;
}
.worker-ai-form.bp-ai-form-enhanced .worker-ai-legacy-send {
  display: none;
}

.doc-payroll-banner {
  background: linear-gradient(135deg, rgba(15, 76, 92, 0.12), rgba(244, 196, 0, 0.18));
  border: 1px solid rgba(15, 76, 92, 0.25);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
}
.doc-payroll-banner strong { color: #06b6d4; }
.doc-payroll-item {
  border-inline-start: 3px solid #06b6d4;
  background: rgba(244, 196, 0, 0.08);
}
.doc-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
.doc-payroll-pill {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #06b6d4;
  color: #fff;
  white-space: nowrap;
}
.doc-download-btn {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #06b6d4;
  background: #fff;
  color: #06b6d4;
  cursor: pointer;
  font-weight: 600;
}
.worker-ai-action-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.worker-ai-action-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--accent, #06b6d4);
  background: transparent;
  color: var(--accent, #06b6d4);
}

/* Leave Request Card */
.leave-request-card {
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.leave-request-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leave-request-form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.leave-request-form input,
.leave-request-form textarea,
.leave-request-form select {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.leave-request-form textarea {
  resize: vertical;
  min-height: 60px;
}

.leave-ai-row {
  display: flex;
  justify-content: flex-end;
}

.ai-suggest-btn {
  border: 1px solid rgba(217, 93, 57, 0.35);
  background: rgba(217, 93, 57, 0.14);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.ai-suggest-btn:hover {
  background: rgba(217, 93, 57, 0.22);
}

.send-to-boss-panel {
  margin-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  padding-top: 12px;
  display: grid;
  gap: 8px;
}

.send-boss-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.send-boss-row {
  display: flex;
  gap: 8px;
}

.send-boss-email {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.send-boss-btn {
  min-width: 110px;
}

.leave-request-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leave-request-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  font-size: 0.9rem;
}

.leave-request-item.approved {
  border-left-color: var(--status-active);
}

.leave-request-item.rejected {
  border-left-color: var(--status-error);
}

.leave-request-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 8px;
}

.leave-request-status.ausstehend {
  background: rgba(234, 140, 0, 0.2);
  color: #ea8c00;
}

.leave-request-status.genehmigt {
  background: rgba(22, 163, 74, 0.2);
  color: #16a34a;
}

.leave-request-status.abgelehnt {
  background: rgba(220, 38, 38, 0.2);
  color: #dc2626;
}

/* Notification Permission Banner */
.notification-permission-banner {
  background: rgba(22, 94, 216, 0.1);
  border: 1px solid #165ed8;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-permission-banner button {
  padding: 6px 12px;
  background: #165ed8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

body.worker-loaded #notificationBanner:not(.hidden) {
  display: flex !important;
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 10050;
  margin: 0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

/* Voice Command Button */
.voice-command-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--muted);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.voice-command-btn:hover {
  background: var(--card);
  border-color: var(--accent);
}

.voice-command-btn.listening {
  background: var(--accent-soft);
  border-color: var(--accent);
  animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 93, 57, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(217, 93, 57, 0);
  }
}

/* ── Timesheet Card ──────────────────────────────── */
.timesheet-card {
  display: grid;
  gap: 14px;
}

.timesheet-list {
  display: grid;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  .timesheet-list { border-color: rgba(255,255,255,.1); }
}
[data-theme="dark"] .timesheet-list { border-color: rgba(255,255,255,.1); }

.timesheet-list
}

.timesheet-day {
  display: grid;
  gap: 6px;
}

.timesheet-date {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  .timesheet-date { border-color: rgba(255,255,255,.1); }
}
[data-theme="dark"] .timesheet-date { border-color: rgba(255,255,255,.1); }

.timesheet-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .88rem;
}

.timesheet-entry.entry-in {
  background: rgba(22, 163, 74, .1);
  border: 1px solid rgba(22, 163, 74, .22);
}

.timesheet-entry.entry-out {
  background: rgba(220, 38, 38, .08);
  border: 1px solid rgba(220, 38, 38, .18);
}

.entry-direction {
  font-weight: 700;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  min-width: 58px;
}

.entry-in .entry-direction { color: #16a34a; }
.entry-out .entry-direction { color: #dc2626; }

.entry-time {
  font-family: "Space Grotesk", monospace;
  font-weight: 600;
  color: var(--text);
  font-size: .92rem;
}

.entry-gate {
  margin-left: auto;
  font-size: .74rem;
  color: var(--muted);
  opacity: .7;
}

.muted-info {
  color: var(--muted);
  font-size: .88rem;
  margin: 0;
  padding: 8px 0;
}

.compact-list-toggle {
  margin-top: 4px;
  justify-self: start;
  min-height: 36px;
  font-weight: 700;
}

/* ── Documents Card ──────────────────────────────── */
.documents-card {
  display: grid;
  gap: 14px;
}

body.worker-loaded.worker-deployment-open #workerDashboard {
  display: none !important;
}

body.worker-loaded.worker-deployment-open #badgeCard,
body.worker-loaded.worker-deployment-open #workerHubPanel:not(.hidden) {
  display: flex !important;
}

body.worker-loaded.worker-deployment-open #deploymentPlanCard:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body.worker-loaded.worker-deployment-open #deploymentDayDetailModal:not(.hidden),
body.worker-loaded.worker-deployment-open #deploymentDeclineModal:not(.hidden),
body.worker-loaded #deploymentDayDetailModal:not(.hidden),
body.worker-loaded #deploymentDeclineModal:not(.hidden) {
  display: flex !important;
  z-index: 100500;
  pointer-events: auto;
}

body.worker-loaded.worker-deployment-open #deploymentPlanCard:not(.hidden),
body.worker-loaded.worker-page-focus #deploymentPlanCard:not(.hidden) {
  pointer-events: auto;
}

#deploymentPlanList,
.deployment-plan-calendar-cell.is-interactive {
  pointer-events: auto;
}

.home-deployment-teaser {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 12px 0 4px;
  padding: 14px 16px;
  text-align: start;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 76, 92, 0.55), rgba(20, 28, 40, 0.92));
  color: #e8eef4;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.home-deployment-teaser.hidden {
  display: none !important;
}

.home-deployment-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5eead4;
}

.home-deployment-title {
  font-size: 1.05rem;
  line-height: 1.3;
  color: #fff;
}

.home-deployment-meta {
  font-size: 0.85rem;
  color: rgba(232, 238, 244, 0.82);
}

.home-deployment-cta {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5eead4;
}

.deployment-plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.deployment-plan-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid rgba(94, 234, 212, 0.22);
  background: rgba(15, 23, 42, 0.35);
  color: rgba(232, 238, 244, 0.92);
}

.deployment-plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.deployment-plan-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.deployment-plan-legend-item::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.deployment-plan-legend-item.is-assignment::before {
  background: rgba(56, 189, 248, 0.35);
  border-color: rgba(56, 189, 248, 0.45);
}

.deployment-plan-legend-item.is-free::before {
  background: rgba(16, 185, 129, 0.35);
  border-color: rgba(16, 185, 129, 0.45);
}

.deployment-plan-legend-item.is-declined::before {
  background: rgba(251, 113, 133, 0.35);
  border-color: rgba(251, 113, 133, 0.45);
}

.deployment-plan-card {
  display: grid;
  gap: 12px;
}

.deployment-plan-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.deployment-plan-month-label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}

.deployment-plan-month-select {
  min-width: 11rem;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--card);
  color: inherit;
}

.deployment-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deployment-plan-list {
  display: grid;
  gap: 6px;
}

.deployment-plan-calendar {
  display: grid;
  gap: 8px;
}

.deployment-plan-calendar-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.deployment-plan-calendar-head-cell {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.deployment-plan-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.deployment-plan-calendar-pad {
  min-height: 1px;
}

.deployment-plan-calendar-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 6.5rem;
  padding: 8px 7px 6px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--card);
  overflow: hidden;
}

.leave-worker-context-hint {
  margin: 0 0 10px;
  font-size: 0.72rem;
  line-height: 1.35;
  word-break: break-word;
}

.leave-request-actions {
  margin: 0 0 12px;
}

.leave-request-toggle-btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
  touch-action: manipulation;
}

#leaveRequestCard.leave-form-open #leaveRequestFormWrapper {
  display: block !important;
}

#leaveRequestFormWrapper:not(.hidden) {
  margin-bottom: 12px;
}

.leave-signature-block {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.leave-signature-name {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--corp-text, var(--text));
}

.leave-signature-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.leave-signature-pad-wrap {
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
}

#leaveSignatureCanvas {
  width: 100%;
  height: 140px;
  display: block;
  touch-action: none;
  border-radius: 8px;
  background: #fff;
  cursor: crosshair;
}

.worker-loaded .leave-request-item.leave-request-doc {
  border: 1px solid var(--corp-border, rgba(0, 0, 0, 0.1));
  border-radius: 14px;
  overflow: hidden;
  background: var(--corp-surface, var(--card));
}

.leave-req-doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(248,250,252,.98));
}

.leave-req-doc-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.leave-req-doc-company {
  margin: 0;
  font-size: 0.72rem;
  color: var(--corp-muted, var(--muted));
}

.leave-req-doc-body {
  padding: 10px 12px 12px;
}

.leave-req-signature-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--corp-muted, var(--muted));
}

.deployment-plan-calendar-cell.is-interactive {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.deployment-plan-calendar-cell.is-interactive:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 2px;
}

.deployment-plan-calendar-cell.is-interactive:active {
  transform: scale(0.98);
}

.deployment-day-detail-body {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
}

.deployment-day-detail-row {
  margin: 0;
  line-height: 1.45;
}

.deployment-day-detail-close {
  width: 100%;
  margin-top: 8px;
}

.home-deployment-teaser:not(.hidden) {
  pointer-events: auto;
}

.home-deployment-teaser[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.deployment-plan-calendar-cell .deployment-plan-day-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.deployment-plan-calendar-cell .deployment-plan-day-location {
  font-size: 0.78rem;
  line-height: 1.2;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.deployment-plan-calendar-cell .deployment-plan-day-time,
.deployment-plan-calendar-cell .deployment-plan-day-notes {
  font-size: 0.68rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deployment-plan-calendar-cell .deployment-plan-day-status {
  font-size: 0.62rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployment-plan-calendar-cell .deployment-plan-day-actions {
  margin-top: auto;
  padding-top: 2px;
}

.deployment-plan-calendar-cell .deployment-plan-day-actions .ghost.small-btn {
  width: 100%;
  font-size: 0.62rem;
  padding: 4px 6px;
  min-height: 0;
}

.deployment-plan-calendar-cell .deployment-plan-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.deployment-plan-calendar-cell .deployment-plan-day-date {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.deployment-plan-calendar-cell.is-free {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.05));
  border-color: rgba(16, 185, 129, 0.35);
}

.deployment-plan-calendar-cell.has-assignment {
  border-color: rgba(31, 111, 235, 0.35);
}

.deployment-plan-calendar-cell .deployment-plan-day-actions {
  margin-top: auto;
  grid-column: auto;
  flex-direction: row;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .deployment-plan-calendar-head,
  .deployment-plan-calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .deployment-plan-calendar-cell {
    min-height: 5.5rem;
    padding: 6px 5px 4px;
  }

  .deployment-plan-calendar-cell .deployment-plan-day-location {
    font-size: 0.68rem;
  }

  .deployment-plan-calendar-cell .deployment-plan-day-weekday {
    display: none;
  }
}

.deployment-plan-day {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--card);
}

.deployment-plan-day.is-weekend:not(.is-free) {
  opacity: 0.72;
}

.deployment-plan-day.is-free {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.06));
  border-color: rgba(16, 185, 129, 0.42);
  border-left: 4px solid #10b981;
  opacity: 1;
}

.deployment-plan-day.is-free .deployment-plan-day-date {
  color: #0f766e;
}

.deployment-plan-day.is-free .deployment-plan-day-location {
  color: #0f766e;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.deployment-plan-day.is-free .deployment-plan-day-weekday {
  color: #0f766e;
}

.deployment-plan-day.is-free .deployment-plan-day-actions {
  display: none;
}

.deployment-plan-day.has-assignment {
  border-color: rgba(31, 111, 235, 0.35);
  grid-template-columns: minmax(4.5rem, auto) 1fr;
}

.deployment-plan-day.has-assignment .deployment-plan-day-actions {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-end;
  margin-top: 4px;
}

.deployment-plan-day-date {
  font-weight: 700;
  font-size: 0.9rem;
}

.deployment-plan-day-weekday {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
}

.deployment-plan-day-location {
  font-weight: 600;
}

.deployment-plan-day-time,
.deployment-plan-day-notes {
  grid-column: 2;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}

.deployment-plan-day.is-declined {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.deployment-plan-day-status {
  grid-column: 2;
  font-size: 0.78rem;
  font-weight: 700;
  color: #b45309;
}

.deployment-plan-day-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
}

.deployment-plan-day-actions .ghost.small-btn {
  white-space: nowrap;
}

.deployment-decline-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: auto;
}

.deployment-decline-modal.hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}

.deployment-decline-sheet {
  pointer-events: auto;
  width: min(100%, 420px);
  background: #ffffff;
  color: #0f172a;
  color-scheme: light;
  border-radius: 16px 16px 12px 12px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.deployment-decline-sheet h4 {
  margin: 0 0 0.35rem;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.35;
}

.deployment-decline-sheet .muted-info {
  color: #475569;
  font-size: 0.92rem;
  padding: 0 0 0.35rem;
}

.deployment-decline-reason-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.75rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
}

.deployment-decline-reason {
  width: 100%;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 5.5rem;
  background: #ffffff;
  color: #0f172a;
  caret-color: #0f172a;
}

.deployment-decline-reason::placeholder {
  color: #64748b;
  opacity: 1;
}

.deployment-decline-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.deployment-decline-sheet .ghost.small-btn {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.deployment-decline-sheet .primary.small-btn {
  color: #ffffff;
  background: #0a57c0;
  border: 1px solid #0a57c0;
}

.deployment-decline-error {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7f1f1b;
  background: rgba(255, 236, 236, 0.95);
  border: 1px solid rgba(184, 42, 36, 0.35);
}

.deployment-decline-error.hidden {
  display: none;
}

.home-deployment-teaser.is-declined {
  border-color: #f59e0b;
}

.home-deployment-teaser.is-free {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}

.worker-menu-btn-deployment.hidden {
  display: none !important;
}

.documents-list {
  display: grid;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  .documents-list { border-color: rgba(255,255,255,.1); }
}
[data-theme="dark"] .documents-list { border-color: rgba(255,255,255,.1); }

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.1);
  background: var(--card);
}

.worker-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(52vh, 420px);
  overflow: auto;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0;
}

.worker-chat-row {
  display: flex;
  width: 100%;
}

.worker-chat-row.is-company {
  justify-content: flex-start;
}

.worker-chat-row.is-mine {
  justify-content: flex-end;
}

.home-chat-card,
.worker-dashboard .home-chat-card {
  margin-top: 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.9rem 1rem 1rem;
}

.home-chat-card .worker-chat-messages,
.worker-dashboard .home-chat-card .worker-chat-messages {
  max-height: min(38vh, 280px);
}

body.worker-loaded:not(.worker-feature-tab-active) #chatCard.home-chat-card {
  display: block !important;
  visibility: visible !important;
  min-height: 120px;
}

body.worker-card-install.worker-loaded:not(.worker-feature-tab-active) #chatCard.home-chat-card {
  display: block !important;
  margin-top: 0.85rem;
}

.worker-chat-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  opacity: 0.72;
}

.worker-chat-read.is-read {
  color: #5eead4;
  font-weight: 600;
}

.worker-chat-bubble {
  max-width: min(88%, 320px);
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  word-break: break-word;
}

.worker-chat-bubble.is-company,
.worker-chat-bubble.admin {
  background: rgba(22, 78, 99, 0.12);
  border-color: rgba(94, 234, 212, 0.22);
  border-bottom-left-radius: 4px;
}

.worker-chat-bubble.is-mine,
.worker-chat-bubble.worker {
  background: rgba(10, 87, 192, 0.1);
  border-color: rgba(10, 87, 192, 0.22);
  border-bottom-right-radius: 4px;
}

.worker-chat-compose {
  display: grid;
  gap: 0.65rem;
}

.worker-chat-file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  border: 1px dashed rgba(94, 234, 212, 0.35);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  cursor: pointer;
}

.worker-chat-file-label input[type="file"] {
  max-width: 180px;
  font-size: 0.82rem;
}

.worker-chat-file-hint {
  margin: 0;
  font-size: 0.82rem;
}

.worker-chat-attachments {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.worker-chat-attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(22, 78, 99, 0.18);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  word-break: break-word;
}

.worker-chat-attachment-btn:active {
  transform: scale(0.98);
}

.worker-chat-compose textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

@media (prefers-color-scheme: dark) {
  .document-item { border-color: rgba(255,255,255,.1); }
}
[data-theme="dark"] .document-item { border-color: rgba(255,255,255,.1); }

.document-item.doc-expired {
  border-color: rgba(220, 38, 38, .3);
  background: rgba(220, 38, 38, .06);
}

.document-item.doc-ok {
  border-color: rgba(22, 163, 74, .25);
  background: rgba(22, 163, 74, .06);
}

.doc-type {
  font-weight: 600;
  font-size: .9rem;
  text-transform: capitalize;
  color: var(--text);
}

.doc-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: .78rem;
  color: var(--muted);
}

.doc-status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
}

.doc-status-badge.doc-ok {
  background: rgba(22, 163, 74, .15);
  color: #16a34a;
}

.doc-status-badge.doc-expired {
  background: rgba(220, 38, 38, .15);
  color: #dc2626;
}

.doc-status-badge.doc-no-expiry {
  background: rgba(107, 114, 128, .12);
  color: var(--muted);
}


/* Urlaubstage-Hinweis */
.leave-days-hint {
  font-size: 13px;
  font-weight: 600;
  color: #1a7a3a;
  padding: 4px 10px;
  background: rgba(26, 122, 58, .1);
  border-radius: 6px;
  display: inline-block;
  margin: 4px 0 8px;
  min-height: 1em;
}

/* Dokument-Ablauf-Warnungen */
.doc-warning-banner {
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.doc-warning-expired {
  background: rgba(197, 61, 47, .12);
  color: #c53d2f;
  border: 1px solid rgba(197, 61, 47, .25);
}
.doc-warning-soon {
  background: rgba(234, 139, 22, .12);
  color: #b86b00;
  border: 1px solid rgba(234, 139, 22, .3);
}

/* ── Leave Balance Badge ── */
.leave-balance-badge { display:inline-flex; align-items:center; gap:6px; background:rgba(26,122,58,.12); color:#1a7a3a; border:1px solid rgba(26,122,58,.25); border-radius:20px; padding:6px 14px; margin:8px 0; font-size:14px; font-weight:700; }
.leave-balance-badge.medium { background:rgba(234,139,22,.12); color:#b86b00; border-color:rgba(234,139,22,.3); }
.leave-balance-badge.low { background:rgba(197,61,47,.12); color:#c53d2f; border-color:rgba(197,61,47,.25); }
.leave-balance-label { font-weight:400; font-size:12px; opacity:.8; }

/* ── Late check-in banner ─────────────────────────────────────────── */
.late-checkin-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(230, 92, 0, .15);
  border: 1px solid rgba(230, 92, 0, .4);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
  color: #ff9a3c;
  font-size: 14px;
  font-weight: 600;
  position: relative;
}
.late-banner-icon { font-size: 18px; flex-shrink: 0; }
.late-banner-text { flex: 1; }
.late-banner-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  opacity: .7;
  flex-shrink: 0;
}
.late-banner-close:hover { opacity: 1; }

/* ── Worker: Leave request list ────────────────────────────────────── */
.leave-request-item { border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); }
.leave-request-item { border-radius: 14px; border-color: rgba(140, 105, 74, .18); background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(248,243,236,.96)); }
.leave-req-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.leave-req-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.leave-status-ok .leave-req-badge { background: #2e7d32; color: #fff; }
.leave-status-no .leave-req-badge { background: #c62828; color: #fff; }
.leave-status-pending .leave-req-badge { background: #e65100; color: #fff; }
.leave-req-dates { font-size: 13px; opacity: .8; display: flex; align-items: center; gap: 8px; }
.leave-req-days { font-size: 11px; background: rgba(17, 74, 138, .10); border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.leave-req-note { font-size: 12px; opacity: .7; font-style: italic; margin-top: 6px; }
.leave-req-review { font-size: 12px; margin-top: 6px; background: rgba(17, 74, 138, .08); border-radius: 10px; padding: 4px 10px; }

/* ── Worker: Timesheet total ───────────────────────────────────────── */
.timesheet-date-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.timesheet-total { font-size: 13px; font-weight: 700; background: rgba(17, 74, 138, .08); border-radius: 999px; padding: 2px 10px; }

/* ── Logout button prominent ────────────────────────────────────── */
.logout-btn-prominent {
  border-color: rgba(185,28,28,.35) !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
}
.logout-btn-prominent:hover {
  background: rgba(185,28,28,.15) !important;
  border-color: rgba(185,28,28,.6) !important;
}

/* ── Update-Banner (neue App-Version verfügbar) ──────────────────── */
.update-banner {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: 420px;
  width: calc(100% - 28px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f1923, #1a2d3d);
  color: #e8f4ff;
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 10px 36px rgba(0,0,0,.45), 0 2px 10px rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
  animation: updateBannerIn .4s cubic-bezier(.22,1,.36,1) both;
}

.update-banner.hidden {
  display: none !important;
}

.update-banner-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  animation: spinOnce 1.2s .4s ease both;
}

@keyframes updateBannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Top-Panel Verbesserungen ──────────────────────────────────────── */
.top-panel .install-cta {
  background: linear-gradient(135deg, rgba(26, 58, 98, 0.22), rgba(35, 75, 116, 0.1));
  border: 1px solid rgba(67, 118, 181, 0.34);
  color: #f2f8ff;
  font-weight: 800;
  letter-spacing: .01em;
  font-size: .95rem;
  box-shadow: 0 4px 16px rgba(19, 49, 79, 0.16);
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.top-panel .install-cta:hover {
  background: linear-gradient(135deg, rgba(26, 58, 98, 0.3), rgba(35, 75, 116, 0.18));
  box-shadow: 0 10px 26px rgba(19, 49, 79, 0.26);
}

/* Stat-Karten im Top-Panel – warm coffee palette */
.top-stat-card {
  background: rgba(18, 31, 45, 0.18) !important;
  border: 1px solid rgba(96, 116, 136, 0.22) !important;
}

.top-stat-card strong {
  color: #f3f7fb !important;
}

.top-stat-label {
  color: rgba(219, 230, 242, 0.72) !important;
}

/* ── Interior polish: Worker app inside layout ───────────────────── */
.worker-loaded {
  letter-spacing: 0.002em;
}

.worker-loaded .below-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.24)),
    var(--card-strong);
  box-shadow: 0 16px 32px rgba(52, 30, 17, 0.08);
}

[data-theme="dark"] .worker-loaded .below-card {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    var(--card-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
}

.worker-loaded .section-head {
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(88, 102, 120, 0.22);
}

.worker-loaded .section-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

[data-theme="dark"] .worker-loaded .section-head {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.worker-loaded .compact-head h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.worker-loaded .day-card-validity,
.worker-loaded .section-copy,
.worker-loaded .muted-info {
  line-height: 1.5;
}

.worker-loaded .info-label {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
}

.worker-loaded .info-value {
  font-size: 1.02rem;
  font-weight: 750;
}

.worker-loaded .small-btn,
.worker-loaded .quick-menu-btn,
.worker-loaded .worker-menu-btn {
  font-weight: 720;
}

.worker-loaded .leave-request-item {
  border-radius: 14px;
  border: 1px solid rgba(88, 102, 120, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 249, 252, 0.97));
}

.worker-loaded .leave-req-dates,
.worker-loaded .leave-req-note,
.worker-loaded .leave-req-review {
  color: rgba(49, 62, 77, 0.84);
}

.worker-loaded .timesheet-total {
  background: rgba(17, 74, 138, 0.1);
}

.worker-loaded .actions-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.worker-loaded .small-btn {
  min-height: 48px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.2;
}

.worker-loaded .primary,
.worker-loaded .ghost {
  box-shadow: 0 10px 22px rgba(37, 22, 13, 0.13);
}

[data-theme="dark"] .worker-loaded .primary,
[data-theme="dark"] .worker-loaded .ghost {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

.worker-loaded .actions-gate-btn {
  position: relative;
  overflow: hidden;
}

.worker-loaded .actions-gate-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-130%);
  transition: transform 320ms ease;
}

.worker-loaded .actions-gate-btn:hover::after {
  transform: translateX(130%);
}

@media (max-width: 420px) {
  .worker-loaded {
    letter-spacing: 0;
  }

  .worker-loaded .compact-head h3 {
    font-size: 1.04rem;
  }

  .worker-loaded .day-card-validity,
  .worker-loaded .section-copy,
  .worker-loaded .muted-info {
    font-size: 0.9rem;
  }

  .worker-loaded .below-card {
    border-radius: 18px;
    padding: 14px;
  }

  .worker-loaded .actions-secondary {
    grid-template-columns: 1fr;
  }
}

/* ── Icon and badge polish ────────────────────────────────────────── */
.worker-loaded .connection-banner,
.worker-loaded .pass-stage-chip,
.worker-loaded .scanner-chip,
.worker-loaded .doc-status-badge,
.worker-loaded .leave-request-status {
  border-radius: 999px;
  letter-spacing: 0.07em;
  font-weight: 780;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.worker-loaded .status-banner {
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(36, 22, 13, 0.11);
}

[data-theme="dark"] .worker-loaded .status-banner {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.worker-loaded .status-banner-icon,
.worker-loaded .info-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(110, 79, 53, 0.2);
  color: #6d4328;
  box-shadow: 0 3px 8px rgba(44, 25, 12, 0.14);
}

[data-theme="dark"] .worker-loaded .status-banner-icon,
[data-theme="dark"] .worker-loaded .info-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffd6ba;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.worker-loaded .wc-status {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.11);
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.worker-loaded .wc-status[data-status="gesperrt"],
.worker-loaded .wc-status[data-status="inaktiv"] {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.3);
}

@media (max-width: 420px) {
  .worker-loaded .status-banner {
    border-radius: 12px;
  }

  .worker-loaded .status-banner-icon,
  .worker-loaded .info-icon {
    width: 20px;
    height: 20px;
  }
}

/* ── Motion polish: subtle card reveal ────────────────────────────── */
.worker-loaded .worker-panel-grid > .below-card,
.worker-loaded .worker-hub-panel {
  animation: workerCardReveal 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.worker-loaded .worker-panel-grid > .below-card:nth-of-type(2) {
  animation-delay: 40ms;
}

.worker-loaded .worker-panel-grid > .below-card:nth-of-type(3) {
  animation-delay: 80ms;
}

.worker-loaded .worker-panel-grid > .below-card:nth-of-type(4) {
  animation-delay: 120ms;
}

@keyframes workerCardReveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .worker-loaded .worker-panel-grid > .below-card,
  .worker-loaded .worker-hub-panel {
    animation: none !important;
  }
}

/* ── Dark consistency patch: remove gray leftovers ───────────────────── */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .worker-quick-menu {
    background: rgba(24, 32, 45, 0.9);
    border-color: rgba(129, 173, 240, 0.2);
  }

  html:not([data-theme="light"]) .quick-menu-btn {
    background: rgba(29, 38, 53, 0.94);
    color: #f4f7ff;
    border-color: rgba(129, 173, 240, 0.2);
  }

  html:not([data-theme="light"]) .worker-menu-btn {
    background: #f2f2f2;
    color: #151515;
    border-color: #d8d8d8;
  }

  html:not([data-theme="light"]) .scanner-card {
    background: linear-gradient(180deg, rgba(28, 36, 49, 0.92), rgba(22, 30, 41, 0.94));
    border-color: rgba(129, 173, 240, 0.18);
    box-shadow: 0 16px 30px rgba(4, 7, 12, 0.34);
  }

  html:not([data-theme="light"]) .gate-panel {
    background: rgba(24, 32, 44, 0.96);
    border-color: rgba(129, 173, 240, 0.22);
  }

  html:not([data-theme="light"]) .site-map-link {
    background: linear-gradient(135deg, #f58a46 0%, #ea6f2f 48%, #5d87e8 52%, #4f76d1 100%);
    box-shadow: 0 12px 26px rgba(8, 14, 29, 0.44);
  }
}

[data-theme="dark"] .worker-quick-menu {
  background: rgba(24, 32, 45, 0.9);
  border-color: rgba(129, 173, 240, 0.2);
}

[data-theme="dark"] .quick-menu-btn {
  background: rgba(29, 38, 53, 0.94);
  color: #f4f7ff;
  border-color: rgba(129, 173, 240, 0.2);
}

[data-theme="dark"] .worker-menu-btn {
  background: #f2f2f2;
  color: #151515;
  border-color: #d8d8d8;
}

[data-theme="dark"] .scanner-card {
  background: linear-gradient(180deg, rgba(28, 36, 49, 0.92), rgba(22, 30, 41, 0.94));
  border-color: rgba(129, 173, 240, 0.18);
  box-shadow: 0 16px 30px rgba(4, 7, 12, 0.34);
}

[data-theme="dark"] .gate-panel {
  background: rgba(24, 32, 44, 0.96);
  border-color: rgba(129, 173, 240, 0.22);
}

[data-theme="dark"] .site-map-link {
  background: linear-gradient(135deg, #f58a46 0%, #ea6f2f 48%, #5d87e8 52%, #4f76d1 100%);
  box-shadow: 0 12px 26px rgba(8, 14, 29, 0.44);
}

/* Ultra pass: stronger glow only on dark interactive buttons */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .primary,
  html:not([data-theme="light"]) .site-map-link {
    position: relative;
    overflow: hidden;
    box-shadow:
      0 12px 28px rgba(6, 10, 18, 0.48),
      0 0 0 1px rgba(129, 173, 240, 0.2),
      0 0 22px rgba(243, 146, 86, 0.18),
      0 0 16px rgba(93, 135, 232, 0.16);
  }

  html:not([data-theme="light"]) .primary::before,
  html:not([data-theme="light"]) .site-map-link::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.36) 50%, transparent 80%);
    transform: translateX(-140%);
    opacity: 0;
    pointer-events: none;
  }

  html:not([data-theme="light"]) .primary:hover,
  html:not([data-theme="light"]) .site-map-link:hover {
    transform: translateY(-2px) scale(1.01);
    filter: saturate(1.08);
    box-shadow:
      0 16px 34px rgba(6, 10, 18, 0.56),
      0 0 0 1px rgba(129, 173, 240, 0.34),
      0 0 30px rgba(243, 146, 86, 0.28),
      0 0 24px rgba(93, 135, 232, 0.24);
  }

  html:not([data-theme="light"]) .primary:hover::before,
  html:not([data-theme="light"]) .site-map-link:hover::before {
    opacity: 0.82;
    animation: darkButtonSweepWorker 760ms cubic-bezier(0.22, 0.78, 0.18, 1) 1;
  }

  html:not([data-theme="light"]) .primary:focus-visible,
  html:not([data-theme="light"]) .site-map-link:focus-visible {
    outline: none;
    animation: darkButtonPulseWorker 520ms ease-out 1;
    box-shadow:
      0 0 0 2px rgba(129, 173, 240, 0.44),
      0 0 0 5px rgba(243, 146, 86, 0.28),
      0 0 34px rgba(93, 135, 232, 0.28);
  }

  html:not([data-theme="light"]) .primary:active,
  html:not([data-theme="light"]) .site-map-link:active {
    transform: translateY(0) scale(0.99);
    filter: saturate(1.14) brightness(1.05);
    animation: darkButtonPulseWorker 420ms ease-out 1;
  }
}

[data-theme="dark"] .primary,
[data-theme="dark"] .site-map-link {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(6, 10, 18, 0.48),
    0 0 0 1px rgba(129, 173, 240, 0.2),
    0 0 22px rgba(243, 146, 86, 0.18),
    0 0 16px rgba(93, 135, 232, 0.16);
}

[data-theme="dark"] .primary::before,
[data-theme="dark"] .site-map-link::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.36) 50%, transparent 80%);
  transform: translateX(-140%);
  opacity: 0;
  pointer-events: none;
}

[data-theme="dark"] .primary:hover,
[data-theme="dark"] .site-map-link:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.08);
  box-shadow:
    0 16px 34px rgba(6, 10, 18, 0.56),
    0 0 0 1px rgba(129, 173, 240, 0.34),
    0 0 30px rgba(243, 146, 86, 0.28),
    0 0 24px rgba(93, 135, 232, 0.24);
}

[data-theme="dark"] .primary:hover::before,
[data-theme="dark"] .site-map-link:hover::before {
  opacity: 0.82;
  animation: darkButtonSweepWorker 760ms cubic-bezier(0.22, 0.78, 0.18, 1) 1;
}

[data-theme="dark"] .primary:focus-visible,
[data-theme="dark"] .site-map-link:focus-visible {
  outline: none;
  animation: darkButtonPulseWorker 520ms ease-out 1;
  box-shadow:
    0 0 0 2px rgba(129, 173, 240, 0.44),
    0 0 0 5px rgba(243, 146, 86, 0.28),
    0 0 34px rgba(93, 135, 232, 0.28);
}

[data-theme="dark"] .primary:active,
[data-theme="dark"] .site-map-link:active {
  transform: translateY(0) scale(0.99);
  filter: saturate(1.14) brightness(1.05);
  animation: darkButtonPulseWorker 420ms ease-out 1;
}

@keyframes darkButtonSweepWorker {
  from { transform: translateX(-140%); }
  to { transform: translateX(140%); }
}

@keyframes darkButtonPulseWorker {
  0% {
    box-shadow:
      0 0 0 0 rgba(243, 146, 86, 0.38),
      0 0 0 0 rgba(93, 135, 232, 0.34);
  }
  100% {
    box-shadow:
      0 0 0 10px rgba(243, 146, 86, 0),
      0 0 0 14px rgba(93, 135, 232, 0);
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .quick-menu-btn {
    box-shadow: 0 6px 14px rgba(6, 10, 18, 0.28), 0 0 0 1px rgba(129, 173, 240, 0.14);
  }

  html:not([data-theme="light"]) .worker-menu-btn {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  }

  html:not([data-theme="light"]) .quick-menu-btn:hover {
    transform: translateY(-1px);
    filter: none;
    box-shadow: 0 9px 18px rgba(6, 10, 18, 0.34), 0 0 0 1px rgba(129, 173, 240, 0.2);
  }

  html:not([data-theme="light"]) .worker-menu-btn:hover {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

[data-theme="dark"] .quick-menu-btn {
  box-shadow: 0 6px 14px rgba(6, 10, 18, 0.28), 0 0 0 1px rgba(129, 173, 240, 0.14);
}

[data-theme="dark"] .worker-menu-btn {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .quick-menu-btn:hover {
  transform: translateY(-1px);
  filter: none;
  box-shadow: 0 9px 18px rgba(6, 10, 18, 0.34), 0 0 0 1px rgba(129, 173, 240, 0.2);
}

[data-theme="dark"] .worker-menu-btn:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}




/* ═════════════════════════════════════════════════════════ */
/* ── GMAIL-STYLE COMPACT LISTS (📧 Inbox-like) ──────────── */
/* ═════════════════════════════════════════════════════════ */

.timesheet-list {
  gap: 0 !important;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  .timesheet-list { border-color: rgba(255,255,255,.1); }
}

[data-theme="dark"] .timesheet-list { border-color: rgba(255,255,255,.1); }

.timesheet-day { gap: 0 !important; }

.timesheet-date {
  padding: 10px 12px;
  background: rgba(0,0,0,.02);
  border-bottom: 1px solid rgba(0,0,0,.05);
}

@media (prefers-color-scheme: dark) {
  .timesheet-date { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.08); }
}

[data-theme="dark"] .timesheet-date { background: rgba(255,255,255,.02); border-color: rgba(255,255,255,.08); }

.timesheet-entry {
  padding: 8px 12px;
  border-radius: 0;
  background: transparent !important;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,.03);
  font-size: .85rem;
}

.timesheet-entry.entry-in { background: transparent; border: none; }
.timesheet-entry.entry-out { background: transparent; border: none; }

.timesheet-entry::before {
  content: "📍";
  margin-right: 6px;
  font-size: .9rem;
}

.timesheet-entry.entry-out::before { content: "📤"; }

@media (prefers-color-scheme: dark) {
  .timesheet-entry { border-color: rgba(255,255,255,.05); }
}

[data-theme="dark"] .timesheet-entry { border-color: rgba(255,255,255,.05); }

.timesheet-entry:last-child { border-bottom: none; }

.documents-list {
  gap: 0 !important;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
}

@media (prefers-color-scheme: dark) {
  .documents-list { border-color: rgba(255,255,255,.1); }
}

[data-theme="dark"] .documents-list { border-color: rgba(255,255,255,.1); }

.document-item {
  border-radius: 0;
  border-bottom: 1px solid rgba(0,0,0,.03);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,.03);
  font-size: .87rem;
}

.document-item::before {
  content: "📄";
  margin-right: 6px;
  font-size: 0.95rem;
}

.document-item.doc-ok::before { content: "✅"; }
.document-item.doc-expired::before { content: "⚠️"; }

.document-item.doc-ok,
.document-item.doc-expired,
.document-item.doc-no-expiry {
  background: transparent;
  border: none;
}

@media (prefers-color-scheme: dark) {
  .document-item { border-color: rgba(255,255,255,.05); }
}

[data-theme="dark"] .document-item { border-color: rgba(255,255,255,.05); }

.document-item:last-child { border-bottom: none; }

.doc-meta {
  margin-left: auto;
  font-size: .75rem;
  white-space: nowrap;
}

.doc-status-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: .7rem;
}

/* ═════════════════════════════════════════════════════════ */
/* ── Worker Interior Unified Tile Theme ─────────────────── */
/* ═════════════════════════════════════════════════════════ */

.worker-loaded .worker-hub-panel {
  background: #f4f4f4;
  border: 1px solid #dddddd;
  border-radius: 4px;
  box-shadow: none;
}

.worker-loaded .below-card {
  background: #f2f2f2;
  border: 1px solid #dddddd;
  border-radius: 3px;
  box-shadow: none;
  padding: 14px;
}

.worker-loaded .worker-menu-card {
  gap: 12px;
}

.worker-loaded .worker-menu-grid {
  gap: 12px;
}

.worker-loaded .worker-menu-btn {
  min-height: 172px;
  padding: 12px 8px 12px;
  justify-content: flex-start;
  gap: 12px;
}

.worker-loaded .worker-menu-icon {
  width: 78px;
  height: 78px;
  margin-top: 4px;
}

.worker-loaded .worker-menu-svg {
  width: 72px;
  height: 72px;
}

.worker-loaded .worker-menu-label {
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.16;
  max-width: 13ch;
  min-height: 2.3em;
}

.worker-loaded .section-head {
  border-bottom: 1px solid #dfdfdf;
  padding-bottom: 10px;
}

.worker-loaded .section-kicker {
  color: #6b6b6b;
}

.worker-loaded .compact-head h3 {
  color: #141414;
}

.worker-loaded .section-copy,
.worker-loaded .muted-info,
.worker-loaded .day-card-validity,
.worker-loaded .info-label {
  color: #4c4c4c;
}

.worker-loaded .info-value {
  color: #1b1b1b;
}

.worker-loaded .actions-gate-btn {
  min-height: 54px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(126, 62, 33, .25);
}

.worker-loaded .actions-panel .actions-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.worker-loaded .actions-panel .actions-secondary .small-btn,
.worker-loaded .actions-panel .theme-toggle-btn,
.worker-loaded .actions-panel .voice-command-btn,
.worker-loaded .notification-permission-banner button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(196, 178, 158, .56);
  background: linear-gradient(180deg, rgba(255, 255, 255, .97) 0%, rgba(244, 238, 230, .96) 100%);
  color: #2b211b;
  box-shadow: 0 4px 12px rgba(75, 48, 31, .10), inset 0 1px 0 rgba(255, 255, 255, .92);
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 0 10px;
  text-align: center;
}

.worker-loaded .actions-panel .actions-secondary .small-btn:hover,
.worker-loaded .actions-panel .theme-toggle-btn:hover,
.worker-loaded .actions-panel .voice-command-btn:hover,
.worker-loaded .notification-permission-banner button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(240, 232, 221, .98) 100%);
  border-color: rgba(186, 160, 130, .7);
  box-shadow: 0 8px 18px rgba(75, 48, 31, .14), inset 0 1px 0 rgba(255, 255, 255, .95);
  transform: translateY(-1px);
}

.worker-loaded .actions-panel .theme-toggle-btn,
.worker-loaded .actions-panel .voice-command-btn {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.worker-loaded .actions-panel #qrContrastToggle,
.worker-loaded .actions-panel #refreshButton {
  border-color: rgba(148, 163, 184, .55);
}

.worker-loaded .actions-panel #changePhotoButton,
.worker-loaded .actions-panel #themeToggleBtn,
.worker-loaded .actions-panel #voiceCommandBtn {
  border-color: rgba(196, 178, 158, .7);
}

.worker-loaded .leave-request-card,
.worker-loaded .timesheet-card,
.worker-loaded .documents-card,
.worker-loaded .session-info-card,
.worker-loaded .route-card,
.worker-loaded .actions-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 244, 239, .96));
  border: 1px solid rgba(255, 255, 255, .60);
  box-shadow: 0 12px 28px rgba(68, 41, 25, .08), inset 0 1px 0 rgba(255, 255, 255, .78);
  border-radius: 16px;
  padding: 14px;
}

.worker-loaded #logoutButton.logout-btn-prominent {
  color: #9f1239 !important;
  border-color: rgba(190, 24, 93, .28) !important;
  background: linear-gradient(180deg, rgba(255, 245, 248, .98) 0%, rgba(255, 237, 242, .98) 100%) !important;
  grid-column: 1 / -1;
}

.worker-loaded #logoutButton.logout-btn-prominent:hover {
  border-color: rgba(190, 24, 93, .42) !important;
  background: linear-gradient(180deg, rgba(255, 241, 245, 1) 0%, rgba(255, 228, 236, .98) 100%) !important;
}

@media (max-width: 420px) {
  .worker-loaded .actions-panel .actions-secondary {
    grid-template-columns: 1fr;
  }
}

.worker-loaded .leave-request-form input,
.worker-loaded .leave-request-form textarea,
.worker-loaded .leave-request-form select,
.worker-loaded .send-boss-email {
  border: 1px solid #d2d2d2;
  border-radius: 3px;
  background: #ffffff;
  color: #1a1a1a;
}

.worker-loaded .ai-suggest-btn {
  border-radius: 3px;
  border-color: #d2b24a;
  background: #f4e7b0;
  color: #1a1a1a;
}

.worker-pulse-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pulse-item {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 22px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.pulse-item:active {
  transform: scale(0.985);
}

.pulse-label {
  margin: 0;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 246, 236, 0.62);
}

.pulse-item strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  line-height: 1.1;
  color: #fffaf5;
}

.pulse-item span {
  font-size: 0.74rem;
  color: rgba(255, 246, 236, 0.72);
}

.pulse-item-network.is-offline {
  border-color: rgba(254, 202, 202, 0.42);
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.35), rgba(88, 28, 28, 0.2));
}

.pulse-item-sync.is-fresh {
  border-color: rgba(134, 239, 172, 0.34);
}

.pulse-item-sync.is-stale {
  border-color: rgba(253, 186, 116, 0.44);
}

.pulse-item-power.is-low {
  border-color: rgba(254, 202, 202, 0.42);
  background: linear-gradient(160deg, rgba(127, 29, 29, 0.35), rgba(88, 28, 28, 0.2));
}

.pulse-item-flow.is-active {
  border-color: rgba(147, 197, 253, 0.45);
}

body.worker-loaded .worker-pulse-panel {
  margin-top: 2px;
}

@media (max-width: 420px) {
  .worker-pulse-panel {
    grid-template-columns: 1fr;
  }
}

[data-theme="light"] .pulse-item {
  border-color: rgba(0, 0, 0, 0.09);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 238, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 9px 18px rgba(75, 48, 31, 0.12);
}

[data-theme="light"] .pulse-label {
  color: rgba(29, 24, 20, 0.6);
}

[data-theme="light"] .pulse-item strong {
  color: #1f1712;
}

[data-theme="light"] .pulse-item span {
  color: rgba(46, 37, 31, 0.74);
}

@media (prefers-reduced-motion: reduce) {
  .pulse-item {
    transition: none;
  }
}

.worker-loaded .notification-permission-banner {
  border-radius: 3px;
  border: 1px solid #d8d8d8;
  background: #efefef;
  color: #202020;
}

.worker-loaded .timesheet-list,
.worker-loaded .documents-list {
  border: 1px solid #d8d8d8;
  border-radius: 3px;
  background: #f6f6f6;
}

.worker-loaded .timesheet-date {
  background: #ececec;
  border-bottom: 1px solid #d8d8d8;
  color: #4a4a4a;
}

.worker-loaded .timesheet-entry,
.worker-loaded .document-item {
  border: none;
  border-bottom: 1px solid #dddddd;
  border-radius: 0;
  background: transparent;
}

.worker-loaded .timesheet-entry::before,
.worker-loaded .document-item::before {
  content: none;
}

.worker-loaded .document-item:last-child,
.worker-loaded .timesheet-entry:last-child {
  border-bottom: none;
}

/* ── Creative Luxury Refresh (Final Layer) ─────────────────────────── */
:root {
  --bg: #f6f3ea;
  --card: rgba(255, 255, 252, 0.76);
  --card-strong: rgba(255, 255, 253, 0.92);
  --text: #10221f;
  --muted: #4d6460;
  --accent: #0f766e;
  --accent-dark: #0b5f58;
  --accent-soft: #88d7cf;
  --blue: #155e75;
  --shadow: 0 20px 50px rgba(13, 53, 49, 0.14);
}

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(1200px 560px at -8% -20%, rgba(15, 118, 110, 0.24), transparent 58%),
    radial-gradient(1000px 500px at 110% 8%, rgba(180, 83, 9, 0.18), transparent 60%),
    linear-gradient(165deg, #f8f6ef 0%, #edf7f4 42%, #e8f2ef 100%);
}

.top-panel {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(14, 97, 90, 0.28);
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.24), transparent 26%),
    linear-gradient(130deg, #0f3f3b 0%, #0f766e 44%, #256f56 100%);
  box-shadow: 0 32px 70px rgba(7, 34, 31, 0.26);
}

.top-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.18) 48%, transparent 68%);
  transform: translateX(-120%);
  animation: luxurySweep 1.1s cubic-bezier(0.2, 0.78, 0.22, 1) 280ms 1 both;
}

.top-panel h1,
.card h2,
.card h3,
.worker-next-step-panel strong {
  font-family: "Syne", sans-serif;
  letter-spacing: -0.01em;
}

.brand-chip-platform {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
}

.brand-chip-operator {
  background: rgba(180, 83, 9, 0.26);
  color: #ffedd5;
  border-color: rgba(251, 191, 36, 0.3);
}

.card {
  border-radius: 26px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 251, 249, 0.9)),
    var(--card);
  box-shadow: 0 18px 42px rgba(13, 53, 49, 0.1);
}

.login-card {
  border-color: rgba(120, 156, 255, 0.22);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 32%),
    radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.12), transparent 30%),
    var(--card);
}

.login-hero-strip,
.worker-next-step-panel {
  border-radius: 20px;
  border: 1px solid rgba(120, 156, 255, 0.16);
  background: linear-gradient(140deg, rgba(10, 16, 30, 0.88), rgba(16, 24, 44, 0.96));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.login-hero-point {
  border-radius: 16px;
  border: 1px solid rgba(120, 156, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.lang-option-block,
.worker-quick-menu {
  border-radius: 16px;
  border-color: rgba(120, 156, 255, 0.16);
  background: rgba(10, 16, 30, 0.9);
}

.quick-menu-btn {
  border-color: rgba(120, 156, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #eef6ff;
}

.quick-menu-btn.active {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #050816;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.26);
}

.pulse-item {
  border: 1px solid rgba(120, 156, 255, 0.18);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
}

.pulse-item strong {
  color: #eef6ff;
}

.primary {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 52%, #7c3aed 100%);
  box-shadow: 0 14px 28px rgba(56, 189, 248, 0.28);
}

.ghost {
  border: 1px solid rgba(120, 156, 255, 0.16);
}

button:hover,
.site-map-link:hover {
  transform: translateY(-2px) scale(1.01);
}

.worker-pass,
.below-card,
#workerMenuCard {
  animation: luxuryRise 560ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.worker-pass { animation-delay: 40ms; }
#workerMenuCard { animation-delay: 120ms; }
.below-card:nth-of-type(2) { animation-delay: 180ms; }
.below-card:nth-of-type(3) { animation-delay: 220ms; }
.below-card:nth-of-type(4) { animation-delay: 260ms; }

@keyframes luxuryRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes luxurySweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@media (max-width: 520px) {
  .top-panel {
    border-radius: 28px;
    padding: 22px 18px;
  }

  .card,
  .login-hero-strip,
  .worker-next-step-panel {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-panel::after,
  .worker-pass,
  .below-card,
  #workerMenuCard {
    animation: none !important;
  }
}

.worker-loaded .leave-request-item {
  border-radius: 3px;
  background: #f1f1f1;
  border: 1px solid #d8d8d8;
}

.worker-loaded .leave-request-status,
.worker-loaded .doc-status-badge {
  border-radius: 3px;
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .worker-loaded .worker-hub-panel,
  html:not([data-theme="light"]) .worker-loaded .below-card {
    background: #f2f2f2;
    border-color: #dddddd;
    box-shadow: none;
  }

  html:not([data-theme="light"]) .worker-loaded .section-head {
    border-bottom-color: #dfdfdf;
  }

  html:not([data-theme="light"]) .worker-loaded .section-copy,
  html:not([data-theme="light"]) .worker-loaded .muted-info,
  html:not([data-theme="light"]) .worker-loaded .day-card-validity,
  html:not([data-theme="light"]) .worker-loaded .info-label,
  html:not([data-theme="light"]) .worker-loaded .entry-gate,
  html:not([data-theme="light"]) .worker-loaded .timesheet-date,
  html:not([data-theme="light"]) .worker-loaded .doc-meta {
    color: #4c4c4c;
  }

  html:not([data-theme="light"]) .worker-loaded .compact-head h3,
  html:not([data-theme="light"]) .worker-loaded .info-value,
  html:not([data-theme="light"]) .worker-loaded .entry-time,
  html:not([data-theme="light"]) .worker-loaded .doc-type {
    color: #1b1b1b;
  }
}

@media (max-width: 420px) {
  .worker-loaded .worker-menu-grid {
    gap: 10px;
  }

  .worker-loaded .worker-menu-btn {
    min-height: 156px;
    padding: 10px 7px 10px;
    gap: 10px;
  }

  .worker-loaded .worker-menu-icon {
    width: 68px;
    height: 68px;
    margin-top: 2px;
  }

  .worker-loaded .worker-menu-svg {
    width: 62px;
    height: 62px;
  }

  .worker-loaded .worker-menu-label {
    font-size: .96rem;
  }
}

[data-theme="dark"] .worker-loaded .worker-hub-panel,
[data-theme="dark"] .worker-loaded .below-card {
  background: #f2f2f2;
  border-color: #dddddd;
  box-shadow: none;
}

[data-theme="dark"] .worker-loaded .section-head {
  border-bottom-color: #dfdfdf;
}

[data-theme="dark"] .worker-loaded .section-copy,
[data-theme="dark"] .worker-loaded .muted-info,
[data-theme="dark"] .worker-loaded .day-card-validity,
[data-theme="dark"] .worker-loaded .info-label,
[data-theme="dark"] .worker-loaded .entry-gate,
[data-theme="dark"] .worker-loaded .timesheet-date,
[data-theme="dark"] .worker-loaded .doc-meta {
  color: #4c4c4c;
}

[data-theme="dark"] .worker-loaded .compact-head h3,
[data-theme="dark"] .worker-loaded .info-value,
[data-theme="dark"] .worker-loaded .entry-time,
[data-theme="dark"] .worker-loaded .doc-type {
  color: #1b1b1b;
}

/* ── Wallet Ultra Surface Upgrade ─────────────────────────────────── */
.wallet-card {
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 70px 120px rgba(0, 0, 0, 0.56),
    0 26px 54px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 36px rgba(30, 130, 210, 0.15);
  transition: transform 0.35s cubic-bezier(0.2, 0.84, 0.22, 1), box-shadow 0.35s ease;
}

.wallet-card:hover {
  transform: translateY(-2px) scale(1.004);
  box-shadow:
    0 82px 130px rgba(0, 0, 0, 0.6),
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 0 42px rgba(30, 130, 210, 0.2);
}

.wallet-card::before {
  height: 6px;
}

.wallet-card::after {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.2), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(120, 200, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.16));
}

.wallet-card .wc-shimmer {
  background: linear-gradient(
    112deg,
    transparent 0%,
    transparent 26%,
    rgba(255, 255, 255, 0.1) 34%,
    rgba(117, 205, 255, 0.14) 42%,
    rgba(255, 232, 170, 0.16) 50%,
    rgba(117, 205, 255, 0.1) 58%,
    transparent 68%,
    transparent 100%
  );
  background-size: 240% 240%;
  animation: cardHoloUltra 6.8s ease-in-out infinite;
}

.wallet-card .wc-grid {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 18px 18px, 36px 36px, 36px 36px;
  opacity: 0.46;
}

.wc-brand-mark {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34), 0 0 16px rgba(255, 178, 110, 0.26);
}

.wc-brand-name {
  font-size: clamp(0.6rem, 2.5vw, 0.9rem);
  letter-spacing: 0.18em;
}

.wc-qr-frame {
  border-radius: 18px;
  box-shadow:
    0 14px 30px rgba(164, 120, 24, 0.46),
    0 0 26px rgba(255, 209, 98, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(96, 61, 12, 0.5);
}

#workerQr,
#visitorQr {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.wc-photo {
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.wc-name {
  letter-spacing: 0.09em;
}

.wc-status {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.wallet-card.preset-construction {
  background: linear-gradient(135deg, #071722 0%, #12374c 44%, #07111b 100%);
}

.wallet-card.preset-industry {
  background: linear-gradient(135deg, #241307 0%, #6b3d16 42%, #291306 100%);
}

.wallet-card.preset-premium {
  background: linear-gradient(135deg, #020d21 0%, #0a3d86 42%, #020a19 100%);
}

@keyframes cardHoloUltra {
  0% { background-position: 210% 210%; }
  50% { background-position: 0% 0%; }
  100% { background-position: 210% 210%; }
}

@media (max-width: 520px) {
  .wallet-card {
    border-radius: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-card .wc-shimmer {
    animation: none !important;
  }

  .wallet-card,
  .wallet-card:hover {
    transform: none !important;
  }
}

/* ── Signature Ultra Layer ─────────────────────────────────────────── */
:root {
  --luxury-emerald: #0a7f73;
  --luxury-deep: #082a32;
  --luxury-gold: #c6922f;
  --luxury-ivory: #fffdf8;
}

body {
  background:
    radial-gradient(900px 500px at -10% -12%, rgba(10, 127, 115, 0.28), transparent 56%),
    radial-gradient(960px 520px at 108% -8%, rgba(198, 146, 47, 0.2), transparent 58%),
    linear-gradient(160deg, #f9f8f1 0%, #ebf7f4 45%, #e3f0ee 100%);
}

.app-backdrop {
  filter: saturate(1.1);
}

.orb-one {
  width: 360px;
  height: 360px;
  animation: floatOrbA 8s ease-in-out infinite;
}

.orb-two {
  width: 320px;
  height: 320px;
  animation: floatOrbB 10s ease-in-out infinite;
}

.top-panel {
  border-radius: 38px;
  border: 1px solid rgba(123, 224, 210, 0.22);
  box-shadow:
    0 34px 80px rgba(6, 35, 39, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.top-panel h1 {
  font-size: clamp(2rem, 8vw, 2.9rem);
  letter-spacing: -0.035em;
}

.top-panel .eyebrow {
  color: rgba(224, 255, 250, 0.86);
}

.top-lead {
  color: rgba(236, 255, 251, 0.82);
}

.brand-chip {
  border-width: 1px;
  box-shadow: 0 8px 16px rgba(8, 24, 29, 0.24);
}

.brand-chip-platform {
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.3), rgba(226, 255, 251, 0.14));
}

.brand-chip-operator {
  background: linear-gradient(130deg, rgba(198, 146, 47, 0.35), rgba(164, 95, 20, 0.28));
  color: #fff4dc;
}

.top-stat-card,
.pulse-item {
  border-radius: 18px;
}

.card {
  border-radius: 28px;
}

.section-kicker,
.worker-next-step-kicker,
.pulse-label,
.top-stat-label {
  letter-spacing: 0.16em;
}

.login-card,
.worker-pass,
.below-card,
#workerMenuCard {
  border-color: rgba(12, 125, 114, 0.24);
  box-shadow: 0 20px 44px rgba(7, 44, 45, 0.12);
}

.login-hero-strip::before,
.worker-next-step-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 20%, rgba(255, 255, 255, 0.34) 46%, transparent 72%);
  transform: translateX(-120%);
  animation: softSweep 1s ease both;
}

.login-hero-strip,
.worker-next-step-panel {
  position: relative;
  overflow: hidden;
}

.quick-menu-btn.active,
.primary {
  background: linear-gradient(135deg, var(--luxury-emerald) 0%, #0b665f 45%, var(--luxury-deep) 100%);
}

.primary,
.site-map-link {
  position: relative;
  overflow: hidden;
}

.primary::after,
.site-map-link::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent 24%, rgba(255, 255, 255, 0.3) 52%, transparent 78%);
  transform: translateX(-140%);
  transition: transform 0.55s cubic-bezier(0.22, 0.78, 0.2, 1);
}

.primary:hover::after,
.site-map-link:hover::after {
  transform: translateX(140%);
}

.worker-menu-btn,
.document-item,
.timesheet-entry,
.leave-request-item {
  border-radius: 16px;
}

@keyframes floatOrbA {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-10px) translateX(8px); }
}

@keyframes floatOrbB {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(12px) translateX(-10px); }
}

@keyframes softSweep {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .orb-one,
  .orb-two,
  .login-hero-strip::before,
  .worker-next-step-panel::before,
  .top-panel::after {
    animation: none !important;
  }
}

@media (max-width: 520px) {
  .top-panel {
    border-radius: 30px;
  }

  .card {
    border-radius: 22px;
  }
}

/* ── Final Polish Pass ────────────────────────────────────────────── */
.app-shell {
  max-width: 540px;
  gap: 20px;
}

.top-panel {
  padding: 28px 24px;
}

.top-lead {
  max-width: 38ch;
  line-height: 1.5;
}

.section-copy,
.worker-next-step-copy {
  line-height: 1.55;
}

.status-banner {
  border-left: 3px solid currentColor;
  border-radius: 16px;
}

.quick-menu-btn {
  min-height: 36px;
  font-weight: 800;
}

.quick-menu-btn.active {
  box-shadow: 0 10px 22px rgba(12, 103, 96, 0.28);
}

.worker-menu-btn {
  border: 1px solid rgba(12, 103, 96, 0.14);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(239, 250, 247, 0.92));
}

.worker-menu-btn:hover {
  border-color: rgba(12, 103, 96, 0.28);
  box-shadow: 0 14px 30px rgba(7, 44, 45, 0.16);
}

.timesheet-entry,
.document-item,
.leave-request-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.timesheet-entry:hover,
.document-item:hover,
.leave-request-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(8, 38, 39, 0.1);
  border-color: rgba(12, 103, 96, 0.24);
}

.actions-panel .actions-secondary {
  gap: 12px;
}

.actions-panel .small-btn,
.actions-panel .theme-toggle-btn,
.actions-panel .voice-command-btn {
  border-radius: 12px;
}

.worker-next-step-panel {
  border-left: 4px solid rgba(198, 146, 47, 0.56);
}

button:focus-visible,
.quick-menu-btn:focus-visible,
.worker-menu-btn:focus-visible,
.site-map-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(10, 127, 115, 0.55);
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .worker-loaded .below-card,
  html:not([data-theme="light"]) .worker-loaded .worker-hub-panel,
  html:not([data-theme="light"]) .worker-loaded .actions-panel,
  html:not([data-theme="light"]) .worker-loaded .timesheet-card,
  html:not([data-theme="light"]) .worker-loaded .documents-card,
  html:not([data-theme="light"]) .worker-loaded .leave-request-card {
    background: linear-gradient(180deg, rgba(20, 34, 45, 0.94), rgba(15, 27, 36, 0.96));
    border-color: rgba(137, 213, 202, 0.2);
    box-shadow: 0 16px 30px rgba(2, 11, 14, 0.42);
  }

  html:not([data-theme="light"]) .worker-loaded .compact-head h3,
  html:not([data-theme="light"]) .worker-loaded .info-value,
  html:not([data-theme="light"]) .worker-loaded .doc-type,
  html:not([data-theme="light"]) .worker-loaded .entry-time {
    color: #ecfffb;
  }

  html:not([data-theme="light"]) .worker-loaded .section-copy,
  html:not([data-theme="light"]) .worker-loaded .muted-info,
  html:not([data-theme="light"]) .worker-loaded .doc-meta,
  html:not([data-theme="light"]) .worker-loaded .entry-gate {
    color: rgba(220, 246, 241, 0.76);
  }
}

@media (max-width: 420px) {
  .app-shell {
    gap: 16px;
    padding-top: 20px;
  }

  .top-panel {
    padding: 22px 18px;
  }

  .top-panel h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1;
  }

  .worker-menu-btn {
    min-height: 132px;
  }

  .worker-next-step-panel {
    padding: 12px 13px;
  }
}

/* ── Art Direction Pass: Industrial Luxe ─────────────────────────── */
:root {
  --bg: #f3f4ef;
  --card: rgba(255, 255, 252, 0.82);
  --card-strong: rgba(255, 255, 253, 0.95);
  --text: #0f1c2a;
  --muted: #55657a;
  --accent: #1f6feb;
  --accent-dark: #184fb4;
  --accent-soft: #9cc6ff;
  --blue: #0b3a75;
  --shadow: 0 18px 46px rgba(16, 32, 64, 0.14);
}

body {
  background:
    radial-gradient(1200px 640px at -15% -20%, rgba(31, 111, 235, 0.22), transparent 58%),
    radial-gradient(1200px 620px at 114% -16%, rgba(181, 117, 24, 0.14), transparent 60%),
    linear-gradient(154deg, #f7f8fb 0%, #edf2fb 47%, #e8edf7 100%);
}

.app-backdrop {
  opacity: 0.94;
}

.backdrop-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 56px 56px;
}

.top-panel {
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.24), transparent 24%),
    linear-gradient(128deg, #101b36 0%, #1f6feb 42%, #0f3f78 100%);
  border: 1px solid rgba(162, 196, 255, 0.28);
  box-shadow: 0 28px 66px rgba(9, 22, 49, 0.34);
}

.top-panel h1 {
  letter-spacing: -0.028em;
  line-height: 0.98;
}

.brand-chip {
  border-radius: 10px;
  letter-spacing: 0.09em;
}

.brand-chip-platform {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.26), rgba(214, 230, 255, 0.12));
}

.brand-chip-operator {
  background: linear-gradient(140deg, rgba(181, 117, 24, 0.32), rgba(131, 78, 16, 0.28));
  border-color: rgba(255, 219, 156, 0.24);
}

.card,
.login-hero-strip,
.worker-next-step-panel,
.worker-menu-btn,
.document-item,
.timesheet-entry,
.leave-request-item,
.quick-menu-btn,
.actions-panel .small-btn,
.actions-panel .theme-toggle-btn,
.actions-panel .voice-command-btn {
  border-radius: 14px;
}

.card {
  border: 1px solid rgba(31, 111, 235, 0.16);
  box-shadow: 0 16px 34px rgba(14, 34, 70, 0.1);
}

.section-kicker,
.worker-next-step-kicker,
.pulse-label,
.top-stat-label {
  letter-spacing: 0.14em;
}

.login-hero-strip,
.worker-next-step-panel {
  border-color: rgba(31, 111, 235, 0.2);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(241, 246, 255, 0.95));
}

.worker-next-step-panel {
  border-left: 5px solid rgba(181, 117, 24, 0.64);
}

.quick-menu-btn {
  border: 1px solid rgba(31, 111, 235, 0.2);
  background: rgba(255, 255, 255, 0.86);
}

.quick-menu-btn.active,
.primary,
.site-map-link {
  background: linear-gradient(135deg, #1f6feb 0%, #184fb4 44%, #0f3f78 100%);
}

.worker-menu-btn {
  border: 1px solid rgba(31, 111, 235, 0.18);
  background: linear-gradient(154deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.92));
  box-shadow: 0 10px 24px rgba(13, 37, 82, 0.1);
}

.worker-menu-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 111, 235, 0.34);
  box-shadow: 0 16px 30px rgba(12, 32, 71, 0.16);
}

.worker-menu-icon {
  border-radius: 12px;
}

.status-banner {
  border-left: 3px solid currentColor;
}

.timesheet-entry:hover,
.document-item:hover,
.leave-request-item:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 111, 235, 0.24);
  box-shadow: 0 8px 18px rgba(12, 32, 71, 0.1);
}

.worker-loaded .below-card,
.worker-loaded .worker-hub-panel,
.worker-loaded .actions-panel,
.worker-loaded .timesheet-card,
.worker-loaded .documents-card,
.worker-loaded .leave-request-card {
  background: linear-gradient(180deg, rgba(255, 255, 253, 0.92), rgba(244, 247, 255, 0.95));
  border-color: rgba(31, 111, 235, 0.16);
}

.worker-loaded .section-head {
  border-bottom: 1px dashed rgba(31, 111, 235, 0.2);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #070d1a;
    --card: rgba(17, 24, 40, 0.86);
    --card-strong: rgba(13, 21, 35, 0.94);
    --text: #eaf2ff;
    --muted: #9fb4d2;
    --accent: #4d8dff;
    --accent-dark: #2f6feb;
    --accent-soft: #9cc6ff;
    --blue: #6ba4ff;
  }

  html:not([data-theme="light"]) body {
    background:
      radial-gradient(1200px 640px at -15% -20%, rgba(77, 141, 255, 0.26), transparent 58%),
      radial-gradient(1200px 620px at 114% -16%, rgba(181, 117, 24, 0.18), transparent 60%),
      linear-gradient(154deg, #070d1a 0%, #0d1b34 47%, #081226 100%);
  }

  html:not([data-theme="light"]) .worker-loaded .below-card,
  html:not([data-theme="light"]) .worker-loaded .worker-hub-panel,
  html:not([data-theme="light"]) .worker-loaded .actions-panel,
  html:not([data-theme="light"]) .worker-loaded .timesheet-card,
  html:not([data-theme="light"]) .worker-loaded .documents-card,
  html:not([data-theme="light"]) .worker-loaded .leave-request-card {
    background: linear-gradient(180deg, rgba(14, 26, 46, 0.94), rgba(10, 19, 34, 0.96));
    border-color: rgba(147, 183, 255, 0.24);
    box-shadow: 0 16px 30px rgba(2, 11, 14, 0.44);
  }

  html:not([data-theme="light"]) .worker-menu-btn,
  html:not([data-theme="light"]) .quick-menu-btn {
    background: rgba(20, 30, 52, 0.92);
    border-color: rgba(147, 183, 255, 0.26);
    color: #eaf2ff;
  }
}

@media (max-width: 420px) {
  .top-panel {
    border-radius: 18px;
    padding: 20px 16px;
  }

  .card,
  .login-hero-strip,
  .worker-next-step-panel,
  .worker-menu-btn {
    border-radius: 12px;
  }

  .worker-menu-btn {
    min-height: 126px;
  }
}


/* ── Clean Banking UI Override (Map-safe) ───────────────────────────── */
:root {
  --bank-bg: #f3f6fb;
  --bank-surface: #ffffff;
  --bank-surface-soft: #f8fbff;
  --bank-border: #dce6f4;
  --bank-text: #0f1f36;
  --bank-muted: #5b6f8e;
  --bank-accent: #0c5ccf;
  --bank-accent-strong: #0949a4;
  --bank-shadow: 0 18px 42px rgba(15, 31, 54, 0.1);
}

body {
  background:
    radial-gradient(1000px 520px at -10% -18%, rgba(12, 92, 207, 0.14), transparent 58%),
    radial-gradient(900px 460px at 110% -20%, rgba(11, 88, 187, 0.09), transparent 60%),
    linear-gradient(160deg, #f8fbff 0%, var(--bank-bg) 52%, #eef3fa 100%);
}

.top-panel {
  background: linear-gradient(145deg, #0f2a52 0%, #0c5ccf 56%, #0b4ca9 100%);
  border: 1px solid rgba(184, 210, 245, 0.45);
  box-shadow: 0 28px 70px rgba(10, 33, 70, 0.34);
  border-radius: 20px;
}

.top-panel h1 {
  letter-spacing: -0.025em;
}

.top-panel .top-lead,
.top-panel .eyebrow,
.top-panel .platform-hint {
  color: rgba(236, 246, 255, 0.9);
}

.worker-loaded .card,
.worker-loaded .below-card:not(#routeCard),
.worker-loaded #workerMenuCard,
.worker-loaded .worker-hub-panel,
.worker-loaded .actions-panel,
.worker-loaded .timesheet-card,
.worker-loaded .documents-card,
.worker-loaded .leave-request-card,
.worker-loaded .login-card,
.worker-loaded .worker-pass {
  background: linear-gradient(180deg, var(--bank-surface) 0%, var(--bank-surface-soft) 100%);
  border: 1px solid var(--bank-border);
  box-shadow: var(--bank-shadow);
  border-radius: 16px;
}

.section-kicker,
.pulse-label,
.top-stat-label,
.worker-next-step-kicker {
  color: var(--bank-muted);
  letter-spacing: 0.12em;
}

.worker-loaded h2,
.worker-loaded h3,
.worker-loaded .info-value,
.worker-loaded .doc-type,
.worker-loaded .entry-time {
  color: var(--bank-text);
}

.worker-loaded .section-copy,
.worker-loaded .muted-info,
.worker-loaded .doc-meta,
.worker-loaded .entry-gate,
.worker-loaded .worker-next-step-copy {
  color: var(--bank-muted);
}

.primary,
.quick-menu-btn.active,
.actions-gate-btn {
  background: linear-gradient(140deg, var(--bank-accent) 0%, var(--bank-accent-strong) 100%);
  border: 1px solid rgba(10, 74, 164, 0.35);
  box-shadow: 0 10px 24px rgba(12, 92, 207, 0.32);
}

.ghost,
.small-btn,
.theme-toggle-btn,
.voice-command-btn,
.quick-menu-btn,
.worker-menu-btn {
  border: 1px solid var(--bank-border);
  background: #ffffff;
}

.worker-menu-btn {
  min-height: 132px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.worker-menu-btn:hover,
.quick-menu-btn:hover,
.timesheet-entry:hover,
.document-item:hover,
.leave-request-item:hover {
  transform: translateY(-2px);
  border-color: rgba(12, 92, 207, 0.36);
  box-shadow: 0 14px 30px rgba(15, 31, 54, 0.12);
}

input,
select,
textarea {
  border: 1px solid #cfdced;
  background: #ffffff;
  border-radius: 12px;
  color: var(--bank-text);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(12, 92, 207, 0.45);
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bank-bg: #0a1323;
    --bank-surface: #101d33;
    --bank-surface-soft: #12223a;
    --bank-border: #1f3353;
    --bank-text: #e8f1ff;
    --bank-muted: #9ab0d1;
    --bank-accent: #2b79ea;
    --bank-accent-strong: #175fc8;
    --bank-shadow: 0 20px 46px rgba(2, 8, 18, 0.5);
  }

  html:not([data-theme="light"]) body {
    background:
      radial-gradient(1000px 520px at -10% -18%, rgba(43, 121, 234, 0.2), transparent 58%),
      radial-gradient(900px 460px at 110% -20%, rgba(23, 95, 200, 0.17), transparent 60%),
      linear-gradient(160deg, #091221 0%, #0a1323 52%, #0d182c 100%);
  }

  html:not([data-theme="light"]) .ghost,
  html:not([data-theme="light"]) .small-btn,
  html:not([data-theme="light"]) .theme-toggle-btn,
  html:not([data-theme="light"]) .voice-command-btn,
  html:not([data-theme="light"]) .quick-menu-btn,
  html:not([data-theme="light"]) .worker-menu-btn,
  html:not([data-theme="light"]) input,
  html:not([data-theme="light"]) select,
  html:not([data-theme="light"]) textarea {
    background: #0f1d32;
    border-color: #243a5d;
    color: #e8f1ff;
  }
}

/* ── Clean Interior Pages: Vacation / Timesheet / Documents ─────────────── */
.worker-loaded #leaveRequestCard,
.worker-loaded #timesheetCard,
.worker-loaded #documentsCard {
  border-radius: 18px;
  padding: 16px;
  background: var(--corp-surface);
  border: 1px solid var(--corp-border);
  box-shadow: 0 6px 14px rgba(19, 40, 69, 0.06);
}

.worker-loaded #leaveRequestCard .section-head.compact-head,
.worker-loaded #timesheetCard .section-head.compact-head,
.worker-loaded #documentsCard .section-head.compact-head {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--corp-border);
}

.worker-loaded #leaveRequestCard .section-head.compact-head h3,
.worker-loaded #timesheetCard .section-head.compact-head h3,
.worker-loaded #documentsCard .section-head.compact-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--corp-text);
}

.worker-loaded #leaveRequestCard .section-kicker,
.worker-loaded #timesheetCard .section-kicker,
.worker-loaded #documentsCard .section-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  color: var(--corp-muted);
}

.worker-loaded #leaveRequestCard .leave-request-item,
.worker-loaded #timesheetCard .timesheet-day,
.worker-loaded #documentsCard .document-item,
.worker-loaded #timesheetCard .timesheet-entry {
  background: color-mix(in srgb, var(--corp-surface) 88%, var(--corp-bg) 12%);
  border: 1px solid var(--corp-border);
  border-radius: 12px;
  box-shadow: none;
}

.worker-loaded #leaveRequestCard .ghost,
.worker-loaded #leaveRequestCard .small-btn,
.worker-loaded #timesheetCard .ghost,
.worker-loaded #timesheetCard .small-btn,
.worker-loaded #documentsCard .ghost,
.worker-loaded #documentsCard .small-btn,
.worker-loaded #leaveRequestCard input,
.worker-loaded #leaveRequestCard select,
.worker-loaded #leaveRequestCard textarea {
  background: var(--corp-surface);
  border: 1px solid var(--corp-border);
  color: var(--corp-text);
  border-radius: 12px;
}

.worker-loaded #leaveRequestCard .primary,
.worker-loaded #timesheetCard .primary,
.worker-loaded #documentsCard .primary {
  border-radius: 12px;
  background: var(--corp-primary);
  border-color: rgba(8, 71, 158, 0.45);
  color: #fff;
}

.worker-loaded #leaveRequestCard .muted-info,
.worker-loaded #timesheetCard .muted-info,
.worker-loaded #documentsCard .muted-info,
.worker-loaded #timesheetCard .entry-gate,
.worker-loaded #documentsCard .doc-meta {
  color: var(--corp-muted);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard,
  html:not([data-theme="light"]) .worker-loaded #timesheetCard,
  html:not([data-theme="light"]) .worker-loaded #documentsCard {
    background: #0f1e34;
    border-color: #263e61;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  }

  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard .leave-request-item,
  html:not([data-theme="light"]) .worker-loaded #timesheetCard .timesheet-day,
  html:not([data-theme="light"]) .worker-loaded #documentsCard .document-item,
  html:not([data-theme="light"]) .worker-loaded #timesheetCard .timesheet-entry {
    background: #122640;
    border-color: #2a446c;
  }

  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard .ghost,
  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard .small-btn,
  html:not([data-theme="light"]) .worker-loaded #timesheetCard .ghost,
  html:not([data-theme="light"]) .worker-loaded #timesheetCard .small-btn,
  html:not([data-theme="light"]) .worker-loaded #documentsCard .ghost,
  html:not([data-theme="light"]) .worker-loaded #documentsCard .small-btn,
  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard input,
  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard select,
  html:not([data-theme="light"]) .worker-loaded #leaveRequestCard textarea {
    background: #11223a;
    border-color: #2b476f;
    color: #e8f1ff;
  }
}

.smart-work-hub-card {
  display: grid;
  gap: 12px;
}

.smart-work-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.smart-hub-item {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(31, 111, 235, 0.18);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.9));
}

.smart-hub-label {
  margin: 0;
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.smart-hub-item strong {
  font-size: .86rem;
  line-height: 1.35;
  color: var(--text);
}

.smart-work-hub-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.smart-work-hub-actions .small-btn {
  min-height: 42px;
  font-size: .79rem;
  border-radius: 10px;
}

.smart-hub-recommendation,
.smart-hub-planner,
.smart-hub-doc-checklist {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid rgba(208, 147, 82, 0.3);
  background: linear-gradient(150deg, rgba(255, 251, 245, 0.92), rgba(255, 244, 229, 0.76));
}

.smart-hub-recommendation strong {
  font-size: .91rem;
  line-height: 1.35;
}

.smart-hub-recommendation .small-btn {
  justify-self: flex-start;
}

.smart-hub-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.smart-hub-meta-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(31, 111, 235, 0.16);
  background: rgba(255, 255, 255, 0.7);
}

.smart-hub-meta-item strong {
  font-size: .96rem;
}

.smart-hub-meta-item small {
  font-size: .73rem;
  color: var(--muted);
  line-height: 1.35;
}

.smart-hub-planner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tiny-btn {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .7rem;
  letter-spacing: .06em;
}

.day-planner-list {
  display: grid;
  gap: 7px;
}

.day-planner-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
}

.day-planner-item input {
  margin-top: 2px;
}

.day-planner-item.done .day-planner-text {
  text-decoration: line-through;
  opacity: .62;
}

.day-planner-text {
  font-size: .82rem;
  line-height: 1.35;
}

.smart-hub-checklist-list {
  display: grid;
  gap: 7px;
}

.smart-hub-check-item {
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  font-size: .8rem;
  line-height: 1.35;
}

.smart-hub-check-item.ok {
  border-left: 3px solid rgba(25, 165, 109, 0.72);
}

.smart-hub-check-item.warn {
  border-left: 3px solid rgba(208, 147, 82, 0.9);
}

.smart-hub-check-item.alert {
  border-left: 3px solid rgba(211, 58, 49, 0.9);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .smart-hub-item {
    background: rgba(20, 30, 52, 0.9);
    border-color: rgba(147, 183, 255, 0.26);
  }

  html:not([data-theme="light"]) .smart-hub-item strong {
    color: #eaf2ff;
  }

  html:not([data-theme="light"]) .smart-hub-recommendation,
  html:not([data-theme="light"]) .smart-hub-planner,
  html:not([data-theme="light"]) .smart-hub-doc-checklist,
  html:not([data-theme="light"]) .smart-hub-meta-item,
  html:not([data-theme="light"]) .day-planner-item,
  html:not([data-theme="light"]) .smart-hub-check-item {
    background: rgba(17, 27, 46, 0.9);
    border-color: rgba(166, 200, 255, 0.24);
  }
}

@media (max-width: 560px) {
  .smart-work-hub-grid,
  .smart-work-hub-actions,
  .smart-hub-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Sparkasse-Clean Strict (Map-safe, final) ────────────────────────── */
:root {
  --spark-bg: #f4f7fb;
  --spark-surface: #ffffff;
  --spark-surface-soft: #f9fbfe;
  --spark-border: #d7e1ee;
  --spark-text: #11233d;
  --spark-muted: #5e738f;
  --spark-primary: #0b5ac5;
  --spark-primary-strong: #08489f;
}

body {
  background:
    radial-gradient(760px 360px at -10% -15%, rgba(11, 90, 197, 0.08), transparent 60%),
    linear-gradient(170deg, #f8fbff 0%, var(--spark-bg) 55%, #edf3fa 100%);
}

.top-panel {
  background: linear-gradient(160deg, #0f2a52 0%, #0b5ac5 100%);
  border: 1px solid rgba(167, 195, 236, 0.45);
  border-radius: 16px;
  box-shadow: 0 20px 46px rgba(11, 34, 69, 0.28);
}

.worker-loaded .card,
.worker-loaded .below-card:not(#routeCard),
.worker-loaded #workerMenuCard,
.worker-loaded .worker-hub-panel,
.worker-loaded .actions-panel,
.worker-loaded .timesheet-card,
.worker-loaded .documents-card,
.worker-loaded .leave-request-card,
.worker-loaded .login-card,
.worker-loaded .worker-pass {
  background: linear-gradient(180deg, var(--spark-surface) 0%, var(--spark-surface-soft) 100%);
  border: 1px solid var(--spark-border);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(17, 35, 61, 0.08);
}

.worker-loaded h2,
.worker-loaded h3,
.worker-loaded .info-value,
.worker-loaded .doc-type,
.worker-loaded .entry-time {
  color: var(--spark-text);
}

.worker-loaded .section-copy,
.worker-loaded .muted-info,
.worker-loaded .doc-meta,
.worker-loaded .entry-gate,
.worker-loaded .worker-next-step-copy,
.section-kicker,
.pulse-label,
.top-stat-label,
.worker-next-step-kicker {
  color: var(--spark-muted);
}

.primary,
.quick-menu-btn.active,
.actions-gate-btn {
  background: linear-gradient(160deg, var(--spark-primary) 0%, var(--spark-primary-strong) 100%);
  border: 1px solid rgba(8, 72, 159, 0.4);
  box-shadow: 0 8px 18px rgba(11, 90, 197, 0.22);
}

.ghost,
.small-btn,
.theme-toggle-btn,
.voice-command-btn,
.quick-menu-btn,
.worker-menu-btn,
input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--spark-border);
  color: var(--spark-text);
}

.worker-menu-btn,
.quick-menu-btn,
.timesheet-entry,
.document-item,
.leave-request-item {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.worker-menu-btn:hover,
.quick-menu-btn:hover,
.timesheet-entry:hover,
.document-item:hover,
.leave-request-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 35, 61, 0.1);
  border-color: rgba(11, 90, 197, 0.35);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --spark-bg: #0a1322;
    --spark-surface: #0f1d33;
    --spark-surface-soft: #12243d;
    --spark-border: #233a5d;
    --spark-text: #e7f0ff;
    --spark-muted: #9ab0ce;
    --spark-primary: #2b79ea;
    --spark-primary-strong: #175fc8;
  }

  html:not([data-theme="light"]) body {
    background:
      radial-gradient(760px 360px at -10% -15%, rgba(43, 121, 234, 0.14), transparent 60%),
      linear-gradient(170deg, #091221 0%, #0a1322 55%, #0d182b 100%);
  }

  html:not([data-theme="light"]) .ghost,
  html:not([data-theme="light"]) .small-btn,
  html:not([data-theme="light"]) .theme-toggle-btn,
  html:not([data-theme="light"]) .voice-command-btn,
  html:not([data-theme="light"]) .quick-menu-btn,
  html:not([data-theme="light"]) .worker-menu-btn,
  html:not([data-theme="light"]) input,
  html:not([data-theme="light"]) select,
  html:not([data-theme="light"]) textarea {
    background: #102036;
    border-color: #2a446c;
    color: #e7f0ff;
  }
}

/* ── Bottom Tab Navigation & Showcase Mode ──────────────────────────── */
.worker-bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  width: min(100%, 520px);
  margin-inline: auto;
  left: 0;
  right: 0;
  transform: none;
  height: calc(68px + env(safe-area-inset-bottom, 0px));
  padding: 6px 6px max(6px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background: var(--corp-surface);
  border-top: 1px solid var(--corp-border);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  box-shadow: 0 -2px 10px rgba(8, 28, 54, 0.08);
  z-index: 1200;
  gap: 0;
}

.worker-bottom-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(2px, calc(env(safe-area-inset-bottom, 0px) - 2px));
  width: 128px;
  height: 4px;
  border-radius: 999px;
  background: rgba(17, 31, 49, 0.34);
  pointer-events: none;
}

/* Login page must never show bottom navigation */
body:not(.worker-loaded) .worker-bottom-nav {
  display: none !important;
}

body:not(.worker-loaded) #topPanel {
  display: none !important;
}

body:not(.worker-loaded) #badgeCard,
body:not(.worker-loaded) #workerDashboard,
body:not(.worker-loaded) #homeCompactInfo,
body:not(.worker-loaded) #workerHubPanel,
body:not(.worker-loaded) #workerPageNav,
body:not(.worker-loaded) #smartWorkHubCard,
body:not(.worker-loaded) .worker-hub-toggle-row,
body:not(.worker-loaded) #visitorCardContainer,
body:not(.worker-loaded) .quick-gate-fab {
  display: none !important;
}

/* The floating quick gate FAB clashes with the new bottom tab layout. */
.quick-gate-fab {
  display: none !important;
}

.nav-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 25%;
  height: 100%;
  background: transparent;
  border: none;
  color: #4f6078;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
  border-radius: 0;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.nav-tab svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.8;
  display: block;
}

.nav-tab svg path,
.nav-tab svg line,
.nav-tab svg rect,
.nav-tab svg circle {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
  white-space: nowrap;
  transform: translateY(0.5px);
}

.nav-tab.active {
  color: #0f1724;
  background-color: transparent;
}

.nav-tab.active svg {
  transform: translateY(-0.5px);
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  top: 6px;
  left: calc(50% + 8px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--corp-primary);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.nav-tab:nth-child(1).active::after { left: calc(50% + 9px); }
.nav-tab:nth-child(2).active::after { left: calc(50% + 10px); }
.nav-tab:nth-child(3).active::after { left: calc(50% + 9px); }
.nav-tab:nth-child(4).active::after { left: calc(50% + 9px); }
.nav-tab:nth-child(5).active::after { left: calc(50% + 9px); }

.nav-tab:hover {
  background-color: rgba(10, 87, 192, 0.08);
}

.nav-tab:active {
  transform: translateY(1px);
}

/* When bottom nav is visible, adjust main content spacing */
body.worker-loaded .app-shell {
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

/* Showcase mode: full-screen pass card for 10 seconds */
.showcase-mode {
  position: fixed;
  inset: 0;
  background: var(--corp-bg);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-mode .app-shell {
  padding-bottom: 0;
  max-width: 100%;
}

.showcase-mode .dashboard-featured-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
}

.showcase-mode .dashboard-featured-card .wallet-card {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.showcase-mode .worker-quick-menu,
.showcase-mode .worker-menu-card,
.showcase-mode .below-card,
.showcase-mode #workerPageNav,
.showcase-mode #actionsPanel,
.showcase-mode #sessionInfoCard,
.showcase-mode #leaveRequestCard,
.showcase-mode #timesheetCard,
.showcase-mode #documentsCard,
.showcase-mode .dashboard-quick-actions,
.showcase-mode .dashboard-content {
  display: none !important;
}

.showcase-mode .pass-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.showcase-mode .wallet-card {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Login compact adjustments */
.login-compact {
  max-height: 70vh;
  overflow-y: auto;
}

.login-compact .login-hero-strip {
  display: none;
}

.login-compact .login-tips {
  display: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .worker-bottom-nav {
    background: #0f1e34;
    border-color: #223a60;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.35);
  }

  html:not([data-theme="light"]) .nav-tab.active {
    color: #e7f0ff;
    background-color: transparent;
  }

  html:not([data-theme="light"]) .nav-tab {
    color: #94aac8;
  }

  html:not([data-theme="light"]) .nav-tab.active::after {
    background: #2b79ea;
    box-shadow: 0 0 0 2px rgba(15, 30, 52, 0.95);
  }

  html:not([data-theme="light"]) .worker-bottom-nav::after {
    background: rgba(206, 220, 245, 0.28);
  }

  html:not([data-theme="light"]) .showcase-mode {
    background: #0a1322;
  }
}

@media (max-width: 420px) {
  .worker-bottom-nav {
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-top: 4px;
    width: 100%;
    left: 0;
    transform: none;
  }

  .nav-tab {
    gap: 2px;
  }

  .nav-label {
    font-size: 0.64rem;
    letter-spacing: 0;
  }

  .worker-bottom-nav::after {
    width: 118px;
    height: 4px;
  }

  body.worker-loaded .app-shell {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Worker Dashboard Layout ──────────────────────────────────────────── */
.worker-dashboard {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.home-compact-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-info-item {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border: 1px solid rgba(60, 94, 139, 0.44);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(19, 37, 62, 0.98), rgba(14, 28, 48, 0.98));
  box-shadow: 0 6px 18px rgba(7, 20, 38, 0.25);
}

.home-info-label {
  font-size: 0.72rem;
  color: #8ea5c6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-info-value {
  font-size: 1.06rem;
  font-weight: 700;
  color: #ecf3ff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .home-compact-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-info-item {
    padding: 10px 8px;
    border-radius: 12px;
    gap: 4px;
  }

  .home-info-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }

  .home-info-value {
    font-size: 0.82rem;
    white-space: normal;
  }

  .home-info-item:nth-child(3) {
    grid-column: 1 / -1;
  }

  .dashboard-featured-card {
    aspect-ratio: 85.6 / 60;
    border-radius: 16px;
  }

  .wallet-card {
    max-width: 100%;
    aspect-ratio: 85.6 / 60;
    min-height: 292px;
    padding: 4.4% 4.8%;
  }

  .wc-top {
    margin-top: 0;
  }

  .wc-middle {
    gap: 12px;
    align-items: center;
  }

  .wc-qr-holder {
    width: clamp(86px, 34vw, 126px);
    height: clamp(86px, 34vw, 126px);
  }

  .wc-photo {
    width: clamp(58px, 19vw, 80px);
    height: clamp(58px, 19vw, 80px);
    border-radius: 12px;
  }

  .wc-bottom {
    margin-top: 0;
  }

  .wc-name {
    font-size: clamp(.68rem, 2.5vw, .92rem);
    letter-spacing: 0.1em;
  }

  .wc-role-text {
    font-size: clamp(.44rem, 1.9vw, .62rem);
  }

  .wc-footer {
    gap: 8px;
    align-items: center;
  }

  .wc-company,
  .wc-status {
    font-size: 0.72rem;
  }

  .wc-qr-frame {
    inset: -5px;
  }

  #workerQr,
  #visitorQr {
    padding: 3px;
  }
}

.dashboard-featured-card {
  position: relative;
  width: 100%;
  /* Credit-card aspect ratio — matches the wallet-card inside exactly */
  aspect-ratio: 85.6 / 54;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  max-width: 480px;
  margin: 0 auto;
}

.dashboard-featured-card .wallet-card {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 20px;
  /* Ensure wallet-card fills the container without being squashed */
  aspect-ratio: unset;
  min-height: unset;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 4px;
}

.action-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  min-height: 100px;
  background: var(--corp-surface);
  border: 1px solid var(--corp-border);
  border-radius: 16px;
  color: var(--corp-text);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.action-card-btn svg {
  color: var(--corp-primary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.action-card-btn:hover,
.action-card-btn:active {
  background: var(--corp-bg);
  border-color: var(--corp-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 87, 192, 0.12);
}

.action-card-btn:hover svg {
  transform: scale(1.1);
  color: var(--corp-primary-dark);
}

.dashboard-content {
  display: grid;
  gap: 20px;
  min-height: 200px;
}

@media (max-width: 540px) {
  .home-compact-info {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .action-card-btn {
    padding: 14px 10px;
    min-height: 90px;
    font-size: 0.68rem;
  }

  .dashboard-featured-card {
    aspect-ratio: 85.6 / 54;
    border-radius: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .action-card-btn {
    background: #102036;
    border-color: #2a446c;
    color: #e7f0ff;
  }

  html:not([data-theme="light"]) .action-card-btn:hover,
  html:not([data-theme="light"]) .action-card-btn:active {
    background: #0f1a29;
    border-color: #2b79ea;
  }

  html:not([data-theme="light"]) .action-card-btn svg {
    color: #2b79ea;
  }
}

/* ── Ultra-Clean Compact Banking (Map-safe) ─────────────────────────── */
.app-shell {
  max-width: 520px;
  gap: 12px;
  padding: 16px 12px 24px;
}

.top-panel {
  padding: 16px 14px;
  border-radius: 12px;
}

.top-panel h1 {
  font-size: clamp(1.55rem, 6.2vw, 2.05rem);
  line-height: 1.03;
}

.top-lead {
  font-size: 0.9rem;
  line-height: 1.42;
}

.worker-loaded .card,
.worker-loaded .below-card:not(#routeCard),
.worker-loaded #workerMenuCard,
.worker-loaded .worker-hub-panel,
.worker-loaded .actions-panel,
.worker-loaded .timesheet-card,
.worker-loaded .documents-card,
.worker-loaded .leave-request-card,
.worker-loaded .login-card,
.worker-loaded .worker-pass {
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(17, 35, 61, 0.07);
}

.section-head.compact-head {
  margin-bottom: 6px;
}

.section-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.worker-loaded h2,
.worker-loaded h3 {
  font-size: 1.02rem;
  line-height: 1.22;
}

.worker-menu-grid {
  gap: 8px;
}

.worker-menu-btn {
  min-height: 108px;
  padding: 10px;
  border-radius: 10px;
}

.worker-menu-label {
  font-size: 0.78rem;
  line-height: 1.18;
}

.quick-menu-btn,
.small-btn,
.ghost,
.theme-toggle-btn,
.voice-command-btn {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 0.76rem;
}

.actions-panel .actions-secondary {
  gap: 8px;
}

.primary,
.actions-gate-btn {
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.timesheet-entry,
.document-item,
.leave-request-item,
.smart-hub-item,
.smart-hub-meta-item,
.smart-hub-recommendation,
.smart-hub-planner,
.smart-hub-doc-checklist {
  padding: 8px 9px;
  border-radius: 10px;
}

.day-planner-item,
.smart-hub-check-item {
  padding: 6px 7px;
  border-radius: 8px;
}

input,
select,
textarea {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.88rem;
}

textarea {
  min-height: 86px;
}

@media (max-width: 420px) {
  .app-shell {
    gap: 10px;
    padding: 12px 10px 18px;
  }

  .top-panel {
    padding: 14px 12px;
    border-radius: 10px;
  }

  .worker-menu-btn {
    min-height: 98px;
    padding: 8px;
  }

  .quick-menu-btn,
  .small-btn,
  .ghost,
  .theme-toggle-btn,
  .voice-command-btn {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.74rem;
  }
}

/* ── Sparkasse Corporate Flat (Map-safe, final refinement) ───────────── */
:root {
  --corp-bg: #f2f5f9;
  --corp-surface: #ffffff;
  --corp-border: #d4deea;
  --corp-text: #132845;
  --corp-muted: #5f7390;
  --corp-primary: #0a57c0;
  --corp-primary-strong: #08479e;
}

body {
  background: var(--corp-bg);
}

@media (prefers-color-scheme: dark) {
  body { background: #102036; }
}

/* ── Sparkasse Top Bar ────────────────────────────────────────────── */
.sparkasse-top-bar {
  position: sticky;
  top: 0;
  z-index: 1300;
  background: #ffffff;
  border-bottom: 1px solid var(--corp-border);
  box-shadow: 0 1px 4px rgba(11, 38, 80, 0.08);
  padding: max(16px, calc(env(safe-area-inset-top, 0px) + 12px)) max(16px, env(safe-area-inset-right, 0px)) 0
    max(16px, env(safe-area-inset-left, 0px));
}

body.worker-loaded .app-shell {
  padding-top: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
}

body.worker-loaded .worker-notice {
  position: relative;
  z-index: 1300;
}

@media (prefers-color-scheme: dark) {
  .sparkasse-top-bar {
    background: #0f1e34;
    border-bottom-color: #1e3355;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  }
}

.stb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: 520px;
  margin: 0 auto;
}

.stb-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stb-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--corp-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stb-logo-mark svg path,
.stb-logo-mark svg rect {
  fill: #ffffff;
}

.wc-brand-initials,
.stb-logo-mark .wc-brand-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent-on, #fff);
  line-height: 1;
}

.stb-logo-mark .wc-brand-initials {
  font-size: 0.82rem;
}

.wc-brand-mark .wc-brand-logo,
.stb-logo-mark .wc-brand-logo,
.splash-icon .splash-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.splash-icon .splash-icon-img {
  border-radius: 14px;
}

.stb-brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--corp-text);
}

@media (prefers-color-scheme: dark) {
  .stb-brand-name { color: #e7f0ff; }
}

.stb-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stb-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--corp-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.stb-icon-btn:hover,
.stb-icon-btn:focus-visible {
  background: rgba(10, 87, 192, 0.08);
  color: var(--corp-primary);
  outline: none;
}

.stb-logout-btn {
  min-width: 92px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(10, 87, 192, 0.16);
  background: rgba(10, 87, 192, 0.08);
  color: var(--corp-primary);
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.stb-logout-btn:hover,
.stb-logout-btn:focus-visible {
  background: rgba(10, 87, 192, 0.14);
  outline: none;
}

@media (prefers-color-scheme: dark) {
  .stb-logout-btn {
    border-color: rgba(43, 121, 234, 0.26);
    background: rgba(43, 121, 234, 0.12);
    color: #b4d1ff;
  }
  .stb-logout-btn:hover,
  .stb-logout-btn:focus-visible {
    background: rgba(43, 121, 234, 0.2);
  }
}

.stb-connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.stb-connection-dot.online {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.stb-connection-dot.offline {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Screen-reader only (for hidden functional elements) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.worker-loaded .card,
.worker-loaded .below-card:not(#routeCard),
.worker-loaded #workerMenuCard,
.worker-loaded .worker-hub-panel,
.worker-loaded .actions-panel,
.worker-loaded .timesheet-card,
.worker-loaded .documents-card,
.worker-loaded .leave-request-card,
.worker-loaded .login-card,
.worker-loaded .worker-pass {
  background: var(--corp-surface);
  border: 1px solid var(--corp-border);
  box-shadow: 0 6px 14px rgba(19, 40, 69, 0.06);
}

.worker-loaded h2,
.worker-loaded h3,
.worker-loaded .info-value,
.worker-loaded .doc-type,
.worker-loaded .entry-time {
  color: var(--corp-text);
}

.worker-loaded .section-copy,
.worker-loaded .muted-info,
.worker-loaded .doc-meta,
.worker-loaded .entry-gate,
.worker-loaded .worker-next-step-copy,
.section-kicker,
.pulse-label,
.top-stat-label,
.worker-next-step-kicker {
  color: var(--corp-muted);
}

.primary,
.quick-menu-btn.active,
.actions-gate-btn {
  background: var(--corp-primary);
  border: 1px solid rgba(8, 71, 158, 0.45);
  box-shadow: 0 4px 10px rgba(10, 87, 192, 0.2);
}

.primary:hover,
.quick-menu-btn.active:hover,
.actions-gate-btn:hover {
  background: var(--corp-primary-strong);
}

.ghost,
.small-btn,
.theme-toggle-btn,
.voice-command-btn,
.quick-menu-btn,
.worker-menu-btn,
input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--corp-border);
  color: var(--corp-text);
}

.worker-menu-btn:hover,
.quick-menu-btn:hover,
.timesheet-entry:hover,
.document-item:hover,
.leave-request-item:hover {
  transform: none;
  box-shadow: 0 4px 10px rgba(19, 40, 69, 0.08);
  border-color: rgba(10, 87, 192, 0.34);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --corp-bg: #0a1322;
    --corp-surface: #0f1e34;
    --corp-border: #263e61;
    --corp-text: #e8f1ff;
    --corp-muted: #9db3d0;
    --corp-primary: #2b79ea;
    --corp-primary-strong: #1d66d1;
  }

  html:not([data-theme="light"]) body {
    background: linear-gradient(180deg, #0b1424 0%, #0a1322 56%, #0d182b 100%);
  }

  html:not([data-theme="light"]) .top-panel {
    background: #123f82;
    border-color: rgba(103, 145, 207, 0.5);
  }

  html:not([data-theme="light"]) .ghost,
  html:not([data-theme="light"]) .small-btn,
  html:not([data-theme="light"]) .theme-toggle-btn,
  html:not([data-theme="light"]) .voice-command-btn,
  html:not([data-theme="light"]) .quick-menu-btn,
  html:not([data-theme="light"]) .worker-menu-btn,
  html:not([data-theme="light"]) input,
  html:not([data-theme="light"]) select,
  html:not([data-theme="light"]) textarea {
    background: #11223a;
    border-color: #2b476f;
    color: #e8f1ff;
  }
}



