﻿:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
  background: #020617;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.20), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #08111f 50%, #111827 100%);
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; font-weight: 900; }
.hidden { display: none !important; }

.auth-page,
.app-page {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.card,
.login-box,
.panel,
.stat,
.report,
.menu-card {
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025)), rgba(8,13,22,.82);
  box-shadow: 0 30px 90px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 28px;
}

.login-box {
  width: min(100%, 480px);
  padding: 30px;
  display: grid;
  gap: 16px;
}

.logo {
  width: min(260px, 100%);
  max-height: 72px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}

.center { text-align: center; }
h1, h2, h3, p { margin-top: 0; }

.kicker {
  margin: 0 0 10px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .82rem;
  font-weight: 900;
}

.muted, small, .meta, p { color: #cbd5e1; }

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #e2e8f0;
}

input, textarea, select {
  width: 100%;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.68);
  color: #f8fafc;
  border-radius: 18px;
  padding: 15px 16px;
  outline: none;
}

textarea { min-height: 130px; resize: vertical; }

.primary,
.secondary,
.red,
.green,
.danger,
.nav-btn,
.menu-item {
  border-radius: 18px;
  transition: transform .08s ease;
}

button:active { transform: scale(.985); }

.primary {
  padding: 15px 20px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.secondary {
  padding: 14px 18px;
  color: #e2e8f0;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(148,163,184,.18);
}

.green {
  padding: 12px 14px;
  color: white;
  background: linear-gradient(135deg, #22c55e, #15803d);
}

.danger {
  padding: 12px 14px;
  color: white;
  background: linear-gradient(135deg, #ef4444, #991b1b);
}

.red {
  width: 100%;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 24px;
  color: white;
  background: radial-gradient(circle at top left, rgba(255,255,255,.22), transparent 34%), linear-gradient(135deg, #ef4444, #dc2626 55%, #991b1b);
  box-shadow: 0 24px 52px rgba(239,68,68,.28), inset 0 1px 0 rgba(255,255,255,.18);
  font-size: clamp(1.25rem, 4vw, 1.8rem);
}

.red span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 2rem;
}

.error {
  padding: 12px 14px;
  border-radius: 16px;
  color: #fecaca;
  background: rgba(239,68,68,.13);
  border: 1px solid rgba(239,68,68,.28);
  font-weight: 800;
}

.app-page { padding: 24px 0 112px; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

.header-logo {
  width: 148px;
  max-height: 40px;
  object-fit: contain;
}

.header h1 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  margin: 0;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.userbox span {
  color: #dbeafe;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(59,130,246,.12);
}

.content {
  display: grid;
  gap: 22px;
  animation: enter .14s ease-out both;
}

.panel { padding: 24px; }

.big-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  margin-bottom: 14px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.stat { padding: 18px; }
.stat span { display: block; color: #cbd5e1; margin-bottom: 8px; }
.stat strong { display: block; font-size: 2rem; line-height: 1; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.list { display: grid; gap: 14px; }

.report {
  padding: 18px;
  animation: enter .14s ease-out both;
}

.report-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: .94rem;
}

.status {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .82rem;
  font-weight: 900;
}

.status-draft, .status-pending { color: #fcd34d; background: rgba(245,158,11,.15); }
.status-sent, .status-active, .status-approved { color: #93c5fd; background: rgba(59,130,246,.15); }
.status-rejected, .status-blocked { color: #fca5a5; background: rgba(239,68,68,.15); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.photo-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
  padding: 18px;
  border-radius: 22px;
  color: #f8fafc;
  background: rgba(255,255,255,.045);
  border: 1px dashed rgba(148,163,184,.35);
}

.photo-btn > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(239,68,68,.14);
  font-size: 1.5rem;
}

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

.photo-preview {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.045);
}

.photo-preview img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  display: block;
}

.photo-preview small {
  display: block;
  padding: 8px;
  font-size: .72rem;
  word-break: break-word;
}

.photo-mini {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.photo-mini img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 50;
  width: min(560px, calc(100% - 24px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 9px;
  border-radius: 26px;
  background: rgba(8,13,22,.88);
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 18px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}

.nav-btn {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: #cbd5e1;
  background: transparent;
}

.nav-btn span { font-size: 1.28rem; line-height: 1; }
.nav-btn small { font-size: .74rem; font-weight: 900; color: inherit; }
.nav-btn.active { color: white; background: rgba(59,130,246,.18); }
.nav-btn.add { color: white; background: linear-gradient(135deg, #ef4444, #dc2626); }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2,6,23,.62);
  display: grid;
  place-items: end center;
  padding: 18px;
}

.menu-card {
  width: min(560px, 100%);
  padding: 18px;
  margin-bottom: 92px;
  animation: menuUp .14s ease-out both;
}

.menu-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

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

.menu-item {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 14px;
  color: #f8fafc;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
}

.menu-item span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(59,130,246,.15);
  font-size: 1.2rem;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2,6,23,.72);
}

.loader-card {
  width: min(100%, 320px);
  padding: 26px;
  border-radius: 26px;
  text-align: center;
  background: rgba(8,13,22,.94);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}

.spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.14);
  border-top-color: #ef4444;
  animation: spin .95s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 1000;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 28px));
  padding: 15px 18px;
  border-radius: 18px;
  color: white;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, rgba(34,197,94,.94), rgba(21,128,61,.94));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 60px rgba(0,0,0,.42);
}

