/* Astraz Core · Portal do cliente
 * Tokens iguais aos do tema astraz-studio (o portal funciona mesmo sem o tema). */
:root {
	--az-bg: #080808;
	--az-bg-2: #0b0b0d;
	--az-card: #111113;
	--az-card-2: #151518;
	--az-line: rgba(255, 255, 255, .08);
	--az-line-2: rgba(255, 255, 255, .14);
	--az-text: #f5f5f7;
	--az-muted: #a1a1aa;
	--az-dim: #71717a;
	--az-brand: #e040e3;
	--az-brand-ink: #0b0b0d;
	--az-purple: #6d28d9;
	--az-ok: #34d399;
	--az-warn: #fbbf24;
	--az-bad: #f87171;
	--az-info: #60a5fa;
	--az-r: 14px;
	--az-r-sm: 10px;
	--az-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--az-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--az-ease: cubic-bezier(.22, 1, .36, 1);
	color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.azp { margin: 0; background: var(--az-bg); color: var(--az-text); font: 15px/1.55 var(--az-font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--az-brand); outline-offset: 2px; border-radius: 6px; }
.azp-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.azp-skip { position: absolute; left: 12px; top: -48px; background: var(--az-brand); color: var(--az-brand-ink); padding: 8px 14px; border-radius: 999px; z-index: 100; font-weight: 600; text-decoration: none; }
.azp-skip:focus { top: 12px; }

/* ---------- app shell ---------- */
.azp-app { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.azp-side { display: none; }
.azp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: rgba(8, 8, 8, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--az-line); }
.azp-top__bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--az-line); color: var(--az-muted); }
.azp-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 99px; background: var(--az-brand); box-shadow: 0 0 0 3px var(--az-bg); }
.azp-main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); width: 100%; max-width: 1080px; margin: 0 auto; outline: 0; }
.azp-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(11, 11, 13, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--az-line); }
.azp-bottom a { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; font-size: 11px; color: var(--az-dim); text-decoration: none; border-radius: 10px; }
.azp-bottom a.is-active { color: var(--az-text); }
.azp-bottom a.is-active .azp-i { color: var(--az-brand); }

.azp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.azp-brand__mark { width: 9px; height: 9px; background: var(--az-brand); transform: rotate(45deg); transition: transform .5s var(--az-ease); }
.azp-brand:hover .azp-brand__mark { transform: rotate(135deg); }
.azp-brand--lg { font-size: 18px; margin-bottom: 28px; }

@media (min-width: 960px) {
	.azp-app { grid-template-columns: 248px 1fr; }
	.azp-top, .azp-bottom { display: none; }
	.azp-side { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; padding: 24px 16px; border-right: 1px solid var(--az-line); background: var(--az-bg-2); }
	.azp-side .azp-brand { padding: 4px 10px; }
	.azp-main { padding: 40px 40px 64px; }
}
.azp-nav { display: grid; gap: 2px; }
.azp-nav__a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--az-muted); text-decoration: none; font-size: 14px; transition: background .2s, color .2s; }
.azp-nav__a:hover { background: var(--az-card); color: var(--az-text); }
.azp-nav__a.is-active { background: var(--az-card-2); color: var(--az-text); box-shadow: inset 0 0 0 1px var(--az-line); }
.azp-nav__a.is-active .azp-i { color: var(--az-brand); }
.azp-count { margin-left: auto; font-style: normal; font-size: 11px; min-width: 20px; padding: 1px 6px; text-align: center; border-radius: 99px; background: var(--az-brand); color: var(--az-brand-ink); font-weight: 600; }
.azp-side__foot { margin-top: auto; display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--az-line); }
.azp-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; color: var(--az-muted); }
.azp-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: linear-gradient(135deg, var(--az-brand), var(--az-purple)); color: #fff; font-weight: 600; font-size: 13px; }

