/* ═══════════════════════════════════════════════════════════════
   Arkdium OS — design system (identidade arkdium.dev: ember on black)
   Space Grotesk display · Inter body · assinatura: ember glow +
   hairlines que acendem em vermelho no hover
   ═══════════════════════════════════════════════════════════════ */
:root {
  --red:         #e01e1e;
  --red-bright:  #ff5a52;
  --red-deep:    #8f1010;
  --red-soft:    #ff6b64;
  --bg:          #070709;
  --panel:       #0e0e12;
  --panel-2:     #14141a;
  --glass:       rgba(9, 9, 12, .72);
  --line:        rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --text:        #f5f5f7;
  --muted:       #9b9ba6;
  --success:     #3ddc97;
  --warn:        #f5b74f;
  --radius:      14px;
  --radius-sm:   10px;
  --maxw:        1160px;
  --ease:        cubic-bezier(.22, 1, .36, 1);
  --ease-out:    cubic-bezier(.23, 1, .32, 1);
  --font-head:   "Space Grotesk", system-ui, sans-serif;
  --font-body:   "Inter", system-ui, sans-serif;
  --space-1:     8px;
  --space-2:     16px;
  --space-3:     24px;
  --shadow-card: 0 1px 0 rgba(255,255,255,.03) inset, 0 16px 40px -20px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 50% -200px, rgba(224, 30, 30, .13), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.015em; }

a { color: var(--red-soft); text-decoration: none; transition: color 160ms var(--ease-out); }
a:hover { color: var(--red-bright); }

::selection { background: rgba(224, 30, 30, .35); }

/* ─── Entrada suave (stagger) ────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.grid > *, .card { animation: rise 340ms var(--ease-out) both; }
.grid > *:nth-child(2) { animation-delay: 45ms; }
.grid > *:nth-child(3) { animation-delay: 90ms; }
.grid > *:nth-child(4) { animation-delay: 135ms; }
.grid > *:nth-child(5) { animation-delay: 180ms; }
.grid > *:nth-child(6) { animation-delay: 225ms; }

/* ─── Layout ─────────────────────────────────────────────── */
.center-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-2);
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-3);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
  animation: none;
}
.topnav .brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.topnav .brand span { color: var(--red-bright); }
.topnav .brand:hover { text-decoration: none; }
.topnav nav { display: flex; gap: 4px; flex: 1; }
.topnav nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.topnav nav a:hover { color: var(--text); background: rgba(255,255,255,.05); text-decoration: none; }
.topnav nav a.active {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.topnav .who {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
}

/* ─── Multi-perfil do admin (D25) ─────────────────────────── */
.viewas {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.viewas__label {
  padding: 0 8px 0 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.viewas__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 160ms var(--ease-out), background 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.viewas__btn:hover { color: var(--text); }
.viewas__btn:active { transform: scale(0.97); }
.viewas__btn--on {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.viewas-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px var(--space-3);
  font-size: 0.85rem;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 22%, transparent);
}
.viewas-banner strong { font-weight: 600; }
.viewas-banner__form { margin: 0; }
.viewas-banner__back {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.viewas-banner__back:hover { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.viewas-banner__back:active { transform: scale(0.97); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--space-3) 64px; }

/* ─── Page header ────────────────────────────────────────── */
.page-head { margin: 8px 0 var(--space-3); animation: rise 300ms var(--ease-out) both; }
.page-head h2 { margin: 4px 0 0; font-size: 1.75rem; font-weight: 700; }
.page-head .sub { color: var(--muted); margin: 6px 0 0; font-size: 0.95rem; }

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
}

.section-title {
  margin: var(--space-3) 0 var(--space-2);
  font-size: 1.4rem;
  font-weight: 700;
}

/* ─── Card ───────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(180deg, #101015, #0c0c10);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
}
.card--login {
  width: min(430px, 92vw);
  padding: 36px 32px;
  border-color: var(--line-strong);
}
.card--login h1 { font-size: 1.7rem; margin: 0 0 6px; }
.card--login h1 span { color: var(--red-bright); }
.card h1 { font-size: 1.5rem; margin: 0 0 var(--space-1); }
.card h3 { font-weight: 600; }
.card p.sub { color: var(--muted); margin: 0 0 var(--space-3); }

/* Cards clicáveis: hairline acende em vermelho + lift */
a.card {
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out),
              box-shadow 200ms var(--ease-out);
}
a.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(224,30,30,.7), rgba(224,30,30,.12) 40%, transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  a.card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 48px -20px rgba(0,0,0,.8),
                0 12px 32px -16px rgba(224,30,30,.18);
    text-decoration: none;
  }
  a.card:hover::after { opacity: 1; }
}

