@font-face { font-family: "DM Sans"; src: url("/s/fonts/dm-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/s/fonts/space-grotesk-latin.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --bg: #f2f0e9; --surface: #fffefa; --surface-2: #f7f5ee; --line: #dedbd1; --line-strong: #8a8f83;
  --ink: #20261f; --ink-2: #444b41; --ink-3: #61685c;
  --accent: #bb4a22; --accent-hover: #a5401c; --accent-ink: #fffaf2; --accent-soft: #f8e8df;
  --ok: #3d6713; --danger: #a2293d; --danger-soft: #fbecef; --dark: #171b17; --dark-ink: #f4f1e8;
  --radius: 16px; --radius-sm: 10px;
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "DM Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171b17; --surface: #1d231d; --surface-2: #222821; --line: #383e35; --line-strong: #6c7366;
    --ink: #f4f1e8; --ink-2: #d6d8cf; --ink-3: #a9ada1;
    --accent: #c4ef75; --accent-hover: #d4f797; --accent-ink: #1a2515; --accent-soft: #2f3a24;
    --ok: #c4ef75; --danger: #ff9aac; --danger-soft: #492a37; --dark: #121512;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font: 600 15px var(--font); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .6; cursor: wait; }

.logo { font: 700 19px var(--display); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo img { width: 28px; height: 28px; }

/* Login e área logada */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: min(440px, 100%); display: grid; gap: 20px; }
.card h1 { font-size: 1.8rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.tabs button { border: 0; background: transparent; min-height: 40px; border-radius: 999px; font: 600 14px var(--font); color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font: 600 14px var(--font); }
label small { font-weight: 400; color: var(--ink-3); }
input, select { width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 15px var(--font); }
.error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; }
.error:empty { display: none; }
.muted { color: var(--ink-3); font-size: 14px; }
.app-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.app-main { padding: 32px 0 64px; display: grid; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; }
.panel h2 { font-size: 1.3rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rows { display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); flex-wrap: wrap; }
.row .meta { display: grid; gap: 2px; min-width: 0; }
.row .meta span { color: var(--ink-3); font-size: 14px; overflow-wrap: anywhere; }
.row .acts { display: flex; gap: 8px; }
.pill { font: 600 12px var(--font); padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
}
#form-ai > .btn { justify-self: start; }
.row-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Página de texto (política de privacidade) */
.legal { max-width: 70ch; padding: 40px 0 64px; display: grid; gap: 24px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal section { display: grid; gap: 8px; }
.legal h2 { font-size: 1.2rem; }
.legal p { color: var(--ink-2); }
