:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5e6c65;
  --line: #dce4df;
  --surface: #ffffff;
  --canvas: #f4f7f5;
  --green: #176b4d;
  --green-dark: #0d5239;
  --green-soft: #e7f4ed;
  --yellow: #a86f00;
  --yellow-soft: #fff5d9;
  --red: #b13a32;
  --red-soft: #fdecea;
  --blue: #276b9b;
  --blue-soft: #e8f2f9;
  --shadow: 0 18px 50px rgb(34 62 49 / 9%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgb(32 126 89 / 8%), transparent 25rem),
    var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid rgb(220 228 223 / 90%);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(16px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  color: white;
  background: var(--green);
  border-radius: 13px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  place-items: center;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.official-link {
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.header-actions,
.account-summary {
  display: flex;
  gap: 14px;
  align-items: center;
}

.account-summary {
  gap: 9px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.account-summary span {
  display: grid;
  line-height: 1.2;
  text-align: right;
}

.account-summary strong {
  max-width: 180px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary small {
  color: var(--muted);
  font-size: 0.67rem;
}

.page-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 44px;
}

.intro {
  max-width: 750px;
  margin-bottom: 36px;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4rem);
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.intro > p:last-child {
  max-width: 670px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.status-panel {
  overflow: hidden;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.catalog-state {
  padding: 6px 10px;
  color: var(--muted);
  background: var(--canvas);
  border-radius: 999px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.catalog-state.ready {
  color: var(--green-dark);
  background: var(--green-soft);
}

.catalog-state.error {
  color: var(--red);
  background: var(--red-soft);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span {
  color: #34443c;
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.field select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid #cfd9d3;
  border-radius: 11px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input:hover,
.field select:hover {
  border-color: #9eaea5;
}

.field input:focus,
.field select:focus {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(23 107 77 / 13%);
}

.field select:disabled {
  color: #89958f;
  background: #f3f5f4;
}

.notification-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.alert-options {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.alert-options legend {
  margin-bottom: 8px;
  color: #34443c;
  font-size: 0.82rem;
  font-weight: 800;
}

.alert-options .notification-option {
  margin-top: 0;
}

.notification-primary {
  background: var(--green-soft);
  border-color: rgb(23 107 77 / 24%);
}

.push-option {
  cursor: default;
}

.push-symbol {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: white;
  background: var(--green);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 800;
  place-items: center;
}

.push-copy {
  min-width: 0;
}

.push-status {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.045em;
}

.push-status[data-state="active"] {
  color: var(--green-dark);
}

.push-status[data-state="attention"] {
  color: var(--yellow);
}

.push-status[data-state="unavailable"] {
  color: var(--red);
}

.push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.push-actions .text-button:disabled {
  opacity: 0.5;
}

.ios-install-help {
  display: block;
  margin-top: 9px;
  padding: 9px 10px;
  color: #394a42;
  background: rgb(255 255 255 / 72%);
  border-radius: 8px;
  font-size: 0.73rem;
}

.notification-option em {
  margin-left: 5px;
  padding: 3px 6px;
  color: var(--green-dark);
  background: white;
  border-radius: 999px;
  font-size: 0.62rem;
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notification-option input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--green);
}

.notification-option strong,
.notification-option small {
  display: block;
}

.notification-option strong {
  font-size: 0.85rem;
}

.notification-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.77rem;
}

.form-error {
  margin: 16px 0 0;
  padding: 11px 13px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 10px;
  font-size: 0.83rem;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.button {
  min-height: 45px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 750;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button:disabled {
  opacity: 0.48;
}

.button-primary {
  color: white;
  background: var(--green);
}

.button-primary:not(:disabled):hover {
  background: var(--green-dark);
}

.button-secondary {
  color: #34443c;
  background: white;
  border-color: #cfd9d3;
}

.button-secondary:not(:disabled):hover {
  background: var(--canvas);
}

.status-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.status-parado {
  color: var(--muted);
  background: var(--canvas);
}

.status-aguardando,
.status-encerrando {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-tem-vaga {
  color: var(--green-dark);
  background: var(--green-soft);
}

.status-sem-vaga {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.status-erro {
  color: var(--red);
  background: var(--red-soft);
}

.status-display {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 18px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.monitors-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: #f8faf9;
  border: 1px dashed #cfd9d3;
  border-radius: 13px;
  font-size: 0.82rem;
}

.monitors-list {
  display: grid;
  gap: 12px;
}

.monitor-card {
  padding: 15px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.monitor-card.selected {
  border-color: rgb(23 107 77 / 42%);
  box-shadow: 0 0 0 2px rgb(23 107 77 / 8%);
}

.monitor-card-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.monitor-identity {
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.monitor-route {
  display: block;
  margin-top: 12px;
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.monitor-meta,
.monitor-message {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.monitor-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.text-button-danger {
  color: var(--red);
}

#current-monitor-detail:not([hidden]) {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.status-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 800;
  place-items: center;
}

.status-display strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
}

.status-display p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.query-summary {
  display: grid;
  gap: 13px;
  margin: 20px 0 0;
}

.query-summary > div {
  display: grid;
  gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.query-summary dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.query-summary dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 650;
}

.history-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.history-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.history-heading h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.text-button {
  padding: 3px 0;
  color: var(--green-dark);
  background: transparent;
  border: 0;
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.history-empty {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.history-list {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.history-result {
  min-width: 71px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-align: center;
}

.history-result-tem-vaga {
  color: var(--green-dark);
  background: var(--green-soft);
}

.history-result-sem-vaga {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.history-result-erro {
  color: var(--red);
  background: var(--red-soft);
}

.history-details {
  min-width: 0;
}

.history-details strong,
.history-details time {
  display: block;
}

.history-details strong {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-details time {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
}

.scope-note {
  margin-top: 20px;
  padding: 15px;
  color: #394a42;
  background: #f6f8f7;
  border-left: 3px solid var(--green);
  border-radius: 4px 11px 11px 4px;
  font-size: 0.8rem;
}

.scope-note p {
  margin: 4px 0 0;
  color: var(--muted);
}

footer {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0 38px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.auth-shell {
  display: grid;
  width: min(100% - 40px, 480px);
  min-height: calc(100vh - 77px);
  margin: 0 auto;
  padding: 56px 0;
  place-items: center;
}

.auth-panel {
  width: 100%;
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.auth-intro {
  margin: 16px 0 26px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form .field small {
  color: var(--muted);
  font-size: 0.72rem;
}

.auth-form .button {
  margin-top: 4px;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.auth-switch a {
  color: var(--green-dark);
  font-weight: 750;
  text-underline-offset: 3px;
}

@media (max-width: 880px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-content,
  .page-shell,
  footer {
    width: min(100% - 28px, 1160px);
  }

  .header-content {
    min-height: 68px;
  }

  .official-link {
    max-width: 90px;
    text-align: right;
  }

  .header-actions .official-link,
  .account-summary small {
    display: none;
  }

  .account-summary {
    padding-left: 0;
    border-left: 0;
  }

  .account-summary strong {
    max-width: 100px;
  }

  .page-shell {
    padding-top: 42px;
  }

  .intro h1 {
    font-size: 2.35rem;
  }

  .panel {
    padding: 21px;
    border-radius: 17px;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .monitor-card-heading {
    align-items: flex-start;
  }

  .monitor-actions {
    gap: 10px 18px;
  }

  .push-option {
    padding: 13px;
  }

  .notification-option em {
    display: inline-block;
    margin-top: 4px;
  }

  .button {
    width: 100%;
  }

  .auth-shell {
    width: min(100% - 28px, 480px);
    min-height: calc(100vh - 69px);
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
