/* Agenda re/crie — base visual (preto + dourado) */
/* Layout: cartão central no público; barra lateral + conteúdo no painel */
:root {
  --ink: #0b0b0b;
  --bg: #111;
  --card: #151515;
  --raise: #1d1d1d;
  --field: #101010;
  --line: rgba(212, 162, 76, .16);
  --line-strong: rgba(212, 162, 76, .35);
  --gold: #d4a24c;
  --gold-soft: #e8c988;
  --gold-deep: #8a6a2f;
  --text: #f2ede4;
  --muted: #8a8378;
  --soft: #c9c2b6;
  --faint: #5c5750;
  --ok: #3ccf7a;
  --wa: #22c35e;
  --danger: #e2675a;
  --nfc: #d4a24c;
  --bio: #6aa8ff;
  --qr: #43d1c0;
  --link: #b49cff;
  --manual: #8a8378;
  --hairline: rgba(255, 255, 255, .14);
  --tint: rgba(255, 255, 255, .05);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  color-scheme: dark;
}
:root[data-theme="claro"] {
  --ink: #fbf8f2;
  --bg: #f7f3ea;
  --card: #ffffff;
  --raise: #f1ebdc;
  --field: #fffdf8;
  --line: rgba(138, 106, 47, .18);
  --line-strong: rgba(138, 106, 47, .35);
  --gold: #a9762e;
  --gold-soft: #8a6a2f;
  --gold-deep: #6b4f1f;
  --text: #231f18;
  --muted: #6b6355;
  --soft: #46402f;
  --faint: #a69c89;
  --ok: #1f9d57;
  --wa: #1fae57;
  --danger: #c23b2e;
  --nfc: #a9762e;
  --bio: #3573d6;
  --qr: #0f8a7c;
  --link: #7456d6;
  --manual: #6b6355;
  --hairline: rgba(35, 31, 24, .14);
  --tint: rgba(35, 31, 24, .05);
  color-scheme: light;
}
* { box-sizing: border-box }
html, body { margin: 0; min-height: 100% }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
a { color: var(--gold) }
[hidden] { display: none !important }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px }
.num { font-variant-numeric: tabular-nums }

label.lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 5px }
.input, input[type=text].input, input[type=email].input, input[type=password].input, input[type=tel].input, select.input, textarea.input {
  width: 100%; background: var(--field); border: 1px solid rgba(212, 162, 76, .2); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-size: 13.5px; outline: none; transition: border-color .15s
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 162, 76, .12) }
.input::placeholder { color: var(--faint) }
textarea.input { resize: vertical; min-height: 70px }

.cta {
  width: 100%; border: none; border-radius: 16px; padding: 15px; font-size: 15px; font-weight: 800;
  background: linear-gradient(120deg, var(--gold), var(--gold-deep)); color: #161616;
  box-shadow: 0 12px 24px rgba(212, 162, 76, .25); transition: transform .1s, opacity .15s
}
.cta:active { transform: scale(.99) }
.cta:disabled { opacity: .45; cursor: default; box-shadow: none }
.cta small { display: block; font-weight: 600; font-size: 12px; opacity: .75; margin-top: 2px }

.pill-btn { background: transparent; border: 1px solid var(--line-strong); color: var(--gold); font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 8px 14px; white-space: nowrap }
.pill-btn:hover { background: rgba(212, 162, 76, .08) }
.pill-btn.ghost { border-color: var(--hairline); color: var(--muted) }
.pill-btn.danger { border-color: rgba(226, 103, 90, .4); color: var(--danger) }
.pill-btn:disabled { opacity: .5; cursor: default }

.tema-btn { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--raise); color: var(--gold); display: flex; align-items: center; justify-content: center }
.tema-btn:hover { background: var(--tint) }
.tema-btn svg { width: 17px; height: 17px }

.tag { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .3px; padding: 3px 8px; border-radius: 6px; text-transform: uppercase }
.tag.nfc { color: var(--nfc); background: rgba(212, 162, 76, .14) }
.tag.bio { color: var(--bio); background: rgba(106, 168, 255, .14) }
.tag.qr { color: var(--qr); background: rgba(67, 209, 192, .14) }
.tag.link { color: var(--link); background: rgba(180, 156, 255, .14) }
.tag.manual { color: var(--muted); background: var(--tint) }

.avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #161616; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center }

.err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin: 4px 0 0 }

.toast-global {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: #222; border: 1px solid var(--line-strong); color: var(--text); padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); text-align: center
}
.toast-global.show { opacity: 1; transform: translate(-50%, 0) }
.toast-global.erro { border-color: rgba(226, 103, 90, .5) }

.spinner { width: 22px; height: 22px; border: 2.5px solid rgba(212, 162, 76, .2); border-top-color: var(--gold); border-radius: 50%; animation: gira .7s linear infinite }
@keyframes gira { to { transform: rotate(360deg) } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important } }