.empty,
.hint {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.075);
  color: #cbd5e1;
  line-height: 1.5;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
}

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

@keyframes menuUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 720px) {
  .auth-page, .app-page { width: min(100% - 18px, 1120px); }
  .login-box, .panel, .stat, .report { border-radius: 24px; }
  .login-box, .panel { padding: 20px; }
  .header, .brand, .section-head, .report-top, .actions { flex-direction: column; align-items: flex-start; }
  .userbox { width: 100%; justify-content: space-between; }
  .grid-2, .grid-3, .grid-4, .photo-grid, .photo-mini { grid-template-columns: 1fr; }
  .actions button { width: 100%; }
}

/* =========================================================
   SUDUVERK v2 - szczegóły raportu / edycja / zdjęcia / mobile
   Dopisek bezpieczny na koniec style.css
========================================================= */

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.report {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.report:hover {
  transform: translateY(-1px);
}

.report-top {
  gap: 12px;
}

.report p {
  white-space: pre-wrap;
  line-height: 1.45;
}

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

.actions button {
  flex: 1 1 150px;
}

.status {
  white-space: nowrap;
}

.status-draft {
  background: rgba(255, 183, 3, .14);
  color: #b56b00;
  border-color: rgba(255, 183, 3, .35);
}

.status-sent {
  background: rgba(37, 99, 235, .12);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, .28);
}

.status-rejected {
  background: rgba(220, 38, 38, .12);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, .28);
}

.status-pending {
  background: rgba(245, 158, 11, .14);
  color: #92400e;
  border-color: rgba(245, 158, 11, .32);
}

.status-active {
  background: rgba(22, 163, 74, .12);
  color: #15803d;
  border-color: rgba(22, 163, 74, .28);
}

.status-blocked {
  background: rgba(220, 38, 38, .12);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, .28);
}

.error {
  border: 1px solid rgba(220, 38, 38, .22);
  background: rgba(220, 38, 38, .08);
  color: #991b1b;
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.4;
}

.hint {
  border: 1px solid rgba(37, 99, 235, .16);
  background: rgba(37, 99, 235, .07);
  color: #1e3a8a;
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.4;
}

.photo-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin: 14px 0 8px;
}

.photo-mini img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #f1f5f9;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.photo-mini img:hover {
  filter: brightness(.96);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.photo-preview {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .75);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
}

.photo-preview img {
  width: 100%;
  height: 125px;
  object-fit: cover;
  display: block;
}

.photo-preview small {
  display: block;
  padding: 9px 10px;
  word-break: break-word;
}

.photo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px;
  border-radius: 20px;
  border: 1px dashed rgba(185, 28, 28, .35);
  background: rgba(185, 28, 28, .045);
  color: inherit;
  cursor: pointer;
}

.photo-btn span {
  font-size: 2rem;
}

.photo-btn strong {
  display: block;
}

.photo-btn small {
  display: block;
  opacity: .72;
  margin-top: 2px;
}

.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}

.account-form textarea {
  min-height: 120px;
  resize: vertical;
}

.account-form input[type="number"] {
  appearance: textfield;
}

.account-form input[type="number"]::-webkit-outer-spin-button,
.account-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button.green {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: 0;
}

button.danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  border: 0;
}

button.primary,
button.secondary,
button.red,
button.green,
button.danger {
  min-height: 44px;
}