/* ─── Tile (projeto) ─────────────────────────────────────── */
.tile__company {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.tile h3 { margin: 0 0 14px; font-size: 1.15rem; color: var(--text); }
.tile__meta { display: flex; align-items: center; gap: 8px; }
.tile__arrow {
  color: var(--muted);
  transition: transform 200ms var(--ease-out), color 200ms var(--ease-out);
}
a.card:hover .tile__arrow { transform: translateX(4px); color: var(--red-bright); }

.tile__body { flex: 1; min-width: 0; }
.tile__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  text-align: right;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.tile__stat-num {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
  line-height: 1.1;
  color: var(--text);
}
.tile__stat-num small { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.tile__stat-label {
  margin: 2px 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ─── Stat (métricas) ────────────────────────────────────── */
.stat { display: block; }
.stat__num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
  line-height: 1.1;
  margin: 0;
}
.stat__label {
  margin: 6px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ─── Forms ──────────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: var(--space-1);
  color: var(--muted);
}

input, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0a0a0d;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: var(--space-2);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out),
              background 160ms var(--ease-out);
}
input::placeholder { color: rgba(155, 155, 166, .5); }
input:hover, select:hover { border-color: var(--line-strong); }
input:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 30, 30, .22);
  background: #0c0c10;
}
input.otp {
  letter-spacing: 12px;
  font-size: 1.6rem;
  font-family: var(--font-head);
  text-align: center;
}

/* ─── Buttons ────────────────────────────────────────────── */
.button {
  display: inline-block;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ef2626, #c81010);
  box-shadow: 0 8px 24px -10px rgba(224, 30, 30, .55), 0 1px 0 rgba(255,255,255,.12) inset;
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
  transition: transform 160ms var(--ease-out), filter 160ms var(--ease-out),
              box-shadow 160ms var(--ease-out), opacity 160ms var(--ease-out);
}
.button:hover {
  filter: brightness(1.12);
  box-shadow: 0 12px 28px -10px rgba(224, 30, 30, .65), 0 1px 0 rgba(255,255,255,.14) inset;
  text-decoration: none;
}
.button:active { transform: scale(0.97); }
.button:disabled { opacity: 0.55; cursor: wait; }
.button:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }

.button--small { width: auto; padding: 8px 16px; font-size: 0.85rem; }
.button--ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  box-shadow: none;
  color: var(--text);
}
.button--ghost:hover { background: rgba(255,255,255,.05); filter: none; box-shadow: none; }
.button--danger {
  background: transparent;
  border: 1px solid var(--red-deep);
  box-shadow: none;
  color: var(--red-soft);
}
.button--danger:hover {
  background: var(--red-deep);
  color: #fff;
  filter: none;
  box-shadow: 0 8px 20px -10px rgba(143, 16, 16, .6);
}