/* ---------- tipografia ---------- */
.azp-eyebrow { margin: 0 0 8px; font: 500 11px/1 var(--az-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--az-brand); }
.azp-h1 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.azp-h2 { margin: 0 0 14px; font-size: 16px; letter-spacing: -.01em; font-weight: 600; }
.azp-h3 { font-size: 16px; font-weight: 600; }
.azp-lead { margin: 10px 0 0; color: var(--az-muted); max-width: 60ch; }
.azp-muted { color: var(--az-muted); font-size: 13px; }
.azp-mono { font-family: var(--az-mono); font-size: 12px; }
.azp-big { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.azp-link { color: var(--az-muted); font-size: 13px; text-decoration: none; }
.azp-link:hover { color: var(--az-text); }
.azp-prose { color: #d4d4d8; }
.azp-prose p { margin: 0 0 12px; }
.azp-crumbs { margin-bottom: 14px; font-size: 13px; color: var(--az-dim); }
.azp-crumbs a { color: var(--az-muted); text-decoration: none; }

/* ---------- blocos ---------- */
.azp-head { margin-bottom: 24px; }
.azp-head--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.azp-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 0 0; color: var(--az-muted); font-size: 13px; }
.azp-card { background: var(--az-card); border: 1px solid var(--az-line); border-radius: var(--az-r); padding: 20px; margin-bottom: 16px; }
.azp-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.azp-card--auth { width: 100%; max-width: 420px; padding: 28px; }
.azp-card--link a { display: grid; gap: 12px; text-decoration: none; }
.azp-card--link { transition: border-color .2s, transform .3s var(--az-ease); }
.azp-card--link:hover { border-color: var(--az-line-2); transform: translateY(-1px); }
.azp-grid2 { display: grid; gap: 16px; }
.azp-grid3 { display: grid; gap: 12px; }
@media (min-width: 760px) { .azp-grid2 { grid-template-columns: 1fr 1fr; } .azp-grid3 { grid-template-columns: repeat(3, 1fr); } }
.azp-grid2 > .azp-card { margin-bottom: 0; }
.azp-grid2 { margin-bottom: 16px; }

.azp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 760px) { .azp-stats { grid-template-columns: repeat(4, 1fr); } .azp-stats--3 { grid-template-columns: repeat(3, 1fr); } }
.azp-stat { display: grid; gap: 6px; padding: 16px; border-radius: var(--az-r); background: var(--az-card); border: 1px solid var(--az-line); text-decoration: none; }
.azp-stat span { color: var(--az-muted); font-size: 12px; }
.azp-stat strong { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.azp-stat--warn { border-color: rgba(251, 191, 36, .28); }
a.azp-stat:hover { border-color: var(--az-line-2); }

.azp-list { list-style: none; margin: 0; padding: 0; }
.azp-list > li > a, .azp-list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; }
.azp-list > li + li { border-top: 1px solid var(--az-line); }
.azp-list > li > a { padding: 0; width: 100%; }
.azp-list strong, .azp-list small { display: block; }
.azp-list small { color: var(--az-muted); font-size: 12px; margin-top: 2px; }
.azp-card.azp-list { padding: 4px 20px; }
.azp-row { display: flex; gap: 8px; align-items: center; }

.azp-projects, .azp-docs, .azp-notes, .azp-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.azp-projects a { display: grid; gap: 8px; padding: 14px; border-radius: var(--az-r-sm); background: var(--az-card-2); border: 1px solid var(--az-line); text-decoration: none; }
.azp-projects small { color: var(--az-muted); font-size: 12px; }
.azp-projects__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.azp-cards > .azp-card { margin: 0; }

