:root {
  --bg-main: #020614;
  --bg-card: linear-gradient(165deg, rgba(16, 25, 48, 0.56) 0%, rgba(9, 15, 31, 0.68) 100%);
  --bg-card-solid: #0b1326;
  --bg-glass: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.14);
  --border-highlight: rgba(255, 255, 255, 0.24);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  --accent-red: #ef4444;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", Roboto, sans-serif;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
}

html { background-color: var(--bg-main); }

/* body MUSI być przezroczyste: inaczej zasłania warstwę tła Aurora (z-index: -1) */
body { background-color: transparent; }

body {
  padding-bottom: 120px;
  position: relative;
}

/* ==========================================================================
   TŁO AURORA - tony zależne od stanu zmiany + wolno dryfujące plamy światła.
   Tylko transform/opacity (bez filter: blur), żeby nie męczyć GPU.
   ========================================================================== */
:root {
  --ring-a: #3b82f6;
  --ring-b: #22d3ee;
  --glow: rgba(34, 211, 238, 0.38);
}

body.state-working { --ring-a: #10b981; --ring-b: #22d3ee; --glow: rgba(16, 185, 129, 0.42); }
body.state-break { --ring-a: #f59e0b; --ring-b: #fb923c; --glow: rgba(245, 158, 11, 0.42); }
body.state-working.state-night { --ring-a: #a78bfa; --ring-b: #6366f1; --glow: rgba(139, 92, 246, 0.48); }
body.state-working.state-ot { --ring-a: #fb7185; --ring-b: #f59e0b; --glow: rgba(244, 63, 94, 0.42); }

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  background: linear-gradient(165deg, #020614 0%, #071027 55%, #030712 100%);
}

.aurora-tone {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.tone-idle {
  opacity: 1;
  background: radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.36) 0%, transparent 56%),
              radial-gradient(circle at 85% 22%, rgba(168, 85, 247, 0.3) 0%, transparent 56%),
              radial-gradient(circle at 50% 92%, rgba(6, 182, 212, 0.26) 0%, transparent 60%);
}

.tone-working {
  background: radial-gradient(circle at 18% 12%, rgba(16, 185, 129, 0.44) 0%, transparent 56%),
              radial-gradient(circle at 88% 26%, rgba(6, 182, 212, 0.36) 0%, transparent 56%),
              radial-gradient(circle at 50% 95%, rgba(20, 184, 166, 0.16) 0%, transparent 58%),
              linear-gradient(165deg, #021310 0%, #042426 50%, #020814 100%);
}

.tone-break {
  background: radial-gradient(circle at 18% 12%, rgba(245, 158, 11, 0.4) 0%, transparent 56%),
              radial-gradient(circle at 88% 26%, rgba(234, 88, 12, 0.32) 0%, transparent 56%),
              radial-gradient(circle at 50% 95%, rgba(251, 146, 60, 0.12) 0%, transparent 58%),
              linear-gradient(165deg, #160d02 0%, #1c1108 50%, #050714 100%);
}

.tone-night {
  background: radial-gradient(circle at 20% 10%, rgba(124, 58, 237, 0.48) 0%, transparent 56%),
              radial-gradient(circle at 86% 28%, rgba(79, 70, 229, 0.4) 0%, transparent 56%),
              radial-gradient(circle at 50% 95%, rgba(56, 189, 248, 0.1) 0%, transparent 58%),
              linear-gradient(165deg, #0a0620 0%, #120a33 50%, #04030f 100%);
}

body.state-working .tone-idle,
body.state-break .tone-idle { opacity: 0; }
body.state-working .tone-working { opacity: 1; }
body.state-break .tone-break { opacity: 1; }
body.state-working.state-night .tone-night { opacity: 1; }

.aurora-blob {
  position: absolute;
  width: min(135vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
}

.blob-1 {
  top: -14%;
  left: -26%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.62) 0%, rgba(56, 189, 248, 0.2) 36%, transparent 62%);
  animation: blobDriftA 15s ease-in-out infinite alternate;
}

.blob-2 {
  top: 22%;
  right: -40%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.58) 0%, rgba(167, 139, 250, 0.18) 36%, transparent 62%);
  animation: blobDriftB 19s ease-in-out infinite alternate;
}

.blob-3 {
  bottom: -26%;
  left: 2%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.5) 0%, rgba(45, 212, 191, 0.16) 36%, transparent 62%);
  animation: blobDriftC 22s ease-in-out infinite alternate;
}

/* Obracający się wachlarz światła: najbardziej widoczny element tła */
.aurora-ribbon {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 170vmax;
  height: 170vmax;
  margin: -85vmax 0 0 -85vmax;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      transparent 0deg,
      rgba(56, 189, 248, 0.26) 38deg,
      transparent 95deg,
      rgba(167, 139, 250, 0.24) 170deg,
      transparent 230deg,
      rgba(45, 212, 191, 0.22) 300deg,
      transparent 360deg);
  will-change: transform;
  animation: ribbonSpin 38s linear infinite;
}