@media (max-width: 720px) {
  .section-head {
    flex-direction: column;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions button {
    width: 100%;
  }

  .photo-mini {
    grid-template-columns: repeat(3, 1fr);
  }

  .photo-mini img {
    height: 88px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-preview img {
    height: 118px;
  }

  .report-top {
    align-items: flex-start;
  }

  .report-top .status {
    align-self: flex-start;
  }

  .userbox {
    max-width: 100%;
  }

  .userbox span {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .photo-mini {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .big-title {
    font-size: 2rem;
  }
}

/* mały polish dla ekranów raportu */
.panel h3 {
  margin-top: 18px;
  margin-bottom: 10px;
}

.panel > p {
  line-height: 1.5;
}


/* =========================================================
   SUDUVERK v3 - panel kierownika / tabele / eksport
========================================================= */

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

.quick-row button {
  flex: 0 1 auto;
}

.manager-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.manager-card {
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255, 255, 255, .70);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.manager-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  background: white;
}

.manager-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.manager-table th {
  text-align: left;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(15, 23, 42, .58);
  background: rgba(15, 23, 42, .04);
  padding: 12px;
  white-space: nowrap;
}

.manager-table td {
  padding: 12px;
  border-top: 1px solid rgba(15, 23, 42, .08);
  vertical-align: top;
}

.manager-table tbody tr {
  cursor: pointer;
}

.manager-table tbody tr:hover {
  background: rgba(185, 28, 28, .035);
}

.manager-table td small {
  display: block;
  margin-top: 4px;
  color: rgba(15, 23, 42, .55);
}

.table-desc {
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.table-actions button {
  padding: 8px 10px;
  min-height: 36px;
  font-size: .86rem;
}

.worker-summary-list {
  display: grid;
  gap: 10px;
}

.worker-summary {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 16px;
  background: rgba(255, 255, 255, .75);
}

.worker-summary strong,
.worker-summary small {
  display: block;
}

.worker-summary small {
  margin-top: 3px;
  color: rgba(15, 23, 42, .58);
}

@media (max-width: 900px) {
  .manager-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .quick-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-row button {
    width: 100%;
  }

  .manager-card {
    padding: 12px;
    border-radius: 18px;
  }

  .manager-table {
    min-width: 680px;
  }
}

@media (max-width: 420px) {
  .quick-row {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   SUDUVERK v4 - urlopy + pracownicy
========================================================= */

.leave-card label textarea {
  margin-top: 8px;
  min-height: 86px;
}

.leave-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.leave-main > div,
.employee-meta > div {
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  padding: 12px;
}

.leave-main span,
.employee-meta span {
  display: block;
  font-size: .78rem;
  color: rgba(15, 23, 42, .58);
  margin-bottom: 4px;
}

.leave-main strong,
.employee-meta strong {
  display: block;
  font-size: .98rem;
}

.employee-card {
  position: relative;
}

.employee-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.employee-card .hint {
  margin-top: 12px;
}

[data-employee-card],
[data-leave-card] {
  animation: fadeInUp .16s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-approved {
  background: rgba(22, 163, 74, .12);
  color: #15803d;
  border-color: rgba(22, 163, 74, .28);
}

@media (max-width: 720px) {
  .leave-main,
  .employee-meta {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   SUDUVERK v5 - start screen / menu / mobile polish
========================================================= */

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(185, 28, 28, .16);
  background:
    radial-gradient(circle at top right, rgba(185, 28, 28, .12), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.68));
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.hero-panel p {
  max-width: 720px;
}

.manager-hero {
  border-color: rgba(15, 23, 42, .12);
  background:
    radial-gradient(circle at top right, rgba(15, 23, 42, .10), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.70));
}

.hero-main-btn {
  min-width: 210px;
  min-height: 76px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-main-btn span {
  font-size: 1.7rem;
}

.hero-badge {
  min-width: 160px;
  border-radius: 24px;
  padding: 18px;
  background: rgba(15, 23, 42, .88);
  color: white;
  box-shadow: 0 16px 35px rgba(15, 23, 42, .22);
}

.hero-badge span,
.hero-badge strong {
  display: block;
}

.hero-badge span {
  font-size: .78rem;
  opacity: .72;
  letter-spacing: .08em;
}

.hero-badge strong {
  font-size: 1.25rem;
  margin-top: 4px;
}

.stat-hot {
  border-color: rgba(185, 28, 28, .22);
  background: rgba(185, 28, 28, .07);
}

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

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

.quick-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 17px;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: rgba(255,255,255,.76);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  color: inherit;
  cursor: pointer;
  min-height: 94px;
}

.quick-tile:hover {
  transform: translateY(-1px);
}

.quick-tile span {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(185, 28, 28, .10);
  color: #991b1b;
  font-size: 1.45rem;
  flex: 0 0 auto;
}

.quick-tile strong,
.quick-tile small {
  display: block;
}

.quick-tile small {
  margin-top: 4px;
  color: rgba(15, 23, 42, .60);
  line-height: 1.25;
}

.quick-tile.main {
  border-color: rgba(185, 28, 28, .25);
  background: rgba(185, 28, 28, .07);
}

.menu-card-v5 {
  max-height: min(720px, calc(100vh - 28px));
  overflow-y: auto;
}

.menu-section {
  margin-top: 16px;
}

.menu-section > p {
  margin: 0 0 8px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(15, 23, 42, .52);
}

.menu-card-v5 .menu-grid {
  display: grid;
  gap: 10px;
}

.menu-logout {
  width: 100%;
  margin-top: 18px;
  min-height: 46px;
  border: 0;
  border-radius: 18px;
  background: rgba(15, 23, 42, .08);
  color: #0f172a;
  font-weight: 800;
}

@media (max-width: 900px) {
  .quick-grid,
  .worker-quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-main-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .quick-grid,
  .worker-quick {
    grid-template-columns: 1fr;
  }

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

  .quick-tile {
    min-height: 82px;
  }

  .hero-badge {
    width: 100%;
  }
}


/* =========================================================
   SUDUVERK v8 HOTFIX - spójne kolory i czytelność
========================================================= */

:root {
  --bg-main: #06142b;
  --bg-deep: #081a36;
  --bg-card: rgba(9, 20, 40, 0.92);
  --bg-card-2: rgba(13, 27, 52, 0.96);
  --bg-soft: rgba(255,255,255,0.06);
  --line: rgba(255,255,255,0.10);
  --line-2: rgba(255,255,255,0.16);
  --text: #f8fafc;
  --text-soft: rgba(248,250,252,0.78);
  --text-fade: rgba(248,250,252,0.58);
  --accent: #ef4444;
  --accent-2: #dc2626;
  --blue: #3b82f6;
  --violet: #7c3aed;
  --green: #16a34a;
  --yellow: #f59e0b;
}

html, body {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.12), transparent 25%),
    radial-gradient(circle at top left, rgba(124,58,237,0.08), transparent 20%),
    linear-gradient(180deg, #04101f 0%, #06142b 45%, #07182f 100%) !important;
  color: var(--text) !important;
}

body, button, input, textarea, select {
  color: var(--text);
}

.app-page,
.content {
  color: var(--text) !important;
}

.header {
  background: transparent !important;
  border-bottom: 0 !important;
  padding-bottom: 8px !important;
}

.header h1,
.header h2,
.header h3,
.brand h1,
.brand h2 {
  color: var(--text) !important;
}

.kicker {
  color: #93c5fd !important;
  letter-spacing: .08em;
  font-weight: 800;
}

.big-title {
  color: #ffffff !important;
}

.panel,
.report,
.manager-card,
.login-box,
.menu-card,
.menu-card-v5,
.hero-panel,
.quick-tile,
.stat,
.hours-row,
.worker-summary,
.leave-main > div,
.employee-meta > div,
.photo-preview {
  background: linear-gradient(135deg, rgba(8,20,43,0.94), rgba(10,25,48,0.96)) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22) !important;
}

.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(239,68,68,0.16), transparent 32%),
    linear-gradient(135deg, rgba(11,24,45,0.98), rgba(16,31,58,0.98)) !important;
}

.manager-hero {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.15), transparent 32%),
    linear-gradient(135deg, rgba(11,24,45,0.98), rgba(16,31,58,0.98)) !important;
}

.hero-panel p,
.hero-panel small,
.panel p,
.panel small,
.report p,
.report small,
.quick-tile small,
.worker-summary small,
.meta,
.meta span,
small {
  color: var(--text-soft) !important;
}

.quick-tile {
  min-height: 96px;
}

.quick-tile span {
  background: rgba(239,68,68,0.14) !important;
  color: #fca5a5 !important;
}

.quick-tile strong,
.menu-item strong,
.report strong,
.panel strong,
.stat strong {
  color: #ffffff !important;
}

.quick-tile.main {
  background:
    radial-gradient(circle at top right, rgba(239,68,68,0.16), transparent 35%),
    linear-gradient(135deg, rgba(30,12,27,0.98), rgba(26,17,45,0.98)) !important;
  border-color: rgba(239,68,68,0.28) !important;
}

.stat {
  min-height: 110px;
}

.stat span {
  color: var(--text-soft) !important;
}

.stat strong {
  color: #ffffff !important;
}

.stat-hot {
  background:
    radial-gradient(circle at top right, rgba(239,68,68,0.14), transparent 35%),
    linear-gradient(135deg, rgba(33,14,22,0.96), rgba(24,18,39,0.96)) !important;
  border-color: rgba(239,68,68,0.25) !important;
}

.report-top strong {
  color: #ffffff !important;
}

.table-desc,
.report p {
  color: var(--text-soft) !important;
}

input,
textarea,
select {
  background: rgba(2,10,24,0.92) !important;
  border: 1px solid rgba(148,163,184,0.18) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(248,250,252,0.42) !important;
}

label {
  color: #ffffff !important;
  font-weight: 700;
}

.hint {
  background: rgba(59,130,246,0.12) !important;
  color: #dbeafe !important;
  border: 1px solid rgba(59,130,246,0.18) !important;
}

.error {
  background: rgba(220,38,38,0.12) !important;
  color: #fecaca !important;
  border: 1px solid rgba(220,38,38,0.22) !important;
}

button,
.primary,
.secondary,
.red,
.green,
.danger,
.menu-logout,
.nav-btn {
  font-weight: 800 !important;
}

button.primary,
.primary {
  background: linear-gradient(135deg, var(--blue), var(--violet)) !important;
  color: white !important;
  border: 0 !important;
}

button.red,
.red,
.hero-main-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: white !important;
  border: 0 !important;
}

