/* ==========================================================================
   Login
   ========================================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr); min-height: 100vh; background: var(--surface); }
.auth-hero { position: relative; overflow: hidden; background: #050e22; color: #dfe9ff; }
.aurora { position: absolute; inset: -20%; filter: blur(60px); opacity: 0.9; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: floatY 12s ease-in-out infinite; }
.aurora i:nth-child(1) { width: 60%; height: 60%; left: 5%; top: 10%; background: radial-gradient(circle, rgba(29, 95, 191, 0.85), transparent 65%); }
.aurora i:nth-child(2) { width: 50%; height: 55%; right: 0; top: 30%; background: radial-gradient(circle, rgba(0, 145, 213, 0.65), transparent 65%); animation-delay: -4s; animation-duration: 15s; }
.aurora i:nth-child(3) { width: 45%; height: 45%; left: 30%; bottom: -5%; background: radial-gradient(circle, rgba(50, 185, 87, 0.45), transparent 65%); animation-delay: -8s; animation-duration: 18s; }
.auth-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%); }
.auth-hero-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; padding: 44px 56px; gap: 40px; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand img { width: 58px; filter: drop-shadow(0 8px 20px rgba(34, 176, 240, 0.4)); }
.auth-brand b { display: block; font-family: var(--font-display); font-size: 17px; letter-spacing: 0.04em; color: #fff; font-weight: 700; }
.auth-brand b span { background: linear-gradient(90deg, #3fb5f2, #6bd48f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand small { display: block; font-size: 10.5px; letter-spacing: 0.42em; color: #8ea4c8; margin-top: 3px; font-weight: 600; }
.auth-copy { margin-top: auto; max-width: 560px; }
.eyebrow.light { color: #7cc8f5; }
.auth-copy h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; color: #fff; font-weight: 600; }
.auth-copy h1 em { font-style: normal; background: linear-gradient(90deg, #4cc0f7 0%, #5fd18a 60%, #a6d65a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy p { margin-top: 18px; font-size: 16px; color: #a9bbd9; max-width: 480px; line-height: 1.6; }
.float-cards { position: relative; height: 210px; margin-bottom: auto; }
.glass { position: absolute; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6); color: #e7efff; animation: floatY 7s ease-in-out infinite; }
.glass small { color: #9fb3d6; font-size: 12px; font-weight: 500; }
.glass b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-top: 6px; color: #fff; }
.gc-top { display: flex; align-items: center; gap: 8px; }
.gc-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(34, 176, 240, 0.18); color: #7fd0fa; }
.gc-ico .i { width: 15px; height: 15px; }
.gc-ico.g { background: rgba(50, 185, 87, 0.2); color: #7ee2a2; }
.gc-ico.v { background: rgba(139, 92, 246, 0.22); color: #c4b5fd; }
.gc-1 { left: 0; top: 0; width: 230px; }
.gc-spark { margin: 6px 0 4px; }
.gc-spark svg { width: 100%; height: 36px; }
.gc-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: #7ee2a2; }
.gc-2 { left: 250px; top: 36px; width: 250px; animation-delay: -2.5s; }
.gc-tasks { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 12px; font-size: 13px; color: #d6e2f7; }
.gc-tasks span { display: flex; align-items: center; gap: 8px; }
.gc-tasks i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); }
.gc-tasks i.ok { background: #32b957; border-color: #32b957; box-shadow: inset 0 0 0 2px #0c2146; }
.gc-bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,0.1); overflow: hidden; }
.gc-bar span { display: block; height: 100%; background: linear-gradient(90deg, #22b0f0, #32b957); border-radius: inherit; }
.gc-3 { left: 90px; top: 150px; display: flex; align-items: center; gap: 12px; animation-delay: -5s; }
.gc-3 b { font-size: 15px; margin-top: 2px; }
.auth-foot { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: #8ea4c8; }
.auth-foot span { display: inline-flex; align-items: center; gap: 7px; }

.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 28px 24px; position: relative; background: var(--surface); }
.auth-box { width: 100%; max-width: 400px; margin: auto 0; }
.auth-box.swap { animation: fadeUp 360ms var(--ease); }
.auth-logo { width: 150px; margin: 0 auto 28px; }
[data-theme="dark"] .auth-logo { filter: brightness(0) invert(1) opacity(0.92); }
.auth-box h2 { font-size: 26px; letter-spacing: -0.02em; }
.auth-sub { color: var(--text-2); margin: 6px 0 24px; }
.input-lg { height: 46px; font-size: 14.5px; border-radius: 12px; }
.input-group:has(> .btn) .input { padding-right: 46px; }
.input-group > .prefix.icon { color: var(--faint); }
.auth-sep { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 12.5px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-switch { text-align: center; margin-top: 20px; color: var(--text-2); font-size: 13.5px; }
.auth-switch a { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.auth-legal { font-size: 12px; color: var(--faint); margin-top: 24px; }
.shake { animation: shakeX 420ms var(--ease); }
@keyframes shakeX { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 980px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { display: none; }
}

/* ==========================================================================
   Gráficos
   ========================================================================== */
