:root {
  --navy: #10294f;
  --navy-2: #173c72;
  --blue: #2563eb;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --line: #d9e1ec;
  --muted: #667085;
  --text: #172033;
  --green: #15803d;
  --green-bg: #dcfce7;
  --yellow: #a16207;
  --yellow-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --gray-bg: #eef2f7;
  --shadow: 0 10px 24px rgba(16, 41, 79, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand span {
  display: block;
  color: #cbd5e1;
  font-size: 0.78rem;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 4px;
  margin-top: 18px;
}

.nav button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: #e5edf8;
  border: 0;
  background: transparent;
  border-radius: 8px;
  text-align: left;
}

.nav button:hover,
.nav button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav .badge {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  text-align: center;
  font-size: 0.75rem;
}

.nav-caret {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
}

.nav-sub {
  display: grid;
  gap: 3px;
  margin: 0 0 7px 18px;
  padding: 4px 0 4px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.nav-sub button {
  min-height: 34px;
  grid-template-columns: 8px 1fr auto;
  padding: 7px 8px;
  font-size: 0.9rem;
  color: #d6e2f2;
}

.nav-sub button span:first-child {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.nav-sub button.active span:first-child,
.nav-sub button:hover span:first-child {
  background: #fff;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.22rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.content {
  padding: 24px 26px 42px;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: var(--navy-2);
  border-color: var(--navy-2);
  color: #fff;
}

.button.success {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

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

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.stat {
  min-height: 112px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.stat strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.stat small {
  color: var(--muted);
}

.band {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.band-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.band-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.band-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar input,
.toolbar select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.toolbar > input {
  flex: 1 1 260px;
  min-width: min(100%, 240px);
}

.toolbar > select {
  flex: 0 1 210px;
  min-width: 170px;
}

.toolbar > .button,
.toolbar > .action-menu {
  flex: 0 0 auto;
}

.toolbar > .action-menu {
  margin-left: auto;
}

.toolbar > .button.primary + .action-menu,
.toolbar > select + .action-menu {
  margin-left: 0;
}

.band-header .action-menu summary,
.toolbar .action-menu summary {
  min-height: 38px;
}

.toolbar .action-menu-panel {
  min-width: 190px;
}

.compact-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.compact-summary strong {
  overflow-wrap: anywhere;
}

.compact-summary small {
  color: var(--muted);
}

.admin-tree {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.admin-node {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-node.open {
  border-color: #b7c7dc;
}

.admin-node-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.admin-node-toggle {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 4px;
}

.admin-node-toggle span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy-2);
  background: #f8fafc;
}

.admin-node-toggle strong {
  overflow-wrap: anywhere;
}

.admin-node-toggle small {
  color: var(--muted);
  white-space: nowrap;
}

.admin-unit-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px 50px;
}

.admin-unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.admin-unit-row span {
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow: auto;
}

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

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

th {
  color: #344054;
  background: #f8fafc;
  font-size: 0.82rem;
  text-transform: uppercase;
}

tr:hover td {
  background: #fbfdff;
}

.contracts-compact-table {
  min-width: 760px;
}

.contracts-compact-table th,
.contracts-compact-table td {
  padding: 9px 12px;
  vertical-align: middle;
}

.contract-number-cell {
  width: 130px;
}

.contract-number-cell strong,
.contract-number-cell span,
.contract-money-cell strong,
.contract-money-cell span {
  display: block;
}

.contract-number-cell span,
.contract-money-cell span {
  color: var(--muted);
  font-size: 0.82rem;
}

.contract-summary-cell {
  min-width: 360px;
}

.contract-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.contract-line.primary strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.contract-line.primary span,
.contract-line.secondary span {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.contract-line.secondary {
  margin-top: 3px;
}

.contract-line.secondary span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contract-money-cell {
  width: 130px;
}

.contract-money-cell .pill {
  display: inline-block;
  margin-top: 4px;
}

.action-menu {
  position: relative;
  display: inline-block;
}

.action-menu summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.action-menu summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.78rem;
}

.action-menu[open] summary {
  border-color: var(--navy-2);
  color: var(--navy-2);
}

.action-menu-panel {
  min-width: 190px;
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.action-menu-panel .button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  padding: 7px 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  background: var(--green-bg);
}

.pill.yellow {
  color: var(--yellow);
  background: var(--yellow-bg);
}

.pill.red {
  color: var(--red);
  background: var(--red-bg);
}

.pill.gray {
  color: #475467;
  background: var(--gray-bg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px;
}

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

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

.form-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.form-section h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.95rem;
  color: var(--navy);
}

.form-section p {
  grid-column: 1 / -1;
  margin: -6px 0 2px;
  color: var(--muted);
  font-size: 0.84rem;
}


.document-conference-section {
  grid-template-columns: 1fr;
}

.document-conference-list {
  display: grid;
  gap: 8px;
}

.document-conference-item {
  display: grid;
  grid-template-columns: minmax(82px, 0.55fr) minmax(220px, 1.7fr) minmax(150px, 1fr) minmax(76px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.document-conference-kind {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.document-conference-main,
.document-conference-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.document-conference-main strong,
.document-conference-main span,
.document-conference-main small,
.document-conference-meta span {
  overflow-wrap: anywhere;
}

.document-conference-main span,
.document-conference-main small,
.document-conference-meta span {
  color: var(--muted);
  font-size: 0.82rem;
}

.document-conference-action {
  justify-self: end;
}

.document-conference-action .button {
  min-height: 32px;
  padding: 7px 10px;
}

.form-section .checklist {
  padding: 0;
}

.field label {
  color: #344054;
  font-size: 0.84rem;
  font-weight: 700;
}

.form-note {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  vertical-align: middle;
}

.import-warning {
  border: 1px solid #f6c453;
  border-radius: 8px;
  background: #fff8e6;
  color: #704b00;
  padding: 12px;
}

.import-warning strong,
.import-warning span {
  display: block;
}

.contract-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 16px;
}


.pending-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.pending-card {
  display: grid;
  grid-template-columns: 118px minmax(220px, 1.4fr) minmax(220px, 1fr) minmax(190px, 0.8fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.pending-card.red {
  border-color: #fecaca;
  background: #fffafa;
}

.pending-card.yellow {
  border-color: #fde68a;
  background: #fffdf5;
}

.pending-status,
.pending-main,
.pending-context,
.pending-next {
  display: grid;
  gap: 5px;
}

.pending-status strong,
.pending-main strong {
  color: var(--navy);
}

.pending-main span,
.pending-context span,
.pending-next span,
.pending-main small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.pending-main small b,
.pending-context b {
  color: var(--ink);
}

.pending-next {
  justify-items: start;
}

.pending-next .button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 980px) {
  .pending-card {
    grid-template-columns: 1fr;
  }

  .pending-next .button {
    width: auto;
  }
}


.monthly-assistant {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.monthly-assistant.full {
  grid-column: 1 / -1;
}

.monthly-assistant-modal {
  margin-top: 12px;
}

.monthly-assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.monthly-assistant-head > div {
  display: grid;
  gap: 3px;
}

.monthly-assistant-head strong {
  color: var(--navy);
  font-size: 0.98rem;
}

.monthly-assistant-head span:not(.pill) {
  color: var(--muted);
  font-size: 0.86rem;
}

.monthly-assistant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.monthly-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.monthly-step.ok {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #ffffff, var(--green-bg));
}

.monthly-step.pending {
  border-color: #fde68a;
  background: linear-gradient(180deg, #ffffff, var(--yellow-bg));
}

.monthly-step.blocked {
  border-color: #fecaca;
  background: linear-gradient(180deg, #ffffff, var(--red-bg));
}

.monthly-step.warn {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.monthly-step-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}

.monthly-step-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.monthly-step-main strong {
  color: var(--navy);
  font-size: 0.84rem;
}

.monthly-step-main span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.monthly-step-action {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.monthly-step-action .button {
  min-height: 32px;
  padding: 7px 9px;
}

.monthly-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .monthly-assistant-head,
  .monthly-step-action,
  .monthly-assistant-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-step-action .button,
  .monthly-assistant-actions .button {
    width: 100%;
    justify-content: center;
  }
}

.validation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.validation-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 0;
}

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

.validation-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.validation-item.ok {
  border-color: #98d8b5;
  background: #f0fdf4;
}

.validation-item.ok strong {
  color: #166534;
}

.validation-item.pending {
  border-color: #f6c453;
  background: #fff8e6;
}

.validation-item.pending strong {
  color: #92400e;
}

.validation-item.warn {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.validation-item.warn strong {
  color: #1d4ed8;
}

.prevalidation-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.prevalidation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.prevalidation-head span {
  color: var(--muted);
  font-size: 0.86rem;
}

.import-url-row > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.import-url-row small {
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.detail {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.checklist {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.checkbox-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 6px;
  border-radius: 8px;
}

.check-row:hover {
  background: #f8fafc;
}

.check-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.check-row span {
  overflow-wrap: anywhere;
}

.check-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 160px minmax(200px, 0.8fr);
  gap: 10px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}



.dashboard-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #eef7f1 100%);
  box-shadow: var(--shadow);
}

.dashboard-eyebrow {
  display: inline-block;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
  margin-bottom: 6px;
}

.dashboard-hero-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.7rem;
}

.dashboard-hero-panel p {
  margin: 5px 0 0;
  color: var(--muted);
}

.dashboard-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.view-summary-card {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow);
}

.view-summary-card span,
.view-summary-card small {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.view-summary-card strong {
  color: inherit;
  font-size: 1.65rem;
  line-height: 1;
}

.view-summary-card.blue { color: var(--blue); border-color: #bfdbfe; background: linear-gradient(180deg, #ffffff, #eff6ff); }
.view-summary-card.navy { color: var(--navy); border-color: #bfd2ee; background: linear-gradient(180deg, #ffffff, #eef4ff); }
.view-summary-card.green { color: var(--green); border-color: #bbf7d0; background: linear-gradient(180deg, #ffffff, var(--green-bg)); }
.view-summary-card.yellow { color: #d97706; border-color: #fde68a; background: linear-gradient(180deg, #ffffff, var(--yellow-bg)); }
.view-summary-card.red { color: var(--red); border-color: #fecaca; background: linear-gradient(180deg, #ffffff, var(--red-bg)); }
.view-summary-card.gray { color: #64748b; border-color: #cbd5e1; background: linear-gradient(180deg, #ffffff, #f8fafc); }

.financial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(166px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.financial-card {
  min-height: 102px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.financial-card span,
.financial-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.financial-card strong {
  color: var(--navy);
  font-size: 1.28rem;
  line-height: 1.15;
}

.financial-card.blue { border-color: #bfdbfe; background: linear-gradient(180deg, #ffffff, #eff6ff); }
.financial-card.navy { border-color: #bfd2ee; background: linear-gradient(180deg, #ffffff, #eef4ff); }
.financial-card.green { border-color: #bbf7d0; background: linear-gradient(180deg, #ffffff, var(--green-bg)); }
.financial-card.purple { border-color: #ddd6fe; background: linear-gradient(180deg, #ffffff, #f5f3ff); }
.financial-card.yellow { border-color: #fde68a; background: linear-gradient(180deg, #ffffff, var(--yellow-bg)); }
.financial-card.red { border-color: #fecaca; background: linear-gradient(180deg, #ffffff, var(--red-bg)); }
.financial-card.green strong,
.financial-money.green { color: var(--green); }
.financial-card.purple strong,
.financial-money.purple { color: #7c3aed; }
.financial-card.yellow strong { color: #d97706; }
.financial-card.red strong { color: var(--red); }
.financial-money.blue { color: var(--blue); }
.financial-money.navy { color: var(--navy); }

.financial-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 2px 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid currentColor;
}

.financial-chip.green { color: var(--green); background: var(--green-bg); }
.financial-chip.yellow { color: #d97706; background: var(--yellow-bg); }
.financial-chip.red { color: var(--red); background: var(--red-bg); }

.contract-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.contract-summary-card {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.contract-summary-card span,
.contract-summary-card small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.contract-summary-card:not(.total) span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: currentColor;
}

.contract-summary-card strong {
  color: inherit;
  font-size: 1.85rem;
  line-height: 1;
}

.contract-summary-card small {
  font-weight: 800;
}

.contract-summary-card.total {
  color: #fff;
  border-color: var(--navy);
  background: linear-gradient(145deg, #09224a, #123d73);
}

.contract-summary-card.green { color: var(--green); border-color: #bbf7d0; }
.contract-summary-card.yellow { color: #d97706; border-color: #fde68a; }
.contract-summary-card.red { color: var(--red); border-color: #fecaca; }
.contract-summary-card.gray { color: #64748b; border-color: #cbd5e1; }
.contract-summary-card.blue { color: #1d4ed8; border-color: #bfdbfe; }
.contract-summary-card.active { box-shadow: 0 0 0 2px currentColor inset, var(--shadow); }

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-kpi {
  min-height: 116px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-kpi span,
.dashboard-kpi small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.dashboard-kpi strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--navy);
  font-size: 1.28rem;
}

.dashboard-kpi-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.dashboard-kpi-icon.green { color: var(--green); background: var(--green-bg); border-color: #bbf7d0; }
.dashboard-kpi-icon.yellow { color: var(--yellow); background: var(--yellow-bg); border-color: #fde68a; }
.dashboard-kpi-icon.red { color: var(--red); background: var(--red-bg); border-color: #fecaca; }

.dashboard-visual-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.05fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.dashboard-visual-grid .chart-card,
.dashboard-donut-card,
.dashboard-column-card {
  min-height: 238px;
  border-radius: 8px;
  background: #fff;
}

.dashboard-visual-grid .band-header h2,
.dashboard-donut-card h2,
.dashboard-column-card h2 {
  color: var(--navy);
  font-size: 1rem;
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 4px 0 8px;
}

.dashboard-donut {
  width: 154px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(16, 41, 79, 0.08);
}

.dashboard-donut::after {
  content: "";
  width: 86px;
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 41, 79, 0.06);
}

.dashboard-donut span {
  position: relative;
  z-index: 1;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.6rem;
}

.dashboard-legend {
  display: grid;
  gap: 10px;
}

.dashboard-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.dashboard-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--blue);
}

.dashboard-legend i.green { background: var(--green); }
.dashboard-legend i.yellow { background: #f2b705; }
.dashboard-legend i.red { background: var(--red); }
.dashboard-legend i.gray { background: #94a3b8; }

.dashboard-legend strong {
  color: var(--navy);
  white-space: nowrap;
}

.dashboard-columns {
  height: 174px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
  padding: 10px 6px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-column {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
}

.dashboard-column-bar {
  width: 46px;
  height: 112px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #eef2f7;
}

.dashboard-column-bar span {
  width: 100%;
  min-height: 4px;
  display: block;
  background: var(--blue);
}

.dashboard-column-bar span.green { background: var(--green); }
.dashboard-column-bar span.yellow { background: #f2b705; }
.dashboard-column-bar span.red { background: var(--red); }

.dashboard-column strong {
  color: var(--navy);
  font-size: 0.78rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.dashboard-column small {
  color: var(--muted);
}

.chart-bars {
  display: grid;
  gap: 11px;
  padding: 2px 0 4px;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(116px, 0.9fr) minmax(96px, 1.2fr) 46px;
  gap: 10px;
  align-items: center;
}

.chart-label strong,
.chart-label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-label strong {
  color: var(--navy);
  font-size: 0.86rem;
}

.chart-label span {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 2px;
}

.chart-track {
  height: 8px;
  background: #edf2f7;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  overflow: hidden;
}

.chart-fill {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.chart-fill.green { background: var(--green); }
.chart-fill.yellow { background: #f2b705; }
.chart-fill.red { background: var(--red); }
.chart-fill.gray { background: #94a3b8; }
.chart-fill.blue { background: var(--blue); }

.chart-value {
  color: var(--navy);
  text-align: right;
  font-size: 0.9rem;
}

.dashboard-lower-grid {
  margin-top: 16px;
}

.alert-list,
.timeline {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.alert {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}

.dot.red {
  background: var(--red);
}

.dot.green {
  background: var(--green);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 34px 18px;
  background: rgba(15, 23, 42, 0.48);
  overflow: auto;
}

.modal {
  width: min(1120px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.modal-head {
  position: sticky;
  top: -34px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-radius: 8px 8px 0 0;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

.report-paper {
  margin: 16px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: #101828;
  text-align: justify;
  max-width: 900px;
  min-height: 1120px;
  margin-left: auto;
  margin-right: auto;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
}


.contract-identification-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-family: Arial, sans-serif;
  font-size: 8.6pt;
  text-align: left;
}

.contract-identification-table th,
.contract-identification-table td {
  border: 1px solid #cbd5e1;
  padding: 6px 7px;
  vertical-align: top;
}

.contract-identification-table th {
  width: 18%;
  background: #f1f5f9;
  color: #10294f;
  font-size: 7.4pt;
  text-transform: uppercase;
  letter-spacing: 0;
}

.contract-identification-table td {
  width: 32%;
  color: #101828;
  overflow-wrap: anywhere;
}

.official-header {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 2px solid #10294f;
  text-align: center;
}

.official-seal {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 2px solid #10294f;
  border-radius: 50%;
  color: #10294f;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.official-seal.has-logo {
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.official-logo {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.institution-logo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.institution-logo-preview {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.official-heading {
  display: grid;
  gap: 3px;
  text-align: center;
}

.official-heading strong {
  font-size: 1.08rem;
  text-transform: uppercase;
}

.official-heading span {
  font-weight: 700;
}

.official-heading small {
  color: #475467;
  font-size: 0.8rem;
}

.document-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 20px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.78rem;
  text-align: left;
}

.document-meta div {
  min-width: 0;
}

.document-meta span {
  display: block;
  color: #667085;
  font-weight: 700;
  text-transform: uppercase;
}

.document-meta strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.official-body {
  text-align: justify;
}

.official-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 34px;
  padding-top: 10px;
  border-top: 1px solid #94a3b8;
  color: #475467;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 0.74rem;
  text-align: left;
}

.official-footer strong {
  white-space: nowrap;
}

.report-paper h1 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 1.18rem;
  text-transform: uppercase;
}

.report-paper h2 {
  margin: 18px 0 8px;
  font-size: 0.98rem;
  text-transform: uppercase;
}

.report-paper p,
.report-paper li {
  line-height: 1.55;
  text-align: justify;
}

.sign-boxes {
  display: grid;
  grid-template-columns: minmax(180px, 320px);
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.sign-box {
  min-height: 78px;
  border-top: 1px solid #334155;
  padding-top: 8px;
  text-align: center;
  justify-self: center;
  width: min(100%, max(220px, 22ch));
}

.empty {
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 44px;
  background: #ffffff;
  color: var(--navy);
  border-right: 1px solid var(--line);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 18px;
  align-content: start;
  width: 100%;
}

.login-logo {
  width: min(100%, 760px);
  max-height: 290px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.login-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 3.5rem);
  line-height: 1.05;
  margin: 6px 0;
}

.login-hero > p {
  color: var(--muted);
  max-width: 760px;
  margin: 28px auto 0;
  line-height: 1.55;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.login-form {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
}

.login-form h2 {
  margin: 0;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1080px) {
  .stats-grid,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .split,
  .dashboard-visual-grid,
  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .view-summary-cards,
  .financial-cards,
  .contract-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: block;
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
  }

  .topbar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .top-actions {
    justify-content: start;
  }

  .toolbar > input,
  .toolbar > select,
  .toolbar > .button,
  .toolbar > .action-menu {
    flex: 1 1 100%;
    width: 100%;
  }

  .toolbar > .action-menu {
    margin-left: 0;
  }

  .toolbar .action-menu summary,
  .toolbar .action-menu-panel .button {
    width: 100%;
  }

  .content {
    padding: 14px;
  }

  .stats-grid,
  .form-grid,
  .form-section,
  .detail-list,
  .sign-boxes,
  .document-meta,
  .login {
    grid-template-columns: 1fr;
  }

  .view-summary-cards,
  .financial-cards,
  .contract-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .view-summary-card,
  .financial-card,
  .contract-summary-card {
    min-height: 84px;
    padding: 12px 14px;
  }

  .view-summary-card strong,
  .contract-summary-card strong {
    font-size: 1.42rem;
  }

  .financial-card strong {
    font-size: 1.12rem;
  }

  .official-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .login-hero {
    min-height: 280px;
    padding: 28px;
  }

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

@media print {
  @page {
    size: A4;
    margin: 14mm 13mm 16mm;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .app-shell {
    display: none;
  }

  .modal-backdrop {
    position: static;
    display: block;
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  .modal {
    width: auto;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .modal-head {
    display: none;
  }

  .report-paper {
    position: static;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    max-width: none;
    min-height: auto;
    height: auto;
    width: auto;
    font-size: 11.5pt;
    line-height: 1.45;
    overflow: visible;
  }

  .report-paper h1,
  .report-paper h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .report-paper p,
  .report-paper li {
    orphans: 3;
    widows: 3;
  }

  .report-paper table,
  .report-paper tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .document-meta {
    break-inside: avoid;
    page-break-inside: avoid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .official-header,
  .official-footer,
  .sign-boxes {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .sign-boxes {
    break-before: avoid;
    page-break-before: avoid;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}


.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 0.9rem;
}

.report-table th,
.report-table td {
  border: 1px solid #d8dee8;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.report-table th {
  background: #eef2f7;
  color: var(--navy);
}

.financial-report-box {
  break-inside: auto;
}

.document-meta.compact {
  margin: 10px 0;
}

.print-preview-panel {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 8px;
}

.print-preview-sheet {
  max-height: 620px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d8dee8;
  padding: 18px;
}

.print-preview-sheet .report-paper {
  max-width: 980px;
  margin: 0 auto;
  color: #101828;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9rem;
}

.print-preview-sheet .official-header {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #10294f;
  padding-bottom: 10px;
  margin-bottom: 14px;
  text-align: center;
}

.print-preview-sheet .official-seal {
  min-height: 72px;
  border: 2px solid #10294f;
  color: #10294f;
  font-family: Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.print-preview-sheet .official-seal.has-logo {
  border: 0;
}

.print-preview-sheet .official-logo {
  max-width: 84px;
  max-height: 76px;
  object-fit: contain;
}

.print-preview-sheet .official-heading strong,
.print-preview-sheet .official-heading span,
.print-preview-sheet .official-heading small {
  display: block;
}

.print-preview-sheet .document-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 8px;
  margin: 12px 0 18px;
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
}

.print-preview-sheet .document-meta span {
  display: block;
  color: #667085;
  font-weight: 700;
  text-transform: uppercase;
}

.print-preview-sheet h1 {
  text-align: center;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.print-preview-sheet h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
}

.print-preview-sheet table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
}

.print-preview-sheet th,
.print-preview-sheet td {
  border: 1px solid #cbd5e1;
  padding: 6px;
  text-align: left;
  vertical-align: top;
}

.print-preview-sheet th {
  background: #f1f5f9;
  color: #10294f;
}

.invoice-attachment-list {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.invoice-attachment-list a,
.invoice-attachment-list span {
  display: block;
  font-size: 0.76rem;
  line-height: 1.25;
}

.invoice-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.button.tiny {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 0.72rem;
}

@media (max-width: 620px) {
  .dashboard-hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero-actions {
    justify-content: flex-start;
  }

  .dashboard-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .chart-row {
    grid-template-columns: 1fr 54px;
  }

  .chart-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .view-summary-cards,
  .financial-cards,
  .contract-summary-cards {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .view-summary-card,
  .financial-card,
  .contract-summary-card {
    min-height: 72px;
    gap: 6px;
    padding: 10px 12px;
  }

  .view-summary-card span,
  .view-summary-card small,
  .financial-card span,
  .financial-card small,
  .contract-summary-card span,
  .contract-summary-card small {
    font-size: 0.72rem;
  }

  .view-summary-card strong,
  .contract-summary-card strong {
    font-size: 1.22rem;
  }

  .financial-card strong {
    font-size: 1rem;
  }
}


/* Ajustes quando o Fiscal e exibido dentro do portal unificado. */
.embedded-mode body { min-width: 0; }
.embedded-mode .app-shell { min-height: 100vh; }
.embedded-mode .sidebar { top: 0; }
.embedded-mode [data-action="logout"] { display: none !important; }

/* Central de Trabalho do Fiscal */
.fiscal-work-center { display: grid; gap: 18px; margin-bottom: 22px; }
.fiscal-work-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 22px; align-items: center; padding: 26px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #0f2940 0%, #164866 58%, #166534 135%); box-shadow: 0 18px 44px rgba(15, 41, 64, .18); }
.fiscal-work-hero h2 { margin: 8px 0 6px; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.fiscal-work-hero p { margin: 0; color: #dbeafe; line-height: 1.55; }
.fiscal-next-action { display: grid; gap: 8px; justify-items: start; padding: 16px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.1); }
.fiscal-next-action strong { font-size: 1rem; }
.fiscal-next-action small { color: #e2e8f0; line-height: 1.4; }
.fiscal-next-action .button { background: #34d399; color: #052e2b; border: 0; }
.fiscal-next-action.regular { background: rgba(22,163,74,.18); }
.fiscal-work-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.fiscal-work-metric { display: grid; text-align: left; color: inherit; font: inherit; gap: 5px; min-height: 120px; padding: 17px; border: 1px solid #dbe3ec; border-top: 4px solid #2563eb; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.05); }
.fiscal-work-metric[data-action] { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.fiscal-work-metric[data-action]:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,.1); }
.fiscal-work-metric span { color: #64748b; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fiscal-work-metric strong { color: #0f172a; font-size: 1.7rem; }
.fiscal-work-metric small { color: #64748b; line-height: 1.35; }
.fiscal-work-metric.green { border-top-color: #16a34a; background: #f0fdf4; }
.fiscal-work-metric.yellow { border-top-color: #eab308; background: #fffbeb; }
.fiscal-work-metric.red { border-top-color: #dc2626; background: #fef2f2; }
.fiscal-work-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 16px; align-items: start; }
.fiscal-priority-list, .fiscal-document-list { display: grid; gap: 10px; }
.fiscal-priority-item { display: grid; gap: 9px; padding: 14px; border: 1px solid #e2e8f0; border-left: 4px solid #eab308; border-radius: 12px; background: #fff; }
.fiscal-priority-item.red { border-left-color: #dc2626; background: #fff7f7; }
.fiscal-priority-item > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fiscal-priority-item > div:first-child small { color: #64748b; font-weight: 700; }
.fiscal-priority-item > strong { color: #0f172a; }
.fiscal-priority-item p { margin: 0; color: #64748b; font-size: .86rem; line-height: 1.45; }
.fiscal-priority-item > div:last-child > span { max-width: 70%; color: #475569; font-size: .8rem; }
.fiscal-document-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid #e2e8f0; }
.fiscal-document-list article:last-child { border-bottom: 0; }
.fiscal-document-list article > div { display: grid; gap: 4px; }
.fiscal-document-list article span, .fiscal-document-list article small { color: #64748b; font-size: .78rem; }
.fiscal-document-list article b { color: #0f172a; text-align: right; }
@media (max-width: 1180px) { .fiscal-work-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fiscal-work-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .fiscal-work-hero { grid-template-columns: 1fr; padding: 20px; } .fiscal-work-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fiscal-document-list article { grid-template-columns: 1fr auto; } .fiscal-document-list article > div:nth-child(2) { grid-column: 1; } }
@media (max-width: 480px) { .fiscal-work-metrics { grid-template-columns: 1fr; } .fiscal-priority-item > div:last-child > span { max-width: none; width: 100%; } .fiscal-document-list article { grid-template-columns: 1fr; } .fiscal-document-list article b { text-align: left; } }