/* =========================================================
   CLÍNICA DR. NEWTON MUREB — IDENTIDADE VISUAL
   Paleta clínica: azul-petróleo, verde-água e tons neutros.
   ========================================================= */

:root {
  --primary: #164b59;
  --primary-dark: #103844;
  --primary-soft: #e8f2f2;
  --accent: #62a99d;
  --accent-dark: #397f76;
  --text: #263b42;
  --muted: #6b7f84;
  --border: #dce7e7;
  --surface: #ffffff;
  --background: #f3f7f7;
  --success: #23836b;
  --danger: #b84b4b;
  --radius: 16px;
  --shadow: 0 14px 38px rgba(19, 57, 67, .09);
}

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

body {
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 5%, rgba(98, 169, 157, .13), transparent 28rem),
    var(--background);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 18px rgba(16, 56, 68, .05);
}

.header-inner {
  width: min(1080px, calc(100% - 40px));
  min-height: 104px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--primary), var(--accent-dark));
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -1px;
}

.brand-copy {
  flex: 1;
  min-width: 0;
}

.eyebrow,
.section-kicker,
.intro-label {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.brand-copy h1 {
  color: var(--primary-dark);
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.2;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.header-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 15px;
  transition: .2s ease;
}

.header-link:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

main {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 30px;
}

.intro {
  margin: 0 0 26px;
}

.intro h2 {
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -1px;
}

.intro p {
  max-width: 620px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.tabs-wrapper {
  display: flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 22px;
  background: #e6eeee;
  border-radius: 13px;
}

.tab {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  color: #617579;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.tab.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(22, 75, 89, .2);
}

.tab-icon {
  font-size: 19px;
  line-height: 1;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: appear .22s ease;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading {
  margin: 0 0 18px;
}

.section-heading h2 {
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 21px;
  letter-spacing: -.4px;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

#formAgenda,
.cancel-card,
.success-msg {
  overflow: hidden;
  border: 1px solid rgba(220, 231, 231, .9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.form-section {
  padding: 29px 30px 22px;
}

.form-section + .form-section {
  border-left: 1px solid var(--border);
}

.section-title {
  margin-bottom: 21px;
  padding-bottom: 11px;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.field-group {
  min-width: 0;
  margin-bottom: 15px;
}

.field-group label {
  display: block;
  margin-bottom: 6px;
  color: #52686e;
  font-size: 12px;
  font-weight: 700;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  color: var(--text);
  background: #fbfdfd;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field-group textarea {
  min-height: 83px;
  resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(98, 169, 157, .15);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #9aabad;
}

.field-group select {
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-note {
  margin-top: -5px;
  color: var(--muted);
  font-size: 11px;
}

.form-footer {
  padding: 21px 30px 23px;
  text-align: center;
  background: #f7fafa;
  border-top: 1px solid var(--border);
}

#btnAgendar,
#btnCancelar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 5px 14px rgba(22, 75, 89, .18);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}

#btnAgendar:hover:not(:disabled),
#btnCancelar:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

#btnAgendar:disabled,
#btnCancelar:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

.privacy-note {
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}

.success-msg {
  padding: 42px 25px;
  text-align: center;
}

.success-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-size: 29px;
  font-weight: 700;
}

.success-msg h3 {
  color: var(--primary-dark);
  font-size: 21px;
}

.success-msg p {
  max-width: 460px;
  margin: 8px auto 20px;
  color: var(--muted);
  font-size: 13px;
}

.btn-novo {
  padding: 11px 20px;
  border: 1px solid var(--accent-dark);
  border-radius: 9px;
  color: var(--accent-dark);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn-novo:hover {
  color: #fff;
  background: var(--accent-dark);
}

.cancel-card {
  max-width: 550px;
  margin: 0 auto;
  padding: 29px;
}

.cancel-info {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid #cfe3e0;
  border-radius: 10px;
  color: #315f5a;
  background: var(--primary-soft);
  font-size: 12px;
}

.cancel-info span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-dark);
  font-weight: 800;
}

.cancel-info p {
  margin: 0;
}

#btnCancelar {
  background: var(--danger);
  box-shadow: 0 5px 14px rgba(184, 75, 75, .16);
}

#btnCancelar:hover:not(:disabled) {
  background: #963b3b;
}

.feedback-cancel {
  max-width: 550px;
  margin: 15px auto 0;
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.feedback-cancel.success {
  color: #17644f;
  background: #e9f6f1;
  border: 1px solid #b9e2d3;
}

.feedback-cancel.error {
  color: #963b3b;
  background: #fff0f0;
  border: 1px solid #f0caca;
}

.hidden {
  display: none !important;
}

.site-footer {
  margin-top: 38px;
  padding: 22px 10px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.site-footer strong {
  color: var(--primary);
  font-size: 12px;
}

.site-footer a {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 700px) {
  .header-inner {
    width: min(100% - 28px, 600px);
    min-height: 82px;
    gap: 12px;
  }

  .brand-mark {
    width: 47px;
    height: 47px;
    flex-basis: 47px;
    border-radius: 13px;
    font-size: 16px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }

  .brand-copy h1 {
    font-size: 17px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .header-link {
    padding: 7px 10px;
    font-size: 10px;
    white-space: nowrap;
  }

  main {
    width: calc(100% - 28px);
    padding-top: 29px;
  }

  .tabs-wrapper {
    gap: 5px;
  }

  .tab {
    min-height: 44px;
    gap: 5px;
    padding: 8px 7px;
    font-size: 11px;
  }

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

  .form-section {
    padding: 23px 20px 12px;
  }

  .form-section + .form-section {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .form-footer {
    padding: 19px 20px 21px;
  }

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

  .cancel-card {
    padding: 21px 18px;
  }
}

@media (max-width: 390px) {
  .header-link {
    display: none;
  }

  .brand-copy h1 {
    font-size: 16px;
  }
}