@keyframes ribbonSpin {
  to { transform: rotate(360deg); }
}

@keyframes blobDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(52vw, 30vh, 0) scale(1.35); }
}

@keyframes blobDriftB {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(-56vw, 26vh, 0) scale(0.8); }
}

@keyframes blobDriftC {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to { transform: translate3d(46vw, -34vh, 0) scale(1.3); }
}

.hidden {
  display: none !important;
}

.app-container {
  max-width: 460px;
  margin: 0 auto;
  padding: 14px 16px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   GÓRNY PASEK: CZYSTY NAPIS SHIFTPULSE W KOLORACH Z LOGO (BEZ IKONY OBOK)
   ========================================================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 2px 18px;
  gap: 12px;
  width: 100%;
}

.brand-pill {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

/* Ukrywamy obrazek logo w górnym pasku - zostaje sam wyrazisty napis */
.top-bar .brand-icon-img {
  display: none !important;
}

.brand-icon-img {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.4);
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.38);
}

.brand-title-text {
  font-size: 23px;
  font-weight: 900;
   font-style: italic;
  letter-spacing: -0.7px;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 198, 255, 0.28);
  line-height: 1.1;
  white-space: nowrap;
  padding-right: 4px;
}

.brand-title-text span {
  background: linear-gradient(90deg, #38bdf8 0%, #00c6ff 50%, #0088ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 198, 255, 0.35));
}

.header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
}

.lang-btn {
  background: rgba(15, 25, 48, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.lang-btn:active {
  transform: scale(0.94);
}

.flag-svg {
  width: 16px !important;
  height: 12px !important;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  display: block;
  flex-shrink: 0;
}

.user-badge {
  background: rgba(15, 25, 48, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  max-width: 132px;
  min-width: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.user-badge span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badge svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  stroke: #38bdf8;
}

/* ==========================================================================
   KARTY FINTECH PREMIUM (BEZ BŁĘDÓW PRZECINANIA PODCZAS PRZEWIJANIA)
   ========================================================================== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  position: relative;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.hero-card {
  text-align: center;
  padding: 26px 18px 22px;
  background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.16) 0%, transparent 62%),
              linear-gradient(165deg, rgba(18, 29, 56, 0.5) 0%, rgba(8, 13, 28, 0.64) 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-top: 1px solid rgba(103, 232, 249, 0.45);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.status-pill.working {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.48);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.25);
}

.status-pill.on_break {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-pill.working .pulse-dot {
  animation: pulseAnim 1.4s infinite;
}

@keyframes pulseAnim {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.85); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.live-money {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -1.8px;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 6px;
  background: linear-gradient(90deg, #ffffff 0%, #e0f2fe 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(6, 182, 212, 0.25));
}

.live-money .pence-fraction {
  font-size: 25px;
  color: var(--accent-cyan);
  -webkit-text-fill-color: var(--accent-cyan);
  font-weight: 800;
}

/* Siatka Bento */
.metrics-Bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.bento-box {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 11px 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bento-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.bento-val {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.bento-val.cyan { color: #38bdf8; }
.bento-val.emerald { color: #34d399; }
.bento-val.amber { color: #fbbf24; }

/* Wielokolorowy pasek postępu nadgodzin */
.progress-wrap {
  margin-top: 16px;
  text-align: left;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #06b6d4 45%, #a855f7 80%, #10b981 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.55);
}

.peoplexd-bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  margin: 14px 0 8px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-deductions {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  height: 100%;
}

.bar-net {
  background: linear-gradient(90deg, #8b5cf6, #06b6d4);
  height: 100%;
}

/* ==========================================================================
   PRZYCISKI AKCJI (EFEKT 3D HIGHLIGHT & SZTYWNE IKONY 18PX)
   ========================================================================== */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease;
  text-decoration: none;
  line-height: 1.25;
}

.btn svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  stroke-width: 2.2;
  flex-shrink: 0 !important;
}

.btn:active {
  transform: scale(0.96);
  filter: brightness(1.08);
}

.btn-full {
  grid-column: 1 / -1;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.34);
}

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.36);
}

.btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.34);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.34);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--text-primary);
}

