/* Agenda imersiva — Nogueira Lins */
:root { --navy: #001e50; --blue: #0a3a7d; --accent: #00b0f0; --dark: #001237; --ink: #eaf0fb; --muted: #a9bad6; --glass: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .16); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ag { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--dark); color: var(--ink); font-family: "VWText", "Manrope", system-ui, "Segoe UI", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.ag__bg { position: fixed; inset: 0; z-index: -1; background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(0, 176, 240, .28), transparent 60%),
    radial-gradient(50rem 40rem at 100% 110%, rgba(10, 58, 125, .75), transparent 60%), var(--dark); }
.ag__top { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; padding-top: max(16px, env(safe-area-inset-top)); }
.ag__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 300; font-size: 1.2rem; }
.ag__brand b { font-weight: 800; color: var(--accent); }
.ag__brand svg { width: 38px; height: 38px; }
.ag__exit { font-size: .82rem; color: var(--muted); text-decoration: none; padding: 8px 4px; }
.ag__exit:hover { color: #fff; }
.ag__progress { height: 3px; background: rgba(255, 255, 255, .1); margin: 0 22px; border-radius: 3px; overflow: hidden; }
.ag__progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }

.ag__main { width: min(760px, 100%); margin: 0 auto; padding: 28px 22px 90px; }
.ag__stage { position: relative; }
.ag__step { opacity: 0; transform: translateY(18px); transition: opacity .3s ease, transform .35s ease; }
.ag__step.is-in { opacity: 1; transform: none; }
.ag__step.is-out { opacity: 0; transform: translateX(-24px); position: absolute; inset: 0 0 auto 0; pointer-events: none; }