/* ─── Tables ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
tbody tr { transition: background 140ms var(--ease-out); }
tbody tr:hover { background: rgba(255, 255, 255, .025); }
tbody tr:last-child td { border-bottom: none; }
td form { display: inline; }

/* ─── Badges & messages ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
}
.badge::first-letter { text-transform: uppercase; }
.badge--gerente {
  color: var(--red-soft);
  border-color: rgba(224, 30, 30, .4);
  background: rgba(224, 30, 30, .1);
}
.badge--ok {
  color: var(--success);
  border-color: rgba(61, 220, 151, .3);
  background: rgba(61, 220, 151, .08);
}
/* Tags coloridas por tipo de documento (identificação visual rápida) */
.badge--kind-orcamento {  /* âmbar = financeiro */
  color: #f5b756; border-color: rgba(245, 183, 86, .35); background: rgba(245, 183, 86, .1);
}
.badge--kind-ata {
  color: #6ea8fe; border-color: rgba(110, 168, 254, .35); background: rgba(110, 168, 254, .1);
}
.badge--kind-requisitos {
  color: #b58cff; border-color: rgba(181, 140, 255, .35); background: rgba(181, 140, 255, .1);
}
.badge--kind-changelog {
  color: var(--success); border-color: rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .08);
}
/* badge--kind-doc: neutro (badge padrão) */

