/* Klasyczny układ Majami — odświeżony bez zmiany sposobu pracy. */
:root {
  --navy: #102a43;
  --navy-2: #1c4768;
  --cream: #f3f7f8;
  --gold: #d3a347;
  --gold-dark: #9b6819;
  --line: #d9e5eb;
  --shadow: 0 12px 30px rgba(18, 51, 74, .07);
}

body {
  background:
    radial-gradient(circle at 92% -5%, rgba(150, 214, 204, .2), transparent 28%),
    var(--cream);
}

.topbar {
  min-height: 80px;
  height: auto;
  gap: 16px;
  padding: 11px max(24px, calc((100vw - 1360px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(112deg, #0e2841, #164963);
  box-shadow: 0 5px 22px rgba(11, 31, 52, .2);
}

.brand-home { cursor: pointer; }
.brand-logo { width: 100px; max-height: 52px; object-fit: contain; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand span { color: #c7d8e1; }
.topbar .department-control label {
  color: #fff !important;
  opacity: 1;
  text-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.topbar .department-control select,
.topbar .department-control select:disabled {
  min-width: 158px;
  border: 1px solid #78aebb !important;
  border-radius: 9px;
  appearance: none;
  padding-right: 34px;
  background-color: #23627f !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'/%3E%3C/svg%3E") !important;
  background-position: right 10px center !important;
  background-repeat: no-repeat !important;
  color: #fff !important;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 7px rgba(0,0,0,.16);
}
.topbar .department-control select:disabled {
  cursor: not-allowed;
}
.topbar .department-control select option { background: #fff; color: #102a43; }

.topbar nav { align-items: center; gap: 4px; }
.nav-btn,
.bird-nav-btn,
.global-nav-btn {
  height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px;
  transition: background .16s ease, color .16s ease;
}
.nav-btn:hover,
.nav-btn.active,
.bird-nav-btn:hover,
.bird-nav-btn.active,
.global-nav-btn:hover,
.global-nav-btn.active {
  border-bottom: 0;
  background: rgba(255,255,255,.13);
  color: #fff;
}

main { max-width: 1360px; padding: 36px 26px 72px; }
.page-heading {
  margin-bottom: 24px;
  padding: 23px 26px;
  border: 1px solid #dbe7ec;
  border-radius: 16px;
  background: linear-gradient(122deg, #fff, #f6fbfc);
  box-shadow: 0 10px 26px rgba(18,51,74,.055);
}
.page-heading h1 { letter-spacing: -.018em; }

.panel,
.production-card,
.history-card,
.overview-day-card,
.temperature-round-card {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.header-panel,
.attachment-panel,
.filters,
.index-form { padding: 24px; }
.production-card { overflow: hidden; }
.card-head { padding: 14px 19px; background: linear-gradient(115deg, #f5fafb, #eef5f7); }
.row-number { background: linear-gradient(145deg, #1a765f, #164a67); }

input,
select,
textarea {
  border-color: #c7d7df;
  border-radius: 9px;
  background: #fcfeff;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #187d76;
  box-shadow: 0 0 0 3px rgba(24,125,118,.13);
  background: #fff;
}

.btn { min-height: 39px; border-radius: 9px; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #147d78, #0e6069); box-shadow: 0 6px 14px rgba(16,111,111,.16); }
.btn.primary:hover { background: linear-gradient(135deg, #106c69, #0b535d); }
.btn.secondary { border-color: #b8ccd6; background: #fff; }

.section-title { margin-top: 30px; }
.stats-grid article { border-radius: 14px; background: linear-gradient(145deg, #153f61, #102a43); box-shadow: var(--shadow); }
.overview-filters,
.filters { border-radius: 14px; }
.table-wrap { border-radius: 14px; }
th { background: #edf5f7; color: #486274; }
tr:hover td { background: #fbfdfd; }

.reporting-area-popover { border-radius: 13px; box-shadow: 0 18px 36px rgba(15, 46, 69, .2); }
.reporting-area-popover button { border-radius: 9px; }

.home-dashboard-view { max-width: 1360px; }
.home-dashboard-hero { background: linear-gradient(122deg, #102a43, #1b5c69); }
.home-dashboard-section { border-radius: 16px; }
.home-quick-card,
.home-report-card { border-radius: 12px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.home-quick-card:hover,
.home-report-card:hover { transform: translateY(-2px); box-shadow: 0 12px 23px rgba(17,58,80,.11); }

/* Formularze raportowe: białe pola uzupełnia lider, szare są wyliczane przez system. */
#report-form,
#cow-packing-report-form,
#bird-report-form,
#sesame-report-form,
#sesame-packing-report-form {
  padding: 18px;
  border: 1px solid #d2e0e6;
  border-radius: 18px;
  background: #e8f0f3;
}

#report-form input[readonly],
#report-form textarea[readonly],
#report-form select:disabled,
#cow-packing-report-form input[readonly],
#cow-packing-report-form textarea[readonly],
#cow-packing-report-form select:disabled,
#bird-report-form input[readonly],
#bird-report-form textarea[readonly],
#bird-report-form select:disabled,
#sesame-report-form input[readonly],
#sesame-report-form textarea[readonly],
#sesame-report-form select:disabled,
#sesame-packing-report-form input[readonly],
#sesame-packing-report-form textarea[readonly],
#sesame-packing-report-form select:disabled {
  border-color: #c7d4da !important;
  background: #e3eaed !important;
  color: #536571 !important;
  box-shadow: inset 0 1px 2px rgba(33, 62, 77, .06);
  cursor: not-allowed;
}

#report-form input[readonly]::placeholder,
#cow-packing-report-form input[readonly]::placeholder,
#bird-report-form input[readonly]::placeholder,
#sesame-report-form input[readonly]::placeholder,
#sesame-packing-report-form input[readonly]::placeholder {
  color: #6e808b;
  opacity: 1;
}

#report-form input[readonly]:focus,
#cow-packing-report-form input[readonly]:focus,
#bird-report-form input[readonly]:focus,
#sesame-report-form input[readonly]:focus,
#sesame-packing-report-form input[readonly]:focus {
  border-color: #c7d4da !important;
  box-shadow: inset 0 1px 2px rgba(33, 62, 77, .06) !important;
}

/* Kafle strony startowej: spójna paleta niebieska, bez zmiany ich funkcji. */
.home-quick-card,
.home-report-card {
  border-color: rgba(126, 186, 208, .58);
  color: #fff;
  box-shadow: 0 9px 20px rgba(20, 59, 84, .13);
}
.home-quick-card { background: linear-gradient(145deg, #164665, #1e6680); }
.home-quick-card:nth-child(2) { background: linear-gradient(145deg, #1d5274, #2c7892); }
.home-quick-card:nth-child(3) { background: linear-gradient(145deg, #24476e, #2e668e); }
.home-quick-card:nth-child(4) { background: linear-gradient(145deg, #153e5d, #27647c); }
.home-report-card { background: linear-gradient(145deg, #174461, #215f78); }
.home-report-card:nth-child(2),
.home-report-card:nth-child(5) { background: linear-gradient(145deg, #1c5370, #2a7187); }
.home-report-card:nth-child(3),
.home-report-card:nth-child(6) { background: linear-gradient(145deg, #1f496c, #2b6387); }
.home-report-card:nth-child(4) { background: linear-gradient(145deg, #193c61, #255d7e); }
.home-quick-card:hover,
.home-report-card:hover {
  border-color: #b4e1e6;
  box-shadow: 0 15px 28px rgba(17, 58, 83, .23);
}
.home-quick-card b,
.home-report-card b { color: #fff; }
.home-quick-card small,
.home-report-card small { color: #d7eaf0; }
.home-quick-card em,
.home-report-card em { color: #9ee2e4; }
.home-quick-icon,
.home-quick-card:nth-child(n) .home-quick-icon {
  background: rgba(255,255,255,.16);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}

@media (max-width: 1100px) {
  .topbar { padding-right: 20px; padding-left: 20px; flex-wrap: wrap; }
  .topbar nav { order: 4; width: 100%; overflow-x: auto; }
}

@media (max-width: 700px) {
  main { padding: 24px 14px 52px; }
  .topbar { position: static; padding: 13px 15px; }
  .brand-logo { width: 82px; }
  .department-control { flex: 1; }
  .department-control select { min-width: 0; }
  .page-heading { padding: 18px; border-radius: 13px; }
  .panel,
  .production-card,
  .history-card { border-radius: 13px; }
  .header-panel,
  .attachment-panel,
  .filters,
  .index-form { padding: 17px; }
  #report-form,
  #cow-packing-report-form,
  #bird-report-form,
  #sesame-report-form,
  #sesame-packing-report-form { padding: 9px; border-radius: 14px; }
}
