/*!********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/styles/globals.css ***!
  \********************************************************************************************************************************************************************************************************************************************************************/
/* ===========================================================
   TurboFlow — paleta i style bazowe.
   Jasny, powściągliwy interfejs (wzorzec: panele biznesowe).
   Kolory zdefiniowane centralnie — zmiana tu zmienia całość.
   =========================================================== */
:root {
  /* Tła i powierzchnie */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f1f3f5;

  /* Obramowania (1px, jasnoszare — zamiast cieni) */
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  /* Tekst */
  --text: #1a1a1a;
  --muted: #6b7280;
  --subtle: #9ca3af;

  /* Akcent — czerwień z logo. Używana OSZCZĘDNIE. */
  --accent: #e30613;
  --accent-hover: #c20510;
  --accent-weak: #fdeaec;

  /* Sygnały statusów (powściągliwe: szarości + czerwień do krytycznych) */
  --ok: #374151;
  --warn: #6b7280;
  --err: #e30613;

  /* Geometria */
  --radius: 6px;
  --radius-lg: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}
h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.muted {
  color: var(--muted);
}

/* ── Nawigacja ─────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.nav .brand {
  display: inline-flex;
  align-items: center;
  margin-right: 0.75rem;
}
.nav .brand img {
  height: 26px;
  width: auto;
  display: block;
}
.nav a.link {
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a.link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav a.link.active {
  color: var(--accent);
  background: var(--accent-weak);
}
.nav .spacer {
  flex: 1 1;
}

/* ── Karty / panele ────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1rem;
}

/* ── Kafelki ───────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
  margin-top: 1rem;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.tile:hover {
  border-color: var(--border-strong);
}
.tile .value {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tile .label {
  color: var(--muted);
  font-size: 0.88rem;
}
.tile.warn .value {
  color: var(--warn);
}
.tile.err .value {
  color: var(--err);
}

/* ── Formularze ────────────────────────────────────── */
.field {
  margin-bottom: 0.9rem;
}
.field label {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: var(--subtle);
}
textarea {
  min-height: 90px;
  resize: vertical;
}

/* ── Przyciski ─────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.btn:hover {
  background: var(--surface-2);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent-hover);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* Duże przyciski (widok mobilny na hali) */
.btn.big {
  padding: 0.95rem;
  font-size: 1.05rem;
  width: 100%;
}
.btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  grid-gap: 0.6rem;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

/* ── Tabela ────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th,
td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--surface-2);
}
tbody tr:last-child td {
  border-bottom: none;
}
tr.row:hover {
  background: var(--surface-2);
  cursor: pointer;
}

/* ── Filtry ────────────────────────────────────────── */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 0.6rem;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* ── Badge / etykiety statusu ──────────────────────── */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.78rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.badge.ok {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.badge.warn {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}
.badge.err {
  background: var(--accent-weak);
  color: var(--accent);
  border-color: transparent;
  font-weight: 600;
}

/* ── Komunikaty ────────────────────────────────────── */
.alert {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  margin: 0.75rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.alert.error {
  background: var(--accent-weak);
  color: var(--accent-hover);
  border-color: #f5c2c7;
}
.alert.success {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.stack > * + * {
  margin-top: 0.5rem;
}
.dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-gap: 0.45rem 1rem;
  gap: 0.45rem 1rem;
  font-size: 0.92rem;
}
.dl dt {
  color: var(--muted);
}

/* ── Logowanie ─────────────────────────────────────── */
.login-wrap {
  max-width: 360px;
  margin: 9vh auto 0;
  padding: 1rem;
}
.login-wrap .brand-logo {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 auto 1.5rem;
}

.center-muted {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

/* ── Etykiety do druku ─────────────────────────────── */
.label-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  padding: 1rem;
}
.label {
  border: 1px solid #000;
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  gap: 10px;
  page-break-inside: avoid;
  break-inside: avoid;
}
.label .info {
  flex: 1 1;
}
.label .tray {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}
.label .turbo {
  font-size: 1rem;
}
.label img {
  width: 96px;
  height: 96px;
}

@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .label-sheet {
    padding: 0;
  }
}

/* ── TurboWiki: krytyczne ostrzeżenie ──────────────── */
.critical {
  background: var(--accent-weak);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  color: var(--accent-hover);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}
.critical .ctitle {
  display: block;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.critical .ctext {
  white-space: pre-wrap;
  font-weight: 600;
}

