:root {
  color-scheme: light;
  --ink: #19382e;
  --muted: #718078;
  --soft: #f5f7f2;
  --paper: #ffffff;
  --line: #e7ece6;
  --green: #31845d;
  --green-dark: #246b4a;
  --green-pale: #eaf5ed;
  --orange: #c47a3a;
  --orange-pale: #fff3e8;
  --red: #b75b51;
  --red-pale: #fff0ee;
  --shadow: 0 18px 45px rgba(31, 65, 47, 0.055);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 7% 16%, rgba(225, 238, 225, .55), transparent 30rem),
    var(--soft);
}

button, input { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5.5vw, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid rgba(219, 228, 218, .75);
  background: rgba(255, 255, 255, .68);
}

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; color: var(--green); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font: 800 20px/1 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -1px; }
.brand-name > span, .brand-period { color: #72a875; }
.header-tools { display: flex; align-items: center; gap: 18px; }
.home-link { color: var(--green-dark); font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.home-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.local-tag { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.local-dot { width: 7px; height: 7px; border-radius: 50%; background: #74ad7e; box-shadow: 0 0 0 3px #e8f2e8; }

.page-shell { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 54px 0 30px; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 13px; font: 800 clamp(29px, 4vw, 41px)/1.16 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -1.8px; }
h1 span { color: #608c6c; }
.intro-copy { max-width: 520px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.intro-note { display: flex; align-items: center; gap: 12px; max-width: 260px; padding: 13px 16px; border: 1px solid #dfe9dc; border-radius: 15px; background: rgba(255, 255, 255, .65); }
.intro-note p { margin: 0; color: #5e7165; font-size: 12px; line-height: 1.5; }
.note-icon { display: grid; flex: 0 0 auto; place-items: center; width: 30px; height: 30px; color: var(--green); background: #e8f3e8; border-radius: 10px; font-size: 19px; }
.example-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 17px; padding: 14px 17px; border: 1px solid #d4e4d4; border-radius: 12px; background: #edf6ed; color: #315a41; }
.example-banner[hidden] { display: none; }
.example-banner div { display: grid; gap: 3px; }
.example-banner strong { font-size: 12px; }
.example-banner span { color: #627466; font-size: 10px; }
.example-banner a { padding: 9px 12px; border: 1px solid #c7dac8; border-radius: 8px; background: #fff; color: var(--green-dark); font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.example-banner a:hover { background: var(--green-pale); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 23px; }
.stat-card { position: relative; min-height: 111px; padding: 17px 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.78); }
.stat-card-accent { border-color: #dae9da; background: linear-gradient(135deg, #f1f8f0, #fff 83%); }
.stat-label, .stat-caption { display: block; color: var(--muted); font-size: 11px; }
.stat-value { display: block; margin: 7px 0 2px; font: 800 27px/1 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -.8px; }
.stat-card-accent .stat-value { color: var(--green-dark); }
.stat-caption { font-size: 10px; }

.workspace-grid { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); gap: 19px; align-items: start; }
.example-mode .workspace-grid { grid-template-columns: minmax(0, 1fr); }
.example-mode .form-panel { display: none; }
.form-panel, .agenda-panel { border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: var(--shadow); }
.form-panel, .agenda-panel { min-width: 0; }
.form-panel { padding: 23px 23px 19px; }
.panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 21px; }
.heading-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; color: var(--green-dark); background: var(--green-pale); font-size: 23px; font-weight: 400; }
.panel-heading .eyebrow { margin-bottom: 3px; font-size: 9px; }
h2 { margin: 0; font: 700 17px/1.35 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -.35px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin: 0 0 6px; color: #42574b; font-size: 11px; font-weight: 600; }
.field input, .field select { width: 100%; height: 42px; padding: 0 12px; outline: none; border: 1px solid #e1e8e1; border-radius: 9px; background: #fcfdfb; color: var(--ink); font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field input::placeholder { color: #a5b0a8; }
.field input:focus { border-color: #88b492; background: white; box-shadow: 0 0 0 3px rgba(90, 153, 105, .12); }
.field small { display: block; margin-top: 6px; color: #859188; font-size: 10px; line-height: 1.45; }
.field-row { display: grid; grid-template-columns: 1.13fr .87fr; gap: 10px; }
.field-row, .field-row .field, .field-row input { min-width: 0; }
.field-row select { min-width: 0; }
.field[hidden] { display: none; }
.recurrence-fields { margin-bottom: 2px; }
.recurrence-fields .field { margin-bottom: 7px; }
.recurrence-fields .field small { margin-top: 4px; }
.recurrence-preview { margin: 7px 0 12px; padding: 11px 12px; border: 1px solid #dce9dc; border-radius: 10px; background: #f3f8f1; }
.recurrence-preview[hidden] { display: none; }
.recurrence-preview p { margin: 0; }
.recurrence-preview-label { color: var(--green-dark); font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.recurrence-preview-summary { margin-top: 4px !important; color: #385c46; font-size: 11px; font-weight: 750; line-height: 1.45; }
.recurrence-preview-note { margin-top: 4px !important; color: #718078; font-size: 9px; line-height: 1.45; }
.recurrence-note { margin: 0 0 12px; color: #859188; font-size: 10px; line-height: 1.45; }
.primary-button { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 3px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 6px 15px rgba(44, 124, 84, .17); transition: background .15s ease, transform .15s ease; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button span:last-child { font-size: 18px; font-weight: 500; }
.form-feedback { min-height: 15px; margin: 8px 0 0; color: var(--green-dark); font-size: 11px; }
.privacy-note { display: flex; gap: 9px; align-items: flex-start; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf0ec; color: #809087; }
.privacy-note > span { color: #78a47d; font-size: 17px; line-height: 1; }
.privacy-note p { margin: 0; font-size: 10px; line-height: 1.55; }

.agenda-panel { min-height: 513px; padding: 25px 25px 17px; }
.agenda-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 21px; }
.agenda-heading .eyebrow { margin-bottom: 6px; font-size: 9px; }
.agenda-heading h2 { font-size: 21px; }
.section-copy { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.agenda-date { margin-top: 3px; color: #75857b; font-size: 11px; white-space: nowrap; }
.filters { display: flex; gap: 5px; overflow-x: auto; padding: 0 0 12px; border-bottom: 1px solid #edf0ec; scrollbar-width: thin; }
.data-tools { display: flex; align-items: center; justify-content: space-between; gap: 9px 14px; padding: 10px 0 7px; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.data-tools small { color: #89958d; font-size: 9px; line-height: 1.45; }
.backup-feedback { min-height: 14px; margin: 0; color: var(--green-dark); font-size: 10px; line-height: 1.4; }
.backup-feedback.is-error { color: var(--red); }
button:disabled { cursor: not-allowed; opacity: .55; }
.example-mode .data-tools, .example-mode .backup-feedback { display: none; }
.filter-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 33px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #7a8980; font-size: 10px; font-weight: 600; transition: color .16s ease, background .16s ease; }
.filter-button:hover { background: #f7f9f5; color: var(--ink); }
.filter-button.is-active { border-color: #dcebdd; background: #eef6ed; color: var(--green-dark); }
.filter-button span { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; background: #daebdb; color: var(--green-dark); font-size: 9px; }
.appointment-list { display: grid; gap: 10px; padding-top: 14px; }
.appointment-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 13px; border: 1px solid #e9eee8; border-radius: 13px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.appointment-card:hover { border-color: #d6e5d5; box-shadow: 0 5px 17px rgba(33, 62, 42, .045); }
.appointment-card.is-past { background: #fbfcfa; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 57px; border-radius: 10px; background: #f1f6ef; color: var(--green-dark); }
.date-day { font: 800 20px/1 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -.8px; }
.date-month { margin-top: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.appointment-main { min-width: 0; }
.appointment-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 4px; }
.appointment-name { overflow: hidden; color: #294438; font: 700 13px/1.35 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { display: inline-block; padding: 4px 7px; border-radius: 6px; background: var(--orange-pale); color: #ad6b35; font-size: 8px; font-weight: 700; white-space: nowrap; }
.status-badge.confirmed { background: var(--green-pale); color: var(--green-dark); }
.status-badge.cancelled { background: var(--red-pale); color: var(--red); }
.appointment-meta { overflow: hidden; margin: 0; color: #7d8b82; font-size: 10px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.appointment-meta strong { color: #65756b; font-weight: 600; }
.appointment-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.appointment-time { color: #456051; font-size: 11px; font-weight: 700; white-space: nowrap; }
.card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.demo-readonly { display: inline-flex; align-items: center; min-height: 28px; padding: 0 9px; border-radius: 7px; background: #f0f6ee; color: #657568; font-size: 9px; font-weight: 700; }
.action-button { min-height: 28px; padding: 0 8px; border: 1px solid #e3eae2; border-radius: 7px; background: white; color: #64776a; font-size: 9px; font-weight: 600; white-space: nowrap; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.action-button:hover { border-color: #a9c9ad; background: #f4faf3; color: var(--green-dark); }
.action-button.whatsapp { display: inline-flex; align-items: center; gap: 5px; border-color: #3c9a62; background: #34965a; color: white; }
.action-button.whatsapp:hover { border-color: #277b49; background: #277b49; color: white; }
.action-button.whatsapp svg { width: 12px; height: 12px; fill: currentColor; }
.action-button.danger:hover { border-color: #edcbc6; background: #fff5f3; color: var(--red); }
.storage-footnote { margin: 13px 0 0; color: #89958d; font-size: 9px; line-height: 1.5; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 240px; padding: 25px 16px; text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 55px; height: 55px; margin-bottom: 14px; border-radius: 18px; background: #f0f6ee; color: #6ea477; font-size: 25px; }
.empty-state h3 { margin: 0 0 6px; font: 700 13px/1.4 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; }
.empty-state p { max-width: 260px; margin: 0; color: #839087; font-size: 10px; line-height: 1.6; }
.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 2px 28px; color: #8a968e; font-size: 10px; }
.page-footer > span:first-child { color: #58715f; font: 800 12px ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -.4px; }
.page-footer a { color: #205b46; font-weight: 750; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.product-prompt { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 22px 0 4px; padding: 20px 22px; border: 1px solid #d9e6d9; border-radius: 16px; background: #eef6ed; }
.product-prompt-copy { max-width: 720px; }
.product-prompt-kicker { margin: 0 0 7px; color: var(--green-dark); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.product-prompt h2 { margin: 0 0 6px; color: var(--ink); font: 750 17px/1.25 ui-sans-serif, system-ui, 'Segoe UI', sans-serif; letter-spacing: -.55px; }
.product-prompt p:not(.product-prompt-kicker) { margin: 0; color: #5f7166; font-size: 11px; line-height: 1.55; }
.product-prompt .product-prompt-note { margin-top: 7px !important; color: #7b8980 !important; font-size: 9px !important; }
.product-prompt-actions { display: grid; flex: 0 0 auto; justify-items: start; gap: 10px; }
.product-prompt a { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 15px; border-radius: 10px; background: var(--green-dark); color: #fff; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.product-prompt a:hover { background: #1b5b3e; }
.product-prompt a.secondary { min-height: 0; padding: 0; background: transparent; color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.product-prompt a.secondary:hover { background: transparent; color: var(--ink); }

@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 14px; }
  .appointment-card { grid-template-columns: 46px minmax(0, 1fr); }
  .appointment-side { grid-column: 2; align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .card-actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
  .topbar { height: 63px; padding: 0 20px; }
  .local-tag { max-width: 175px; font-size: 10px; }
  .header-tools { gap: 10px; }
  .home-link { font-size: 10px; }
  .page-shell { width: min(100% - 30px, 520px); }
  .intro { align-items: flex-start; flex-direction: column; gap: 17px; padding: 36px 0 21px; }
  h1 { font-size: 32px; letter-spacing: -1.4px; }
  .intro-copy { max-width: 420px; font-size: 12px; }
  .intro-note { max-width: none; padding: 9px 11px; }
  .example-banner { align-items: flex-start; flex-direction: column; }
  .stats { gap: 8px; margin-bottom: 13px; }
  .stat-card { min-height: 96px; padding: 13px 11px; border-radius: 12px; }
  .stat-label { min-height: 25px; font-size: 9px; line-height: 1.3; }
  .stat-value { margin-top: 5px; font-size: 23px; }
  .stat-caption { font-size: 9px; }
  .workspace-grid { grid-template-columns: 1fr; gap: 13px; }
  .product-prompt { align-items: flex-start; flex-direction: column; gap: 13px; padding: 17px; }
  .product-prompt h2 { font-size: 15px; }
  .product-prompt a { min-height: 40px; }
  .form-panel { padding: 19px 18px 16px; }
  .agenda-panel { min-height: auto; padding: 19px 17px 15px; }
  .agenda-heading { flex-direction: column; gap: 7px; padding-bottom: 16px; }
  .agenda-heading h2 { font-size: 19px; }
  .agenda-date { margin: 0; font-size: 9px; }
  .data-tools { align-items: flex-start; flex-direction: column; }
  .filters { margin-right: -3px; }
  .filter-button { padding: 0 9px; }
  .appointment-card { grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 11px; }
  .appointment-side { flex-wrap: wrap; gap: 7px; }
  .page-footer { padding-top: 18px; font-size: 9px; }
}

@media (max-width: 390px) {
  .local-tag { max-width: 137px; font-size: 9px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card { padding: 11px 8px; }
  .stat-label { font-size: 8px; }
  .stat-caption { font-size: 8px; }
  .appointment-topline { gap: 5px; }
  .appointment-name { max-width: 145px; font-size: 12px; }
  .card-actions { gap: 4px; }
  .action-button { padding: 0 6px; font-size: 8px; }
}

/* Mais espaço para tocar e ler a agenda em telas pequenas. */
.field > span { font-size: 12px; }
.field input, .field select { min-height: 44px; font-size: 14px; }
.field small, .recurrence-note, .recurrence-preview-note, .privacy-note p { font-size: 11px; }
.form-feedback, .section-copy, .product-prompt p:not(.product-prompt-kicker) { font-size: 12px; line-height: 1.5; }
.action-button, .filter-button { min-height: 36px; font-size: 11px; }
.storage-footnote, .data-tools small { font-size: 11px; }
.appointment-meta { font-size: 11px; }
#appointment-form { scroll-margin-top: 18px; }
@media (max-width: 700px) {
  .intro-copy, .intro-note p { font-size: 13px; }
  .stat-label, .stat-caption { font-size: 11px; }
  .stat-card { min-height: 105px; }
  .appointment-name { font-size: 14px; }
  .action-button { min-height: 38px; }
  .example-banner strong, .example-banner span, .example-banner a { font-size: 12px; }
  .field input, .field select { font-size: 16px; }
}
button:focus-visible, a:focus-visible { outline: 3px solid #73ad83; outline-offset: 3px; }