.ag__eyebrow { margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.ag__title { margin: 0 0 10px; font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.ag__title em { font-style: normal; font-weight: 800; color: var(--accent); }
.ag__title:focus { outline: 0; }
.ag__lead { margin: 0 0 22px; color: var(--muted); font-size: 1.02rem; }
.ag__sub { font-size: 1.1rem; margin: 22px 0 10px; }
.ag__back { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700; padding: 8px 0 16px; cursor: pointer; }
.ag__back:hover { color: #fff; }

/* botões */
.btn { display: inline-block; border: 1.5px solid transparent; border-radius: 12px; padding: 14px 26px; min-height: 48px; font: inherit; font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; text-decoration: none; text-align: center; transition: .15s; }
.btn--accent { background: var(--accent); color: #00122e; }
.btn--accent:hover { filter: brightness(1.08); }
.btn--accent:disabled { opacity: .6; cursor: wait; }
.btn--ghost { border-color: var(--line); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: var(--accent); }
.btn--block { display: block; width: 100%; }

/* opções do início */
.ag__grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.ag__option { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; text-align: left; background: var(--glass); border: 1.5px solid var(--line); border-radius: 18px; padding: 18px; color: #fff; font: inherit; cursor: pointer; transition: transform .18s, border-color .18s, background .18s; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ag__option:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(0, 176, 240, .12); }
.ag__option strong { font-size: 1.08rem; }
.ag__option small { grid-column: 2; color: var(--muted); font-size: .84rem; }
.ag__emoji { grid-row: span 2; font-size: 1.9rem; width: 52px; height: 52px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); border-radius: 14px; }

.ag__ai { margin-top: 24px; padding: 18px; background: var(--glass); border: 1.5px dashed var(--line); border-radius: 18px; display: grid; gap: 10px; }
.ag__ai label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.ag__chatlink { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; font: inherit; font-weight: 700; cursor: pointer; padding: 10px 0; text-decoration: underline; text-underline-offset: 4px; }
.ag__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #00122e; display: grid; place-items: center; font-weight: 800; }

/* campos */
.ag input, .ag textarea { width: 100%; padding: 14px 16px; margin-top: 6px; background: rgba(255, 255, 255, .08); border: 1.5px solid var(--line); border-radius: 12px; color: #fff; font: inherit; font-size: 16px; }
.ag input::placeholder, .ag textarea::placeholder { color: #8da2c6; }
.ag input:focus, .ag textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 176, 240, .25); }
.ag input[type=checkbox] { width: 22px; height: 22px; margin: 2px 12px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.ag label { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.hp { position: absolute; left: -9999px; }

/* veículos */
.ag__cars { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 14px 0; }
.ag__car { background: var(--glass); border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; text-align: left; color: #fff; font: inherit; padding: 0 0 12px; cursor: pointer; display: grid; gap: 2px; transition: .18s; }
.ag__car:hover, .ag__car.is-sel { border-color: var(--accent); transform: translateY(-2px); }
.ag__car img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0b2559; margin-bottom: 8px; }
.ag__car strong, .ag__car small, .ag__car span { padding: 0 12px; }
.ag__car strong { font-size: .95rem; }
.ag__car small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.ag__car span { font-weight: 800; color: var(--accent); margin-top: 4px; }
.ag__skip { background: none; border: 0; color: var(--muted); font: inherit; font-size: .88rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 12px 0; }

.ag__list { display: grid; gap: 10px; }
.ag__row { display: grid; text-align: left; background: var(--glass); border: 1.5px solid var(--line); border-radius: 14px; padding: 16px 18px; color: #fff; font: inherit; cursor: pointer; transition: .18s; }
.ag__row:hover, .ag__row.is-sel { border-color: var(--accent); background: rgba(0, 176, 240, .12); }
.ag__row small { color: var(--muted); }

/* data e hora */
.ag__days { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.ag__days::-webkit-scrollbar { display: none; }
.ag__day { flex: 0 0 auto; width: 68px; display: grid; justify-items: center; gap: 0; padding: 10px 6px; background: var(--glass); border: 1.5px solid var(--line); border-radius: 16px; color: #fff; font: inherit; cursor: pointer; scroll-snap-align: start; transition: .15s; }
.ag__day small { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.ag__day strong { font-size: 1.5rem; line-height: 1.2; }
.ag__day:hover { border-color: var(--accent); }
.ag__day.is-sel { background: var(--accent); border-color: var(--accent); color: #00122e; }
.ag__day.is-sel small { color: #00122e; }
.ag__periods { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.ag__chip { background: none; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); padding: 8px 16px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; min-height: 40px; }
.ag__chip.is-sel { background: #fff; color: var(--navy); border-color: #fff; }
.ag__times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ag__time { display: grid; justify-items: center; background: var(--glass); border: 1.5px solid var(--line); border-radius: 12px; color: #fff; font: inherit; font-weight: 800; font-size: 1.02rem; padding: 12px 6px; min-height: 52px; cursor: pointer; transition: .15s; }
.ag__time small { font-size: .62rem; font-weight: 600; color: #ffd27a; }
.ag__time:hover { border-color: var(--accent); transform: translateY(-1px); }
.ag__time.is-sel { background: var(--accent); color: #00122e; border-color: var(--accent); }

/* resumo e formulário */
.ag__summary { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 14px 0 20px; }
.ag__summary > div { background: rgba(0, 18, 55, .85); padding: 12px 16px; display: grid; gap: 2px; }
.ag__summary span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.ag__summary strong { font-weight: 700; }
.ag__summary small { color: var(--muted); font-weight: 400; }
.ag__form { display: grid; gap: 14px; }
.ag__check { display: flex !important; align-items: flex-start; color: var(--ink) !important; font-size: .82rem !important; font-weight: 500 !important; }
.ag__check a { color: var(--accent); }
.ag__note { color: var(--muted); font-size: .88rem; margin: 10px 0; }
.ag__note--err { color: #ffb4b4; background: rgba(176, 0, 32, .22); padding: 10px 14px; border-radius: 10px; }
.ag__note--ok { color: #9ef0c3; background: rgba(11, 107, 58, .3); padding: 10px 14px; border-radius: 10px; }
.ag__actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.ag__actions form { display: contents; }
.ag__resched { margin-top: 20px; }

/* conclusão */
.ag__done { text-align: center; }
.ag__done .ag__summary { text-align: left; }
.ag__done .ag__actions { justify-content: center; }
.ag__check-anim { width: 84px; height: 84px; margin: 6px auto 14px; }
.ag__check-anim svg { width: 100%; height: 100%; }
.ag__check-anim circle { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: agDraw .7s ease forwards; }
.ag__check-anim path { stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: agDraw .5s .55s ease forwards; }
@keyframes agDraw { to { stroke-dashoffset: 0; } }

/* chat em tela cheia (mobile) / janela lateral (desktop) */
.ag__chat { position: fixed; z-index: 80; inset: 0; background: #fff; display: flex; flex-direction: column; animation: agUp .3s ease; }
@keyframes agUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
body.ag-chat-open { overflow: hidden; }
@media (min-width: 900px) {
    .ag__chat { inset: 24px 24px 24px auto; width: 440px; border-radius: 20px; overflow: hidden; box-shadow: 0 40px 100px rgba(0, 10, 40, .6); }
    .ag__grid { grid-template-columns: 1fr 1fr; }
    .ag__cars { grid-template-columns: repeat(3, 1fr); }
}

/* cookies */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 420px; background: #fff; color: #12233f; border-radius: 14px; padding: 16px; z-index: 90; display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 4px; flex-basis: 100%; }
.cookie a { color: var(--blue); }
.cookie .btn--ghost { color: #001e50; border-color: #001e50; }
.cookie .btn { padding: 9px 20px; min-height: 44px; font-size: .72rem; }

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

[hidden] { display: none !important; }

.ag__step > .btn { margin-top: 14px; }
