:root {
  --bg: #e8f4f1;
  --bg-soft: #f4fbf8;
  --panel: #fbfefc;
  --text: #102126;
  --muted: #587078;
  --line: rgba(16, 33, 38, 0.13);
  --brand: #178279;
  --brand-strong: #0d6770;
  --brand-deep: #062f39;
  --brand-blue: #2b79a6;
  --brand-sage: #73956d;
  --accent: #d1a348;
  --accent-soft: #f6ecd2;
  --copper: #bd654f;
  --aqua-soft: #dff4ef;
  --sky-soft: #eaf5fb;
  --ok: #23704a;
  --warn: #a76517;
  --danger: #9a3737;
  --shadow: 0 16px 36px rgba(7, 53, 61, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(47, 121, 166, 0.09) 0%, transparent 32%),
    linear-gradient(180deg, #e0f1ee 0%, var(--bg) 42%, #fbf7eb 100%);
}

.auth-pending {
  visibility: hidden;
}

.auth-locked {
  overflow: hidden;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    linear-gradient(145deg, rgba(47, 121, 166, 0.1) 0%, transparent 34%),
    linear-gradient(180deg, #e0f1ee 0%, var(--bg) 46%, #fbf7eb 100%);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfefc 58%, #f8fbf3 100%);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 700;
}

.login-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.brand-block {
  display: grid;
  gap: 2px;
}

.product-name {
  margin: 0;
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 0.96;
  color: var(--brand-deep);
  letter-spacing: 0;
}

.product-name::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(47, 111, 149, 0));
}

.client-office {
  margin: 0;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.19em;
  line-height: 1.1;
  text-transform: uppercase;
}

.login-card .product-name {
  font-size: 2.75rem;
  font-weight: 600;
}

.login-card .client-office {
  margin-top: -4px;
}

.page-shell {
  width: min(1560px, calc(100% - 18px));
  margin: 10px auto 0;
}

