.section-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.section-actions > button:not(.primary),
.section-actions > .button-label {
  border-color: #d0a530;
  background: #fff9db;
  color: #73550b;
}

.button-label { display: inline-flex; min-height: 40px; align-items: center; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; font-size: 13px; font-weight: 750; cursor: pointer; }

.run-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0;
}

.run-search {
  flex: 1;
  max-width: 480px;
  margin: 0;
}

.run-search span {
  color: var(--muted);
  font-size: 12px;
}

.run-search input {
  width: 100%;
  background: #fff;
}

.run-scope {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #e7eee9;
  border-radius: 12px;
}

.run-scope button {
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
}

.run-scope button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 8px rgba(15, 67, 42, .1);
}

.run-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(10, 60, 35, .035);
}

.run-schedule-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.run-schedule-table th,
.run-schedule-table td { padding: 12px; vertical-align: middle; }
.run-schedule-table tbody tr.current { background: #eef8f1; box-shadow: inset 4px 0 var(--green2); }
.run-schedule-table tbody tr.past { opacity: .72; }
.run-schedule-table td small { display: block; margin-top: 3px; color: var(--muted); }
.schedule-run { display: flex; align-items: center; gap: 9px; min-width: 142px; }
.schedule-run > img,
.schedule-run > span { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; background: #eef4ef; }
.schedule-run > span { display: grid; place-items: center; font-size: 20px; }
.schedule-run strong,
.schedule-run .badge { display: block; }
.schedule-run .badge { width: max-content; margin-top: 4px; }
.schedule-hare { min-width: 180px; font-weight: 700; overflow-wrap: anywhere; }
.table-edit,
.table-upload {
  display: inline-block;
  min-width: 70px;
  padding: 9px 11px;
  border: 1px solid var(--green);
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
}
.table-upload { border-color: var(--line); background: #fff; color: var(--ink); }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-move { padding: 9px 11px; border: 1px solid #d0a530; border-radius: 9px; background: #fff9db; color: #73550b; font-weight: 750; }
.schedule-location { display: grid; gap: 6px; }
.maps-link { display: inline-flex; width: max-content; min-height: 36px; align-items: center; padding: 7px 10px; border: 1px solid #b9d7c3; border-radius: 9px; background: #eef8f1; color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }
.maps-link[hidden] { display: none; }
.run-place-editor { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.run-place-editor legend { padding: 0 6px; color: var(--green); font-weight: 800; }
.assignment-status { display: inline-block; width: max-content; margin-top: 5px; padding: 3px 7px; border-radius: 999px; background: #e7eee9; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.assignment-status.unassigned { background: #fff0d0; color: #805b00; }
.assignment-status.committee { background: #e9e7ff; color: #4d3f91; }

.hare-selection,
.operation-choice { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.hare-selection legend,
.operation-choice legend { padding: 0 6px; font-weight: 800; }
.hare-selection label,
.operation-choice label { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.hare-selection label small { margin-left: auto; color: var(--muted); }
.schedule-operation-preview { margin-top: 14px; padding: 13px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.schedule-operation-preview.ready { border-style: solid; border-color: #d0a530; background: #fff9db; color: var(--ink); }
.schedule-operation-preview div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(115, 85, 11, .18); }
.schedule-operation-preview span,
.schedule-operation-preview small { display: block; }
.schedule-operation-preview p { margin-bottom: 0; }
.waiting-list { display: grid; gap: 10px; }
.waiting-card { display: flex; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.waiting-card small { display: block; margin-top: 4px; color: var(--muted); }
.waiting-card > div:last-child { text-align: right; }
.waiting-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.waiting-actions button { padding: 7px 9px; }
.smart-proposal-list { display: grid; gap: 9px; margin: 12px 0; }
.smart-proposal { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.smart-proposal:has(input:checked) { border-color: var(--green2); background: #eef8f1; }
.smart-proposal span,
.smart-proposal small { display: block; }
.smart-proposal small { margin-top: 3px; color: var(--muted); }
.smart-proposal select { width: 100%; margin-top: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.smart-suggestion-status { min-height: 24px; margin: 8px 0 4px; color: var(--muted); font-size: 12px; }
.smart-suggestion-status.ready { color: var(--green); font-weight: 750; }
.smart-suggestion-status.error { color: #9b2c2c; }
.smart-recommendation { display: inline-block; margin-top: 4px; padding: 3px 7px; border-radius: 999px; background: #fff0d0; color: #805b00; font-size: 10px; font-weight: 800; }
.smart-recommendation.complete { background: #dff2e5; color: var(--green); }

.run-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(10, 60, 35, .035);
}

.run-card.current {
  border: 2px solid var(--green2);
  box-shadow: 0 7px 24px rgba(13, 81, 50, .12);
}

.run-card.past { opacity: .78; }

.run-thumb {
  width: 76px;
  height: 76px;
  border-radius: 13px;
  object-fit: cover;
  background: #eef4ef;
}

.run-thumb.empty {
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 28px;
}

.run-card-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.run-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.run-card-title strong { font-size: 17px; }
.run-date { font-weight: 700; }
.run-hare { overflow-wrap: anywhere; }
.run-card-main small { color: var(--muted); }
.badge.current-run { background: var(--green); color: #fff; }
.badge.past-run { background: #eef0ee; color: var(--muted); }

.run-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.run-card-actions button,
.run-card-actions .button {
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.run-card-actions .edit-run {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.run-card-actions .button:hover { border-color: var(--green); color: var(--green); }

.run-empty {
  display: grid;
  gap: 5px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.run-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.field-help button {
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: #e7f3eb;
  color: var(--green);
  font-weight: 750;
}

.hare-editor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.hare-editor-head strong,
.hare-editor-head small { display: block; }
.hare-editor-head small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.hare-editor-head button,
.hare-editor-row button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-weight: 750; }
.hare-editor { display: grid; gap: 7px; margin-top: 8px; }
.hare-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.hare-editor-row input { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.hare-editor-row button { color: var(--danger); }

.optional { color: var(--muted); font-weight: 500; }

.auto-run-note {
  margin: 8px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #eef6f0;
  color: var(--green);
  font-size: 12px;
}

#runDialog select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-weight: 800;
}

#runDialog select:disabled { background: #f2f5f2; opacity: 1; }

.swap-source {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 12px;
  background: #eef6f0;
}

.swap-source span,
.swap-source small { color: var(--muted); font-size: 12px; }

.swap-suggestions {
  max-height: 230px;
  overflow: auto;
}

.rotation-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.rotation-input-row input { min-width: 0; }
.rotation-input-row button { white-space: nowrap; }
.rotation-help { display: block; margin-top: 6px; color: var(--muted); }

.swap-suggestions button {
  display: grid;
  gap: 3px;
}

.swap-suggestions small { color: var(--muted); }

.wizard-question {
  margin: 8px 0 5px;
  color: var(--green);
  font-size: clamp(18px, 4vw, 23px);
  line-height: 1.25;
}

.smart-choice {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.smart-choice + .smart-choice { margin-top: 8px; }
.smart-choice.complete { border-color: #9bc9a9; background: #f0faf3; }
.smart-choice-head { display: grid; gap: 3px; }
.smart-choice-head small { color: var(--muted); }
.smart-choice-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.smart-choice-actions button { min-height: 42px; }
.smart-choice-actions .primary { background: var(--green); color: #fff; }
.smart-choice-actions .secondary { background: #fff; color: var(--green); border-color: var(--green); }

.rotation-selected {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.rotation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7faf8;
}

.rotation-item span,
.rotation-item small { display: block; }
.rotation-item small { margin-top: 2px; color: var(--muted); }
.rotation-item button { border: 0; background: transparent; color: var(--danger); font-weight: 700; }

.swap-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 13px;
  color: var(--muted);
}

.swap-preview.ready {
  border-style: solid;
  border-color: #d0a530;
  background: #fff9db;
  color: var(--ink);
}

.swap-preview div {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) 1.2fr;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(115, 85, 11, .18);
}

.swap-preview span,
.swap-preview small { display: block; }
.swap-preview small { color: var(--muted); font-weight: 500; }

.schedule-wizard { width: min(720px, calc(100% - 28px)); }
.schedule-wizard form { display: flex; flex-direction: column; max-height: min(90dvh, 820px); }
.wizard-body { overflow-y: auto; padding: 0 3px; }
.wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0; padding: 0; list-style: none; }
.wizard-steps li { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.wizard-steps li::after { content: ""; height: 2px; flex: 1; background: var(--line); }
.wizard-steps li:last-child::after { display: none; }
.wizard-steps span { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 50%; background: #e7eee9; }
.wizard-steps li.active { color: var(--green); }
.wizard-steps li.active span { background: var(--green); color: #fff; }
.wizard-steps li.active::after { background: var(--green2); }
.wizard-section { padding: 14px 0; border-top: 1px solid var(--line); }
.wizard-section:first-child { border-top: 0; }
.wizard-section > label:first-child { margin-top: 0; }
.wizard-section select { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; }
.wizard-draft-note { margin-bottom: 2px; }
.wizard-draft-note p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.schedule-wizard .dialog-actions { flex: 0 0 auto; margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line); background: #fff; }
.schedule-wizard .dialog-actions button { min-height: 48px; }
.phase-c-summary { display: grid; gap: 4px; margin: 14px 0; }
.phase-c-summary small { color: var(--muted); }
.phase-c-dialog select,
.phase-c-dialog input,
.phase-c-dialog textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; }
.phase-c-dialog textarea { min-height: 250px; resize: vertical; line-height: 1.45; }
.phase-c-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phase-c-checklist { display: grid; gap: 5px; max-height: 250px; overflow: auto; }
.phase-c-checklist label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 7px; border-bottom: 1px solid var(--line); }
.phase-c-checklist input { width: 20px; min-height: 20px; }

@media (max-width: 800px) {
  .section-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .section-actions > button,
  .section-actions > .button-label { width: 100%; min-height: 48px; justify-content: center; }
  .run-toolbar { align-items: stretch; flex-direction: column; }
  .run-search { max-width: none; }
  .run-scope { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .run-scope button { padding: 9px 7px; font-size: 11px; }
  .run-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .run-schedule-table { min-width: 0; }
  .run-schedule-table thead { display: none; }
  .run-schedule-table,
  .run-schedule-table tbody,
  .run-schedule-table tr,
  .run-schedule-table td { display: block; width: 100%; }
  .run-schedule-table tbody { display: grid; gap: 10px; }
  .run-schedule-table tbody tr { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
  .run-schedule-table tbody tr.current { border: 2px solid var(--green2); box-shadow: none; }
  .run-schedule-table td { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; padding: 7px 0; border: 0; }
  .run-schedule-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
  .run-schedule-table td:first-child { display: block; padding-top: 0; }
  .run-schedule-table td:first-child::before { display: none; }
  .run-schedule-table td[data-label="Foto"],
  .run-schedule-table td[data-label="Aksi"] { display: block; width: 100%; padding: 9px 0 0; }
  .run-schedule-table td[data-label="Foto"]::before,
  .run-schedule-table td[data-label="Aksi"]::before { display: none; }
  .table-edit,
  .table-upload,
  .table-move,
  .maps-link { width: 100%; min-height: 48px; justify-content: center; }
  .table-edit,
  .table-upload { min-height: 48px; }
  .table-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .schedule-operation-preview div { grid-template-columns: 1fr; }
  .waiting-card { align-items: flex-start; flex-direction: column; }
  .waiting-card > div:last-child { text-align: left; }
  .waiting-actions { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; width: 100%; }
  .waiting-actions button { min-height: 48px; }
  .run-form-grid { grid-template-columns: 1fr; }
  .field-help { align-items: flex-start; flex-direction: column; }
  .field-help button { width: 100%; min-height: 48px; }
  .hare-editor-head { align-items: stretch; flex-direction: column; }
  .hare-editor-head button,
  .hare-editor-row button { min-height: 48px; }
  .hare-editor-row input { min-height: 48px; }
  .rotation-input-row { grid-template-columns: 1fr; }
  .rotation-input-row input,
  .rotation-input-row button { min-height: 48px; }
  #scheduleWizardDialog,
  #runDialog,
  #excelImportDialog,
  #whatsappScheduleDialog { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  #scheduleWizardDialog form,
  #runDialog form,
  #excelImportDialog form,
  #whatsappScheduleDialog form { height: 100%; max-height: none; overflow: auto; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); }
  #scheduleWizardDialog form { overflow: hidden; }
  .wizard-body { flex: 1; min-height: 0; overflow-y: auto; }
  .wizard-steps { margin: 14px 0 8px; }
  .wizard-steps li { display: grid; justify-items: center; gap: 4px; text-align: center; }
  .wizard-steps li::after { display: none; }
  .dialog-actions {
    position: sticky;
    bottom: calc(-1 * max(18px, env(safe-area-inset-bottom)));
    margin: 20px -18px calc(-1 * max(18px, env(safe-area-inset-bottom)));
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .dialog-actions button { min-height: 48px; flex: 1; }
  .schedule-wizard .dialog-actions { margin: 0 -18px calc(-1 * max(18px, env(safe-area-inset-bottom))); }
  .phase-c-range { grid-template-columns: 1fr; }
  .swap-preview div { grid-template-columns: 1fr; }
}
