/* Simplifica Brasil — sistema visual compartilhado entre a página de
   agendamento e o painel administrativo, seguindo o design system já usado
   no site (navy + teal, Raleway + Open Sans). */

:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --ink: #1d2b36;
  --ink-soft: #2b3a46;
  --ink-faint: #7a8894;
  --forest: #124b80;
  --forest-dark: #0d3a63;
  --forest-tint: #e8f1f5;
  --gold: #1f95a6;
  --gold-tint: #e3f6f9;
  --line: #e1e8ed;
  --line-strong: #cbd6de;
  --error: #b3402f;
  --error-tint: #fbe9e5;
  --success: #1f7d5c;
  --shadow-color: 18 43 60;

  --font-display: "Raleway", Arial, sans-serif;
  --font-body: "Open Sans", "Segoe UI", Arial, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11181f;
    --surface: #182530;
    --surface-2: #1c2b37;
    --ink: #e7edf1;
    --ink-soft: #b6c3cc;
    --ink-faint: #7e8e99;
    --forest: #4f9bd6;
    --forest-dark: #3d84ba;
    --forest-tint: #1c2f3f;
    --gold: #52c6d6;
    --gold-tint: #163338;
    --line: #263543;
    --line-strong: #38495a;
    --error: #e08571;
    --error-tint: #33211d;
    --success: #5cc79f;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #11181f;
  --surface: #182530;
  --surface-2: #1c2b37;
  --ink: #e7edf1;
  --ink-soft: #b6c3cc;
  --ink-faint: #7e8e99;
  --forest: #4f9bd6;
  --forest-dark: #3d84ba;
  --forest-tint: #1c2f3f;
  --gold: #52c6d6;
  --gold-tint: #163338;
  --line: #263543;
  --line-strong: #38495a;
  --error: #e08571;
  --error-tint: #33211d;
  --success: #5cc79f;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a { color: var(--forest); }
:root[data-theme="dark"] a { color: var(--gold); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a { color: var(--gold); }
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0.75em 1.4em;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--forest);
  color: #fff;
}
.btn-primary:hover { background: var(--forest-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--forest); }

.btn-text {
  background: none;
  border: none;
  color: var(--ink-soft);
  padding: 0.4em 0.2em;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-text:hover { color: var(--forest); }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  margin-bottom: 1.1em;
}
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.7em 0.8em;
  background: var(--surface);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--forest);
}
.field textarea { resize: vertical; min-height: 5em; }
.field .hint { font-size: 0.78rem; color: var(--ink-faint); }
.field .error-msg { font-size: 0.8rem; color: var(--error); display: none; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--error); }
.field.has-error .error-msg { display: block; }

.banner {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.9em 1.1em;
  font-size: 0.9rem;
  display: flex;
  gap: 0.7em;
  align-items: flex-start;
}
.banner.error {
  background: var(--error-tint);
  border-color: var(--error);
  color: var(--error);
}
.banner.info {
  background: var(--forest-tint);
  border-color: var(--forest);
  color: var(--forest);
}
:root[data-theme="dark"] .banner.info { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .banner.info { color: var(--ink); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

::selection { background: var(--gold-tint); color: var(--ink); }
