:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #EEF2F8;
  --text: #121826;
  --muted: #5B6578;
  --faint: #8B97AC;
  --border: #DCE2EC;
  --field: #FFFFFF;
  --accent: #2563EB;
  --accent-hover: #1D4FD8;
  --accent-soft: #E5EDFF;
  --danger: #D93B32;
  --danger-soft: #FDECEB;
  --ok: #1F8A3B;
  --ok-soft: #E6F6EA;
  --brand-1: #0E1117;
  --brand-2: #1A2B52;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1117; --surface: #161C28; --surface-2: #1B2230; --text: #E6EAF2;
    --muted: #9AA5B8; --faint: #6B778C; --border: #2A3446; --field: #1B2230;
    --accent: #4F8BFF; --accent-hover: #6C9FFF; --accent-soft: #22304F;
    --danger: #F26B63; --danger-soft: #3A1E20; --ok: #4ACB66; --ok-soft: #173222;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }

/* ------------------------------------------------------------ logo */
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700;
  font-size: 1.2rem; color: inherit; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #4F8BFF, #2563EB); color: #fff; font-size: .95rem; }

/* --------------------------------------------------- auth (split) */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth-brand {
  background: radial-gradient(circle at 20% 15%, #24407A 0, transparent 45%),
              linear-gradient(160deg, var(--brand-1), var(--brand-2));
  color: #E6EAF2; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand h2 { font-size: 2.1rem; max-width: 420px; color: #fff; }
.auth-brand p { color: #A9B5CB; max-width: 420px; }
.auth-brand ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; color: #C9D3E4; }
.auth-brand li::before { content: "✓"; color: #6C9FFF; font-weight: 700; margin-right: .6rem; }
.auth-brand small { color: #6B778C; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 1.75rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.75rem; }

/* ---------------------------------------------------------- forms */
.form { display: grid; gap: 1.05rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; align-items: start; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field label .req { color: var(--danger); }
.field label .opt { color: var(--faint); font-weight: 500; }
.input-wrap { position: relative; }
.field input:not([type=checkbox]), .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--field);
  border: 1.5px solid var(--border); border-radius: 10px; padding: .78rem .9rem; outline: none;
  transition: border-color .15s, box-shadow .15s; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238B97AC' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem;
}
.field input:not([type=checkbox]):focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field .msg { font-size: .8rem; color: var(--danger); min-height: 0; }
.field .hint { font-size: .8rem; color: var(--faint); }
.field .tag { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: .2rem .45rem; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); pointer-events: none; }
.field .tag:empty { display: none; }
.has-tag input { padding-right: 4.2rem; }
.toggle-pass { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--faint); cursor: pointer; padding: .35rem .5rem; font: inherit;
  font-size: .8rem; font-weight: 600; border-radius: 6px; }
.toggle-pass:hover { color: var(--text); background: var(--surface-2); }
.has-toggle input { padding-right: 4.2rem; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .9rem; }
.check { display: inline-flex; gap: .5rem; align-items: center; color: var(--muted); cursor: pointer; }
.check { align-items: flex-start; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit;
  font-weight: 600; font-size: 1rem; padding: .85rem 1.3rem; border-radius: 10px; border: 0;
  cursor: pointer; background: var(--accent); color: #fff; transition: background .15s, transform .05s;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.light { background: #fff; color: #121826; }
.btn.light:hover { background: #E8EEFB; }

.alert { border-radius: 10px; padding: .8rem 1rem; font-size: .92rem; }
.alert:empty { display: none; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--accent-soft); color: var(--accent); }
.alert button.link { background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer; font-weight: 600; }

.divider { text-align: center; color: var(--faint); font-size: .9rem; margin-top: 1.5rem; }
.legal { font-size: .75rem; color: var(--faint); margin-top: 1.25rem; }
.legal a { font-weight: 400; color: inherit; text-decoration: underline; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor;
  border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.center-box { text-align: center; }
.icon-circle { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 1.25rem; font-size: 2rem; background: var(--accent-soft); color: var(--accent); }
.icon-circle.ok { background: var(--ok-soft); color: var(--ok); }
.icon-circle.err { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------- site header */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar .inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex;
  align-items: center; justify-content: space-between; gap: 1rem; }
.topbar nav { display: flex; align-items: center; gap: 1.2rem; font-size: .95rem; }
.topbar nav a { color: var(--muted); }
.topbar nav a.btn { color: #fff; padding: .55rem 1rem; font-size: .9rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------- my-account */
.page-head { padding: 40px 0 24px; }
.page-head .kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.page-head h1 { font-size: 2rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding-bottom: 48px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.dl { display: grid; gap: .8rem; margin: 0; }
.dl div { display: grid; gap: .1rem; }
.dl dt { font-size: .78rem; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: #FFF4DB; color: #A0670A; }

/* -------------------------------------------------------- officehub */
.hero { padding: 72px 0 48px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero .kicker { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .5rem 0 1rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.mock { background: linear-gradient(160deg, var(--brand-1), var(--brand-2)); border-radius: 20px; padding: 22px;
  box-shadow: var(--shadow); color: #C9D3E4; aspect-ratio: 4 / 3.2; display: grid; grid-template-rows: auto 1fr; gap: 14px; }
.mock .bar { display: flex; gap: 6px; }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2C374A; }
.mock .body { display: grid; grid-template-columns: 70px 1fr; gap: 14px; }
.mock .side { background: #151C28; border-radius: 12px; }
.mock .main { display: grid; grid-template-rows: auto 1fr 1fr; gap: 12px; }
.mock .tile { background: #1B2230; border-radius: 12px; }
.mock .tile.top { height: 46px; background: linear-gradient(90deg, #2563EB, #4F8BFF); opacity: .85; }
.mock .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section { padding: 56px 0; }
.section h2 { font-size: 1.9rem; text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto 2.5rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.25rem; margin-bottom: 1rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); gap: 20px; justify-content: center; }
.plan { display: flex; flex-direction: column; gap: 1rem; }
.plan .price { font-size: 2.3rem; font-weight: 700; }
.plan .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan.featured { border: 2px solid var(--accent); }
.pay-note { text-align: center; color: var(--faint); font-size: .85rem; margin-top: 1.5rem; }
footer.site { border-top: 1px solid var(--border); padding: 28px 0; color: var(--faint); font-size: .85rem; }
footer.site .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }


/* -------------------------------------------- termos / privacidade */
.doc { max-width: 820px; margin: 40px auto 56px; padding: 40px 44px; }
.doc-meta { font-size: .85rem; color: var(--faint); margin-bottom: 1.25rem; }
.doc-body { line-height: 1.7; overflow-wrap: anywhere; }
.doc-body h1 { font-size: 2rem; margin: 0 0 1rem; }
.doc-body h2 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
.doc-body h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.doc-body p, .doc-body ul { margin: 0 0 1rem; color: var(--text); }
.doc-body ul { padding-left: 1.3rem; }
.doc-body li { margin-bottom: .35rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc-body th, .doc-body td { border: 1px solid var(--border); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.doc-body th { background: var(--surface-2); font-weight: 600; }

/* ------------------------------------------------------------ admin */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: transparent; color: var(--muted);
  padding: .55rem 1rem; border-radius: 9px; cursor: pointer; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.field textarea { width: 100%; font: .9rem/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--text);
  background: var(--field); border: 1.5px solid var(--border); border-radius: 10px; padding: .8rem .9rem; outline: none; resize: vertical; min-height: 420px; }
.field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.invalid textarea { border-color: var(--danger); }
.preview { max-height: 640px; overflow-y: auto; padding-right: 6px; font-size: .95rem; }
.versoes-lista { display: grid; gap: 8px; }
.versao-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem;
  border: 1px solid var(--border); border-radius: 10px; font-size: .92rem; flex-wrap: wrap; }
.versao-item .acoes { display: flex; gap: .5rem; }
.btn.sm { padding: .4rem .8rem; font-size: .85rem; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } .doc { padding: 24px 18px; margin-top: 20px; } }


/* ---------------------------------------------------------- produtos */
.secao { font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: transparent; color: var(--muted);
  padding: .55rem 1rem; border-radius: 9px; cursor: pointer; }
.secao.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.recursos { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .6rem; color: var(--muted); }
.recursos li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: .6rem; }
.produto-card { display: flex; flex-direction: column; gap: .5rem; color: inherit; text-decoration: none;
  transition: transform .12s, border-color .12s; }
.produto-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent); }
.produto-card p { color: var(--muted); margin: 0; flex: 1; }
.produto-card .price { font-weight: 700; }
.produto-card .btn { align-self: flex-start; }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-main { align-items: flex-start; }
  .auth-brand { padding: 24px 16px; }
  .auth-brand .pitch { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .mock { display: none; }
}
@media (max-width: 560px) {
  .auth-main { padding: 32px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .container, .topbar .inner { padding-left: 16px; padding-right: 16px; }
  .topbar nav .hide-sm { display: none; }
}