/* Entregáveis (D30): versão em destaque + barra de classificação do upload */
.badge--versao {
  color: var(--red-bright);
  border-color: rgba(224, 30, 30, .45);
  background: rgba(224, 30, 30, .12);
  font-weight: 600;
}
.upload-confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
}
.upload-confirm__name {
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-confirm select,
.upload-confirm input { margin: 0; padding: 7px 10px; width: auto; font-size: 0.86rem; }
.upload-confirm input { width: 90px; }

.msg { margin-top: var(--space-2); font-size: 0.9rem; min-height: 1.2em; }
.msg--error { color: var(--red-soft); }
.msg--ok { color: var(--success); }

.grid { display: grid; gap: var(--space-2); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.row { display: flex; gap: var(--space-2); align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.row > .button { flex: 0 0 auto; }
.muted { color: var(--muted); }

/* ─── Progress bar (horas — F5) ──────────────────────────── */
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.4);
  overflow: hidden;
  margin-top: var(--space-2);
}
.progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--red-bright));
  box-shadow: 0 0 12px rgba(224, 30, 30, .5);
  transition: width 500ms var(--ease);
}
.progress__bar--warn {
  background: linear-gradient(90deg, #a87b1e, var(--warn));
  box-shadow: 0 0 12px rgba(245, 183, 79, .4);
}
.progress__bar--danger {
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  box-shadow: 0 0 14px rgba(224, 30, 30, .7);
}

.hours__big {
  margin: 0;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}
.hours__big small { font-size: 1.05rem; font-weight: 500; color: var(--muted); }

/* ─── Project header + donut de horas ────────────────────── */
.proj-head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.proj-head__main { flex: 1; min-width: 0; }

.card--hours {
  flex: 0 0 300px;
  padding: 20px;
  text-align: center;
}
.card--hours__title {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.donut { position: relative; width: 148px; margin: 8px auto 0; }
.donut svg { display: block; width: 100%; transform: rotate(-90deg); }
.donut__track {
  fill: none;
  stroke: rgba(255, 255, 255, .06);
  stroke-width: 10;
}
.donut__arc {
  fill: none;
  stroke: var(--red);
  stroke-width: 10;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(224, 30, 30, .45));
  transition: stroke-dasharray 600ms var(--ease);
}
.donut__arc--warn {
  stroke: var(--warn);
  filter: drop-shadow(0 0 6px rgba(245, 183, 79, .4));
}
.donut__arc--danger {
  stroke: var(--red-bright);
  filter: drop-shadow(0 0 8px rgba(224, 30, 30, .7));
}
.donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.donut__total {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
  line-height: 1;
}
.donut__total small { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.donut__pct {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.donut__stamp { margin: 12px 0 0; font-size: 0.72rem; }

/* ─── Card head (título + ações) ─────────────────────────── */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.card-head__actions { display: flex; gap: 8px; }

/* ─── Form grid (criação/edição de projeto) ──────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 var(--space-2);
  margin-bottom: var(--space-2);
}
.form-grid__wide { grid-column: 1 / -1; }
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0a0a0d;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: var(--space-2);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
textarea:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 30, 30, .22);
}

/* ─── Busca ──────────────────────────────────────────────── */
.search-input {
  padding: 9px 14px 9px 34px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: #0a0a0d url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="%239b9ba6" stroke-width="2.4" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>') no-repeat 12px center;
}

.rename-input {
  border-radius: 8px;
  font-size: 0.82rem;
  background: transparent;
  border-color: transparent;
  width: 180px;
}
.rename-input:hover { border-color: var(--line); }
.rename-input:focus-visible { background: #0a0a0d; }

/* ─── Timeline de fases ──────────────────────────────────── */
.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.tl-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 0 22px 0;
}
.tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 24px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.tl-item--done:not(:last-child)::before {
  background: linear-gradient(180deg, var(--red-deep), var(--line));
}
.tl-dot {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #fff;
  background: var(--panel-2);
  border: 2px solid var(--line-strong);
  z-index: 1;
}
.tl-item--done .tl-dot {
  background: linear-gradient(160deg, var(--red), var(--red-deep));
  border-color: var(--red);
  box-shadow: 0 0 10px rgba(224, 30, 30, .35);
}
.tl-item--current .tl-dot {
  border-color: var(--red-bright);
  box-shadow: 0 0 0 4px rgba(224, 30, 30, .18), 0 0 12px rgba(224, 30, 30, .4);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(224, 30, 30, .14), 0 0 10px rgba(224, 30, 30, .3); }
  50%      { box-shadow: 0 0 0 6px rgba(224, 30, 30, .22), 0 0 16px rgba(224, 30, 30, .5); }
}
.tl-body { flex: 1; min-width: 0; }
.tl-name { margin: 1px 0 2px; font-weight: 600; font-size: 0.98rem; }
.tl-item--done .tl-name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(224,30,30,.5); }
.tl-date { margin: 0; font-size: 0.82rem; }
.tl-now {
  color: var(--red-bright);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}
.tl-actions { display: flex; gap: 6px; }

/* ─── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  border: none;
  margin: var(--space-3) 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

[hidden] { display: none !important; }

/* ─── Acessibilidade / motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  .topnav { flex-wrap: wrap; gap: 10px; }
  .topnav nav { order: 3; flex-basis: 100%; }
  .topnav .who { margin-left: auto; }
  .container { padding: 20px var(--space-2) 48px; }
  .stat__num { font-size: 1.7rem; }
  .proj-head { flex-direction: column; }
  .card--hours { flex: none; width: 100%; }
  .card-head { flex-direction: column; align-items: flex-start; }
}


/* ═══ v1.1.0 — badges, timeline horizontal, modal novidades, footer, WhatsApp ═══ */

/* Badge: ::first-letter não se aplica a flex container — inline-block resolve */
.badge { display: inline-block; vertical-align: middle; }

/* Timeline de fases — horizontal no desktop.
   SEM overflow-x: overflow num eixo clipa o outro e cortaria a .tl-tip. */
.timeline { display: flex; padding-bottom: 6px; }
.tl-item { flex: 1 1 0; min-width: 0; flex-direction: column; padding: 0 14px 0 0; }
.tl-item:not(:last-child)::before {
  left: 24px; right: -2px; top: 11px; bottom: auto; width: auto; height: 2px;
}
.tl-item--done:not(:last-child)::before {
  background: linear-gradient(90deg, var(--red-deep), var(--line));
}
.tl-dot { margin-bottom: 12px; }
.tl-body { flex: none; }
.tl-name { font-size: 0.9rem; }
.tl-actions { margin-top: 8px; }

/* Timeline — mobile volta ao vertical */
@media (max-width: 640px) {
  .timeline { display: block; overflow: visible; }
  .tl-item { flex-direction: row; padding: 0 0 22px 0; }
  .tl-item:not(:last-child)::before {
    left: 10px; right: auto; top: 24px; bottom: 0; width: 2px; height: auto;
  }
  .tl-item--done:not(:last-child)::before {
    background: linear-gradient(180deg, var(--red-deep), var(--line));
  }
  .tl-dot { margin-bottom: 0; }
  .tl-body { flex: 1; }
}

/* Modal "Novidades" */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4, 4, 6, .7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn 180ms var(--ease-out);
}
.modal {
  width: min(480px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  animation: popIn 220ms var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.whatsnew-list {
  margin: 0 0 20px; padding-left: 18px;
  color: var(--muted); font-size: 0.92rem; line-height: 1.7;
}
.whatsnew-list li::marker { color: var(--red-bright); }

/* Rodapé com versão */
.appfoot {
  max-width: var(--maxw); margin: 28px auto 0; padding: 18px 16px 26px;
  border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: 0.78rem;
}

/* Botão WhatsApp (discreto, header) */
.btn-wa {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--muted);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out),
              transform 160ms var(--ease-out);
}
.btn-wa:hover { color: var(--success); border-color: rgba(61, 220, 151, .4); }
.btn-wa:active { transform: scale(.94); }

