:root {
  --bg: #f6f1e7;
  --card: #ffffff;
  --ink: #3b2f2a;
  --muted: #8a7a6d;
  --accent: #b3541e;
  --accent-dark: #8f3f14;
  --accent-soft: #f3e0d0;
  --line: #e6dbcc;
  --green: #2e7d32;
  --green-soft: #e4f0e3;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --blue: #1e5fb3;
  --blue-soft: #e3edfb;
  --shadow: 0 2px 10px rgba(90, 60, 30, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Heebo", "Assistant", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.app-header {
  background: linear-gradient(135deg, #7a2e0e, #b3541e 60%, #d97a36);
  color: #fff;
  padding: 28px 16px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.header-inner h1 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0.5px;
}

.subtitle {
  margin: 8px 0 0;
  opacity: 0.92;
  font-size: 1rem;
}

.container {
  max-width: 860px;
  margin: 22px auto;
  padding: 0 16px;
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

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

.card-head h2 { margin: 0; font-size: 1.25rem; }

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 0.95rem;
}
.opt { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.98rem;
  font-family: inherit;
  background: #fffdf8;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
textarea { resize: vertical; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

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

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 9px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn-danger { background: var(--red); color: #fff; padding: 6px 12px; font-size: 0.85rem; }
.btn-small { background: var(--accent-soft); color: var(--accent-dark); padding: 6px 12px; font-size: 0.85rem; }

/* רשימת אצוות */
.batch-list { display: grid; gap: 14px; }

.batch-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fffdf8;
  position: relative;
}
.batch-item:hover { border-color: var(--accent); }

.batch-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.batch-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.batch-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-בתכנון { background: var(--blue-soft); color: var(--blue); }
.status-בבריין { background: var(--accent-soft); color: var(--accent-dark); }
.status-בסוויד { background: #f3e8fd; color: #7b1fa2; }
.status-בעישון { background: #fff3e0; color: #e65100; }
.status-מוכן { background: var(--green-soft); color: var(--green); }

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px 16px;
  margin: 12px 0;
}
.batch-grid .kv {
  display: flex;
  flex-direction: column;
  background: #faf6ee;
  border-radius: 8px;
  padding: 7px 10px;
}
.kv .k { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.kv .v { font-size: 0.92rem; font-weight: 600; }

.batch-note {
  background: #faf6ee;
  border-right: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: pre-wrap;
  margin: 8px 0;
}

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

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 30px 10px;
}

.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 20px 10px 30px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 50%;
  transform: translateX(50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 22px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 99;
  font-size: 0.95rem;
}