button.green,
.green {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: white !important;
  border: 0 !important;
}

button.danger,
.danger {
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  color: white !important;
  border: 0 !important;
}

button.secondary,
.secondary,
.menu-logout {
  background: rgba(255,255,255,0.06) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

button.secondary:hover,
.secondary:hover,
.menu-logout:hover,
.quick-tile:hover,
.nav-btn:hover {
  filter: brightness(1.08);
}

.photo-btn {
  background: rgba(239,68,68,0.08) !important;
  border: 1px dashed rgba(239,68,68,0.28) !important;
  color: #ffffff !important;
}

.photo-btn small {
  color: var(--text-soft) !important;
}

.photo-preview small {
  color: var(--text-soft) !important;
}

.bottom-nav {
  background: rgba(6,20,43,0.96) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25) !important;
}

.nav-btn {
  background: transparent !important;
  color: rgba(255,255,255,0.74) !important;
  border-radius: 18px !important;
}

.nav-btn span,
.nav-btn small {
  color: inherit !important;
}

.nav-btn.active {
  background: rgba(59,130,246,0.18) !important;
  color: #ffffff !important;
}

.nav-btn.add,
.nav-btn.add.active {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
}

.userbox {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
  border-radius: 18px !important;
  padding: 8px 10px !important;
}

