/* Pensionados: one list of plates and one short form to add another. */
.permits .dash-lot-head { align-items: center; }
.permits .lede { margin: 6px 0 16px; }

.permit-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin: 0 0 16px;
  padding: 20px;
  border: 1px solid rgba(20, 61, 43, 0.18);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 32, 26, 0.03), 0 8px 24px rgba(16, 32, 26, 0.05);
}
.permit-form[hidden] { display: none; }
.permit-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.permit-form-head .dash-h2 { margin: 0; }
.permit-field { display: grid; gap: 8px; min-width: 0; }
.permit-label { color: #10201a; font-size: 13px; font-weight: 600; }
.permit-label em { margin-left: 4px; color: #9aa39d; font-style: normal; font-weight: 400; }
.permit-sub { color: #7b867f; font-size: 12px; font-weight: 500; }
.permit-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.permit-pair[hidden] { display: none; }
.permit-pair.is-tight { max-width: 360px; }
.permit-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(16, 32, 26, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #10201a;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}
.permit-input:focus { outline: none; border-color: rgba(20, 61, 43, 0.4); box-shadow: 0 0 0 4px rgba(20, 61, 43, 0.08); }
.permit-input::placeholder { color: #b3bab5; }
.permit-input.is-plate { font-family: var(--font-mono); font-size: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.permit-input.is-plate::placeholder { letter-spacing: 0.06em; }

.permit-choice { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-self: start; padding: 3px; border-radius: 10px; background: #eff0ec; }
.permit-choice button,
.permit-days button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5f6b64;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.permit-choice button:hover,
.permit-days button:hover { color: #10201a; }
.permit-choice button.is-on { background: #143d2b; color: #fff; font-weight: 600; }
.permit-days { display: flex; flex-wrap: wrap; gap: 6px; }
.permit-days[hidden] { display: none; }
.permit-days button { min-width: 48px; padding: 0 10px; border: 1px solid rgba(16, 32, 26, 0.12); background: #fff; }
.permit-days button.is-on { border-color: #143d2b; background: #e7efe9; color: #143d2b; font-weight: 600; }
.permit-choice button:focus-visible,
.permit-days button:focus-visible { outline: 2px solid #143d2b; outline-offset: 2px; }

.permit-preview { margin: 0; padding: 10px 14px; border-radius: 10px; background: #f3f6f2; color: #143d2b; font-size: 13.5px; font-weight: 500; }
.permit-preview[hidden] { display: none; }
.permit-form .form-error { margin: 0; }
.permit-actions { display: flex; justify-content: flex-end; gap: 10px; }
.permit-actions .dash-page { height: 40px; }

/* The list */
.permits-card { container-type: inline-size; }
.permit-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid #f0f1ee; }
.permit-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 212px;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 20px;
  border-bottom: 1px solid #f3f4f1;
  transition: background 0.6s ease;
}
.permit-row:last-child { border-bottom: 0; }
.permit-row.is-new { background: #eef5ef; }
.permit-row[data-state="ended"] > :not(.permit-action) { opacity: 0.55; }
.permit-chip { justify-self: start; font-size: 13px; }
.permit-who,
.permit-when,
.permit-valid { display: grid; gap: 3px; min-width: 0; }
.permit-who strong,
.permit-when strong { overflow: hidden; color: #10201a; font-size: 14px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.permit-who strong.is-muted { color: #9aa39d; font-weight: 450; }
.permit-row small { overflow: hidden; color: #7b867f; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.permit-valid { justify-items: start; }
.permit-pill { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.permit-pill.is-active { background: #e3f1e6; color: #1f6b3c; }
.permit-pill.is-later { background: #f6efdf; color: #8a5a1c; }
.permit-pill.is-ended { background: #eff0ec; color: #6b756f; }
.permit-action { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.permit-ask { color: #5f6b64; font-size: 13px; }
.permit-remove { height: 32px; padding: 0 12px; border: 1px solid rgba(16, 32, 26, 0.12); border-radius: 8px; background: #fff; color: #5f6b64; font: inherit; font-size: 13px; cursor: pointer; }
.permit-remove:hover { border-color: rgba(141, 59, 44, 0.4); color: #8d3b2c; }
.permit-remove.is-yes { border-color: #8d3b2c; background: #8d3b2c; color: #fff; }
.permit-remove.is-yes:hover { background: #742f23; color: #fff; }
.permit-remove:disabled { opacity: 0.5; cursor: default; }

.permit-empty { display: grid; justify-items: center; gap: 14px; padding: 40px 20px 44px; color: #5f6b64; text-align: center; }
.permit-empty[hidden] { display: none; }
.permit-empty strong { color: #10201a; font-size: 15px; font-weight: 600; }

@container (max-width: 680px) {
  .permit-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "plate who action"
      "when when valid";
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .permit-chip { grid-area: plate; }
  .permit-who { grid-area: who; }
  .permit-when { grid-area: when; }
  .permit-valid { grid-area: valid; justify-items: end; text-align: right; }
  .permit-action { grid-area: action; }
}
@media (max-width: 760px) {
  .permit-form { padding: 16px; }
  .permit-pair { grid-template-columns: minmax(0, 1fr); }
  .permit-pair.is-tight { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .permit-actions .cta { flex: 1; }
}