.azp-progress { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.azp-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--az-purple), var(--az-brand)); transition: width .8s var(--az-ease); }
.azp-hero { display: flex; gap: 20px; align-items: center; }
.azp-hero__pct { display: grid; place-items: center; text-align: center; min-width: 92px; height: 92px; border-radius: 22px; background: var(--az-card-2); border: 1px solid var(--az-line); }
.azp-hero__pct strong { font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.azp-hero__pct span { font-size: 11px; color: var(--az-muted); }
.azp-hero__body { flex: 1; display: grid; gap: 12px; }
.azp-hero__body p { margin: 0; color: var(--az-muted); }
.azp-hero__body strong { color: var(--az-text); }

.azp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.azp-steps__i { display: flex; gap: 12px; }
.azp-steps__i strong, .azp-steps__i small, .azp-steps__i em { display: block; }
.azp-steps__i small { color: var(--az-muted); font-size: 12px; }
.azp-steps__i em { font-style: normal; font-size: 13px; color: var(--az-muted); margin-top: 4px; }
.azp-steps__dot { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 99px; border: 2px solid var(--az-line-2); }
.is-done .azp-steps__dot { background: var(--az-ok); border-color: var(--az-ok); }
.is-doing .azp-steps__dot { border-color: var(--az-brand); box-shadow: 0 0 0 4px rgba(224, 64, 227, .15); }

.azp-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--az-line-2); display: grid; gap: 14px; }
.azp-timeline li { position: relative; }
.azp-timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 9px; height: 9px; border-radius: 99px; background: var(--az-card); border: 2px solid var(--az-brand); }
.azp-timeline time { display: block; font-size: 11px; color: var(--az-dim); font-family: var(--az-mono); }
.azp-timeline p { margin: 2px 0 0; color: var(--az-muted); font-size: 13px; }
.azp-next { display: grid; gap: 4px; margin: 0 0 10px; }
.azp-next strong { font-size: 22px; letter-spacing: -.02em; }
.azp-next span { color: var(--az-muted); }

.azp-doc { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--az-r-sm); background: var(--az-card-2); border: 1px solid var(--az-line); }
.azp-doc__ext { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(224, 64, 227, .1); color: var(--az-brand); font: 600 10px var(--az-mono); letter-spacing: .06em; }
.azp-doc__main { flex: 1; min-width: 0; }
.azp-doc__main strong, .azp-doc__main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.azp-doc__main small { color: var(--az-muted); font-size: 12px; }

.azp-notes li a { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--az-r-sm); text-decoration: none; border: 1px solid transparent; }
.azp-notes li.is-unread a { background: var(--az-card-2); border-color: var(--az-line); }
.azp-notes li.is-unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 99px; background: var(--az-brand); vertical-align: middle; }
.azp-notes span { color: var(--az-muted); font-size: 13px; }
.azp-notes small { color: var(--az-dim); font-size: 12px; }
.azp-card.azp-notes { padding: 8px; }

.azp-thread { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.azp-thread li { max-width: 86%; padding: 12px 14px; border-radius: 14px; background: var(--az-card-2); border: 1px solid var(--az-line); }
.azp-thread li.is-me { margin-left: auto; background: rgba(224, 64, 227, .08); border-color: rgba(224, 64, 227, .22); }
.azp-thread header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--az-muted); margin-bottom: 6px; }
.azp-thread header strong { color: var(--az-text); font-weight: 600; }
.azp-thread p { margin: 0 0 6px; }
.azp-attach { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--az-brand); text-decoration: none; }

.azp-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 0 0 16px; }
.azp-dl dt { font-size: 12px; color: var(--az-muted); }
.azp-dl dd { margin: 4px 0 0; }
.azp-pix__grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .azp-pix__grid { grid-template-columns: 220px 1fr; } }
.azp-pix__qr { background: #fff; border-radius: 12px; padding: 10px; aspect-ratio: 1; }
.azp-pix__qr svg { width: 100%; height: 100%; }

/* ---------- tabela responsiva ---------- */
.azp-table { overflow-x: auto; border: 1px solid var(--az-line); border-radius: var(--az-r); background: var(--az-card); }
.azp-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.azp-table th { text-align: left; font-weight: 500; color: var(--az-muted); font-size: 12px; padding: 12px 16px; border-bottom: 1px solid var(--az-line); }
.azp-table td { padding: 14px 16px; border-bottom: 1px solid var(--az-line); vertical-align: middle; }
.azp-table tr:last-child td { border-bottom: 0; }
.azp-table td small { display: block; color: var(--az-muted); font-size: 12px; }
.azp-table__act { text-align: right; white-space: nowrap; }
.azp-table__act .azp-btn + .azp-btn { margin-left: 6px; }
@media (max-width: 700px) {
	.azp-table { border: 0; background: none; }
	.azp-table thead { display: none; }
	.azp-table tr { display: grid; gap: 8px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--az-line); border-radius: var(--az-r); background: var(--az-card); }
	.azp-table td { display: flex; justify-content: space-between; gap: 12px; padding: 0; border: 0; }
	.azp-table td::before { content: attr(data-label); color: var(--az-muted); font-size: 12px; }
	.azp-table td.azp-table__act { justify-content: flex-end; }
	.azp-table td.azp-table__act::before { content: none; }
}