/* ==========================================================================
   FORMULARZE I WYRÓWNANE POLA INPUT
   ========================================================================== */
.form-group {
  margin-bottom: 14px;
  text-align: left;
  min-width: 0;
}

.form-group label {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
  line-height: 1.3;
}

.sub-hint {
  font-size: 10px;
  color: #38bdf8;
  display: block;
  font-weight: 500;
  margin-top: 2px;
}

.form-input, .form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  background: rgba(6, 11, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

input[type="date"].form-input,
input[type="datetime-local"].form-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  color-scheme: dark;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.form-row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  gap: 12px;
}

.pxd-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

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

.pxd-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #f8fafc;
}

.pxd-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pxd-val {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
  flex-shrink: 0;
}

/* ==========================================================================
   SZKLANY POPOVER WYBORU W MIEJSCU KLIKNIĘCIA (Z ROZMYTYM TŁEM APLIKACJI)
   ========================================================================== */
.custom-select-trigger {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(6, 11, 26, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.custom-select-trigger:active {
  border-color: #38bdf8;
  background: rgba(14, 24, 52, 0.92);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.custom-select-trigger .trig-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.custom-select-trigger svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  stroke: #38bdf8;
  stroke-width: 2.3;
  flex-shrink: 0 !important;
}

/* Półprzezroczysta, rozmyta przysłona, przez którą widać aplikację w tle */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(4, 10, 24, 0.42) !important;
  backdrop-filter: blur(14px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
  z-index: 9000 !important;
}

.modal-overlay.popover-overlay {
  display: block !important;
  padding: 0 !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-box {
  width: 100%;
  max-width: 390px;
  background: linear-gradient(165deg, rgba(18, 28, 54, 0.94), rgba(9, 15, 32, 0.97));
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.78), 0 0 28px rgba(6, 182, 212, 0.18);
  animation: modalPopIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.popover-select-box {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 410px;
  padding: 18px 16px;
  z-index: 9100;
  animation: popoverZoom 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popoverZoom {
  from { opacity: 0; transform: translateX(-50%) scale(0.92); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.custom-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  margin-bottom: 4px;
}

.custom-opt-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}

.custom-opt-item:active {
  transform: scale(0.98);
}

.custom-opt-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.34), rgba(6, 182, 212, 0.26));
  border-color: rgba(56, 189, 248, 0.85);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.24);
}

.custom-opt-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-opt-item.active .custom-opt-radio {
  border-color: #38bdf8;
}

.custom-opt-item.active .custom-opt-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* ==========================================================================
   KALENDARZ URLOPOWY (HOLIDAY CALENDAR)
   ========================================================================== */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.cal-day:active {
  transform: scale(0.91);
}

