:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #171717;
  background: #f3f3f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.top-bar {
  min-height: 88px;
  padding: 18px 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #111111;
  color: #ffffff;

  border-bottom: 6px solid #f58220;
}

.brand {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
}

.tagline {
  margin-top: 3px;
  color: #cccccc;
  font-size: 14px;
}

.environment {
  padding: 7px 12px;

  border: 1px solid #f58220;
  border-radius: 4px;

  color: #f58220;
  font-size: 13px;
  font-weight: 700;
}

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.page-heading,
.panel-heading,
.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-heading {
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0 0 5px;
  font-size: 32px;
}

.page-heading p,
.panel-heading p {
  margin: 0;
  color: #666666;
}

.status {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.status-waiting {
  background: #eeeeee;
  color: #555555;
}

.status-connected {
  background: #e6f4ea;
  color: #176b35;
}

.status-error {
  background: #fde8e8;
  color: #9d1c1c;
}

.notice {
  margin-bottom: 28px;
  padding: 16px 18px;

  background: #fff7ef;
  border-left: 5px solid #f58220;
}

.notice p {
  margin: 5px 0 0;
}

.panel {
  margin-bottom: 28px;
  padding: 24px;

  background: #ffffff;

  border: 1px solid #dddddd;
  border-radius: 7px;
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 22px;
}

.panel-heading h2 {
  margin: 0 0 5px;
}

.session-bar {
  margin-bottom: 24px;
  padding: 14px 16px;

  background: #ffffff;

  border: 1px solid #dddddd;
  border-radius: 6px;
}

.session-bar strong,
.session-bar span {
  display: block;
}

.session-bar span {
  margin-top: 3px;
  color: #666666;
}

.form-stack {
  display: grid;
  gap: 18px;
  max-width: 500px;
}

.form-stack label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.form-stack input {
  width: 100%;
  padding: 11px 12px;

  border: 1px solid #bbbbbb;
  border-radius: 4px;

  background: #ffffff;
}

.form-stack input:focus {
  outline: 2px solid #f58220;
  outline-offset: 1px;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 10px 16px;

  border-radius: 4px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid #f58220;
  background: #f58220;
  color: #111111;
}

.primary-button:hover {
  background: #dd6f12;
  border-color: #dd6f12;
}

.secondary-button {
  border: 1px solid #bbbbbb;
  background: #ffffff;
  color: #222222;
}

.secondary-button:hover {
  background: #f4f4f4;
}

.message,
.loading-message,
.empty-state {
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: 4px;
}

.loading-message,
.empty-state {
  background: #eeeeee;
  color: #555555;
}

.message-success {
  background: #e6f4ea;
  color: #176b35;
}

.message-error {
  background: #fde8e8;
  color: #9d1c1c;
}

.payment-list {
  display: grid;
  gap: 18px;
}

.payment-card {
  padding: 20px;

  border: 1px solid #dddddd;
  border-radius: 6px;

  background: #ffffff;
}

.payment-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  margin-bottom: 18px;
}

.payment-card h3 {
  margin: 0 0 5px;
}

.payment-reference {
  color: #666666;
  font-size: 14px;
}

.payment-amount {
  font-size: 22px;
  font-weight: 800;
}

.payment-status {
  display: inline-block;

  padding: 5px 8px;
  border-radius: 4px;

  font-size: 12px;
  font-weight: 700;
}

.payment-status-unpaid {
  background: #fff1df;
  color: #8a4a00;
}

.payment-status-proof_pending {
  background: #fff7d6;
  color: #755d00;
}

.payment-status-verified {
  background: #e6f4ea;
  color: #176b35;
}

.payment-status-problem {
  background: #fde8e8;
  color: #9d1c1c;
}

.payment-details {
  display: grid;
  gap: 8px;

  margin-bottom: 18px;
}

.payment-detail {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
}

.payment-detail-label {
  color: #666666;
}

.order-items {
  margin: 18px 0;
  padding-top: 16px;

  border-top: 1px solid #eeeeee;
}

