:root {
  --ink: #17101c;
  --muted: #74687d;
  --line: #eadde7;
  --paper: #fbf7fb;
  --surface: #ffffff;
  --claw: #b5122b;
  --claw-dark: #740d23;
  --claw-hot: #f04452;
  --violet: #6236c9;
  --violet-dark: #35204c;
  --lilac: #c7a6ff;
  --cyan: #58d7ef;
  --teal: var(--claw);
  --teal-dark: var(--claw-dark);
  --coral: #ff6f6b;
  --amber: #f3bd42;
  --blue: var(--violet);
  --green: #1f8f74;
  --red: var(--claw);
  --shadow: 0 18px 45px rgba(23, 16, 28, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
  color: var(--ink);
}

.brand-logo,
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.brand-logo {
  object-fit: contain;
  padding: .18rem;
  background: #16070d;
  border: 1px solid rgba(240, 68, 82, .36);
  box-shadow: 0 0 24px rgba(181, 18, 43, .22);
}

.brand-mark {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 42px;
  padding: .72rem 1rem;
  border: 1px solid var(--claw);
  border-radius: 8px;
  background: var(--claw);
  color: #fff;
  font-weight: 750;
  white-space: nowrap;
}

.button:hover {
  background: var(--claw-dark);
  border-color: var(--claw-dark);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button.secondary:hover {
  background: #fff;
  color: var(--claw);
  border-color: var(--claw);
}

.button.ghost,
.button.ghost-dark {
  background: transparent;
}

.button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .78);
}

.button.ghost-dark {
  color: var(--ink);
  border-color: var(--line);
}

.button.small {
  min-height: 34px;
  padding: .45rem .7rem;
  font-size: .88rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.icon-button:hover {
  border-color: var(--claw);
  color: var(--claw);
}

[data-lucide],
.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.side-nav .lucide {
  color: var(--lilac);
}

.icon-button .lucide {
  color: var(--claw);
}

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--claw-hot);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  background: rgba(18, 7, 18, .9);
  border-bottom: 1px solid rgba(199, 166, 255, .18);
  backdrop-filter: blur(14px);
}

.site-header .brand,
.site-nav {
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 8rem clamp(1rem, 6vw, 5rem) 5.5rem;
  color: #fff;
  overflow: hidden;
  background-color: #120712;
  background-image:
    linear-gradient(115deg, rgba(18, 7, 18, .98), rgba(44, 11, 30, .94) 54%, rgba(15, 8, 24, .98)),
    repeating-linear-gradient(90deg, rgba(199, 166, 255, .07) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(88, 215, 239, .06) 0 1px, transparent 1px 76px);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 7, 18, .18), rgba(18, 7, 18, .72)),
    linear-gradient(0deg, rgba(18, 7, 18, .18), rgba(181, 18, 43, .14));
}

.hero-symbol {
  position: absolute;
  right: clamp(-4rem, 2vw, 4rem);
  bottom: clamp(1rem, 8vw, 5rem);
  width: min(45vw, 560px);
  max-height: 76vh;
  opacity: .28;
  filter: drop-shadow(0 0 50px rgba(240, 68, 82, .46));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: .9;
}

.hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero .hero-note {
  max-width: 620px;
  margin-top: -.7rem;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.section {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 6vw, 5rem);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.panel > .section-heading {
  max-width: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.section-lead {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  line-height: 1.7;
}

.alt-section {
  background: #f4edf7;
}

.service-grid,
.portfolio-grid,
.origin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.portfolio-card,
.origin-grid article,
.panel,
.metric,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(24, 32, 42, .06);
}

.service-card {
  padding: 1.4rem;
}

.service-card ul {
  display: grid;
  gap: .5rem;
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.service-card li::marker {
  color: var(--claw);
}

.service-card [data-lucide] {
  width: 28px;
  height: 28px;
  color: var(--claw);
}

.service-card h3,
.portfolio-card h3,
.origin-grid h3,
.panel h2 {
  margin: .8rem 0 .45rem;
}

.service-card p,
.portfolio-card p,
.origin-grid p,
.contact-info p {
  color: var(--muted);
  line-height: 1.65;
}

.about-section {
  background:
    linear-gradient(140deg, #170b16, #28122f 60%, #120712);
  color: #fff;
  overflow: hidden;
}

.about-section .section-heading {
  margin-bottom: 0;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: clamp(1rem, 5vw, 4rem);
  margin-bottom: 2rem;
}

.lead {
  color: rgba(255, 255, 255, .76);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.75;
}

.about-symbol {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px solid rgba(199, 166, 255, .24);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(181, 18, 43, .16), rgba(98, 54, 201, .16)),
    rgba(255, 255, 255, .035);
}

.about-symbol img {
  width: min(240px, 70%);
  filter: drop-shadow(0 0 36px rgba(240, 68, 82, .5));
}

.origin-grid article {
  padding: 1.15rem;
  background: rgba(255, 255, 255, .055);
  border-color: rgba(199, 166, 255, .22);
  box-shadow: none;
}

.origin-grid span {
  color: var(--lilac);
  font-weight: 900;
}

.origin-grid p {
  color: rgba(255, 255, 255, .74);
}

.portfolio-card {
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.portfolio-card div {
  padding: 1rem;
}

.portfolio-card span {
  color: var(--violet);
  font-size: .82rem;
  font-weight: 800;
}

.client-logo-section {
  overflow: hidden;
  background: #fff;
}

.client-logo-carousel {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #fbf7fb;
}

.client-logo-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  padding: 1rem;
  animation: logo-scroll 28s linear infinite;
}

.client-logo-carousel:hover .client-logo-track {
  animation-play-state: paused;
}

.client-logo-card {
  display: grid;
  place-items: center;
  gap: .55rem;
  width: 180px;
  min-height: 122px;
  margin: 0;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-logo-card img {
  width: 120px;
  height: 58px;
  object-fit: contain;
}

.client-logo-card figcaption {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 780;
  text-align: center;
}

.team-section {
  background: #fff;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.team-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 32, 42, .06);
}

.team-card > img,
.team-card > .team-avatar-fallback {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.team-card > div:last-child {
  padding: 1rem;
}

.team-card span {
  color: var(--violet);
  font-size: .82rem;
  font-weight: 850;
}

.team-card h3 {
  margin: .35rem 0 .5rem;
}

.team-card p {
  color: var(--muted);
  line-height: 1.55;
}

.team-avatar-fallback {
  display: grid;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(181, 18, 43, .14), rgba(88, 215, 239, .18)),
    #f9f2f8;
  color: var(--claw);
  font-weight: 900;
}

.team-avatar-fallback.small {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 8px;
}

.team-avatar-fallback.large {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  font-size: 3rem;
}

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 1rem;
}

.form-panel,
.contact-info {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-info {
  background:
    linear-gradient(145deg, #170b16, #32152e 70%, #170b16);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.contact-info p {
  color: rgba(255, 255, 255, .72);
}

.contact-logo {
  position: absolute;
  right: -1.7rem;
  bottom: -2.4rem;
  width: 180px;
  opacity: .12;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  padding: 1.5rem clamp(1rem, 6vw, 5rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    linear-gradient(140deg, rgba(18, 7, 18, .92), rgba(44, 11, 30, .82)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=82");
  background-size: cover;
  background-position: center;
}

.login-panel {
  width: min(430px, 100%);
  padding: 1.5rem;
}

.login-panel h1 {
  margin: 1.4rem 0 1rem;
}

.login-alt-actions {
  display: grid;
  gap: .65rem;
  margin-top: .8rem;
}

.login-help {
  margin: 1rem 0 0;
  color: var(--muted);
  font-weight: 720;
  text-align: center;
}

.login-help a {
  color: var(--claw);
}

.app-body {
  --sidebar-width: 260px;
  --sidebar-layout-width: var(--sidebar-width);
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-layout-width) minmax(0, 1fr);
  transition: grid-template-columns .22s ease;
}

.app-body.team-app {
  --sidebar-width: 220px;
}

.app-body.sidebar-collapsed {
  --sidebar-layout-width: 0px;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 25;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 1.1rem;
  overflow-y: auto;
  background:
    linear-gradient(180deg, #140812, #20102d 62%, #120712);
  color: #fff;
  transition: transform .22s ease, box-shadow .22s ease;
}

.app-body.sidebar-collapsed .sidebar {
  transform: translateX(calc(var(--sidebar-width) * -1));
  pointer-events: none;
}

.app-brand {
  color: #fff;
  margin-bottom: 1.2rem;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: .9rem;
}

.side-nav-group {
  display: grid;
  gap: .18rem;
}

.side-nav-label {
  margin: 0 0 .25rem;
  padding: 0 .75rem;
  color: rgba(255, 255, 255, .45);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, .78);
  font-weight: 720;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(181, 18, 43, .22);
  color: #fff;
}

.app-shell {
  min-width: 0;
}

.sidebar-backdrop {
  display: none;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 248, 244, .94);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.app-topbar-main {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-width: 0;
}

.menu-logo-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(181, 18, 43, .18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 32, 42, .06);
}

.menu-logo-toggle:hover {
  border-color: var(--claw);
}

.menu-logo-toggle .brand-logo {
  width: 32px;
  height: 32px;
}

.app-topbar h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 700;
}

.user-menu form {
  margin: 0;
}

.client-pwa-install[hidden] {
  display: none;
}

.pwa-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: min(360px, calc(100vw - 2rem));
  padding: .85rem 1rem;
  border: 1px solid rgba(181, 18, 43, .24);
  border-radius: 8px;
  background: #160b18;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 720;
}

.offline-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    linear-gradient(140deg, rgba(18, 7, 18, .96), rgba(50, 21, 46, .9)),
    #140812;
}

.offline-panel {
  width: min(560px, 100%);
  padding: 1.25rem;
  border: 1px solid rgba(199, 166, 255, .22);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.offline-panel h1 {
  margin: .6rem 0 .8rem;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
}

.offline-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.app-content {
  padding: clamp(1rem, 3vw, 2rem);
}

.flash-wrap {
  position: fixed;
  z-index: 40;
  top: 5rem;
  right: 1rem;
  display: grid;
  gap: .5rem;
}

.flash-wrap.inside {
  position: static;
  margin: 1rem clamp(1rem, 3vw, 2rem) 0;
}

.flash {
  padding: .8rem 1rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--blue);
  max-width: 520px;
}

.flash.sucesso {
  border-left-color: var(--green);
}

.flash.erro {
  border-left-color: var(--red);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric {
  padding: 1rem;
}

.metric span {
  color: var(--muted);
  font-weight: 720;
}

.metric strong {
  display: block;
  margin-top: .55rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.panel {
  padding: 1rem;
  margin-bottom: 1rem;
}

.panel-head,
.toolbar,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-head h2,
.panel > h2 {
  margin-top: 0;
}

.collapsible-panel {
  padding: 0;
  overflow: hidden;
}

.panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}

.panel-summary::-webkit-details-marker {
  display: none;
}

.panel-summary h2 {
  margin: 0;
}

.panel-summary .eyebrow {
  margin-bottom: .25rem;
}

.summary-meta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--muted);
}