.cal-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.cal-day.today {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.28);
}

.cal-day.hol-paid {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.42), rgba(6, 182, 212, 0.32));
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.cal-day.hol-half {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.42), rgba(234, 88, 12, 0.3));
  border-color: #fbbf24;
  color: #ffffff;
}

.cal-day.selected-range {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.28);
}

/* ==========================================================================
   CHOWANE PŁYWAJĄCE DOLNE MENU (AUTO-HIDING FLOATING PILL DOCK - 5 ZAKŁADEK)
   ========================================================================== */
.bottom-nav-wrapper {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.bottom-nav-wrapper.nav-hidden {
  transform: translateY(135%);
  opacity: 0;
}

.bottom-nav {
  pointer-events: auto;
  position: relative;
  width: calc(100% - 24px);
  max-width: 440px;
  height: 68px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  gap: 3px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%),
              rgba(10, 16, 32, 0.72);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65),
              0 0 34px -6px var(--glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.28),
              inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  transition: box-shadow 1.2s ease;
}

/* Wskaźnik aktywnej zakładki: przesuwa się sprężyście i przejmuje kolor stanu zmiany */
.nav-pill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 24px) / 5);
  border-radius: 28px;
  background: rgba(56, 189, 248, 0.24);
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--ring-a) 40%, transparent),
              color-mix(in srgb, var(--ring-b) 30%, transparent));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 6px 18px -4px var(--glow);
  transform: translateX(calc(var(--idx, 0) * (100% + 3px)));
  transition: transform 0.5s cubic-bezier(0.34, 1.45, 0.5, 1);
  pointer-events: none;
}

.nav-item {
  position: relative;
  z-index: 1;
  border-radius: 28px;
  padding: 6px 2px 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.52);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.15s ease;
}

.nav-item svg {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.nav-item.active { color: #ffffff; }

.nav-item.active svg {
  transform: translateY(-2px) scale(1.12);
  filter: drop-shadow(0 0 7px var(--glow));
}

.nav-item:active { transform: scale(0.94); }
.nav-item:active svg { transform: scale(0.8); }
.nav-item.active:active svg { transform: translateY(0) scale(0.92); }

.nav-ripple {
  position: absolute;
  width: 90px;
  height: 90px;
  margin: -45px 0 0 -45px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  transform: scale(0);
  opacity: 0.9;
  pointer-events: none;
  animation: navRipple 0.55s ease-out forwards;
}

@keyframes navRipple {
  to { transform: scale(2.3); opacity: 0; }
}

/* ==========================================================================
   PEŁNOEKRANOWY EKRAN PIN Z PODŚWIETLENIEM WCISKANEJ CYFRY
   ========================================================================== */
#pin-modal.modal-overlay {
  z-index: 99999 !important;
  background: radial-gradient(circle at 50% 20%, #0d1e42 0%, #020614 85%) !important;
}

body.pin-locked #main-app-view,
body.pin-locked .top-bar,
body.pin-locked #bottom-nav-wrapper {
  visibility: hidden !important;
  pointer-events: none !important;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
  transform: scale(1.12);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.pin-key {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  height: 56px;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: transform 0.08s ease, background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.pin-key:active,
.pin-key.pressed {
  background: rgba(56, 189, 248, 0.42) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.65) !important;
  transform: scale(0.92) !important;
}



/* ==========================================================================
   HERO: PIERŚCIEŃ PULSE (postęp zmiany / tygodnia) + EKG
   ========================================================================== */
.pulse-ring {
  position: relative;
  width: min(100%, 290px);
  aspect-ratio: 1;
  margin: 8px auto 6px;
}

.ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ring-ticks {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 5;
  stroke-dasharray: 1.4 8.636;
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 9;
}

.ring-progress {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 653.45;
  stroke-dashoffset: 653.45;
  filter: drop-shadow(0 0 7px var(--glow));
  transition: stroke-dashoffset 0.25s linear;
}

.pulse-ring.is-working .ring-progress {
  animation: glowBeat 1.7s ease-in-out infinite;
}

@keyframes glowBeat {
  0%, 100% { filter: drop-shadow(0 0 5px var(--glow)); }
  50% { filter: drop-shadow(0 0 15px var(--glow)); }
}

.ring-head { transition: opacity 0.4s ease; }
.pulse-ring.is-idle .ring-head { opacity: 0.35; }

.ring-head-halo {
  fill: var(--ring-b);
  opacity: 0.4;
  transform-box: fill-box;
  transform-origin: center;
  animation: headPulse 1.7s ease-out infinite;
}

.ring-head-dot {
  fill: #ffffff;
  filter: drop-shadow(0 0 5px var(--ring-b));
}

@keyframes headPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2.3); opacity: 0; }
}