/* Banner de ambiente de testes (só renderizado quando APP_ENV != production) */
.devbanner {
  background: repeating-linear-gradient(-45deg, #2a1503, #2a1503 14px, #1c0e02 14px, #1c0e02 28px);
  border-bottom: 1px solid rgba(245, 183, 86, .5);
  color: #f5b756;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 12px;
}

/* Botão de ajuda ("?") — mesmo corpo do btn-wa, acento ember no hover */
.btn-help {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--muted);
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out),
              transform 160ms var(--ease-out);
}
.btn-help:hover { color: var(--red-bright); border-color: rgba(224, 30, 30, .4); }
.btn-help:active { transform: scale(.94); }

/* Central de ajuda — accordion nativo (<details>), sem JS */
.faq { display: grid; gap: 10px; }
.faq details {
  background: linear-gradient(180deg, #101015, #0c0c10);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 16px 20px;
  font-weight: 600; font-size: 0.98rem;
  display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-grid; place-items: center;
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--red-bright);
  font-weight: 700; transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::before { transform: rotate(45deg); }
.faq .faq__body {
  padding: 0 20px 18px 56px;
  color: var(--muted); font-size: 0.92rem; line-height: 1.65;
}
.faq .faq__body p { margin: 0 0 10px; }
.faq .faq__body p:last-child { margin-bottom: 0; }
.faq .faq__body strong { color: var(--text); }

/* Histórico de arquivos */
.filelog { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.filelog__item {
  display: flex; gap: 12px; padding: 7px 0;
  border-bottom: 1px solid var(--line); font-size: 0.88rem;
}
.filelog__item:last-child { border-bottom: none; }
.filelog__date { flex: 0 0 84px; font-size: 0.8rem; padding-top: 1px; }
.filelog__name { color: var(--muted); }

/* Textarea (form de changelog) — combina com inputs */
textarea {
  width: 100%; background: #0a0a0d; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); color: var(--text); padding: 10px 12px;
  font-family: var(--font-body); font-size: 0.95rem; resize: vertical;
}
textarea:focus-visible {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 30, 30, .22);
}


/* ═══ v1.1.1 — rodapé ancorado, dots da timeline, tooltip de fase ═══ */

/* Rodapé sempre no fim da viewport (conteúdo curto não deixa ele "flutuando") */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main.container { flex: 1 0 auto; width: 100%; }
.appfoot { margin: auto auto 0; width: 100%; }

/* Dots: largura explícita (flex-basis vira ALTURA no layout horizontal) */
.tl-dot { width: 26px; height: 26px; flex: 0 0 auto; font-size: 0.78rem; }
.tl-item:not(:last-child)::before { top: 13px; }  /* centro do dot 26px */

@media (max-width: 640px) {
  .tl-item:not(:last-child)::before { left: 13px; top: 28px; }
}

/* Tooltip da fase (hover no dot): início e fim/previsão */
.tl-tip {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 8px; z-index: 5;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 6px 10px;
  font-size: 0.75rem; color: var(--text); white-space: nowrap;
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
/* Hover em qualquer parte do item abre a tooltip (datas só existem aqui) */
.tl-item:hover .tl-tip { opacity: 1; transform: translateY(0); }
