
@font-face {
  font-family: "Futura PL";
  src: url("../fonts/FuturaPL-Book.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Futura PL";
  src: url("../fonts/FuturaPL-Demi.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  font-family:
    "Futura PL",
    Futura,
    "Trebuchet MS",
    Arial,
    sans-serif;

  color: #2f3028;
  background: #ffffff;

  --olive: #9ba437;
  --olive-dark: #747c24;
  --cream: #f5f4ef;
  --ink: #303126;
  --muted: #747568;
  --line: #dddccf;
  --white: #ffffff;
  --danger: #a53a32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e6e4da;
}

.header-inner {
  position: relative;
  max-width: 1240px;
  min-height: 112px;
  margin: 0 auto;
  padding: 16px 24px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-link img {
  display: block;
  width: 210px;
  height: 78px;
  object-fit: contain;
  object-position: center;
}

.main-nav {
  position: absolute;
  right: 24px;

  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  color: #56574c;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.main-nav a:hover {
  color: var(--olive-dark);
}

.page-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 24px 70px;
}

.search-hero,
.admin-heading {
  max-width: 780px;
  padding: 28px 0 30px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.search-hero h1,
.admin-heading h1 {
  margin: 0 0 14px;
  color: #3c3d32;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
}

.search-hero p,
.admin-heading p,
.muted {
  color: var(--muted);
  line-height: 1.6;
}

.search-panel,
.card {
  margin-bottom: 24px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(67, 68, 51, 0.07);
}

.search-panel {
  max-width: 860px;
  border-top: 5px solid var(--olive);
}

label {
  display: block;
  margin-bottom: 9px;
  color: #55564b;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input,
select {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #cbcabc;
  background: #ffffff;
  color: #34352d;
  font-size: 16px;
  border-radius: 0;
}

input:focus,
select:focus {
  outline: 2px solid rgba(155, 164, 55, 0.22);
  border-color: var(--olive);
}

.suggestions {
  display: block;
  margin-top: 6px;
  max-height: 360px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #deddd3;
}

.suggestions:empty {
  display: none;
}

.suggestion-button {
  display: block;
  width: 100%;
  padding: 11px 15px;

  border: 0;
  border-bottom: 1px solid #ecebe4;
  border-radius: 0;

  background: #ffffff;
  color: #303126 !important;

  text-align: left;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.suggestion-button:last-child {
  border-bottom: 0;
}

.suggestion-button:hover,
.suggestion-button:focus {
  background: #f4f5e9;
  color: #303126 !important;
  outline: none;
}

.suggestion-button:active {
  background: #ecefdc;
}

@media (max-width: 600px) {
  .suggestions {
    max-height: 320px;
  }

  .suggestion-button {
    padding: 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 400;
    color: #303126 !important;
  }
}

.search-status {
  margin-bottom: 0;
}

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

.section-heading h2,
.card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 400;
}

.result-heading {
  align-items: flex-start;
}

.updated-at {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

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

.stock-value {
  min-height: 130px;
  padding: 20px;
  border: 1px solid var(--line);
  background: #faf9f5;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stock-value > span,
.stock-value > label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stock-value strong {
  display: block;
  font-size: 32px;
  font-weight: 400;
}

.stock-value small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.quantity-selector select {
  margin-top: auto;
}

.inventory-notice {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer {
  margin-top: 30px;
  background: #ffffff;
  border-top: 1px solid #e6e4da;
}

.footer-inner {
  max-width: 1240px;
  min-height: 120px;
  margin: 0 auto;
  padding: 24px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.footer-logo {
  width: 120px;
  height: 54px;
  object-fit: contain;
}

.footer-copy {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.footer-copy strong {
  color: var(--ink);
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 24px;
}

.two-cols {
  grid-template-columns: 1fr 1fr;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.primary,
.secondary {
  padding: 14px 20px;
  border: 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.primary {
  background: var(--olive);
  color: #ffffff;
}

.primary:hover {
  background: var(--olive-dark);
}

.secondary {
  background: #4d4e43;
  color: #ffffff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--olive);
}

.stat-card span {
  display: block;
  color: #77786d;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 38px;
  font-weight: 400;
}

.filter-bar {
  display: grid;
  grid-template-columns:
    minmax(220px, 1fr)
    180px
    190px
    auto
    auto;
  gap: 10px;
  align-items: center;
  margin: 18px 0 22px;
}

.filter-bar.compact {
  grid-template-columns:
    minmax(260px, 1fr)
    auto
    auto;
}

.text-link {
  color: var(--olive-dark);
  text-decoration: none;
  font-weight: 600;
}

.tablecard {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 13px;
  border-bottom: 1px solid #e9e8df;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #faf9f5;
  color: #747568;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cell-subtitle {
  margin-top: 4px;
  color: #8a8b7e;
  font-size: 12px;
}

.status-pill,
.activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill.active {
  background: #edf3df;
  color: #5d6a20;
}

.status-pill.blocked {
  background: #f5e5e2;
  color: #9a362d;
}

.activity-badge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #bbbbbb;
}

.activity-badge.high {
  background: #e4f1dc;
  color: #3e6b2d;
}

.activity-badge.high i {
  background: #4d922f;
}

.activity-badge.medium {
  background: #f1efcf;
  color: #746d19;
}

.activity-badge.medium i {
  background: #a79a25;
}

.activity-badge.low {
  background: #f2eadf;
  color: #885f2a;
}

.activity-badge.low i {
  background: #bd8137;
}

.activity-badge.none {
  background: #ededeb;
  color: #72736d;
}

.actions {
  display: flex;
  gap: 7px;
}

.small-button {
  padding: 8px 10px;
  border: 1px solid #cccbc0;
  background: #ffffff;
  cursor: pointer;
}

.dangerbtn {
  color: var(--danger);
}

.bar-track {
  width: 170px;
  height: 10px;
  background: #ecece2;
}

.bar-track span {
  display: block;
  height: 100%;
  background: var(--olive);
}

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-left: 5px solid;
}

.alert.success {
  background: #edf4e4;
  border-color: #73902c;
}

.alert.danger {
  background: #f7e7e4;
  border-color: #a53a32;
}

.alert.warning {
  background: #fbf3d5;
  border-color: #b1902d;
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 34px;
  color: #88897f;
  text-align: center;
}

.narrow {
  max-width: 500px;
  margin: 55px auto;
}

.narrow h1 {
  font-size: 36px;
  font-weight: 400;
}

.narrow form {
  display: grid;
  gap: 14px;
}

.narrow label {
  margin: 0;
}

.narrow .primary {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .stock-summary,
  .two-cols,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .filter-bar.compact {
    grid-template-columns: 1fr;
  }

  .main-nav {
    position: static;
    margin-top: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-inner {
    flex-direction: column;
  }

  .updated-at {
    text-align: left;
  }

  .result-heading {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .page-shell {
    padding: 22px 14px 50px;
  }

  .header-inner {
    min-height: 92px;
    padding: 10px 14px;
  }

  .brand-link img {
    width: 170px;
    height: 68px;
  }

  .main-nav {
    gap: 14px;
  }

  .main-nav a {
    font-size: 11px;
  }

  .search-panel,
  .card {
    padding: 18px;
  }

  .search-hero h1,
  .admin-heading h1 {
    font-size: 38px;
  }

  .suggestion-button {
    color: var(--ink) !important;
    font-size: 16px;
  }

  .stock-value {
    min-height: auto;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  th,
  td {
    padding: 11px 9px;
  }
}

.search-hero {
  max-width: 780px;
  padding: 24px 0 26px;
}

.search-hero h1 {
  margin: 0 0 12px;
}

.search-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-panel {
  max-width: 860px;
}

.search-input-wrap input {
  width: 100%;
}

.search-status {
  margin: 10px 0 0;
  min-height: 22px;
}

/* Zwykła lista, nie tabela */
.suggestions {
  display: block;
  margin-top: 6px;
  max-height: 360px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
}

.suggestions:empty {
  display: none;
}

.suggestion-button {
  display: block;
  width: 100%;
  padding: 12px 15px;

  border: 0;
  border-bottom: 1px solid #ecebe4;
  border-radius: 0;

  background: #ffffff;
  color: var(--ink) !important;

  text-align: left;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;

  box-shadow: none;
}

.suggestion-button:last-child {
  border-bottom: 0;
}

.suggestion-button:hover,
.suggestion-button:focus {
  background: #f4f5e9;
  color: var(--ink) !important;
  outline: none;
}

.suggestion-button:active {
  background: #ecefdc;
}

/* Wynik */
.result-card {
  max-width: 860px;
  scroll-margin-top: 12px;
}

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

.result-title h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
}

.updated-at {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.stock-summary {
  display: grid;
  grid-template-columns:
    minmax(210px, 0.8fr)
    minmax(280px, 1.2fr);
  gap: 14px;
}

.stock-value {
  min-height: 126px;
  padding: 18px;

  border: 1px solid var(--line);
  background: #faf9f5;
}

.stock-value > span {
  display: block;
  margin-bottom: 10px;

  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-stock {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.current-stock strong {
  display: block;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.1;
}

.deliveries-card {
  min-height: 126px;
}

.deliveries-list {
  display: grid;
  gap: 0;
}

.delivery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 8px 0;
  border-bottom: 1px solid #e5e4dc;
}

.delivery-row:last-child {
  border-bottom: 0;
}

.delivery-date {
  color: var(--muted);
  font-size: 14px;
}

.delivery-quantity {
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
}

.inventory-notice {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .page-shell {
    padding-top: 12px;
  }

  .search-hero {
    padding: 5px 0 10px;
  }

  .search-hero .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .search-hero h1 {
    margin-bottom: 5px;
    font-size: 27px;
    line-height: 1.12;
  }

  .search-hero p {
    font-size: 13px;
    line-height: 1.35;
  }

  .search-panel {
    margin-bottom: 10px;
    padding: 12px;
  }

  .search-panel label {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .search-input-wrap input {
    padding: 10px 11px;
    font-size: 16px;
  }

  .search-status {
    margin-top: 6px;
    min-height: 18px;
    font-size: 12px;
  }

  .suggestions {
    max-height: 280px;
  }

  .suggestion-button {
    padding: 10px 11px;
    color: var(--ink) !important;
    text-align: left;
    font-size: 14px;
    line-height: 1.3;
  }

  .result-card {
    padding: 12px;
  }

  .result-top {
    display: block;
    margin-bottom: 9px;
  }

  .result-title .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .result-title h2 {
    font-size: 20px;
    line-height: 1.2;
  }

  .updated-at {
    margin-top: 5px;
    font-size: 11px;
    text-align: left;
  }

  .stock-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stock-value {
    min-height: auto;
    padding: 11px 12px;
  }

  .stock-value > span {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .current-stock strong {
    font-size: 30px;
  }

  .delivery-row {
    padding: 5px 0;
  }

  .delivery-date {
    font-size: 12px;
  }

  .delivery-quantity {
    font-size: 16px;
  }

  .inventory-notice {
    margin-top: 9px;
    font-size: 11px;
    line-height: 1.35;
  }
}

.inventory-notices {
  margin-top: 18px;
}

.inventory-notices .inventory-notice {
  margin: 5px 0 0;
}

.delivery-row-without-date {
  justify-content: flex-end;
}

.site-footer {
    margin-top: 48px;
    padding: 24px 0;
    text-align: center;
    border-top: 1px solid #e6e6e6;
}

.footer-logout {
    color: #8a8a8a;
    font-size: 13px;
    text-decoration: none;
}

.footer-logout:hover {
    text-decoration: underline;
}