.ring-center {
  position: absolute;
  inset: 15%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.ring-caption {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ring-center .live-money {
  font-size: clamp(34px, 11.5vw, 44px);
  letter-spacing: -1.4px;
  line-height: 1.05;
  margin: 0;
  white-space: nowrap;
}

.ring-center .live-money .pence-fraction { font-size: 0.5em; }

.live-money.tick { animation: moneyTick 0.8s ease-out; }

@keyframes moneyTick {
  0% { filter: drop-shadow(0 4px 18px rgba(6, 182, 212, 0.25)); }
  25% { filter: drop-shadow(0 0 18px var(--glow)) brightness(1.25); }
  100% { filter: drop-shadow(0 4px 18px rgba(6, 182, 212, 0.25)); }
}

.ecg {
  width: 96px;
  height: 21px;
  overflow: visible;
}

.ecg path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ecg-base { stroke: rgba(255, 255, 255, 0.14); }

.ecg-glow {
  stroke: var(--ring-b);
  stroke-dasharray: 46 194;
  stroke-dashoffset: 0;
  opacity: 0;
  filter: drop-shadow(0 0 3px var(--ring-b));
}

.pulse-ring.is-working .ecg-glow { opacity: 1; animation: ecgRun 1.7s linear infinite; }
.pulse-ring.is-break .ecg-glow { opacity: 0.75; animation: ecgRun 4.2s linear infinite; }

@keyframes ecgRun {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -240; }
}

.ring-timer {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  gap: 6px;
  align-items: baseline;
  white-space: nowrap;
}

.ring-timer strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.pulse-ring.burst::after {
  content: "";
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  border: 2px solid var(--ring-b);
  pointer-events: none;
  animation: ringBurst 0.9s ease-out forwards;
}

@keyframes ringBurst {
  from { transform: scale(0.92); opacity: 0.9; }
  to { transform: scale(1.3); opacity: 0; }
}

.long-shift-banner {
  margin: 10px 0 2px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
}

/* Pasek nadgodzin: znacznik progu i kolor po przekroczeniu */
.progress-bar-bg { position: relative; }

.progress-marker {
  position: absolute;
  right: 0;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.5);
}

.progress-bar-fill.over {
  background: linear-gradient(90deg, #f43f5e 0%, #f59e0b 100%);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.55);
}

/* ==========================================================================
   SŁUPKI TYGODNIA (zarobki dzień po dniu)
   ========================================================================== */
.week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  height: 112px;
  padding: 4px 0 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-glass);
}

.wb-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
  min-width: 0;
}

.wb-val {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-height: 11px;
  white-space: nowrap;
}