/* ---------- componentes ---------- */
.azp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid transparent; background: var(--az-brand, #e040e3); color: #0b0b0d; font: 600 14px/20px var(--az-font); text-decoration: none; cursor: pointer; transition: transform .2s var(--az-ease), background .2s, border-color .2s; }
.azp-btn:hover { transform: translateY(-1px); background: #ea62ec; }
.azp-btn:active { transform: none; }
.azp-btn--ghost { background: transparent; color: var(--az-text); border-color: var(--az-line-2); }
.azp-btn--ghost:hover { background: var(--az-card-2); border-color: rgba(255, 255, 255, .24); }
.azp-btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.azp-btn--block { width: 100%; }
.azp-btn[disabled] { opacity: .6; cursor: progress; }
.azp-i { flex: none; }

.azp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid; }
.azp-badge::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.azp-badge--neutral { color: #a1a1aa; border-color: rgba(161, 161, 170, .25); background: rgba(161, 161, 170, .06); }
.azp-badge--info { color: var(--az-info); border-color: rgba(96, 165, 250, .28); background: rgba(96, 165, 250, .07); }
.azp-badge--warn { color: var(--az-warn); border-color: rgba(251, 191, 36, .28); background: rgba(251, 191, 36, .07); }
.azp-badge--ok { color: var(--az-ok); border-color: rgba(52, 211, 153, .28); background: rgba(52, 211, 153, .07); }
.azp-badge--bad { color: var(--az-bad); border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .07); }
.azp-badge--brand { color: var(--az-brand); border-color: rgba(224, 64, 227, .3); background: rgba(224, 64, 227, .08); }

.azp-toast { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid; animation: azp-in .5s var(--az-ease); }
.azp-toast--ok { color: #a7f3d0; border-color: rgba(52, 211, 153, .3); background: rgba(52, 211, 153, .08); }
.azp-toast--bad { color: #fecaca; border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); }
.azp-toast--warn { color: #fde68a; border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .08); }

.azp-empty { display: grid; justify-items: start; gap: 6px; padding: 18px; border: 1px dashed var(--az-line-2); border-radius: var(--az-r); }
.azp-empty__mark { width: 10px; height: 10px; border: 2px solid var(--az-brand); transform: rotate(45deg); margin-bottom: 6px; }
.azp-empty__t { margin: 0; font-weight: 600; }
.azp-empty__d { margin: 0 0 6px; color: var(--az-muted); font-size: 13px; }

/* ---------- formularios ---------- */
.azp-form { display: grid; gap: 14px; }
.azp-field { display: grid; gap: 6px; }
.azp-field > label, .azp-field > span { font-size: 13px; color: var(--az-muted); }
.azp-field small { font-size: 12px; }
.azp-field input, .azp-field select, .azp-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--az-r-sm); border: 1px solid var(--az-line-2); background: var(--az-bg-2); color: var(--az-text); font: inherit; transition: border-color .2s, box-shadow .2s; }
.azp-field textarea { min-height: 110px; resize: vertical; }
.azp-field input:focus, .azp-field select:focus, .azp-field textarea:focus { outline: 0; border-color: var(--az-brand); box-shadow: 0 0 0 3px rgba(224, 64, 227, .18); }
.azp-field input[type=file] { padding: 9px; }
.azp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--az-muted); }
.azp-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--az-brand); }

/* ---------- login ---------- */
.azp--auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(900px 480px at 50% -10%, rgba(224, 64, 227, .12), transparent 60%), var(--az-bg); }
.azp-auth { width: 100%; max-width: 460px; padding: 32px 16px; display: grid; justify-items: center; }
.azp-auth .azp-h1 { margin-bottom: 20px; }
.azp-auth__links { margin: 16px 0 6px; font-size: 14px; }
.azp-auth__links a { color: var(--az-brand); }
.azp-auth__foot { margin-top: 24px; font-size: 13px; }
.azp-auth__foot a { color: var(--az-muted); text-decoration: none; }

@keyframes azp-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