.chart { width: 100%; position: relative; }
.svg-chart { display: block; overflow: visible; }
.svg-chart .ax { font-size: 11px; fill: var(--muted); font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.svg-chart .ax.proj { fill: var(--faint); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 2px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
.hbar-top b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar-track { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 8px; transform-origin: left; animation: growX 800ms var(--ease) both; }
.hbar small { font-size: 11.5px; color: var(--muted); }
.hdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.spark { display: block; }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.hello h1 { font-size: 28px; letter-spacing: -0.025em; }
.hello h1 span { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello p { color: var(--text-2); margin-top: 6px; }
.dash-grid { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dash-grid > .w-12 { grid-column: span 12; } .dash-grid > .w-8 { grid-column: span 8; } .dash-grid > .w-7 { grid-column: span 7; }
.dash-grid > .w-6 { grid-column: span 6; } .dash-grid > .w-5 { grid-column: span 5; } .dash-grid > .w-4 { grid-column: span 4; }
@media (max-width: 1200px) { .dash-grid > .w-8, .dash-grid > .w-4, .dash-grid > .w-7, .dash-grid > .w-5 { grid-column: span 12; } }
@media (max-width: 900px) { .dash-grid > .w-6 { grid-column: span 12; } }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
.hero-stat { padding: 22px; display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }
.card-brand .big, .hero-stat .big { font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.hero-stat .row small { color: #9fb3d6; }
.hero-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-split > div { min-width: 0; padding: 11px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); }
.hero-split small { display: block; font-size: 11.5px; color: #9fb3d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-split b { display: block; font-family: var(--font-display); font-size: 16px; color: #fff; margin-top: 3px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-rows { display: flex; flex-direction: column; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.hero-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; }
.hero-rows > div + div { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.hero-rows small { color: #9fb3d6; font-size: 12.5px; display: inline-flex; align-items: center; gap: 8px; }
.hero-rows b { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 15px; white-space: nowrap; }
.task-line { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--border); transition: background var(--t-fast); cursor: pointer; }
.task-line:first-child { border-top: 0; }
.task-line:hover { background: var(--surface-2); }
.task-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; transition: all var(--t-fast); color: transparent; }
.task-check:hover { border-color: var(--green); color: var(--green); }
.task-check.done { background: #22a34a; border-color: #22a34a; color: #fff; }
.task-check .i { width: 12px; height: 12px; stroke-width: 3; }
.activity { display: flex; flex-direction: column; padding: 4px 20px 16px; }
.act-item { display: flex; gap: 12px; position: relative; padding: 10px 0; }
.act-item::before { content: ""; position: absolute; left: 13px; top: 38px; bottom: -8px; width: 2px; background: var(--border); border-radius: 2px; }
.act-item:last-child::before { display: none; }
.act-item .avatar { --size: 28px; }
.act-item p { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.act-item p b { color: var(--text); font-weight: 600; }
.act-item time { font-size: 11.5px; color: var(--muted); }

.proj-mini { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); cursor: pointer; transition: background var(--t-fast); }
.proj-mini:first-child { border-top: 0; }
.proj-mini:hover { background: var(--surface-2); }
.proj-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: var(--gradient-primary); box-shadow: 0 8px 18px -10px rgba(29, 95, 191, 0.8); }
.proj-ico .i { width: 19px; height: 19px; }

/* ==========================================================================
   Projetos
   ========================================================================== */
.proj-card { display: flex; flex-direction: column; overflow: hidden; }
.proj-card .pc-body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.proj-card .pc-head { display: flex; align-items: flex-start; gap: 12px; }
.proj-card h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.proj-card .pc-client { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.proj-card .pc-desc { font-size: 13px; color: var(--text-2); }
.proj-card .pc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-card .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--text-2); }
.proj-card .pc-stage { display: flex; flex-direction: column; gap: 7px; }
.proj-card .pc-stage-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.proj-card .pc-stage-top b { color: var(--text); font-weight: 600; }
.pc-code { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.pboard .column { max-height: none; }
.pboard .kcard h4 { font-size: 14px; font-family: var(--font-sans); letter-spacing: 0; font-weight: 600; }

/* Detalhe do projeto */
.proj-hero { padding: 24px 26px 0; margin-bottom: 22px; overflow: hidden; }
.proj-hero .ph-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; position: relative; z-index: 1; }
.proj-hero .ph-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14); color: #7fd0fa; flex-shrink: 0; }
.proj-hero .ph-ico .i { width: 26px; height: 26px; }
.proj-hero h1 { font-size: 26px; color: #fff; letter-spacing: -0.02em; }
.proj-hero .ph-sub { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: #a9bcdc; }
.proj-hero .ph-sub span { display: inline-flex; align-items: center; gap: 6px; }
.proj-hero .ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.proj-hero .btn-secondary { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); color: #fff; box-shadow: none; }
.proj-hero .btn-secondary:hover { background: rgba(255,255,255,0.14); }
.proj-hero .ph-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; position: relative; z-index: 1; }
.proj-hero .ph-stats > div { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.proj-hero .ph-stats small { font-size: 11.5px; color: #9fb3d6; display: block; }
.proj-hero .ph-stats b { font-family: var(--font-display); font-size: 17px; color: #fff; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-top: 3px; white-space: nowrap; }
@media (max-width: 900px) { .proj-hero .ph-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stepper { display: flex; margin: 22px -26px 0; padding: 16px 26px 18px; gap: 0; overflow-x: auto; position: relative; z-index: 1; background: rgba(3, 10, 28, 0.35); border-top: 1px solid rgba(255,255,255,0.07); scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { flex: 1; min-width: 104px; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; cursor: pointer; padding: 0 4px; color: #7f93b7; font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.25; background: none; border: 0; }
.step::before { content: ""; position: absolute; top: 14px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: rgba(255,255,255,0.12); border-radius: 2px; }
.step:first-child::before { display: none; }
.step .sd { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.16); position: relative; z-index: 1; transition: all var(--t) var(--ease); }
.step .sd .i { width: 14px; height: 14px; }
.step:hover .sd { border-color: #7fd0fa; color: #bfe6fc; transform: scale(1.08); }
.step.done { color: #b6c7e3; }
.step.done .sd { background: #1f6fd6; border-color: #1f6fd6; color: #fff; }
.step.done::before, .step.current::before { background: linear-gradient(90deg, #1f6fd6, #22b0f0); }
.step.current { color: #fff; }
.step.current .sd { background: linear-gradient(135deg, #22b0f0, #32b957); border-color: transparent; color: #fff; box-shadow: 0 0 0 5px rgba(34, 176, 240, 0.18), 0 0 22px rgba(34, 176, 240, 0.6); }
.stepper.cancelled .step .sd { opacity: 0.4; }

.brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .brief-grid { grid-template-columns: minmax(0, 1fr); } }
.brief { display: flex; flex-direction: column; }
.brief-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 0; }
.brief-head .bi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.brief-head h3 { font-size: 15px; }
.brief-head p { font-size: 12px; color: var(--muted); }
.brief-head .saved { margin-left: auto; font-size: 11.5px; color: var(--green); display: inline-flex; align-items: center; gap: 4px; opacity: 0; transition: opacity var(--t); }
.brief-head .saved.show { opacity: 1; }
.brief textarea { border: 0; background: transparent; resize: vertical; min-height: 150px; padding: 12px 18px 18px; font-size: 14px; line-height: 1.65; outline: none; width: 100%; color: var(--text); }
.brief textarea:focus { background: var(--surface-2); }
.brief textarea::placeholder { color: var(--faint); }
.brief:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.scope-list { display: flex; flex-direction: column; gap: 8px; }
.scope-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.scope-item .n { width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.scope-item input { border: 0; background: transparent; outline: none; flex: 1; font-size: 13.5px; min-width: 0; }

.proto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.proto-shot { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); aspect-ratio: 4 / 3; cursor: zoom-in; }
.proto-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.proto-shot:hover img { transform: scale(1.04); }
.proto-shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-size: 12.5px; font-weight: 600; color: #fff; background: linear-gradient(180deg, transparent, rgba(4, 10, 24, 0.8)); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.proto-shot .del { opacity: 0; transition: opacity var(--t-fast); }
.proto-shot:hover .del { opacity: 1; }
.proto-add { border: 2px dashed var(--border-strong); border-radius: 14px; display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--muted); cursor: pointer; transition: all var(--t-fast); text-align: center; gap: 6px; padding: 12px; }
.proto-add:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.embed-frame { width: 100%; height: 520px; border: 0; border-radius: 12px; background: var(--surface-2); }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 10px; }

.res-group { margin-bottom: 22px; }
.res-group h4 { font-size: 13px; font-family: var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.res-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.res-card .url { font-family: var(--font-mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.paper-wrap { background: var(--surface-3); border-radius: var(--r-lg); padding: 28px; display: flex; justify-content: center; }
.paper { width: 100%; max-width: 820px; background: #fff; color: #1a2233; padding: 64px 72px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 24px 60px -24px rgba(10, 31, 68, 0.35); font-family: "Georgia", "Times New Roman", serif; font-size: 14.5px; line-height: 1.7; }
.paper h1 { font-family: var(--font-display); text-align: center; font-size: 19px; letter-spacing: 0.02em; margin: 18px 0 26px; color: #0f2c59; }
.paper h2 { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: #0f2c59; margin: 22px 0 8px; }
.paper p { margin: 0 0 10px; text-align: justify; }
.paper ul, .paper ol { margin: 0 0 10px 22px; list-style: disc; }
.paper ol { list-style: decimal; }
.paper table { width: 100%; font-size: 13px; margin: 8px 0 14px; font-family: var(--font-sans); }
.paper th, .paper td { border: 1px solid #d8dee9; padding: 6px 10px; text-align: left; }
.paper th { background: #f2f5fa; }
.paper .ct-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #0f2c59; padding-bottom: 14px; }
.paper .ct-head img { height: 64px; }
.paper .ct-head small { font-family: var(--font-sans); font-size: 11px; color: #5b6b86; text-align: right; line-height: 1.5; }
.paper .sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 60px; text-align: center; font-size: 13px; }
.paper .sign div { border-top: 1px solid #1a2233; padding-top: 8px; }
.paper[contenteditable="true"] { outline: 2px dashed var(--primary); outline-offset: 6px; }
.paper .missing { background: #fff3cd; color: #8a5a00; padding: 0 4px; border-radius: 3px; font-family: var(--font-sans); font-size: 0.9em; }
@media (max-width: 760px) { .paper { padding: 32px 22px; } .paper-wrap { padding: 10px; } }

/* Wizard */
.wizard { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 560px; }
.wiz-rail { background: var(--surface-2); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; border-radius: var(--r-xl) 0 0 var(--r-xl); }
.wiz-rail h3 { font-size: 17px; padding: 0 8px 4px; }
.wiz-rail > p { font-size: 12.5px; color: var(--muted); padding: 0 8px 14px; }
.wiz-step { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; font-weight: 600; font-size: 13.5px; color: var(--muted); text-align: left; position: relative; transition: all var(--t-fast); }
.wiz-step .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border-strong); font-size: 12.5px; flex-shrink: 0; transition: all var(--t); }
.wiz-step small { display: block; font-weight: 500; font-size: 11.5px; color: var(--faint); }
.wiz-step:hover { background: var(--surface-3); color: var(--text); }
.wiz-step.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.wiz-step.active .n { background: var(--gradient-primary); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
.wiz-step.done .n { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.wiz-main { display: flex; flex-direction: column; min-width: 0; }
.wiz-body { padding: 26px 28px; flex: 1; overflow-y: auto; max-height: calc(100vh - 16vh - 80px); }
.wiz-body h2 { font-size: 20px; }
.wiz-body p.lead { color: var(--text-2); margin: 4px 0 22px; }
.wiz-foot { display: flex; align-items: center; gap: 10px; padding: 14px 28px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-xl) 0; }
.wiz-anim { animation: fadeUp 340ms var(--ease); }
.client-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; max-height: 300px; overflow-y: auto; padding: 2px; }
.client-pick .choice > span { flex-direction: column; align-items: flex-start; gap: 2px; }
.client-pick .choice small { font-weight: 500; color: var(--muted); font-size: 12px; }
.schedule { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.schedule .table td, .schedule .table th { padding: 9px 14px; }
.summary-box { border-radius: 14px; padding: 18px; background: var(--surface-2); border: 1px solid var(--border); }
@media (max-width: 860px) {
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .wiz-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 12px; }
  .wiz-rail h3, .wiz-rail > p, .wiz-step small { display: none; }
  .wiz-step span.lbl { display: none; }
  .wiz-body { padding: 20px 16px; max-height: none; }
  .wiz-foot { padding: 12px 16px; }
}

/* Task drawer */
.td-title { width: 100%; font-family: var(--font-display); font-size: 21px; font-weight: 600; border: 0; outline: 0; background: transparent; padding: 4px 0; letter-spacing: -0.01em; }
.td-props { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 14px; align-items: center; font-size: 13.5px; margin: 16px 0 20px; }
.td-props > label { color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.td-props > label .i { width: 15px; height: 15px; }
.td-props .select, .td-props .input { height: 36px; font-size: 13.5px; }
.checklist { display: flex; flex-direction: column; gap: 4px; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.cl-item:hover { background: var(--surface-2); }
.cl-item input[type=checkbox] { width: 17px; height: 17px; accent-color: #22a34a; }
.cl-item span { flex: 1; font-size: 13.5px; }
.cl-item.done span { text-decoration: line-through; color: var(--muted); }
.cl-item .btn { opacity: 0; }
.cl-item:hover .btn { opacity: 1; }
.comments { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 10px 12px; font-size: 13.5px; flex: 1; }
.comment .bubble small { color: var(--muted); font-size: 11.5px; display: block; margin-bottom: 3px; }

/* ==========================================================================
   Financeiro
   ========================================================================== */
.fin-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
@media (max-width: 1100px) { .fin-hero { grid-template-columns: minmax(0, 1fr); } }
.dre { width: 100%; font-size: 13.5px; }
.dre td { padding: 9px 0; border-bottom: 1px dashed var(--border); }
.dre td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.dre tr.sub td { color: var(--muted); padding-left: 14px; font-weight: 500; }
.dre tr.sub td:last-child { font-weight: 500; }
.dre tr.total td { border-bottom: 0; border-top: 2px solid var(--border-strong); font-weight: 700; font-size: 14.5px; padding-top: 12px; }
.money-in { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }
.money-out { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-type { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.fin-type .i { width: 16px; height: 16px; }
.sub-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sub-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; font-size: 15px; flex-shrink: 0; }
.tax-meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; }
.tax-meter i { height: 8px; border-radius: 4px; background: var(--surface-3); }
.tax-meter i.on { background: var(--series-1); }
.tax-meter i.cur { background: linear-gradient(90deg, #1d5fbf, #22b0f0); box-shadow: 0 0 10px rgba(34, 176, 240, 0.5); }
.partner-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

/* ==========================================================================
   Equipe
   ========================================================================== */
.member-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.member-top { display: flex; align-items: center; gap: 14px; }
.member-top h3 { font-size: 16px; }
.member-top p { font-size: 12.5px; color: var(--muted); }
.member-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.member-stats > div { padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.member-stats b { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.1; }
.member-stats small { font-size: 11px; color: var(--muted); font-weight: 500; }
.member-tasks { display: flex; flex-direction: column; gap: 6px; }
.mt-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 7px 10px; border-radius: 9px; background: var(--surface-2); cursor: pointer; transition: background var(--t-fast); }
.mt-row:hover { background: var(--surface-3); }
.mt-row .truncate { flex: 1; }
.load { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.timeline { overflow-x: auto; }
.tl-grid { display: grid; min-width: 900px; }
.tl-head { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 8px 2px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.04em; }
.tl-head.today { color: var(--primary); }
.tl-head b { display: block; font-size: 15px; color: var(--text); font-family: var(--font-display); letter-spacing: 0; }
.tl-head.today b { color: var(--primary); }
.tl-head.we { background: var(--surface-2); }
.tl-name { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tl-cell { border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; min-height: 52px; }
.tl-cell.we { background: var(--surface-2); }
.tl-cell.today { background: var(--primary-soft); }
.tl-chip { font-size: 10.5px; font-weight: 600; padding: 3px 6px; border-radius: 6px; line-height: 1.25; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid; }
.tl-chip.alta { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.tl-chip.media { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.tl-chip.baixa { background: var(--blue-bg); color: var(--blue); border-color: var(--blue); }
.tl-chip.done { background: var(--green-bg); color: var(--green); border-color: var(--green); text-decoration: line-through; }

/* ==========================================================================
   Clientes / Usuários / Perfil / Configurações
   ========================================================================== */
.client-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.client-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 16px; flex-shrink: 0; }
.contact-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.contact-line .i { width: 15px; height: 15px; color: var(--muted); }
.profile-cover { height: 170px; border-radius: var(--r-lg) var(--r-lg) 0 0; position: relative; overflow: hidden; background: radial-gradient(500px 200px at 85% 0%, rgba(50, 185, 87, 0.5), transparent 60%), radial-gradient(600px 240px at 10% 100%, rgba(0, 145, 213, 0.55), transparent 60%), linear-gradient(120deg, #0a1f44, #123a7a); }
.profile-cover::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(90deg, transparent, #000); }
.profile-head { display: flex; align-items: flex-end; gap: 20px; padding: 0 26px 22px; margin-top: -44px; position: relative; z-index: 1; flex-wrap: wrap; }
.profile-head .avatar { box-shadow: 0 0 0 5px var(--surface), var(--shadow); }
.avatar-edit { position: relative; cursor: pointer; border-radius: 50%; }
.avatar-edit .cam { position: absolute; right: 4px; bottom: 4px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient-primary); color: #fff; border: 3px solid var(--surface); transition: transform var(--t) var(--ease-spring); z-index: 2; }
.avatar-edit:hover .cam { transform: scale(1.12); }
.profile-head h1 { font-size: 24px; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.pw-meter i { height: 5px; border-radius: 4px; background: var(--surface-3); transition: background var(--t); }
.pw-meter.s1 i:nth-child(-n+1) { background: #ef4444; }
.pw-meter.s2 i:nth-child(-n+2) { background: #f59e0b; }
.pw-meter.s3 i:nth-child(-n+3) { background: #22b0f0; }
.pw-meter.s4 i { background: #22a34a; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.settings-nav a:hover { background: var(--surface-3); color: var(--text); }
.settings-nav a.active { background: var(--primary-soft); color: var(--primary); }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } .settings-nav { position: static; flex-direction: row; overflow-x: auto; } }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-yes { color: var(--green); } .perm-no { color: var(--faint); }

/* Impressão */
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 0; }
}