.wb-bar {
  width: 100%;
  max-width: 28px;
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #38bdf8, #3b82f6);
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.wb-bar.empty { background: rgba(255, 255, 255, 0.09); }

.wb-col.today .wb-bar {
  background: linear-gradient(180deg, #34d399, #06b6d4);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.wb-day {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.wb-col.today .wb-day { color: #34d399; }

/* ==========================================================================
   PODSUMOWANIE ZMIANY
   ========================================================================== */
.summary-box { padding: 26px 18px 20px; }

.summary-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.summary-amount {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -2px;
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #ffffff 0%, #a7f3d0 60%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 22px rgba(16, 185, 129, 0.35));
}

.summary-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

/* ==========================================================================
   WIDOCZNY FOCUS + WYŁĄCZANIE RUCHU
   ========================================================================== */
.btn:focus-visible,
.nav-item:focus-visible,
.cal-day:focus-visible,
.lang-btn:focus-visible,
.user-badge:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

body.fx-off .aurora-blob,
body.fx-off .aurora-ribbon,
body.fx-off .ecg-glow,
body.fx-off .ring-head-halo,
body.fx-off .ring-progress,
body.fx-off .live-money,
body.fx-off .pulse-ring::after,
body.fx-off .status-pill .pulse-dot {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.fx-force) .aurora-blob,
  body:not(.fx-force) .aurora-ribbon,
  body:not(.fx-force) .ecg-glow,
  body:not(.fx-force) .ring-head-halo,
  body:not(.fx-force) .ring-progress,
  body:not(.fx-force) .live-money,
  body:not(.fx-force) .pulse-ring::after,
  body:not(.fx-force) .status-pill .pulse-dot {
    animation: none !important;
  }
  body:not(.fx-force) .aurora-tone { transition: none; }
}

body.fx-off .nav-ripple { display: none; }


/* ==========================================================================
   POWIADOMIENIA W APLIKACJI (TOAST)
   ========================================================================== */
.toast {
  --toast-solid: #38bdf8;
  --toast-glow: rgba(56, 189, 248, 0.5);
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 50%;
  width: min(calc(100% - 28px), 400px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 14px 11px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
              rgba(11, 17, 34, 0.86);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6),
              0 0 26px -6px var(--toast-glow),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  z-index: 100000;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -140%);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.5, 1), opacity 0.25s ease;
  cursor: pointer;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.t-success { --toast-solid: #34d399; --toast-glow: rgba(16, 185, 129, 0.55); }
.toast.t-info { --toast-solid: #38bdf8; --toast-glow: rgba(56, 189, 248, 0.5); }
.toast.t-warn { --toast-solid: #fbbf24; --toast-glow: rgba(245, 158, 11, 0.5); }
.toast.t-error { --toast-solid: #f87171; --toast-glow: rgba(239, 68, 68, 0.5); }

.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--toast-solid);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.toast-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-body { min-width: 0; flex: 1; text-align: left; }

.toast-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.toast-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.35;
}

.toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--toast-solid);
  opacity: 0.85;
  transform-origin: left center;
}

.toast.show .toast-bar { animation: toastBar var(--toast-ms, 3200ms) linear forwards; }

@keyframes toastBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

body.fx-off .toast { transition: opacity 0.2s ease; transform: translate(-50%, 0); }
body.fx-off .toast-bar { animation: none !important; }

/* ==========================================================================
   NFC: TAG PRZYPISANY DO UŻYTKOWNIKA
   ========================================================================== */
.nfc-assign {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.nfc-assign-title {
  font-size: 13px;
  font-weight: 700;
  color: #7dd3fc;
  margin-bottom: 6px;
}

.nfc-assign-url {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: #e2e8f0;
  word-break: break-all;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  margin-bottom: 8px;
}

.nfc-assign-hint {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}

/* Tryb "Efekty wyłączone": bez rozmycia kart (lżej dla GPU), karty prawie pełne */
body.fx-off .glass-card,
body.fx-off .bottom-nav {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.fx-off .glass-card { background: linear-gradient(165deg, rgba(16, 25, 48, 0.9) 0%, rgba(9, 15, 31, 0.95) 100%); }
body.fx-off .bottom-nav { background: rgba(10, 16, 32, 0.94); }

/* Stopka: ten sam napis co w górnym pasku */
.footer-brand {
  display: inline-block;
  padding-right: 4px;
}