.menu-item {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #ffffff !important;
}

.menu-item small {
  color: var(--text-soft) !important;
}

.menu-backdrop {
  background: rgba(0,0,0,0.45) !important;
}

.status {
  font-weight: 800;
}

.status-draft {
  background: rgba(245,158,11,0.15) !important;
  color: #fcd34d !important;
  border-color: rgba(245,158,11,0.22) !important;
}

.status-sent {
  background: rgba(59,130,246,0.14) !important;
  color: #93c5fd !important;
  border-color: rgba(59,130,246,0.22) !important;
}

.status-rejected {
  background: rgba(220,38,38,0.14) !important;
  color: #fca5a5 !important;
  border-color: rgba(220,38,38,0.22) !important;
}

.status-pending {
  background: rgba(245,158,11,0.14) !important;
  color: #fde68a !important;
  border-color: rgba(245,158,11,0.22) !important;
}

.status-active,
.status-approved {
  background: rgba(22,163,74,0.14) !important;
  color: #86efac !important;
  border-color: rgba(22,163,74,0.22) !important;
}

.status-blocked {
  background: rgba(220,38,38,0.14) !important;
  color: #fca5a5 !important;
  border-color: rgba(220,38,38,0.22) !important;
}

.manager-table-wrap {
  background: rgba(8,20,43,0.9) !important;
}

.manager-table th {
  background: rgba(255,255,255,0.05) !important;
  color: rgba(255,255,255,0.68) !important;
}

