:root {
  --bg: #eef1fb;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #263044;
  --muted: #65728a;
  --line: #d9e0ec;
  --accent: #2f66f4;
  --accent-strong: #2454cf;
  --success: #18b86a;
  --danger: #c93838;
  --shadow: 0 18px 50px rgba(42, 53, 83, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto;
}

.app-header,
.form-card {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-header {
  padding: 48px 56px;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 4rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.header-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.form-card {
  border-radius: 0 0 8px 8px;
}

.section-band {
  padding: 38px 56px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 20px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trip-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.slot-grid {
  grid-template-columns: repeat(4, minmax(145px, 1fr));
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #56647d;
  font-weight: 650;
}

.field b {
  color: var(--danger);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #bfc8d7;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 102, 244, 0.14);
}

.time-select {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.time-select span {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

.readonly-field input {
  background: var(--surface-soft);
  color: #1e2a3d;
  font-weight: 750;
}

.slots-heading {
  align-items: center;
}

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

.slot-row {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.slot-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.slot-topline h3 {
  margin: 0;
  font-size: 1rem;
}

.remarks-field {
  margin-top: 18px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
}

button:focus-visible {
  outline: 3px solid rgba(47, 102, 244, 0.26);
  outline-offset: 2px;
}

.primary-button,
.secondary-button,
.add-button {
  padding: 0 24px;
}

.primary-button {
  background: var(--success);
  color: #fff;
}

.primary-button:hover {
  background: #10995b;
}

.secondary-button {
  background: #e6eaf4;
  color: var(--text);
}

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

.add-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: #fff;
  white-space: nowrap;
}

.add-button:hover {
  background: var(--accent-strong);
}

.add-button span {
  font-size: 1.35rem;
  line-height: 1;
}

.trash-button {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  border-radius: 6px;
  background: #dfe5f0;
  color: #253047;
  font-size: 1.55rem;
  line-height: 1;
}

.trash-button:hover {
  color: #fff;
  background: var(--danger);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 34px 56px;
}

.submit-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 14px;
}

.submit-status {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.submit-status.success {
  color: #087a48;
}

.submit-status.error {
  color: var(--danger);
}

@media (max-width: 900px) {
  h1 {
    font-size: 3rem;
  }

  .app-header,
  .section-heading,
  .form-actions {
    display: grid;
  }

  .app-header,
  .section-band,
  .form-actions {
    padding-left: 24px;
    padding-right: 24px;
  }

  .field-grid.two,
  .trip-grid,
  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.2rem;
  }

  .page-shell {
    width: min(100% - 18px, 1180px);
    margin: 10px auto;
  }

  .app-header {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .field-grid.two,
  .trip-grid,
  .slot-grid {
    grid-template-columns: 1fr;
  }

  .submit-area,
  .form-actions button {
    width: 100%;
  }
}