.summary-meta .lucide {
  transition: transform .18s ease;
}

.collapsible-panel[open] .summary-meta .lucide {
  transform: rotate(180deg);
}

.collapsible-panel > form {
  padding: 0 1rem 1rem;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 1rem;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  padding: .8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
}

.stack-list {
  display: grid;
  gap: .7rem;
}

.stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.stack-item span {
  color: var(--muted);
  font-size: .9rem;
}

label {
  display: grid;
  gap: .38rem;
  color: var(--ink);
  font-weight: 740;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(181, 18, 43, .14);
  border-color: var(--claw);
}

.form-panel,
.grid-form,
.wide-form {
  display: grid;
  gap: 1rem;
}

.grid-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-form.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form .full,
.wide-form .full {
  grid-column: 1 / -1;
}

.settings-form h3 {
  margin: .8rem 0 -.2rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.inline-check,
.toggles > label:first-child,
.toggles > label:nth-child(3) {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.inline-check input,
.toggles input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.filters {
  display: flex;
  flex: 1 1 720px;
  gap: .6rem;
}

.filters input,
.filters select {
  min-width: 150px;
}

.segmented {
  display: inline-flex;
  padding: .22rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented a,
.segmented button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

.segmented a.active,
.segmented button.active {
  background: var(--claw);
  color: #fff;
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .45rem;
}

.task-list.nested {
  margin: .45rem 0 0 2.2rem;
}

.task-line {
  display: grid;
  grid-template-columns: 26px 32px minmax(220px, 1fr) minmax(120px, .45fr) auto minmax(130px, auto);
  align-items: center;
  gap: .65rem;
  padding: .72rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-row .work-timer {
  margin: .25rem .5rem .25rem calc(26px + 32px + 1.3rem);
}

.kanban-timer {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--line);
}

.kanban-timer .work-timer-label {
  font-size: .78rem;
}

.drag-handle {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.task-state {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.task-state.complete:hover {
  color: var(--green);
  border-color: var(--green);
}

.task-state.wait {
  color: var(--amber);
}

.task-state.branch {
  color: var(--blue);
}

.task-title {
  font-weight: 800;
}

.task-meta,
.task-date {
  color: var(--muted);
  font-size: .92rem;
}

.status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: .25rem .55rem;
  border-radius: 8px;
  background: #eef2f6;
  color: #344054;
  font-size: .78rem;
  font-weight: 850;
}

.status-concluida {
  background: #dff5ec;
  color: #12624f;
}

.status-em-desenvolvimento,
.status-analisando {
  background: #e4efff;
  color: #1f5f9b;
}

.status-aguardando-aprovacao-da-equipe,
.status-aguardando-aprovacao-do-cliente,
.status-aguardando-feedback-do-cliente {
  background: #fff2cc;
  color: #8a5a00;
}

.status-validando {
  background: #f1e9ff;
  color: #6941c6;
}

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: .8rem;
}

.kanban-column h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 .8rem;
  font-size: 1rem;
}

.kanban-column h2 span {
  color: var(--muted);
}

.kanban-items {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-height: 420px;
}

.kanban-card {
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 32, 42, .06);
}

.kanban-card a {
  font-weight: 800;
}

.kanban-card p,
.kanban-card span {
  color: var(--muted);
  font-size: .9rem;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  margin: 1rem 0;
}

.form-main,
.form-side {
  display: grid;
  gap: 1rem;
}

.wysiwyg {
  min-height: 300px;
  background: #fff;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
  border-color: var(--line);
}

.ai-preview {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfb;
}

.ai-preview-header {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
  justify-content: space-between;
}

.ai-create-subtasks {
  display: inline-flex;
  gap: .4rem;
  align-items: center;
  font-size: .88rem;
  font-weight: 600;
}

.ai-subtasks-list {
  display: grid;
  gap: .55rem;
  margin-top: .65rem;
  padding-left: 1.2rem;
}

.ai-preview ul {
  margin-bottom: 0;
}

.ai-subtask-description {
  margin-top: .25rem;
  color: var(--muted);
}

.ai-subtask-description p {
  margin: .25rem 0 0;
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.small-input {
  max-width: 120px;
}

.work-explainer {
  display: grid;
  gap: .75rem;
}

.work-explainer h2 {
  margin: 0;
}

.work-explainer ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-explainer li {
  padding: .72rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  line-height: 1.45;
}

.work-explainer li strong {
  display: block;
  color: var(--ink);
}

.work-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-card {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1.1rem 1.1rem 1rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 32, 42, .06);
  overflow: hidden;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--line);
  transition: background .18s ease;
}

