/* Material-inspired styles (no framework) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.87);
  background: #fafafa;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 16px;
  background: #3f51b5;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toolbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.toolbar--section {
  background: #5c6bc0;
  min-height: 56px;
  margin: -16px -16px 0;
  border-radius: 2px 2px 0 0;
}

.toolbar--section h1 {
  font-size: 18px;
}

/* Layout */
.page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
}

.card {
  flex: 1 1 320px;
  margin: 8px;
  padding: 16px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

/* Subheaders / descriptions */
.subheader {
  color: #3f51b5;
  font-weight: 700;
  text-align: center;
  margin: 12px 0 4px;
  line-height: 1.4;
}

.subheader + .subheader {
  margin-top: 4px;
}

/* Form fields */
.fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 140px;
  position: relative;
}

.field label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.54);
  margin-bottom: 4px;
  transition: color 0.2s;
}

.field input {
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.42);
  background: transparent;
  padding: 6px 0 8px;
  font-size: 16px;
  font-family: inherit;
  color: rgba(0, 0, 0, 0.87);
  outline: none;
  width: 100%;
  min-width: 140px;
}

.field input:focus {
  border-bottom: 2px solid #3f51b5;
  padding-bottom: 7px;
}

.field input:focus + label,
.field:focus-within label {
  color: #3f51b5;
}

.field input:disabled {
  color: rgba(0, 0, 0, 0.54);
  border-bottom-style: dotted;
  cursor: not-allowed;
}

.field--narrow input {
  width: 100px;
  min-width: 100px;
}

/* Footer button */
.footer {
  display: flex;
  justify-content: center;
  padding: 24px 16px 32px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  color: #3f51b5;
  background: transparent;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: rgba(63, 81, 181, 0.08);
}

.btn:active {
  background: rgba(63, 81, 181, 0.16);
}

/* Responsive */
@media (max-width: 600px) {
  .toolbar h1 {
    font-size: 16px;
  }

  .toolbar--section h1 {
    font-size: 15px;
  }

  .row {
    flex-direction: column;
  }

  .card {
    margin: 8px 4px;
  }

  .fields {
    flex-direction: column;
    align-items: stretch;
  }

  .field input,
  .field--narrow input {
    width: 100%;
    min-width: 0;
  }
}
