:root {
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --accent: #16a34a;
  --accent-soft: #dcfce7;
  --accent-text: #15803d;
  --text-main: #111827;
  --text-sub: #6b7280;
  --border-soft: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top, #f1f5f9 0, #f9fafb 40%, #f9fafb 100%);
  color: var(--text-main);
  min-height: 100vh;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.brand-title {
  margin: 0;
  font-size: 1.4rem;
}

.brand-subtitle {
  margin: 0.2rem 0 0;
  color: var(--text-sub);
  font-size: 0.9rem;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
}

.brand-pill-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-chip {
  font-size: 0.8rem;
  color: var(--text-sub);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #22c55e;
}

.top-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--text-sub);
  border: 1px solid var(--border-soft);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #fff;
}

.nav-link-active {
  color: #065f46;
  background: #dcfce7;
  border-color: #86efac;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.single-column {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  }
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--text-sub);
  background: #f9fafb;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 62vh;
  overflow-y: auto;
}

.request-card {
  border: 1px solid var(--border-soft);
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  background: #fff;
}

.request-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.request-top-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.request-name {
  font-weight: 600;
}

.status-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.status-pending {
  background: #fef9c3;
  color: #854d0e;
}

.status-prepared {
  background: #dcfce7;
  color: #166534;
}

.status-given {
  background: #e5e7eb;
  color: #374151;
}

.notes-row {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.note-chip {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #f4f4f5;
}

.request-extra {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.request-controls {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.input-small {
  border: 1px solid var(--border-soft);
  border-radius: 0.45rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
  background: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
}

.empty-state {
  margin: 0.6rem 0 0;
  color: var(--text-sub);
  font-size: 0.9rem;
}

.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.summary-section-title {
  font-size: 0.78rem;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d1d5db;
  padding: 0.35rem 0;
  font-size: 0.86rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-count {
  font-weight: 600;
}

.summary-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-sub);
}

.add-form {
  margin-top: 1rem;
  border-top: 1px dashed #d1d5db;
  padding-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.no-border {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field-label {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.field-help {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.form-tip {
  margin: 0;
  font-size: 0.82rem;
  color: #1f2937;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.6rem;
  padding: 0.55rem 0.65rem;
}

.input-text {
  border: 1px solid var(--border-soft);
  background: #f9fafb;
  border-radius: 0.6rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.input-text:focus {
  outline: 1px solid rgba(22, 163, 74, 0.35);
  border-color: rgba(22, 163, 74, 0.45);
  background: #fff;
}

.input-text:invalid {
  border-color: #fca5a5;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.submit-message {
  min-height: 1.1rem;
  margin: 0;
  color: #166534;
  font-size: 0.82rem;
}

.limits-box {
  margin-top: 0.9rem;
  border-top: 1px dashed #d1d5db;
  padding-top: 0.75rem;
}

.limits-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: #1f2937;
}

.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
  padding: 0.35rem 0.5rem;
  background: #fff;
}