.work-card.status-concluida::before { background: #1f8f74; }
.work-card.status-em-desenvolvimento::before,
.work-card.status-analisando::before { background: #1f5f9b; }
.work-card.status-aguardando-aprovacao-da-equipe::before,
.work-card.status-aguardando-aprovacao-do-cliente::before,
.work-card.status-aguardando-feedback-do-cliente::before { background: #f3bd42; }
.work-card.status-validando::before { background: #6941c6; }

.work-card-head,
.client-work-card-head,
.work-actions,
.work-timer {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.work-card-head {
  flex-wrap: wrap;
  align-items: center;
  row-gap: .65rem;
  column-gap: .85rem;
}

.drag-handle {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  cursor: grab;
}

.drag-handle:hover {
  border-color: var(--claw);
  color: var(--claw);
}

.work-rank {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .55rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, #fbf7fb 0%, #f4ecf4 100%);
  color: var(--violet-dark);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.work-title-wrap {
  display: grid;
  gap: .25rem;
  min-width: 0;
  flex: 1 1 220px;
}

.work-title-wrap .work-timer-label {
  color: var(--muted);
  font-size: .9rem;
}

.work-title {
  display: inline-block;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.work-title:hover {
  color: var(--claw);
}

.work-card-subline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .55rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.4;
}

.work-subline-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.work-subline-item .lucide,
.work-subline-item [data-lucide] {
  width: 14px;
  height: 14px;
  color: var(--violet);
}

.work-subline-sep {
  color: var(--line);
  font-weight: 700;
}

.work-card-badges {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.work-type-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 28px;
  padding: .18rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfb;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.work-type-pill .lucide,
.work-type-pill [data-lucide] {
  width: 13px;
  height: 13px;
}

.work-description,
.client-task-description {
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--ink);
  line-height: 1.6;
  overflow-wrap: anywhere;
  font-size: .95rem;
}

.work-description p,
.client-task-description p {
  margin: .3rem 0;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  min-height: 30px;
  padding: .28rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.priority-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}

.priority-baixa {
  background: #e9f7f2;
  color: #12624f;
}

.priority-media {
  background: #e4efff;
  color: #1f5f9b;
}

.priority-alta {
  background: #fff2cc;
  color: #8a5a00;
}

.priority-maxima {
  background: #fff0f2;
  color: var(--claw-dark);
}

.work-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-meta-grid > li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  min-width: 0;
}

.work-meta-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--violet);
}

.work-meta-icon .lucide,
.work-meta-icon [data-lucide] {
  width: 16px;
  height: 16px;
}

.work-meta-body {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.work-meta-label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.work-meta-value {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .1rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: #fbfcfb;
  color: var(--ink);
  width: max-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.status-pill::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.status-concluida { background: #dff5ec; color: #12624f; }
.status-pill.status-em-desenvolvimento,
.status-pill.status-analisando { background: #e4efff; color: #1f5f9b; }
.status-pill.status-aguardando-aprovacao-da-equipe,
.status-pill.status-aguardando-aprovacao-do-cliente,
.status-pill.status-aguardando-feedback-do-cliente { background: #fff2cc; color: #8a5a00; }
.status-pill.status-validando { background: #f1e9ff; color: #6941c6; }

.work-actions {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--line);
}

.work-timer {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .55rem .35rem .35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfb;
  flex-wrap: wrap;
}

.work-timer .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.work-timer .icon-button:hover {
  border-color: var(--claw);
  color: var(--claw);
}

.work-timer[data-running="0"] .js-work-timer-pause,
.work-timer[data-running="1"] .js-work-timer-start {
  display: none;
}

.work-timer[data-running="1"] .js-work-timer-pause {
  border-color: var(--green);
  color: var(--green);
}

.work-timer[data-running="1"] .js-work-timer-pause:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.work-timer-label {
  padding-right: .35rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}

.work-timer[data-running="1"] {
  background: #e9f7f2;
  border-color: #c1e8db;
}

.work-timer[data-running="1"] .work-timer-label {
  color: var(--green);
  font-weight: 800;
}

.work-timer-counter {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: .9rem;
  color: var(--green);
  min-width: 5.5rem;
  text-align: center;
}

.work-timer[data-running="0"] .work-timer-counter {
  color: var(--muted);
}

.client-work-card-head {
  align-items: flex-start;
  gap: .85rem;
}

.client-work-card-head h2 {
  min-width: 0;
  margin: .15rem 0 0;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.client-task-actions {
  display: grid;
  gap: .75rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--line);
}

.client-cost {
  max-width: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--ink);
  font-weight: 700;
}

.client-cost strong {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}

.client-cost span {
  color: var(--claw-dark);
  font-weight: 800;
}

.client-cost-inline {
  display: inline-flex;
  width: max-content;
  margin-top: .45rem;
  padding: .22rem .5rem;
  border-radius: 8px;
  background: #fff0f2;
  color: var(--claw-dark);
  font-size: .82rem;
  font-weight: 850;
}

.client-task-line {
  grid-template-columns: 32px minmax(0, 1fr);
}

.client-task-summary {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.feedback-list {
  display: grid;
  gap: .7rem;
}

.feedback-item {
  display: grid;
  gap: .45rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.feedback-item span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
}

.feedback-item div {
  color: var(--ink);
  line-height: 1.55;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: .45rem;
  text-align: center;
}

.empty-state .lucide {
  width: 34px;
  height: 34px;
  color: var(--green);
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.faq-item span {
  color: var(--claw);
  font-weight: 800;
  font-size: .82rem;
}

.faq-item h3 {
  margin: .45rem 0;
}

.report-bars {
  display: grid;
  gap: .7rem;
}

.report-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 2fr) 90px;
  gap: .8rem;
  align-items: center;
}

meter {
  width: 100%;
  height: 16px;
}

.file-frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-manager-panel {
  display: grid;
  gap: .75rem;
}

.file-manager-panel.dragging {
  outline: 2px solid rgba(181, 18, 43, .42);
  outline-offset: 3px;
}

.file-manager-head,
.file-manager-actions,
.file-manager-nav,
.file-breadcrumbs,
.file-card-actions,
.file-editor-head,
.file-editor-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.file-manager-head,
.file-manager-nav,
.file-editor-head {
  justify-content: space-between;
}

.file-manager-head h2 {
  margin: 0;
}

.file-manager-options {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1fr) minmax(160px, .65fr);
  gap: .7rem;
}

.file-breadcrumbs {
  min-width: min(100%, 360px);
  color: var(--muted);
}

.file-breadcrumbs button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 32px;
  padding: .32rem .55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-weight: 750;
}

.file-breadcrumbs button.active,
.file-breadcrumbs button:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--claw);
}

.file-breadcrumbs > .fa-chevron-right {
  font-size: .72rem;
  opacity: .55;
}

.file-manager-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
  display: block;
}

.file-manager-global-search {
  width: 100%;
  max-width: none;
}

.file-manager-search .fa-solid {
  position: absolute;
  left: .72rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.file-manager-search input {
  padding-left: 2.1rem;
}

.file-manager-dropzone {
  min-height: 420px;
  padding: .75rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-manager-dropzone.dragging,
.file-manager-panel.dragging .file-manager-dropzone {
  border-color: var(--claw);
  background: #fff5f7;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .7rem;
}

.file-grid-lines,
.file-grid-table {
  display: block;
}

.file-grid > .empty-state {
  grid-column: 1 / -1;
  min-height: 300px;
  color: var(--muted);
}

.file-grid > .empty-state .fa-solid {
  font-size: 2rem;
  color: var(--claw);
}

.file-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(24, 32, 42, .05);
}

.file-card-main {
  display: grid;
  place-items: center;
  gap: .48rem;
  width: 100%;
  min-height: 142px;
  padding: .9rem .65rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
}

.file-card-main:hover {
  background: #fbf7fb;
}

.file-card-main > .fa-solid {
  font-size: 2.15rem;
}

.file-card-main span {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 800;
  line-height: 1.25;
}

.file-card-main small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 720;
}

.file-card-actions {
  justify-content: center;
  padding: .5rem;
  border-top: 1px solid var(--line);
  background: #fbfcfb;
}

.file-list {
  display: grid;
  gap: .55rem;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(90px, auto) minmax(130px, auto);
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-row:hover {
  background: #fbf7fb;
}

.file-row-main,
.file-table-name {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.file-row-main .fa-solid,
.file-table-name .fa-solid {
  font-size: 1.25rem;
}

.file-row-main span,
.file-table-name span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
}

.file-row-main small {
  grid-column: 2;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.file-row-size {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 760;
  white-space: nowrap;
}

.file-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-table {
  min-width: 780px;
}

.file-table td:first-child small {
  display: block;
  margin-top: .28rem;
  color: var(--muted);
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.file-table .file-card-actions {
  justify-content: flex-end;
  padding: 0;
  border-top: 0;
  background: transparent;
}

.icon-button.danger {
  color: var(--red);
}

.icon-button.danger:hover {
  border-color: var(--red);
  background: #fff5f7;
  color: var(--red);
}

.file-type-folder { color: #d39124; }
.file-type-image { color: #1f8f74; }
.file-type-pdf { color: #d92d20; }
.file-type-zip { color: #8a5a00; }
.file-type-doc { color: #2563eb; }
.file-type-sheet { color: #16835f; }
.file-type-slide { color: #c2410c; }
.file-type-code { color: #6941c6; }
.file-type-text { color: #475467; }
.file-type-video { color: #b4237a; }
.file-type-audio { color: #0e7490; }
.file-type-generic { color: var(--muted); }

.file-upload-queue {
  display: grid;
  gap: .45rem;
}

.file-upload-queue[hidden] {
  display: none;
}

.file-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 260px) 54px;
  gap: .65rem;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-upload-item span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 760;
}

.file-upload-item progress {
  width: 100%;
  accent-color: var(--claw);
}

.file-upload-item strong {
  color: var(--muted);
  font-size: .82rem;
  text-align: right;
}

.file-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 8, 18, .58);
}

.file-editor-modal[hidden],
.file-editor-text[hidden],
.markdown-preview[hidden] {
  display: none;
}

.file-editor-dialog {
  width: min(980px, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.file-editor-head {
  padding: .75rem;
  border-bottom: 1px solid var(--line);
}

.file-editor-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-editor-text,
.markdown-preview {
  width: 100%;
  min-height: min(62vh, 620px);
  border: 0;
  border-radius: 0;
}

.file-editor-text {
  font-family: "Cascadia Mono", Consolas, monospace;
  line-height: 1.55;
}

.markdown-preview {
  overflow: auto;
  padding: 1rem;
  line-height: 1.65;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  margin-top: .6rem;
}

.markdown-preview pre {
  overflow: auto;
  padding: .8rem;
  border-radius: 8px;
  background: #141018;
  color: #fff;
}

.markdown-preview img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .file-manager-head,
  .file-manager-nav,
  .file-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .file-manager-actions,
  .file-editor-actions {
    align-items: stretch;
  }

  .file-manager-actions .button,
  .file-editor-actions .button {
    flex: 1 1 130px;
  }

  .file-manager-options {
    grid-template-columns: 1fr;
  }

  .file-breadcrumbs {
    min-width: 0;
  }

  .file-manager-search {
    max-width: none;
  }

  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }

  .file-card-main {
    min-height: 126px;
  }

  .file-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .file-row .file-card-actions {
    justify-content: flex-start;
  }

  .file-row-size {
    white-space: normal;
  }

  .file-upload-item {
    grid-template-columns: 1fr;
  }

  .file-upload-item strong {
    text-align: left;
  }

  .file-editor-dialog {
    max-height: calc(100vh - 1rem);
  }
}

.muted-text {
  color: var(--muted);
  line-height: 1.6;
}

.token-reveal {
  display: grid;
  gap: .55rem;
  padding: .9rem;
  margin: 1rem 0;
  border: 1px solid rgba(181, 18, 43, .32);
  border-radius: 8px;
  background: #fff5f7;
}

.token-reveal code,
.code-block code,
td code {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.token-reveal code {
  display: block;
  overflow-x: auto;
  color: var(--claw-dark);
  font-weight: 800;
}

.scope-list {
  display: grid;
  gap: .55rem;
}

.codex-token-form {
  display: grid;
  gap: 1rem;
}

.token-form-row {
  display: grid;
  grid-template-columns: minmax(180px, .75fr) minmax(220px, 1fr) minmax(160px, auto);
  gap: 1rem;
  align-items: start;
}

.token-form-row .button {
  align-self: end;
}

.field-label {
  display: block;
  margin-bottom: .38rem;
  color: var(--ink);
  font-weight: 740;
}

.scope-list .inline-check {
  align-items: flex-start;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scope-list small {
  display: block;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.35;
}

.code-block {
  overflow-x: auto;
  margin: .75rem 0 0;
  padding: .85rem;
  border: 1px solid rgba(199, 166, 255, .3);
  border-radius: 8px;
  background: #160b18;
  color: #f8eff9;
  white-space: pre;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.doc-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.doc-grid article > span {
  display: inline-flex;
  padding: .2rem .5rem;
  border-radius: 8px;
  background: #fff0f2;
  color: var(--claw);
  font-size: .76rem;
  font-weight: 900;
}

.doc-grid h3 {
  margin: .7rem 0 .4rem;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.doc-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.client-editor-list {
  display: grid;
  gap: 1rem;
}

.team-editor-list {
  display: grid;
  gap: 1rem;
}

.client-form {
  align-items: start;
}

.client-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  gap: 1.2rem;
  align-items: start;
}

.client-editor-main,
.client-editor-side,
.logo-list {
  display: grid;
  gap: 1rem;
}

.client-editor h3 {
  margin: .2rem 0 .4rem;
}

.client-editor-side {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}

.logo-none {
  width: 100%;
  padding: .72rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.logo-list {
  max-height: 560px;
  overflow: auto;
  padding-right: .25rem;
}

.logo-upload-meta {
  display: grid;
  gap: .8rem;
}

.logo-upload-item {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: .8rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.logo-upload-item legend {
  padding: 0 .25rem;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.logo-item {
  display: grid;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.logo-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f6eef5 25%, transparent 25%),
    linear-gradient(-45deg, #f6eef5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f6eef5 75%),
    linear-gradient(-45deg, transparent 75%, #f6eef5 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.summary-person {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}

.summary-person > img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: cover;
  border-radius: 8px;
}

.summary-person .muted-text {
  margin: .25rem 0 0;
}

.team-editor-form {
  display: grid;
  gap: 1rem;
}

.team-editor-grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.team-photo-panel {
  display: grid;
  gap: 1rem;
}

.team-photo-panel img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.security-panel {
  display: grid;
  gap: 1rem;
}

.security-method,
.custom-fields-box {
  display: grid;
  gap: .9rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.passkey-actions,
.custom-fields-head,
.custom-field-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.passkey-actions label {
  flex: 1 1 260px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 1rem;
}

.security-shortcuts {
  align-self: start;
}

.client-user-profile-list {
  display: grid;
  gap: 1rem;
}

.client-user-profile-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.client-user-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.client-user-profile-head strong,
.client-user-profile-head span:not(.status) {
  display: block;
}

.totp-confirm {
  display: grid;
  grid-template-columns: 210px minmax(220px, 1fr);
  gap: 1rem;
  align-items: start;
  margin-top: .8rem;
}

.totp-confirm[hidden] {
  display: none;
}

.totp-qrcode {
  display: grid;
  place-items: center;
  width: 202px;
  min-height: 202px;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.custom-fields-root,
.custom-field-children {
  display: grid;
  gap: .65rem;
}

.custom-field-children {
  min-height: 12px;
  margin: .65rem 0 0 1.4rem;
  padding-left: .85rem;
  border-left: 2px solid var(--line);
}

.custom-field {
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.custom-field-header {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.custom-field-handle {
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: grab;
}

.custom-field-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.custom-field-badge {
  margin-left: auto;
}

.custom-field-body {
  margin-top: .75rem;
}

.custom-field-grid {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(150px, .65fr) minmax(180px, 1fr);
  gap: .75rem;
}

.custom-color-field {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
}

.custom-color-field input[type="color"] {
  width: 52px;
  min-height: 42px;
  padding: .2rem;
}

.sortable-ghost {
  opacity: .55;
}

.subtasks-box {
  display: grid;
  gap: .9rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.subtasks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.subtasks-root,
.subtask-children {
  display: grid;
  gap: .65rem;
}

.subtask-children {
  min-height: 12px;
  margin: .65rem 0 0 1.4rem;
  padding-left: .85rem;
  border-left: 2px solid var(--line);
}

.subtask-item {
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.subtask-header {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.subtask-handle {
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: grab;
}

.subtask-title {
  flex: 1;
  min-width: 0;
}

.subtask-body {
  margin-top: .65rem;
}

.subtask-body textarea {
  min-height: 50px;
  resize: vertical;
}

@media (max-width: 1100px) {
  .metrics-grid,
  .service-grid,
  .portfolio-grid,
  .team-grid,
  .origin-grid,
  .grid-form,
  .field-row,
  .work-explainer ol,
  .work-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-columns,
  .form-grid,
  .about-layout,
  .doc-grid,
  .client-editor-grid,
  .team-editor-grid,
  .profile-layout,
  .totp-confirm,
  .token-form-row,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .client-editor-side {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
  }

  .task-line {
    grid-template-columns: 24px 30px minmax(180px, 1fr) auto;
  }

  .task-meta,
  .task-date {
    display: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
  }

  .site-nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: .9rem;
  }

  .hero {
    min-height: min(68vh, 560px);
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .app-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-topbar {
    position: static;
  }

  .filters {
    flex-direction: column;
  }

  .panel > .section-heading {
    flex-direction: column;
  }

  .panel-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid,
  .service-grid,
  .portfolio-grid,
  .team-grid,
  .origin-grid,
  .grid-form.compact,
  .grid-form,
  .field-row,
  .work-explainer ol,
  .work-meta-grid {
    grid-template-columns: 1fr;
  }

  .custom-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header,
  .app-topbar,
  .panel-head,
  .toolbar,
  .form-actions,
  .user-menu {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .button.small {
    width: 100%;
    white-space: normal;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .hero-symbol {
    right: -7rem;
    width: 78vw;
    opacity: .16;
  }

  .task-line {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .work-card {
    padding: 1rem 1rem .9rem 1.2rem;
    border-radius: 12px;
  }

  .work-card-head {
    display: grid;
    grid-template-columns: 30px 38px minmax(0, 1fr);
    grid-template-areas:
      "handle rank title"
      "badges badges badges";
    row-gap: .65rem;
  }

  .work-card-head .drag-handle { grid-area: handle; }
  .work-card-head .work-rank { grid-area: rank; }
  .work-card-head .work-title-wrap { grid-area: title; }
  .work-card-head .work-card-badges { grid-area: badges; margin-left: 0; }

  .work-actions,
  .work-timer {
    align-items: stretch;
    flex-direction: column;
  }

  .work-timer {
    border-radius: 12px;
    align-items: center;
  }

  .work-actions > .button {
    width: 100%;
  }

  .drag-handle,
  .task-line .status {
    display: none;
  }

  .work-card-head .drag-handle {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-body.client-app {
    grid-template-columns: 1fr;
  }

  .client-app .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: .75rem;
    border-bottom: 1px solid rgba(199, 166, 255, .2);
  }

  .client-app .app-brand {
    margin-bottom: .7rem;
  }

  .client-app .side-nav {
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding-bottom: .2rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .client-app .side-nav a {
    flex: 0 0 auto;
    min-height: 42px;
    padding: .62rem .75rem;
    white-space: nowrap;
  }

  .client-app .app-topbar {
    align-items: flex-start;
    padding: .9rem 1rem;
  }

  .client-app .app-topbar h1 {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .client-app .user-menu {
    margin-left: auto;
  }

  .client-app .app-content {
    padding: .85rem;
  }

  .client-app .panel,
  .client-app .form-panel {
    padding: .85rem;
  }

  .client-app .metrics-grid {
    gap: .7rem;
  }

  .client-app .metric {
    padding: .85rem;
  }

  .client-app .metric strong {
    font-size: 1.75rem;
  }

  .client-app .stack-item {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .client-app .field-row,
  .client-app .grid-form {
    gap: .75rem;
  }

  .client-app input,
  .client-app select,
  .client-app textarea,
  .client-app .button {
    min-height: 46px;
  }

  .client-app .task-list.nested {
    margin-left: .8rem;
    padding-left: .7rem;
    border-left: 1px solid var(--line);
  }

  .client-app .task-line {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    gap: .45rem .65rem;
  }

  .client-app .task-title {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .client-app .task-line .status,
  .client-app .task-date {
    grid-column: 2;
  }

  .client-app .task-line .status {
    display: inline-flex;
  }

  .client-app .task-date {
    display: block;
  }
}

@media (max-width: 700px) {
  .client-app .responsive-cards {
    overflow-x: visible;
  }

  .client-app .responsive-card-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 .7rem;
  }

  .client-app .responsive-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .client-app .responsive-card-table,
  .client-app .responsive-card-table tr,
  .client-app .responsive-card-table td {
    display: block;
    width: 100%;
  }

  .client-app .responsive-card-table tbody {
    display: grid;
    gap: .7rem;
    width: 100%;
  }

  .client-app .responsive-card-table tr {
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(24, 32, 42, .05);
  }

  .client-app .responsive-card-table td {
    display: grid;
    grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: .45rem 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  .client-app .responsive-card-table td:first-child {
    padding-top: 0;
  }

  .client-app .responsive-card-table td:last-child {
    padding-bottom: 0;
  }

  .client-app .responsive-card-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .75rem;
    font-weight: 850;
    text-transform: uppercase;
  }
}

@media (max-width: 560px) {
  .client-app .app-brand span {
    display: none;
  }

  .client-app .side-nav {
    grid-template-columns: none;
  }

  .client-app .side-nav a {
    justify-content: center;
    min-width: 58px;
  }

  .client-app .side-nav a span {
    font-size: .82rem;
  }

  .client-app .app-topbar {
    flex-direction: row;
    gap: .75rem;
  }

  .client-app .user-menu {
    align-items: center;
    flex-direction: row;
    gap: .45rem;
  }

  .client-app .user-menu > span {
    display: none;
  }

  .client-app .user-menu .button {
    width: auto;
  }

  .client-app .panel-head,
  .client-app .toolbar,
  .client-app .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .client-app .panel-head input,
  .client-app .panel-head .button {
    width: 100%;
  }

  .client-app .task-line .status {
    display: inline-flex;
  }

  .client-app .responsive-card-table td {
    grid-template-columns: 1fr;
    gap: .18rem;
  }
}

/* ── Admin compact ── */
.team-app .app-body {
  grid-template-columns: 220px minmax(0, 1fr);
}

.team-app .sidebar {
  padding: .75rem .7rem;
}

.team-app .app-brand {
  margin-bottom: .8rem;
}

.team-app .side-nav {
  gap: .1rem;
}

.team-app .side-nav a {
  gap: .6rem;
  padding: .55rem .6rem;
  font-size: .88rem;
}

.team-app .side-nav [data-lucide] {
  width: 16px;
  height: 16px;
}

.team-app .app-topbar {
  padding: .6rem clamp(.8rem, 2vw, 1.5rem);
}

.team-app .app-topbar h1 {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.team-app .app-content {
  padding: clamp(.7rem, 2vw, 1.25rem);
}

.team-app button,
.team-app input,
.team-app select,
.team-app textarea {
  font-size: .88rem;
}

.team-app .button,
.team-app button.button {
  min-height: 34px;
  padding: .5rem .8rem;
  font-size: .84rem;
  border-radius: 6px;
}

.team-app .button.small {
  min-height: 28px;
  padding: .32rem .6rem;
  font-size: .78rem;
}

.team-app .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.team-app .icon-button [data-lucide] {
  width: 15px;
  height: 15px;
}

.team-app input,
.team-app select,
.team-app textarea {
  min-height: 34px;
  padding: .45rem .6rem;
  border-radius: 6px;
}

.team-app label {
  gap: .25rem;
  font-size: .85rem;
  font-weight: 680;
}

.team-app .segmented {
  padding: .16rem;
}

.team-app .segmented a {
  width: 30px;
  height: 28px;
  border-radius: 5px;
}

.team-app .eyebrow {
  font-size: .7rem;
  margin-bottom: .25rem;
}

.team-app .panel {
  padding: .7rem;
  margin-bottom: .6rem;
}

.team-app .panel > .section-heading {
  margin-bottom: .7rem;
}

.team-app .panel h2,
.team-app .panel-head h2 {
  font-size: 1.05rem;
}

.team-app .collapsible-panel > form {
  padding: 0 .7rem .7rem;
}

.team-app .panel-summary {
  padding: .7rem;
}

.team-app .metrics-grid {
  gap: .6rem;
  margin-bottom: .6rem;
}

.team-app .metric {
  padding: .7rem;
}

.team-app .metric span {
  font-size: .82rem;
}

.team-app .metric strong {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-top: .25rem;
}

.team-app .table-scroll {
  margin: 0 -.7rem;
}

.team-app table {
  min-width: 500px;
}

.team-app th,
.team-app td {
  padding: .5rem .7rem;
  font-size: .85rem;
}

.team-app th {
  font-size: .72rem;
}

.team-app .form-actions {
  gap: .6rem;
}

.team-app .form-grid {
  gap: .7rem;
  margin: .5rem 0;
}

.team-app .form-main,
.team-app .form-side {
  gap: .7rem;
}

.team-app .form-panel,
.team-app .grid-form,
.team-app .wide-form {
  gap: .7rem;
}

.team-app .grid-form {
  gap: .7rem;
}

.team-app .field-row {
  gap: .7rem;
  margin-bottom: .7rem;
}

.team-app .filters {
  gap: .45rem;
}

.team-app .filters input,
.team-app .filters select {
  min-width: 110px;
}

.team-app .two-columns {
  gap: .7rem;
}

.team-app .task-list {
  gap: .3rem;
}

.team-app .task-list.nested {
  margin: .3rem 0 0 1.6rem;
}

.team-app .task-line {
  padding: .55rem;
  gap: .5rem;
  font-size: .88rem;
  grid-template-columns: 20px 26px minmax(160px, 1fr) minmax(90px, .4fr) auto minmax(100px, auto);
}

.team-app .task-state {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.team-app .task-state [data-lucide] {
  width: 14px;
  height: 14px;
}

.team-app .task-title {
  font-size: .9rem;
}

.team-app .task-meta,
.team-app .task-date {
  font-size: .82rem;
}

.team-app .drag-handle [data-lucide] {
  width: 14px;
  height: 14px;
}

.team-app .status {
  min-height: 22px;
  padding: .16rem .45rem;
  font-size: .7rem;
  border-radius: 5px;
}

.team-app .kanban-board {
  gap: .7rem;
}

.team-app .kanban-column {
  padding: .65rem;
  min-height: 380px;
}

.team-app .kanban-column h2 {
  font-size: .88rem;
  margin-bottom: .6rem;
}

.team-app .kanban-items {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-height: 300px;
}

.team-app .kanban-card {
  padding: .6rem;
}

.team-app .kanban-card a {
  font-size: .88rem;
}

.team-app .kanban-card p,
.team-app .kanban-card span {
  font-size: .8rem;
}

.team-app .wysiwyg {
  min-height: 220px;
}

.team-app .stack-list {
  gap: .45rem;
}

.team-app .stack-item {
  padding: .55rem;
  gap: .6rem;
  font-size: .88rem;
}

.team-app .stack-item span {
  font-size: .82rem;
}

.team-app .work-list {
  gap: .6rem;
}

.team-app .work-card {
  padding: .7rem;
  gap: .6rem;
}

.team-app .work-rank {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: .75rem;
}

.team-app .work-title {
  font-size: .92rem;
}

.team-app .work-title-wrap span,
.team-app .work-timer-label {
  font-size: .82rem;
}

.team-app .work-meta-grid {
  gap: .45rem;
}

.team-app .work-meta-grid span {
  padding: .45rem;
  font-size: .82rem;
}

.team-app .work-meta-grid strong {
  font-size: .68rem;
}

.team-app .work-actions {
  padding-top: .5rem;
  gap: .6rem;
}

.team-app .priority-badge {
  min-height: 24px;
  padding: .16rem .45rem;
  font-size: .7rem;
  border-radius: 5px;
}

.team-app .inline-check input,
.team-app .toggles input[type="checkbox"] {
  width: 15px;
  min-height: 15px;
}

.team-app .feedback-item {
  padding: .6rem;
  font-size: .85rem;
}

.team-app .feedback-item span {
  font-size: .76rem;
}

.team-app .faq-item {
  padding: .7rem;
}

.team-app .faq-item h3 {
  font-size: .95rem;
}

.team-app .ai-preview {
  padding: .6rem;
  font-size: .85rem;
}

.team-app .small-input {
  max-width: 80px;
}

.team-app .timer-actions {
  gap: .45rem;
}

.team-app .summary-person {
  gap: .65rem;
}

.team-app .summary-person > img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.team-app .team-avatar-fallback.small {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.team-app .work-card-head .work-rank {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.team-app .work-explainer ol {
  gap: .45rem;
}

.team-app .work-explainer li {
  padding: .55rem;
  font-size: .85rem;
}

.team-app .client-editor-grid {
  gap: .8rem;
}

.team-app .client-editor-side {
  padding-left: .7rem;
}

.team-app .team-editor-grid {
  gap: .7rem;
}

.team-app .security-method,
.team-app .custom-fields-box {
  padding: .65rem;
  gap: .65rem;
}

.team-app .custom-field {
  padding: .55rem;
}

.team-app .custom-field-grid {
  gap: .5rem;
}

.team-app .custom-field-children {
  margin: .5rem 0 0 1rem;
  padding-left: .6rem;
}

.team-app .token-reveal {
  padding: .65rem;
  font-size: .85rem;
}

.team-app .codex-token-form {
  gap: .7rem;
}

.team-app .token-form-row {
  gap: .7rem;
}

.team-app .scope-list {
  gap: .4rem;
}

.team-app .scope-list .inline-check {
  padding: .4rem;
}

.team-app .doc-grid {
  gap: .7rem;
}

.team-app .doc-grid article {
  padding: .7rem;
}

.team-app .doc-grid article > span {
  font-size: .68rem;
}

.team-app .doc-grid h3 {
  font-size: .88rem;
}

.team-app .settings-form h3 {
  font-size: .92rem;
  margin: .5rem 0 -.1rem;
  padding-top: .6rem;
}

.team-app .empty-state [data-lucide] {
  width: 28px;
  height: 28px;
}

.team-app .empty-state {
  gap: .25rem;
  font-size: .88rem;
}

.team-app .flash.inside {
  margin: .5rem clamp(.7rem, 2vw, 1.25rem) 0;
}

.team-app .flash {
  padding: .55rem .75rem;
  font-size: .85rem;
}

.team-app .report-row {
  gap: .6rem;
  font-size: .85rem;
}

.team-app meter {
  height: 12px;
}

.team-app .file-frame {
  min-height: 400px;
}

.team-app .file-manager-dropzone {
  min-height: 360px;
}

.team-app .file-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .5rem;
}

.team-app .file-card-main {
  min-height: 118px;
  padding: .65rem .5rem;
}

.team-app .file-card-main > .fa-solid {
  font-size: 1.75rem;
}

.team-app .client-work-card-head h2 {
  font-size: 1rem;
}

.team-app .client-cost {
  font-size: .85rem;
}

.team-app .client-cost-inline {
  font-size: .75rem;
}

.team-app .muted-text {
  font-size: .85rem;
}

@media (max-width: 1100px) {
  .team-app .app-body {
    grid-template-columns: 1fr;
  }

  .team-app .sidebar {
    position: static;
    height: auto;
  }

  .team-app .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-app .app-topbar {
    position: static;
  }

  .team-app .task-line {
    grid-template-columns: 20px 24px minmax(140px, 1fr) auto;
  }

  .team-app .task-meta {
    display: none;
  }
}

@media (max-width: 820px) {
  .team-app .side-nav a {
    min-height: 36px;
    padding: .48rem .6rem;
  }
}

@media (max-width: 560px) {
  .team-app .side-nav {
    grid-template-columns: 1fr;
  }

  .team-app .task-line {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .team-app .drag-handle,
  .team-app .task-line .status {
    display: none;
  }
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
}

.person-card {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s;
}

.person-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.person-card .person-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.person-card .person-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 1.2rem;
}

.person-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(181, 18, 43, .14), rgba(88, 215, 239, .18)), #f9f2f8;
  color: var(--claw);
  font-weight: 900;
}

.person-avatar-fallback.small {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 6px;
  font-size: .8rem;
}

.person-avatar.small {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 32px;
}

.person-info strong {
  display: block;
}

.person-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.compact-list {
  display: flex;
  flex-direction: column;
}

.compact-list-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.compact-list-item:last-child {
  border-bottom: none;
}

.compact-list-item:hover {
  background: var(--hover);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: .5rem .6rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table th {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.data-table tbody tr:hover {
  background: var(--hover);
}

.table-person {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

.team-photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin-bottom: .5rem;
}

.status-inativo {
  opacity: .55;
  background: var(--line) !important;
  color: var(--muted) !important;
}

.status-ativo {
  background: #dff0d8 !important;
  color: #3c763d !important;
}

.status-pausado {
  opacity: .65;
  background: #fcf8e3 !important;
  color: #8a6d3b !important;
}

.cell-truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-actions {
  white-space: nowrap;
  width: 1%;
}

.cell-actions .icon-button {
  padding: .3rem;
  border-radius: 6px;
}

.link-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.link-info p {
  margin: 0;
  font-size: .92rem;
}

.link-info a {
  word-break: break-all;
}

.qr-display {
  display: inline-flex;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 1rem 0;
}

.qr-display svg {
  width: 280px;
  height: 280px;
  max-width: 90vw;
  max-height: 90vw;
}

.status-ok {
  color: var(--green);
}

.calendarjs-schedule {
  border-radius: 8px;
}

#calendar-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: auto;
  min-width: 42px;
  padding: 0 .62rem;
}

.calendarjs-schedule .calendarjs-event {
  border-radius: 6px;
  font-size: .85rem;
  padding: 2px 6px;
}

.calendarjs-event .calendarjs-title {
  font-weight: 600;
}

.calendarjs-event .calendarjs-time {
  font-size: .78rem;
  opacity: .85;
}

.calendar-month-view {
  min-height: 600px;
}

.calendar-month-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin-bottom: .85rem;
}

.calendar-month-title {
  min-width: 190px;
  text-align: center;
  text-transform: capitalize;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-month-weekday,
.calendar-month-day {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-month-weekday:nth-child(7),
.calendar-month-day.is-week-end {
  border-right: 0;
}

.calendar-month-day.is-last-row {
  border-bottom: 0;
}

.calendar-month-weekday {
  padding: .65rem .55rem;
  background: var(--paper);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-month-day {
  display: flex;
  flex-direction: column;
  gap: .38rem;
  min-height: 118px;
  min-width: 0;
  padding: .48rem;
  background: #fff;
}

.calendar-month-day.is-outside {
  background: #fbf7fb;
  color: var(--muted);
}

.calendar-month-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(181, 18, 43, .28);
}

.calendar-month-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  font-weight: 800;
}

.calendar-month-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--claw);
  color: #fff;
  font-size: .74rem;
}

.calendar-month-events {
  display: grid;
  gap: .3rem;
  min-width: 0;
}

.calendar-month-event {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  width: 100%;
  min-height: 27px;
  min-width: 0;
  padding: .26rem .38rem;
  border: 0;
  border-left: 3px solid var(--event-color);
  border-radius: 6px;
  background: #fdf8fb;
  color: var(--ink);
  text-align: left;
}

.calendar-month-event:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--event-color);
}

.calendar-month-event-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 760;
}

.calendar-month-event-title {
  min-width: 0;
  overflow: hidden;
  font-size: .8rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-month-more {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 760;
}

@media (max-width: 820px) {
  .calendar-month-view {
    overflow-x: auto;
    padding-bottom: .35rem;
  }

  .calendar-month-grid {
    min-width: 760px;
  }

  #calendar-view-switch button {
    padding: 0 .48rem;
    font-size: .88rem;
  }
}

.calendar-modal-open {
  overflow: hidden;
}

.calendar-event-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(18, 7, 18, .58);
}

.calendar-event-modal[hidden] {
  display: none;
}

.calendar-event-dialog {
  width: min(680px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

#calendar-event-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.calendar-event-head,
.calendar-event-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.calendar-event-head {
  justify-content: space-between;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

.calendar-event-head .eyebrow {
  margin-bottom: .2rem;
}

.calendar-event-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.calendar-event-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.calendar-event-fields .full {
  grid-column: 1 / -1;
}

.calendar-event-fields textarea {
  min-height: 96px;
}

.calendar-event-fields input[type="color"] {
  padding: .25rem;
}

.calendar-event-error {
  margin: 0;
  padding: .65rem .75rem;
  border-left: 4px solid var(--red);
  border-radius: 6px;
  background: #fff0f2;
  color: var(--claw-dark);
  font-weight: 700;
}

.calendar-event-actions {
  flex-wrap: wrap;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}

.calendar-event-action-spacer {
  flex: 1 1 auto;
}

@media (max-width: 560px) {
  .calendar-event-modal {
    align-items: end;
    padding: .5rem;
  }

  .calendar-event-dialog {
    max-height: calc(100dvh - 1rem);
  }

  .calendar-event-fields {
    grid-template-columns: 1fr;
  }

  .calendar-event-fields .full {
    grid-column: auto;
  }

  .calendar-event-actions .button {
    width: auto;
  }

  .calendar-event-action-spacer {
    display: none;
  }
}

.jss_event_form {
  z-index: 1060;
}

.jss_event_form .jss_event_title {
  font-size: 1.1rem;
  font-weight: 700;
}

.jss_event_form input,
.jss_event_form select,
.jss_event_form textarea {
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .92rem;
}

.jss_event_form .jss_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 42px;
  padding: .72rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.jss_event_form .jss_button.jss_primary {
  background: var(--claw);
  color: #fff;
  border-color: var(--claw);
}

.jss_event_form .jss_button.jss_danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 2rem 1rem;
}

.error-container {
  text-align: center;
  max-width: 560px;
  width: 100%;
}

.error-gif {
  text-align: center;
  margin-bottom: 1.5rem;
}

.error-gif img {
  width: 260px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.error-code {
  display: inline-block;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--claw);
  margin-bottom: .25rem;
  letter-spacing: -.04em;
}

.error-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin: 0 0 .75rem;
  color: var(--ink);
}

.error-description {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 .4rem;
  font-size: 1.05rem;
}

.error-action {
  color: var(--violet);
  font-weight: 500;
  margin: 0 0 1.5rem;
  font-size: .95rem;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.public-body .error-page {
  min-height: calc(100vh - 140px);
}

@media (max-width: 820px) {
  .app-body,
  .app-body.client-app,
  .app-body.team-app {
    --sidebar-width: min(84vw, 320px);
    --sidebar-layout-width: 0px;
    --mobile-topbar-height: 66px;
    grid-template-columns: 1fr;
  }

  .sidebar,
  .client-app .sidebar,
  .team-app .sidebar {
    position: fixed;
    top: var(--mobile-topbar-height);
    bottom: 0;
    left: 0;
    z-index: 35;
    width: var(--sidebar-width);
    height: calc(100dvh - var(--mobile-topbar-height));
    padding: .9rem;
    border-right: 1px solid rgba(199, 166, 255, .2);
    border-bottom: 0;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .app-body.sidebar-open .sidebar,
  .app-body.client-app.sidebar-open .sidebar,
  .app-body.team-app.sidebar-open .sidebar {
    transform: translateX(0);
    pointer-events: auto;
    box-shadow: 18px 0 38px rgba(18, 7, 18, .22);
  }

  .app-body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  .sidebar-backdrop:not([hidden]) {
    position: fixed;
    inset: var(--mobile-topbar-height) 0 0 0;
    z-index: 30;
    display: block;
    border: 0;
    background: rgba(18, 7, 18, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .app-body.sidebar-open .sidebar-backdrop:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
  }

  .app-brand,
  .client-app .app-brand,
  .team-app .app-brand {
    margin-bottom: 1rem;
  }

  .side-nav,
  .client-app .side-nav,
  .team-app .side-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: .9rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .side-nav a,
  .client-app .side-nav a,
  .team-app .side-nav a {
    flex: none;
    justify-content: flex-start;
    min-height: 42px;
    min-width: 0;
    padding: .7rem .75rem;
    white-space: normal;
  }

  .app-topbar,
  .client-app .app-topbar,
  .team-app .app-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    min-height: var(--mobile-topbar-height);
    align-items: center;
    flex-direction: row;
    padding: .55rem .85rem;
  }

  .app-topbar-main {
    min-width: 0;
  }

  .app-topbar-main h1 {
    overflow-wrap: anywhere;
  }

  .user-menu,
  .client-app .user-menu {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .app-body .app-topbar,
  .client-app .app-topbar,
  .team-app .app-topbar {
    align-items: center;
    flex-direction: row;
  }

  .app-topbar-main {
    gap: .65rem;
  }

  .app-topbar-main .eyebrow {
    margin-bottom: .15rem;
  }

  .menu-logo-toggle {
    width: 40px;
    height: 40px;
  }

  .menu-logo-toggle .brand-logo {
    width: 30px;
    height: 30px;
  }

  .client-app .app-brand span {
    display: inline;
  }

  .user-menu,
  .client-app .user-menu {
    align-items: center;
    flex-direction: row;
    gap: .45rem;
  }

  .user-menu > span {
    display: none;
  }
}
