/* Eggfinity Farms v4 additions */
.production-toolbar,.action-toolbar { margin-bottom: 16px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.production-date-field { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 700; }
.production-date-field input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #f8faf8; font-size: 10px; }
.danger-btn { min-height: 38px; padding: 9px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #efd0ca; border-radius: 9px; color: #9c3d32; background: #fff8f6; font-size: 9px; font-weight: 700; cursor: pointer; }
.danger-btn:hover { color: #fff; background: #a94739; }
.danger-btn svg,.mini-danger svg { width: 14px; height: 14px; }
.mini-danger { min-height: 28px; padding: 5px 8px; border: 1px solid #efd0ca; border-radius: 7px; color: #9c3d32; background: #fff8f6; font-size: 8px; font-weight: 700; cursor: pointer; }
.collection-section + .collection-section { margin-top: 16px; }
.collection-section .card-head { gap: 14px; }
.flock-label { display: inline-flex; align-items: center; gap: 6px; color: var(--green-700); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.flock-label svg { width: 14px; }
.batch-entry-grid.two-batches { grid-template-columns: repeat(2,minmax(0,1fr)); }
.collection-batch-wrap { position: relative; }
.collection-batch-wrap .collection-batch { width: 100%; }
.collection-delete { position: absolute; top: 9px; right: 9px; z-index: 2; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #efd0ca; border-radius: 8px; color: #9c3d32; background: #fff; cursor: pointer; }
.collection-delete svg { width: 12px; height: 12px; }
.combined-summary { margin-bottom: 16px; padding: 17px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; border-radius: 15px; color: #fff; background: linear-gradient(135deg,var(--green-900),#285c48); }
.combined-summary div { padding: 5px 12px; border-left: 1px solid rgba(255,255,255,.16); }
.combined-summary div:first-child { border-left: 0; }
.combined-summary span,.combined-summary strong { display: block; }
.combined-summary span { color: rgba(255,255,255,.66); font-size: 8px; text-transform: uppercase; }
.combined-summary strong { margin-top: 5px; font: 800 18px Manrope; }
.combined-summary small { display: block; margin-top: 2px; color: rgba(255,255,255,.72); font-size: 8px; }
.entry-row-title td { padding: 8px 10px !important; background: #eef5f0; border-top: 2px solid #b9cdbf !important; }
.entry-row-title div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.entry-row-title strong { color: var(--green-800); }
.egg-entry-actions { display: flex; gap: 7px; }
.unconfirmed-note { margin: 0 0 13px; padding: 11px 12px; display: flex; gap: 9px; border-radius: 10px; color: #785f2f; background: #fff8e5; font-size: 9px; line-height: 1.5; }
.unconfirmed-note svg { width: 17px; height: 17px; flex: 0 0 auto; }
.report-tabs { margin: 18px 0 12px; display: flex; gap: 7px; }
.report-tabs button { min-height: 34px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 8px; font-weight: 700; cursor: pointer; }
.report-tabs button.active { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.recorded-by { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; }
.recorded-by::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #76a27c; }

.care-action-grid,.data-tool-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.care-action,.data-tool { min-height: 108px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: var(--shadow); cursor: pointer; text-align: left; }
.care-action:hover,.data-tool:hover { transform: translateY(-1px); border-color: #bdd1c4; }
.care-action > span,.data-tool > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--green-700); background: var(--green-50); }
.care-action svg,.data-tool svg { width: 17px; height: 17px; }
.care-action strong,.data-tool strong { margin-top: 12px; font: 700 11px Manrope; }
.care-action small,.data-tool small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.three-panel-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.record-list { padding: 5px 18px 18px; }
.record-line { padding: 12px 0; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; border-bottom: 1px solid var(--line); }
.record-line:last-child { border-bottom: 0; }
.record-line > span:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--green-700); background: var(--green-50); }
.record-line svg { width: 15px; }
.record-line strong,.record-line small { display: block; }
.record-line strong { font-size: 9px; }
.record-line small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.record-line time { color: var(--muted); font-size: 7px; white-space: nowrap; }
.alert-stack { display: grid; gap: 9px; padding: 0 18px 18px; }
.alert-line { padding: 11px 12px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #e8e5d9; border-radius: 10px; background: #fffcf2; }
.alert-line.good { border-color: #d8e9dc; background: #f5fbf6; }
.alert-line svg { width: 15px; color: #ad8130; flex: 0 0 auto; }
.alert-line.good svg { color: var(--green-700); }
.alert-line strong,.alert-line small { display: block; }
.alert-line strong { font-size: 9px; }
.alert-line small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.worker-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.worker-card { padding: 17px; }
.worker-head { display: flex; align-items: center; gap: 10px; }
.worker-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--green-700); font: 800 12px Manrope; }
.worker-head strong,.worker-head small { display: block; }
.worker-head strong { font-size: 10px; }
.worker-head small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.permission-chips { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 5px; }
.permission-chips span { padding: 5px 7px; border-radius: 20px; color: var(--green-800); background: var(--green-50); font-size: 7px; font-weight: 700; }
.worker-meta { margin-top: 13px; padding-top: 11px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; }
.owner-banner { margin-bottom: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; border-radius: 14px; color: #fff; background: var(--green-900); }
.owner-banner > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #f1cb67; background: rgba(255,255,255,.08); }
.owner-banner svg { width: 19px; }
.owner-banner strong,.owner-banner small { display: block; }
.owner-banner strong { font-size: 10px; }
.owner-banner small { margin-top: 3px; color: rgba(255,255,255,.67); font-size: 8px; }
.owner-banner button { margin-left: auto; }
.trash-list { padding: 0 18px 18px; }
.trash-item { padding: 11px 0; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.trash-item:last-child { border-bottom: 0; }
.trash-item > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #9c3d32; background: #fff2ef; }
.trash-item svg { width: 14px; }
.trash-item div { flex: 1; }
.trash-item strong,.trash-item small { display: block; }
.trash-item strong { font-size: 9px; }
.trash-item small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.audit-table td:last-child { color: var(--muted); }
.role-note { padding: 13px 15px; border: 1px solid #d8e9dc; border-radius: 12px; color: var(--green-800); background: #f5fbf6; font-size: 9px; line-height: 1.55; }
.permission-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.permission-option { padding: 10px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 9px; }
.permission-option input { width: auto !important; min-height: auto !important; margin-top: 2px; }
.permission-option strong,.permission-option small { display: block; }
.permission-option strong { font-size: 9px; }
.permission-option small { margin-top: 2px; color: var(--muted); font-size: 7px; }

.confirm-panel { padding: 24px 22px; text-align: center; }
.confirm-icon { width: 54px; height: 54px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 16px; color: #a94739; background: #fff0ed; }
.confirm-icon svg { width: 24px; }
.confirm-panel h3 { margin: 0; font: 800 19px Manrope; }
.confirm-panel > p { max-width: 400px; margin: 8px auto 17px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.confirm-summary { margin-bottom: 15px; padding: 11px 12px; border-radius: 10px; color: #7d382f; background: #fff6f3; font-size: 9px; font-weight: 700; }
.login-user-grid { padding: 18px 22px 5px; display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.login-user { padding: 13px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; cursor: pointer; text-align: left; }
.login-user.active { border-color: var(--green-600); background: var(--green-50); }
.login-user .worker-avatar { width: 34px; height: 34px; border-radius: 9px; font-size: 10px; }
.login-user strong,.login-user small { display: block; }
.login-user strong { font-size: 9px; }
.login-user small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.locked-screen-note { padding: 4px 22px 18px; color: var(--muted); font-size: 8px; text-align: center; }
.cost-table strong.positive { color: var(--green-700); }
.cost-table strong.negative { color: #a94739; }
.print-only { display: none; }

@media (max-width: 1100px) {
  .care-action-grid,.data-tool-grid { grid-template-columns: repeat(2,1fr); }
  .three-panel-grid,.worker-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .production-toolbar,.action-toolbar { align-items: stretch; flex-direction: column; }
  .production-date-field { justify-content: space-between; }
  .combined-summary { grid-template-columns: 1fr 1fr; }
  .combined-summary div:nth-child(3) { border-left: 0; }
  .batch-entry-grid.two-batches,.care-action-grid,.data-tool-grid,.three-panel-grid,.worker-grid { grid-template-columns: 1fr; }
  .login-user-grid { grid-template-columns: 1fr; }
  .permission-options { grid-template-columns: 1fr; }
}
@media print {
  .sidebar,.topbar,.mobile-nav,.heading-actions,.production-toolbar,.care-action-grid,.data-tool-grid,.form-actions,.collection-delete,.danger-btn { display: none !important; }
  .main { margin: 0 !important; }
  .page-content { padding: 0 !important; }
  .card,.stat-card { break-inside: avoid; box-shadow: none !important; }
  .print-only { display: block; }
}