.manager-table td {
  color: var(--text) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
}

.manager-table tbody tr:hover {
  background: rgba(255,255,255,0.03) !important;
}

.empty {
  background: rgba(255,255,255,0.03) !important;
  color: var(--text-soft) !important;
  border: 1px dashed rgba(255,255,255,0.10) !important;
  border-radius: 16px;
  padding: 16px;
}

.auth-page .login-box {
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.14), transparent 30%),
    linear-gradient(135deg, rgba(11,24,45,0.97), rgba(16,31,58,0.97)) !important;
}

.auth-page p,
.auth-page small {
  color: var(--text-soft) !important;
}

.auth-page h1,
.auth-page h2,
.auth-page h3 {
  color: #ffffff !important;
}

@media (max-width: 720px) {
  .hero-panel {
    padding: 18px !important;
  }

  .stat {
    min-height: 92px;
  }

  .quick-tile {
    min-height: 84px;
  }
}


/* =========================================================
   SUDUVERK v9 HOTFIX - spacing / odstępy / formularze
========================================================= */

.content {
  gap: 20px !important;
}

.panel {
  padding: 22px !important;
}

.panel + .panel {
  margin-top: 0 !important;
}

.account-form {
  display: grid !important;
  gap: 16px !important;
}

.account-form > * {
  margin: 0 !important;
}

.account-form .grid-2,
.account-form .grid-3,
.account-form .grid-4 {
  margin: 0 !important;
  gap: 16px !important;
}

.account-form label {
  display: grid !important;
  gap: 8px !important;
  line-height: 1.35 !important;
}

.account-form input,
.account-form textarea,
.account-form select {
  margin: 0 !important;
}

.account-form textarea {
  min-height: 120px !important;
}

.hint,
.error {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 14px 16px !important;
  line-height: 1.45 !important;
}

.account-form .hint,
.account-form .error {
  margin-top: -2px !important;
}

.photo-btn {
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  min-height: 88px !important;
}

#photo-preview,
.photo-grid {
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}

.photo-grid .empty,
#photo-preview .empty {
  min-height: 82px;
  display: flex;
  align-items: center;
}

.actions {
  margin-top: 16px !important;
  gap: 12px !important;
}

.actions + .actions {
  margin-top: 12px !important;
}

.account-form button,
.actions button {
  margin: 0 !important;
}

button.red,
button.primary,
button.secondary,
button.green,
button.danger {
  min-height: 48px !important;
}

button.red {
  padding: 14px 18px !important;
}

.panel > button.red:last-child,
.account-form + button.red,
.account-form ~ button.red {
  margin-top: 8px !important;
}

.report {
  padding: 18px !important;
}

.report p,
.report small,
.report .meta {
  margin-top: 8px !important;
}

.report .actions {
  margin-top: 16px !important;
}

.section-head {
  margin-bottom: 18px !important;
}

.grid-2,
.grid-3,
.grid-4,
.quick-grid,
.worker-quick {
  gap: 16px !important;
}

.leave-main,
.employee-meta {
  gap: 12px !important;
  margin-top: 14px !important;
  margin-bottom: 14px !important;
}

.menu-card,
.menu-card-v5 {
  padding: 18px !important;
}

.menu-grid {
  gap: 10px !important;
}

.bottom-nav {
  padding: 8px !important;
}

.nav-btn {
  min-height: 62px !important;
}

.auth-page .login-box form {
  display: grid !important;
  gap: 16px !important;
}

.auth-page .grid-2 {
  gap: 12px !important;
}

/* logout mniej agresywny i z odstępem */
.account-logout-btn,
button.logout-btn {
  margin-top: 10px !important;
  min-height: 56px !important;
  font-size: 1.05rem !important;
}

/* bezpieczny fallback dla ostatniego czerwonego przycisku w panelu konta */
.panel button.red:last-of-type {
  margin-top: 10px !important;
  min-height: 56px !important;
  font-size: 1.05rem !important;
}

/* mobile */
@media (max-width: 720px) {
  .panel {
    padding: 18px !important;
  }

  .account-form,
  .account-form .grid-2,
  .account-form .grid-3,
  .account-form .grid-4,
  .grid-2,
  .grid-3,
  .grid-4 {
    gap: 14px !important;
  }

  .actions {
    gap: 10px !important;
  }

  .photo-btn {
    min-height: 78px !important;
  }

  .panel button.red:last-of-type {
    min-height: 52px !important;
    font-size: 1rem !important;
  }
}

