:root {
  color: #182230;
  background: #f4f7fb;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, input, select { font: inherit; }

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px 16px;
  place-items: center;
  background: radial-gradient(circle at 100% 0, #e3efff 0, transparent 35%), #f4f7fb;
}

.card {
  width: min(100%, 620px);
  padding: 36px;
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(31, 49, 77, .1);
}

.card__header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 32px; }
.brand-mark { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; color: #fff; background: #2563eb; border-radius: 12px; font-weight: 700; }
.eyebrow { margin: 1px 0 5px; color: #6280b5; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: 25px; line-height: 1.25; }
h2 { margin-bottom: 18px; font-size: 16px; }
.subtitle { margin-bottom: 0; color: #687385; font-size: 14px; }

.form-section { padding-bottom: 26px; border-bottom: 1px solid #edf0f4; }
.form-section--update { padding-top: 26px; }
.deposit-section { margin-top: 30px; padding-top: 28px; border-top: 1px solid #edf0f4; }
.section-heading h2 { margin-bottom: 7px; }
.section-heading p { margin-bottom: 20px; color: #687385; font-size: 14px; }
.field-label { display: block; margin-bottom: 8px; color: #3d4859; font-size: 14px; font-weight: 600; }
.required { color: #e5484d; }
.lookup-row { display: flex; gap: 10px; }
input, select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: #182230;
  background: #fff;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  outline: none;
}
input:focus, select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #e5484d; }
.field-hint, .form-message { margin: 8px 0 0; color: #718096; font-size: 13px; }
.form-message.is-error { color: #d92d20; }

.order-summary { margin-top: 20px; padding: 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; }
.summary-heading { display: flex; gap: 8px; align-items: center; color: #166534; font-size: 14px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; }
.order-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 20px; margin: 15px 0 0; }
.order-details div { min-width: 0; }
.order-details dt { margin-bottom: 3px; color: #5f6d63; font-size: 12px; }
.order-details dd { overflow-wrap: anywhere; margin: 0; color: #1f3b2a; font-size: 14px; font-weight: 600; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field--wide { grid-column: 1 / -1; }
.overdue-status-field { padding: 12px; background: #fffaf0; border: 1px solid #fde7b2; border-radius: 10px; }
.overdue-status-field .field-label { margin-bottom: 8px; color: #8a5700; }

.button { height: 44px; padding: 0 18px; border: 0; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background .2s, opacity .2s; white-space: nowrap; }
.button:disabled { cursor: not-allowed; opacity: .58; }
.button--secondary { color: #1d4ed8; background: #eff6ff; }
.button--secondary:hover:not(:disabled) { background: #dbeafe; }
.button--primary { width: 100%; margin-top: 24px; color: #fff; background: #2563eb; }
.button--primary:hover:not(:disabled) { background: #1d4ed8; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: calc(100vw - 40px); padding: 13px 17px; color: #fff; background: #166534; border-radius: 8px; box-shadow: 0 8px 24px rgba(22, 101, 52, .25); font-size: 14px; }

@media (max-width: 520px) {
  .page-shell { padding: 0; place-items: stretch; }
  .card { padding: 28px 20px; border: 0; border-radius: 0; }
  .lookup-row, .field-grid { grid-template-columns: 1fr; flex-direction: column; }
  .lookup-row .button { width: 100%; }
  .order-details { grid-template-columns: 1fr; gap: 11px; }
}