.order-items h4 {
  margin: 0 0 12px;
}

.order-item {
  padding: 10px 0;
  border-bottom: 1px solid #eeeeee;
}

.order-item:last-child {
  border-bottom: 0;
}

.order-item strong,
.order-item span {
  display: block;
}

.order-item span {
  margin-top: 3px;
  color: #666666;
  font-size: 14px;
}

.proof-panel {
  margin-top: 18px;
  padding: 16px;

  background: #fafafa;

  border: 1px solid #dddddd;
  border-radius: 5px;
}

.proof-panel h4 {
  margin: 0 0 8px;
}

.proof-panel p {
  margin: 0 0 14px;
  line-height: 1.5;
}

.proof-form {
  display: grid;
  gap: 12px;
}

.proof-form input[type="file"] {
  padding: 10px;
  background: #ffffff;

  border: 1px solid #bbbbbb;
  border-radius: 4px;
}

.field-note {
  color: #666666;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 650px) {
  .top-bar {
    padding: 16px 18px;
  }

  .page {
    padding: 26px 16px 50px;
  }

  .page-heading,
  .panel-heading,
  .session-bar,
  .payment-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .payment-detail {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
/* V1.2 Final CX: bounded onboarding and readability polish. */
#learners-empty .primary-button { margin-top: 1rem; }
#other-school-fields { padding: 1rem; border: 1px solid currentColor; border-radius: .6rem; }
.school-request-status { margin-top: .75rem; }
#learner-allergy-details { margin-top: .75rem; }

/* V1.2 final CX: bounded learner editing and order-aware payment focus. */
.learner-edit-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid currentColor;
}

.learner-edit-form label,
.learner-edit-form fieldset {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.learner-edit-form fieldset label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.learner-edit-form textarea {
  min-height: 5rem;
  resize: vertical;
}

.learner-edit-allergy-note {
  margin: 0.25rem 0 0.6rem;
  font-weight: 600;
}

.learner-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.payment-card-focus {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}


/* V1.2 final UAT CX: compact child selection and allergy controls. */
.weekly-order-context-actions { display:flex; justify-content:flex-end; margin:.5rem 0 .75rem; }
.weekly-order-context-actions .secondary-button { width:auto; }
.weekly-order-learner-selector { margin:.25rem 0 1rem; padding:.8rem; border:1px solid currentColor; border-radius:.6rem; }
.weekly-order-learner-selector > strong { display:block; margin-bottom:.5rem; }
.weekly-order-learner-choices { display:flex; flex-wrap:wrap; gap:.5rem; }
.weekly-order-learner-choices .secondary-button { width:auto; min-width:0; padding:.55rem .8rem; }
.weekly-order-learner-choices .secondary-button.is-active { font-weight:700; text-decoration:underline; text-underline-offset:.2rem; }
#learner-form fieldset label,
.learner-edit-form fieldset label { display:inline-flex; align-items:center; width:auto; gap:.45rem; padding:.35rem .55rem; margin:.15rem .35rem .15rem 0; border:0; border-radius:.35rem; }
#learner-form fieldset input[type="radio"],
.learner-edit-form fieldset input[type="radio"] { width:auto; min-width:1rem; margin:0; }
@media (max-width: 640px) {
  .weekly-order-context-actions { justify-content:flex-start; }
  .weekly-order-learner-choices .secondary-button { width:auto; }
}

/* Highlight the selected learner for multi-child ordering */
.weekly-order-learner-selector{padding:1rem;border:2px solid #f36b21;border-radius:12px;background:#fff8f3;scroll-margin-top:1rem}
.weekly-order-learner-selector>strong{display:block;margin-bottom:.65rem;color:#7a340f;letter-spacing:.025em}
.weekly-order-learner-choices .secondary-button.is-active{background:#f36b21!important;color:#fff!important;border-color:#d45112!important;text-decoration:none!important;box-shadow:0 0 0 2px #ffd5bc}
