html {
  font-size: 16px;
}

body {
  margin-bottom: 48px;
  background: #f5f7fb;
  color: #182230;
}

.navbar {
  background: #ffffff;
  border-bottom: 1px solid #dce3ee;
}

.container {
  max-width: 1180px;
}

.page-heading,
.workspace-grid,
.hospital-records {
  margin-top: 28px;
}

.login-shell {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 36px;
  align-items: center;
  min-height: 70vh;
}

.login-copy h1 {
  max-width: 620px;
  font-size: 2.4rem;
  line-height: 1.1;
}

.login-copy p {
  max-width: 560px;
  color: #475467;
}

.login-panel {
  background: #ffffff;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 24px;
}

.auth-grid {
  display: grid;
  gap: 22px;
}

.register-box {
  border-top: 1px solid #dce3ee;
  padding-top: 18px;
}

.demo-users {
  border-top: 1px solid #dce3ee;
  color: #475467;
  padding-top: 14px;
}

.demo-users p {
  margin: 4px 0 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

.auth-actions,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-heading h1,
.section-title h2,
.panel-title h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: #56657a;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.stat-strip {
  display: flex;
  gap: 12px;
}

.stat-strip span,
.panel,
.record {
  background: #ffffff;
  border: 1px solid #dce3ee;
  border-radius: 8px;
}

.stat-strip span {
  padding: 10px 14px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.single-client {
  margin-top: 28px;
}

.panel,
.record {
  padding: 20px;
}

.panel-title,
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.intake-form,
.record-grid,
.daily-form {
  display: grid;
  gap: 14px;
}

.intake-form {
  grid-template-columns: 1fr 1fr;
}

.form-row,
.form-row.full {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 700;
  color: #304055;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c7d1df;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
}

span.field-validation-error {
  color: #b42318;
  font-size: 0.88rem;
}

button,
.primary-action {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 700;
}

button:disabled {
  background: #98a2b3;
}

.primary-action {
  grid-column: 1 / -1;
}

.secondary-action {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #c7d1df;
}

.danger-action {
  background: #b42318;
  color: #ffffff;
}

.secondary-link {
  align-items: center;
  border: 1px solid #c7d1df;
  border-radius: 6px;
  color: #1f2937;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  text-decoration: none;
}

.signed-in {
  margin: 6px 0 0;
  color: #475467;
}

.empty-state {
  color: #475467;
  margin: 0;
}

.intake-list,
.timeline {
  display: grid;
  gap: 12px;
}

.intake-card {
  border-left: 5px solid #f97316;
  background: #fff8f1;
  border-radius: 8px;
  padding: 14px;
}

.intake-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #475467;
  font-size: 0.92rem;
}

.hospital-records {
  display: grid;
  gap: 16px;
}

.search-form,
.patient-edit-form {
  display: grid;
  gap: 12px;
}

.search-form {
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

.patient-edit-form {
  border-bottom: 1px solid #dce3ee;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.patient-edit-form button {
  align-self: end;
}

.record header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #dce3ee;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.record h3,
.record p {
  margin-bottom: 6px;
}

.debt {
  color: #b42318;
  white-space: nowrap;
}

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

.monitoring {
  margin-top: 16px;
  border-top: 1px solid #dce3ee;
  padding-top: 16px;
}

.daily-form {
  grid-template-columns: 150px repeat(4, 1fr) auto;
  align-items: center;
  margin-bottom: 14px;
}

.timeline > div {
  border: 1px solid #dce3ee;
  border-radius: 8px;
  padding: 12px;
  background: #f9fbff;
}

@media (max-width: 900px) {
  .page-heading,
  .record header {
    align-items: stretch;
    flex-direction: column;
  }

  .login-shell,
  .workspace-grid,
  .record-grid,
  .search-form,
  .patient-edit-form,
  .intake-form,
  .daily-form {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .stat-strip {
    flex-wrap: wrap;
  }
}