.hero,
.panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfefc 68%, #f8fbf5 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 16px;
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
  border-top: 3px solid rgba(209, 163, 72, 0.74);
  box-shadow: 0 16px 36px rgba(7, 53, 61, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.topbar,
.hero-grid,
.section-heading,
.toolbar,
.content-grid {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand actions"
    "brand calc";
  align-items: center;
  row-gap: 8px;
}

.topbar > .brand-block {
  grid-area: brand;
}

.top-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-user {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.mini-calculator {
  grid-area: calc;
  justify-self: end;
  display: grid;
  grid-template-columns: 176px 86px 88px minmax(104px, auto);
  column-gap: 10px;
  row-gap: 4px;
  align-items: end;
  max-width: 500px;
}

.mini-calculator label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calculator-date-field {
  min-width: 176px;
}

.calculator-days-field {
  min-width: 86px;
}

.mini-calculator span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mini-calculator input {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(14, 88, 99, 0.18);
  background: #ffffff;
  padding: 8px 9px;
  font: inherit;
  color: var(--text);
}

.mini-calculator output {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(195, 151, 63, 0.36);
  border-radius: 9px;
  color: var(--brand-strong);
  background: linear-gradient(180deg, #fffaf0 0%, #f7efe0 100%);
  font-size: 0.86rem;
  font-weight: 800;
}

.hero-grid {
  display: contents;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 0.95;
}

.hero-copy h1 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  max-width: 18ch;
  letter-spacing: 0;
}

.section-heading h2 {
  font-size: 1.65rem;
}

.eyebrow {
  display: inline-grid;
  gap: 6px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: clamp(1.02rem, 1.35vw, 1.32rem);
  color: var(--brand-deep);
  font-weight: 900;
  line-height: 1;
}

.eyebrow::after {
  content: "";
  width: 86px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(47, 111, 149, 0));
}

.lead,
.helper-text,
.roadmap p,
.publication-summary,
.meta-line {
  color: var(--muted);
}

.publication-summary {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.meta-line {
  margin: 0;
  font-size: 0.8rem;
}

.publication-details {
  border: 1px solid rgba(18, 33, 38, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.publication-details summary {
  padding: 7px 9px;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
}

.publication-details p {
  margin: 0;
  padding: 0 9px 9px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.38;
}

.lead {
  max-width: 50ch;
  line-height: 1.35;
  font-size: 0.9rem;
  margin: 0;
}

.highlight-box,
.stat-card,
.result-card,
.publication-card,
.roadmap article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.hero-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 8px;
  align-content: start;
}

.stat-card {
  padding: 8px 10px;
  text-align: left;
  font: inherit;
  border-top: 3px solid rgba(24, 117, 111, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, var(--aqua-soft) 100%);
}

.stat-card:nth-child(2) {
  border-top-color: rgba(43, 121, 166, 0.52);
  background: linear-gradient(180deg, #ffffff 0%, var(--sky-soft) 100%);
}

.stat-card:nth-child(3) {
  border-top-color: rgba(209, 163, 72, 0.62);
  background: linear-gradient(180deg, #ffffff 0%, #fff3d8 100%);
}

.stat-action {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.stat-action:hover {
  border-color: rgba(24, 117, 111, 0.36);
  box-shadow: 0 10px 24px rgba(7, 53, 61, 0.14);
  transform: translateY(-1px);
}

.stat-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1.28rem;
  font-family: "Cormorant Garamond", serif;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.accent-stat {
  border-color: rgba(183, 146, 82, 0.36);
  background: #fbf7ee;
}

.nav-link,
.primary-button,
.secondary-button {
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nav-link,
.primary-button {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-strong) 62%, var(--brand));
  color: #fff7ec;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.primary-button,
.secondary-button {
  padding: 11px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-family: inherit;
}

.compact-button {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.board-send-button {
  min-width: 96px;
  padding: 8px 12px;
  border: none;
  border-radius: 9px;
  color: #fff7ec;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-strong) 62%, var(--brand));
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
}

.board-send-button.is-on-board {
  background: linear-gradient(135deg, var(--ok), #2d8a5e);
}

.secondary-button {
  background: #ffffff;
  border: 1px solid var(--brand);
  color: var(--brand-strong);
}

.danger-button {
  border-color: rgba(154, 55, 55, 0.45);
  color: var(--danger);
}

.nav-link:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.panel {
  border-radius: 16px;
  padding: 18px;
  border-top: 3px solid rgba(23, 130, 121, 0.38);
}

.wide-panel {
  grid-column: 1 / -1;
}

.section-anchor {
  display: block;
  position: relative;
  top: -12px;
}

.toolbar {
  grid-template-columns: repeat(2, minmax(0, 220px));
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

.featured-field span {
  color: var(--brand-strong);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(14, 88, 99, 0.18);
  background: #ffffff;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.mini-calculator input:focus {
  outline: 2px solid rgba(209, 163, 72, 0.26);
  border-color: rgba(13, 103, 112, 0.38);
}

.password-field {
  position: relative;
  display: block;
}

.field .password-field input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: rgba(23, 130, 121, 0.11);
  color: var(--brand-strong);
  padding: 6px 8px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.password-toggle:hover {
  background: rgba(14, 88, 99, 0.16);
}

.field textarea {
  resize: vertical;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.top-search-form {
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 1fr));
  align-items: end;
}

.unified-search-form {
  margin: 14px 0 8px;
  padding: 12px;
  border: 1px solid rgba(13, 103, 112, 0.15);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 247, 243, 0.7));
}

.search-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-form {
  gap: 9px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.publication-list {
  display: grid;
  gap: 10px;
}

.publication-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.publication-tabs button {
  border: 1px solid rgba(14, 88, 99, 0.18);
  border-radius: 9px;
  background: #ffffff;
  color: var(--brand-strong);
  padding: 9px 13px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.publication-tabs button.is-active {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-strong) 62%, var(--brand));
  color: #ffffff;
  border-color: transparent;
}

.publication-card {
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  border-left: 4px solid rgba(23, 130, 121, 0.5);
}

.publication-card.is-highlighted {
  outline: 3px solid rgba(195, 151, 63, 0.45);
  outline-offset: 2px;
}

.case-context {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(209, 163, 72, 0.16), rgba(23, 130, 121, 0.07), rgba(43, 121, 166, 0.05));
  border-radius: 0 8px 8px 0;
}

.case-context strong {
  font-size: 0.78rem;
}

.case-context span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.publication-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.duplicate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(195, 151, 63, 0.14);
  color: #825f18;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.deleted-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(154, 55, 55, 0.1);
  color: var(--danger);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.publication-top h3 {
  margin: 0 0 2px;
  font-size: 0.94rem;
}

.publication-sequence {
  display: inline-flex;
  margin-bottom: 4px;
  color: #b98220;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 7px;
}

.meta-item {
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(23, 130, 121, 0.08);
  border: none;
}

.meta-item:nth-child(even) {
  background: rgba(43, 121, 166, 0.08);
}

.meta-item:nth-child(3n) {
  background: rgba(209, 163, 72, 0.1);
}

.meta-item span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.meta-item strong {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  line-height: 1.25;
}

.meta-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.meta-control-item {
  display: grid;
  align-content: start;
}

.deadline-adjust-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.deadline-days-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.deadline-adjust-row small {
  margin: 0;
  white-space: nowrap;
}

.deadline-days-row small {
  margin: 0;
  white-space: nowrap;
}

.suggested-action-input,
.manual-deadline-input,
.deadline-days-input {
  width: 100%;
  margin-top: 3px;
  border: 1px solid rgba(14, 88, 99, 0.16);
  border-radius: 7px;
  background: #ffffff;
  color: var(--text);
  padding: 6px 7px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.deadline-days-input {
  width: 60px;
  min-height: 30px;
  margin-top: 0;
  padding: 4px 6px;
  font-size: 0.78rem;
}

.manual-deadline-input {
  width: 130px;
  min-height: 34px;
  margin-top: 0;
  padding: 5px 7px;
  font-size: 0.76rem;
}

.suggested-action-input:focus,
.manual-deadline-input:focus,
.deadline-days-input:focus {
  outline: 2px solid rgba(195, 151, 63, 0.34);
  border-color: rgba(14, 88, 99, 0.38);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.card-actions .compact-button {
  min-width: 150px;
}

.card-actions .board-send-button {
  min-width: 220px;
}

.mini-field {
  display: grid;
  gap: 6px;
}

.mini-field span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mini-field select,
.mini-field input {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(18, 33, 38, 0.14);
  background: #ffffff;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.84rem;
  color: var(--text);
}

.result-card {
  padding: 14px;
  line-height: 1.55;
}

.roadmap {
  display: grid;
  gap: 14px;
}

.roadmap article {
  padding: 12px;
}

.comunica-result {
  margin: 8px 0 12px;
}

.comunica-card {
  display: grid;
  gap: 14px;
}

.movement-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.movement-list li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(23, 130, 121, 0.08);
}

.movement-list span {
  color: var(--muted);
  font-size: 0.88rem;
}

.comunica-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.query-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.compact-query {
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(14, 88, 99, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f4fbf8);
  font-size: 0.86rem;
}

.query-summary strong {
  color: var(--text);
}

.inline-link {
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.icon-button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

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

.compact-empty {
  padding: 12px;
}

.workboard-panel {
  overflow: hidden;
}

.board-config-form {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.board-config-form input {
  width: min(260px, 100%);
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.82rem;
}

.workboard {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 10px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.work-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 460px;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 4px solid rgba(23, 130, 121, 0.7);
  border-radius: 12px;
  background: #ffffff;
}

.work-column:nth-child(2) {
  border-top-color: rgba(115, 149, 109, 0.74);
  background: #ffffff;
}

.work-column:nth-child(3) {
  border-top-color: rgba(43, 121, 166, 0.74);
  background: #ffffff;
}

.work-column:nth-child(4),
.work-column:nth-child(5) {
  border-top-color: rgba(209, 163, 72, 0.78);
  background: #ffffff;
}

.work-column:nth-child(6) {
  border-top-color: rgba(189, 101, 79, 0.72);
  background: #ffffff;
}

.work-column:nth-child(7) {
  border-top-color: rgba(13, 103, 112, 0.76);
  background: #ffffff;
}

.work-column:nth-child(8) {
  border-top-color: rgba(115, 149, 109, 0.76);
  background: #ffffff;
}

.work-column:nth-child(9) {
  border-top-color: rgba(35, 112, 74, 0.78);
  background: #ffffff;
}

.work-column header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.column-title-input {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 4px 5px;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.column-title-input:focus {
  outline: 2px solid rgba(195, 151, 63, 0.28);
  border-color: rgba(14, 88, 99, 0.18);
  background: #ffffff;
}

.column-tools {
  display: inline-flex;
  gap: 4px;
}

.work-column header span {
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
  color: var(--brand-strong);
  background: rgba(24, 117, 111, 0.12);
  font-weight: 800;
}

.task-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.task-card {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(18, 33, 38, 0.11);
  border-left: 4px solid rgba(18, 33, 38, 0.14);
  border-radius: 9px;
  background: #ffffff;
  cursor: grab;
  box-shadow: 0 5px 12px rgba(7, 53, 61, 0.05);
}

.task-card.task-status-a-fazer {
  border-left-color: #c53f3f;
}

.task-card.task-status-andamento {
  border-left-color: #d4841f;
}

.task-card.task-status-concluidos {
  border-left-color: #2f8f55;
}

.task-card.is-dragging {
  opacity: 0.58;
}

.task-card textarea {
  width: 100%;
  min-height: 34px;
  border: none;
  resize: vertical;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.25;
}

.task-publication-link {
  border: 0;
  border-radius: 7px;
  background: rgba(23, 130, 121, 0.08);
  color: var(--brand-strong);
  padding: 5px 6px;
  text-align: left;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.task-publication-link:hover,
.task-publication-link:focus {
  background: rgba(195, 151, 63, 0.16);
  outline: 2px solid rgba(195, 151, 63, 0.26);
}

.task-process {
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.task-party {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.2;
}

.task-case-type {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.18;
  text-transform: uppercase;
}

.task-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.task-meta input,
.task-meta select {
  min-width: 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 5px 6px;
  font: inherit;
  font-size: 0.72rem;
}

.task-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.task-actions select {
  min-width: 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 6px 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
}

.task-actions select.task-status-a-fazer {
  border-color: #c53f3f;
  color: #a12e2e;
  background: #fff4f3;
}

.task-actions select.task-status-andamento {
  border-color: #d4841f;
  color: #96580f;
  background: #fff7ea;
}

.task-actions select.task-status-concluidos {
  border-color: #2f8f55;
  color: #226f40;
  background: #effaf2;
}

.task-status-select option.task-status-a-fazer {
  color: #a12e2e;
  background: #fff4f3;
}

.task-status-select option.task-status-andamento {
  color: #96580f;
  background: #fff7ea;
}

.task-status-select option.task-status-concluidos {
  color: #226f40;
  background: #effaf2;
}

.task-list {
  flex: 1;
  min-height: 0;
}

.task-list.is-drop-target {
  outline: 2px dashed rgba(24, 117, 111, 0.48);
  outline-offset: 4px;
  border-radius: 10px;
}

.column-task-form {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
}

.column-task-form input {
  min-width: 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 9px 10px;
  font: inherit;
}

.column-task-form button {
  border: none;
  border-radius: 9px;
  color: #fff7ec;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-strong) 62%, var(--brand));
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 800;
}

.empty-column {
  padding: 12px;
  border: 1px dashed rgba(18, 33, 38, 0.18);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.app-footer {
  margin-top: 16px;
  border: 1px solid rgba(16, 33, 38, 0.12);
  border-radius: 16px 16px 0 0;
  background:
    linear-gradient(135deg, rgba(6, 47, 57, 0.96), rgba(13, 103, 112, 0.94) 58%, rgba(23, 130, 121, 0.9));
  color: #f8fbf5;
  overflow: hidden;
  box-shadow: 0 -8px 28px rgba(7, 53, 61, 0.12);
}

.footer-brand {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-product {
  margin: 0;
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: 1.75rem;
  line-height: 0.95;
  color: #fff7e7;
}

.footer-brand p:last-child {
  margin: 0;
  color: rgba(248, 251, 245, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px 20px;
  background:
    linear-gradient(90deg, rgba(209, 163, 72, 0.1), transparent 34%, rgba(43, 121, 166, 0.08));
}

.footer-columns h3 {
  margin: 0 0 6px;
  color: #fff7e7;
  font-size: 0.82rem;
}

.footer-columns p {
  margin: 0;
  color: rgba(248, 251, 245, 0.74);
  font-size: 0.78rem;
  line-height: 1.45;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(248, 251, 245, 0.7);
  font-size: 0.74rem;
}

.footer-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.footer-metrics button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 251, 245, 0.88);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1;
  cursor: pointer;
}

.footer-metrics button:hover,
.footer-metrics button:focus {
  background: rgba(255, 255, 255, 0.16);
  outline: 2px solid rgba(255, 247, 231, 0.24);
}

.footer-metrics strong {
  color: #fff7e7;
  font-size: 1rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .hero-grid,
  .content-grid,
  .toolbar,
  .meta-grid,
  .topbar,
  .hero-stats,
  .form-row,
  .top-search-form,
  .search-actions {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-areas:
      "brand"
      "actions"
      "calc";
  }

  .top-actions,
  .hero-stats,
  .mini-calculator {
    justify-self: stretch;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .mini-calculator {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) 90px;
  }

  .calculator-date-field,
  .calculator-days-field {
    min-width: 0;
  }

  .mini-calculator output,
  .mini-calculator button {
    grid-column: 1 / -1;
  }

  .page-shell {
    width: min(100% - 12px, 1200px);
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .product-name {
    font-size: 1.85rem;
  }

  .login-card .product-name {
    font-size: 2.25rem;
  }

  .publication-top {
    flex-direction: column;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .footer-brand,
  .footer-bottom {
    display: grid;
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }
}
