* {
  box-sizing: border-box;
}

:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --line: #d9dee5;
  --text: #1f2933;
  --muted: #657487;
  --sidebar: #151a21;
  --sidebar-soft: #202833;
  --accent: #2f6f73;
  --accent-strong: #24585b;
  --danger-bg: #fdecea;
  --success-bg: #e8f5e9;
  --info-bg: #eaf3ff;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 8px 18px;
}

.brand strong {
  display: block;
  font-size: 20px;
  margin-bottom: 6px;
}

.brand span,
.sidebar-note span {
  color: #aeb8c5;
  display: block;
  font-size: 13px;
}

.side-nav {
  display: grid;
  gap: 9px;
  align-content: start;
}

.nav-section {
  border-radius: 8px;
  overflow: hidden;
}

.nav-label {
  align-items: center;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.04em;
  margin: 0;
  padding: 9px 10px;
  text-transform: uppercase;
  user-select: none;
}

.nav-label::-webkit-details-marker {
  display: none;
}

.nav-label::after {
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  content: "";
  height: 6px;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  width: 6px;
}

.nav-section[open] .nav-label::after {
  transform: rotate(-135deg);
}

.nav-section-home .nav-label {
  background: #24415f;
}

.nav-section-tickets .nav-label {
  background: #2f6f73;
}

.nav-section-company .nav-label {
  background: #2f6f73;
}

.nav-section-personal .nav-label {
  background: #6d5a2f;
}

.nav-section-billing .nav-label {
  background: #5a4f8f;
}

.nav-section-tax .nav-label {
  background: #7a3f45;
}

.nav-section-maintenance .nav-label {
  background: #4b5663;
}

.nav-links {
  display: grid;
  gap: 4px;
  padding: 6px 0 2px;
}

.side-nav a {
  border-radius: 6px;
  color: #d8dee6;
  display: block;
  padding: 11px 12px;
}

.side-nav a:hover,
.side-nav a.active {
  background: var(--sidebar-soft);
  color: #ffffff;
}

.side-nav a.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-note {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px;
}

.sidebar-note strong {
  display: block;
  font-size: 13px;
  margin-top: 5px;
}

.main-area {
  min-width: 0;
  padding: 28px;
}

.page-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--accent-strong);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.04);
}

.stat {
  padding: 17px;
}

.stat span {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.stat strong {
  display: block;
  font-size: 23px;
  overflow-wrap: anywhere;
}

.stat.wide {
  grid-column: span 3;
}

.panel {
  margin-bottom: 16px;
  min-width: 0;
  padding: 18px;
}

.panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.collapsible-panel {
  padding: 0;
}

.collapsible-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  list-style: none;
  padding: 18px;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary .toggle-label {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.collapsible-summary .toggle-label::after {
  content: "Mostrar";
}

.collapsible-panel[open] .collapsible-summary {
  border-bottom: 1px solid var(--line);
}

.collapsible-panel[open] .collapsible-summary .toggle-label::after {
  content: "Ocultar";
}

.collapsible-body {
  padding: 18px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.messages {
  margin-bottom: 16px;
}

.message {
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 10px 12px;
}

.message.success {
  background: var(--success-bg);
  border: 1px solid #b9dfbd;
}

.message.error {
  background: var(--danger-bg);
  border: 1px solid #f3b8b0;
}

.message.info {
  background: var(--info-bg);
  border: 1px solid #bed5f4;
}

.button,
button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 10px 13px;
}

.button:hover,
button:hover {
  background: var(--accent-strong);
}

.button.secondary {
  background: var(--muted);
}

.button.disabled,
.button.disabled:hover {
  background: #c7d0da;
  color: #ffffff;
  cursor: default;
}

button.danger,
.button.danger {
  background: #a33b3b;
}

button.danger:hover,
.button.danger:hover {
  background: #842f2f;
}

.button.small {
  padding: 6px 9px;
}

.button.icon-button,
button.icon-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 30px;
}

.button.icon-button svg,
button.icon-button svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 15px;
}

.button.big,
button.big {
  font-size: 17px;
  padding: 14px 18px;
}

.file-button {
  margin-bottom: 12px;
}

.actions,
.inline-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rent-history-upload-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.rent-history-upload-form input[type="number"] {
  width: 88px;
}

.hidden-file-input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.upload-summary {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.actions .button {
  font-size: 16px;
  padding: 14px 18px;
}

.module-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.module-card {
  background: var(--surface-soft);
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  padding: 16px;
}

.module-card:hover {
  border-color: var(--accent);
}

.module-card span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.module-card strong {
  font-size: 18px;
}

.module-card small {
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.two-columns {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-columns {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.one-column {
  grid-template-columns: 1fr;
}

.success-panel {
  border-color: #9ed3a5;
}

.export-form {
  margin-top: 12px;
}

.detected-grid,
.mobile-access dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0 0;
}

.detected-grid div,
.mobile-access div {
  background: var(--surface-soft);
  border: 1px solid #e2e6eb;
  border-radius: 6px;
  padding: 10px;
}

.detected-grid dt,
.mobile-access dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.detected-grid dd,
.mobile-access dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.mobile-access p {
  color: var(--muted);
  margin: 8px 0 12px;
}

.mobile-access dd {
  font-weight: 700;
}

.notice {
  background: #fff8e5;
  border: 1px solid #ead38a;
  border-radius: 6px;
  padding: 10px;
}

.notice.success {
  align-items: center;
  background: #eef8f3;
  border-color: #b7ddc8;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f5f7f9;
}

.comparison-chart {
  display: grid;
  gap: 12px;
}

.chart-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 70px 1fr 120px;
}

.chart-row > div {
  background: #e7edf2;
  border-radius: 5px;
  height: 18px;
  overflow: hidden;
}

.chart-row b {
  background: #8aa1b4;
  display: block;
  height: 100%;
  min-width: 3px;
}

.chart-row.current b {
  background: #34495e;
}

.chart-row strong {
  text-align: right;
}

.dashboard-pair {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 16px;
}

.dashboard-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.dashboard-pair .panel {
  margin-bottom: 0;
}

.income-overview {
  overflow: hidden;
}

.tax-simulation {
  border-color: #c9d5df;
}

.tax-badge {
  background: #24313d;
  border-radius: 999px;
  color: #f0c36a;
  display: inline-block;
  padding: 8px 12px;
  white-space: nowrap;
}

.tax-simulation-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tax-simulation-grid article {
  background: #f7f8fa;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 14px;
}

.tax-simulation-grid article.pending {
  background: #fff7e6;
  border-color: #efd189;
}

.tax-simulation-grid article.refund {
  background: #eef8f3;
  border-color: #b7ddc8;
}

.tax-simulation-grid span,
.tax-simulation-grid small {
  color: var(--muted);
  display: block;
}

.tax-simulation-grid strong {
  display: block;
  font-size: 22px;
  margin: 7px 0;
}

.income-hero {
  align-items: start;
  background: #24313d;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 22px;
}

.dashboard-pair .income-hero {
  padding: 18px;
}

.income-hero h2 {
  color: #ffffff;
  font-size: 24px;
  margin: 4px 0 8px;
}

.income-hero p {
  color: #d8e0e7;
  margin: 0;
  max-width: 760px;
}

.income-hero strong {
  color: #f0c36a;
  font-size: 42px;
  line-height: 1;
  white-space: nowrap;
}

.income-compare-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-pair .income-compare-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-pair .income-compare-grid article,
.dashboard-pair .tax-simulation-grid article {
  padding: 12px;
}

.dashboard-pair .income-compare-grid strong,
.dashboard-pair .tax-simulation-grid strong {
  font-size: 20px;
}

.income-compare-grid article {
  background: #f5f7f9;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 14px;
}

.income-compare-grid article.current {
  background: #eef8f3;
  border-color: #b7ddc8;
}

.income-compare-grid span,
.income-compare-grid small {
  color: #657487;
  display: block;
}

.income-compare-grid strong {
  color: #1f2933;
  display: block;
  font-size: 22px;
  margin: 7px 0;
}

.income-bars {
  display: grid;
  gap: 14px;
}

.income-bar {
  display: grid;
  gap: 8px;
}

.bar-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.bar-label span {
  color: #52616f;
  font-weight: 700;
}

.bar-track {
  background: #e7edf2;
  border-radius: 999px;
  height: 26px;
  overflow: hidden;
}

.bar-track b {
  background: #8aa1b4;
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 5px;
}

.income-bar.current .bar-track b {
  background: #2f6f73;
}

.evolution-controls {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(320px, 1fr) auto;
}

.evolution-years {
  align-items: center;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: auto 96px auto 96px;
}

.evolution-years input {
  width: 96px;
}

.metric-picker {
  align-items: center;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  min-height: 52px;
  padding: 7px 10px 9px;
}

.metric-picker legend {
  color: #52616f;
  font-size: 12px;
  font-weight: 800;
  padding: 0 5px;
  text-transform: uppercase;
}

.metric-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 999px;
  color: #33475b;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  line-height: 1;
  padding: 6px 9px;
}

.metric-toggle input {
  accent-color: var(--accent);
  height: 14px;
  margin: 0;
  width: 14px;
}

.evolution-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evolution-hero-panel {
  padding-bottom: 12px;
}

.evolution-line-chart {
  background: #ffffff;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  overflow: hidden;
}

.evolution-line-chart svg {
  display: block;
  height: 300px;
  width: 100%;
}

.chart-axis {
  stroke: #d5dde6;
  stroke-width: 1.5;
}

.line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.line.invoice {
  stroke: #2f6f73;
}

.line.expenses {
  stroke: #8a4b55;
}

.line.tax {
  stroke: #6d5a2f;
}

.line.margin {
  stroke: #4f6597;
}

.line.iva {
  stroke: #5d7f45;
}

.line.irpf {
  stroke: #9a6636;
}

.line.rent {
  stroke: #536b7d;
}

.chart-year {
  fill: #52616f;
  font-size: 18px;
  font-weight: 700;
}

.chart-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.chart-legend span {
  align-items: center;
  color: #52616f;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.legend-dot {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.legend-dot.invoice {
  background: #2f6f73;
}

.legend-dot.expenses {
  background: #8a4b55;
}

.legend-dot.tax {
  background: #6d5a2f;
}

.legend-dot.margin {
  background: #4f6597;
}

.legend-dot.iva {
  background: #5d7f45;
}

.legend-dot.irpf {
  background: #9a6636;
}

.legend-dot.rent {
  background: #536b7d;
}

.evolution-matrix-wrap {
  border: 1px solid #dce3ea;
  border-radius: 8px;
  overflow: auto;
}

.evolution-matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
}

.evolution-matrix-table th,
.evolution-matrix-table td {
  border-bottom: 1px solid #e6ecf2;
  padding: 11px 8px;
  white-space: nowrap;
}

.evolution-matrix-table thead th {
  background: #f3f6f9;
  color: #33475b;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.evolution-matrix-table thead .metric-heading {
  text-align: left;
}

.evolution-matrix-table tbody th {
  color: var(--text);
  font-weight: 800;
  text-align: left;
}

.evolution-matrix-table tbody td {
  color: #1f2933;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.evolution-matrix-table tbody tr:nth-child(even) th,
.evolution-matrix-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.evolution-matrix-table tbody tr:hover th,
.evolution-matrix-table tbody tr:hover td {
  background: #eef5f5;
}

.evolution-matrix-table th:first-child {
  left: 0;
  min-width: 150px;
  position: sticky;
  width: 150px;
  z-index: 2;
}

.evolution-matrix-table thead th:first-child {
  z-index: 3;
}

.matrix-row-label {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.evolution-table {
  min-width: 1260px;
}

.evolution-detail-wrap {
  border: 1px solid #dce3ea;
  border-radius: 8px;
}

.evolution-detail-table {
  table-layout: fixed;
}

.evolution-detail-table th,
.evolution-detail-table td {
  border-bottom: 1px solid #e2e6eb;
  max-width: none;
  overflow: visible;
  padding: 11px 10px;
  text-overflow: clip;
  vertical-align: middle;
  white-space: nowrap;
}

.evolution-detail-table th {
  background: #f4f6f8;
  color: #415162;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.evolution-detail-table td {
  font-size: 14px;
  height: 48px;
}

.evolution-detail-table tbody tr:hover {
  background: #f7f9fb;
}

.evolution-detail-table .amount-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.evolution-detail-table .record-id {
  color: #667789;
  font-weight: 700;
}

.evolution-col-year {
  width: 74px;
}

.evolution-col-primary-amount {
  width: 158px;
}

.evolution-col-count {
  width: 92px;
}

.evolution-col-amount {
  width: 142px;
}

.evolution-col-tax {
  width: 154px;
}

.evolution-detail-table th:nth-child(3),
.evolution-detail-table td:nth-child(3) {
  text-align: center;
}

.checklist-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.checklist-grid.compact {
  grid-template-columns: 1fr;
}

.checklist-item {
  background: #f7f8fa;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 15px;
}

.checklist-grid.compact .checklist-item {
  padding: 12px;
}

.checklist-item span {
  background: #24313d;
  border-radius: 999px;
  color: #ffffff;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 4px 9px;
}

.checklist-item strong {
  display: block;
  font-size: 16px;
  margin-bottom: 7px;
}

.checklist-item p {
  color: var(--muted);
  margin: 0;
}

.preparation-panel h3 {
  border-top: 1px solid var(--line);
  font-size: 16px;
  margin: 18px 0 12px;
  padding-top: 16px;
}

.preparation-panel .checklist-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preparation-panel .checklist-item p {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.prep-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prep-metrics article {
  background: #f7f8fa;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 11px;
}

.prep-metrics span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.prep-metrics strong {
  display: block;
  font-size: 18px;
}

.iva-hero strong {
  font-size: 38px;
}

.iva-quarter-table {
  min-width: 900px;
}

.iva-docs-table {
  min-width: 1120px;
}

.tax-history-filters label {
  color: #52616f;
  display: grid;
  font-weight: 700;
  gap: 6px;
}

.tax-history-filters input,
.tax-history-filters select {
  min-width: 130px;
}

.tax-year-table {
  min-width: 1180px;
}

.tax-history-table {
  min-width: 1460px;
}

.tax-support-table {
  min-width: 880px;
}

.tax-source-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}

.tax-source-pill.irpf {
  background: #eef3f7;
  color: #3f5062;
}

.tax-source-pill.iva {
  background: #eaf4ee;
  color: #2f6041;
}

.iva-checklist .checklist-item p {
  -webkit-line-clamp: initial;
}

.tax-annual-panel .evolution-matrix-table th:first-child {
  min-width: 220px;
  width: 220px;
}

.tax-annual-panel .irpf-comparison-table th,
.tax-annual-panel .irpf-comparison-table td,
.tax-annual-panel .iva-comparison-table th,
.tax-annual-panel .iva-comparison-table td {
  padding-left: 6px;
  padding-right: 6px;
}

.tax-annual-panel .irpf-comparison-table thead th,
.tax-annual-panel .iva-comparison-table thead th {
  font-size: 15px;
}

.tax-annual-panel .irpf-comparison-table thead th:not(:first-child),
.tax-annual-panel .irpf-comparison-table tbody td,
.tax-annual-panel .iva-comparison-table thead th:not(:first-child),
.tax-annual-panel .iva-comparison-table tbody td {
  width: 94px;
}

.tax-annual-panel .irpf-comparison-table tbody th,
.tax-annual-panel .iva-comparison-table tbody th {
  font-size: 18px;
  line-height: 1.25;
}

.tax-annual-panel .irpf-comparison-table tbody td,
.tax-annual-panel .iva-comparison-table tbody td {
  font-size: 15px;
  letter-spacing: 0;
}

.tax-annual-panel .irpf-comparison-table .matrix-row-label,
.tax-annual-panel .iva-comparison-table .matrix-row-label {
  gap: 6px;
}

.compact-form {
  gap: 10px;
}

.compact-form input,
.compact-form select,
.compact-form textarea {
  min-width: 0;
}

.simulator-input-panel {
  background: #f7f2ff;
  border-color: #c9b6eb;
  box-shadow: 0 10px 28px rgba(86, 67, 142, 0.12);
  margin-bottom: 12px;
}

.simulator-input-panel .simulator-subpanel {
  background: #fbf8ff;
  border-color: #d9ccef;
}

.simulator-form-shell {
  display: grid;
  gap: 10px;
}

.simulator-two-columns,
.simulator-result-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simulator-result-layout {
  align-items: stretch;
  margin-top: 12px;
}

.simulator-result-layout > .panel {
  margin-bottom: 0;
}

.simulator-overview-panel,
.simulator-breakdown-panel {
  display: flex;
  flex-direction: column;
}

.simulator-overview-panel .simulator-result-data-grid {
  flex: 1 1 0;
  grid-auto-rows: minmax(96px, 1fr);
}

.simulator-overview-panel .simulator-result-section-label.reference {
  margin-top: 16px;
}

.simulator-subpanel {
  align-content: start;
  background: #fbfcfd;
  border: 1px solid #dde5ec;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
}

.simulator-column-stack {
  align-content: start;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.simulator-subheading {
  display: grid;
  gap: 2px;
  margin-bottom: 2px;
}

.simulator-subheading h3 {
  font-size: 16px;
  line-height: 1.25;
  margin: 0;
}

.simulator-source-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}

.simulator-source-strip article {
  background: #f7f8fa;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 12px;
}

.simulator-source-strip span,
.simulator-source-strip small {
  color: var(--muted);
  display: block;
}

.simulator-source-strip strong {
  display: block;
  font-size: 18px;
  margin: 5px 0;
}

.simulator-result-section-label {
  border-left: 4px solid;
  color: #52616f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0 0 8px;
  padding-left: 8px;
  text-transform: uppercase;
}

.simulator-result-section-label.current {
  border-color: #2f6f73;
  color: #2f6f73;
}

.simulator-result-section-label.reference {
  border-color: #9a6636;
  color: #9a6636;
  margin-top: 14px;
}

.simulator-current-grid article {
  border-color: #c9d8d5;
}

.tax-brackets-panel .simulator-current-grid article {
  background: #edf6ff;
  border-color: #9fc6e8;
}

.simulator-result-subheading {
  color: #52616f;
  font-size: 12px;
  font-weight: 800;
  margin: 12px 0 8px;
}

.simulator-result-data-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simulator-result-data-grid article {
  border: 1px solid;
  border-radius: 8px;
  min-height: 84px;
  min-width: 0;
  padding: 10px;
}

.simulator-data-current article {
  background: #f3fbfa;
  border-color: #b8d8d5;
}

.simulator-data-reference article {
  background: #fff8e8;
  border-color: #efd189;
}

.simulator-result-data-grid span,
.simulator-result-data-grid small {
  display: block;
  font-size: 12px;
}

.simulator-data-current span,
.simulator-data-current small {
  color: #496b6b;
}

.simulator-data-reference span,
.simulator-data-reference small {
  color: #7a6845;
}

.simulator-result-data-grid strong {
  color: #1f2933;
  display: block;
  font-size: 17px;
  margin-top: 5px;
}

.simulator-history-panel {
  margin-bottom: 12px;
}

.simulator-history-summary,
.simulator-review-groups,
.simulator-deduction-grid {
  display: grid;
  gap: 10px;
}

.simulator-history-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.simulator-review-groups {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.simulator-history-summary article,
.simulator-review-group,
.simulator-deduction-grid article {
  background: #f7f8fa;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.simulator-history-summary span,
.simulator-history-summary small,
.simulator-review-group > span,
.simulator-review-group small,
.simulator-deduction-grid span,
.simulator-deduction-grid small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.simulator-history-summary strong,
.simulator-deduction-grid strong {
  display: block;
  font-size: 19px;
  margin: 5px 0;
}

.simulator-review-group > span {
  background: #24313d;
  border-radius: 999px;
  color: #ffffff;
  display: inline-block;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 9px;
  padding: 5px 9px;
}

.simulator-review-group ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.simulator-review-group li {
  border-top: 1px solid #e2e8ef;
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.simulator-review-group li:first-child {
  border-top: 0;
  padding-top: 0;
}

.simulator-review-group li > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.simulator-review-group b {
  background: #eef3f4;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
}

.simulator-review-group em {
  color: #52616f;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.simulator-review-group strong {
  color: var(--text);
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.simulator-review-group small {
  line-height: 1.3;
}

.simulator-review-group .review-item-warning b {
  background: #fff3df;
  color: #8a4d16;
}

.simulator-review-group .review-item-review b {
  background: #efecfb;
  color: #554b90;
}

.simulator-reference-wrap {
  border: 1px solid #dce3ea;
  border-radius: 8px;
  margin-top: 12px;
  overflow: auto;
}

.simulator-reference-table {
  min-width: 760px;
  table-layout: fixed;
}

.simulator-activity-reference-wrap {
  margin-top: 0;
  overflow: hidden;
}

.simulator-activity-reference-table {
  font-size: 12px;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.simulator-activity-reference-table th,
.simulator-activity-reference-table td {
  padding: 6px 7px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.simulator-activity-reference-table th:first-child,
.simulator-activity-reference-table td:first-child {
  text-align: left;
  width: 34%;
  white-space: normal;
}

.simulator-activity-reference-table .amount-cell {
  text-align: center;
}

.simulator-activity-reference-table th:nth-child(2),
.simulator-activity-reference-table td:nth-child(2),
.simulator-activity-reference-table th:nth-child(3),
.simulator-activity-reference-table td:nth-child(3) {
  width: 17%;
}

.simulator-activity-reference-table th:nth-child(4),
.simulator-activity-reference-table td:nth-child(4) {
  width: 18%;
}

.simulator-activity-reference-table th:nth-child(5),
.simulator-activity-reference-table td:nth-child(5) {
  width: 14%;
}

.simulator-activity-reference-table td:first-child strong {
  font-size: 13px;
  line-height: 1.2;
}

.simulator-activity-reference-table td:first-child small {
  font-size: 11px;
  line-height: 1.2;
  margin-top: 2px;
}

.simulator-reference-table td:first-child strong,
.simulator-reference-table td:first-child small {
  display: block;
}

.simulator-reference-table td:first-child small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.simulator-reference-table tbody tr.reference-row-warning td:first-child {
  border-left: 4px solid #bd6b3c;
}

.simulator-reference-table tbody tr.reference-row-review td:first-child {
  border-left: 4px solid #7b6fb0;
}

.simulator-reference-table tbody tr.reference-row-ok td:first-child {
  border-left: 4px solid #7ba37f;
}

.simulator-deduction-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.simulator-history-panel h3 {
  border-top: 1px solid var(--line);
  font-size: 16px;
  margin: 16px 0 10px;
  padding-top: 14px;
}

.simulator-checklist {
  margin-top: 6px;
}

.sim-field {
  align-items: center;
  background: #fbfcfd;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(170px, 0.65fr) minmax(0, 1.35fr);
  padding: 6px 8px;
}

.sim-field-label {
  align-items: center;
  display: flex;
  font-size: 13.5px;
  gap: 8px;
  justify-content: space-between;
  line-height: 1.2;
  min-width: 0;
}

.sim-field-label > :first-child {
  min-width: 0;
}

.sim-field-label b {
  background: #eef3f4;
  border-radius: 999px;
  color: var(--accent-strong);
  flex: 0 0 auto;
  font-size: 10px;
  padding: 3px 6px;
  white-space: nowrap;
}

.sim-field-entry {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 108px minmax(0, 1fr);
  min-width: 0;
}

.sim-field-entry input {
  font-size: 13px;
  height: 30px;
  min-height: 30px;
  padding: 5px 7px;
}

.rent-simulator-form small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.22;
}

.simulator-group-title {
  color: var(--accent-strong);
  font-size: 13px;
  grid-column: 1 / -1;
  letter-spacing: 0.04em;
  margin: 8px 0 0;
  text-transform: uppercase;
}

.rent-simulator-source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.simulator-result-grid {
  margin-bottom: 18px;
}

.tax-brackets-panel .simulator-result-grid {
  margin-bottom: 0;
}

.tax-bracket-block {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.tax-brackets-panel .tax-bracket-block {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.tax-brackets-panel .tax-bracket-block + .tax-bracket-block {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.tax-bracket-block h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.tax-bracket-wrap {
  overflow-x: visible;
}

.tax-bracket-table {
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.tax-bracket-table .bracket-range-col {
  width: 29%;
}

.tax-bracket-table .bracket-rate-col {
  width: 15%;
}

.tax-bracket-table .bracket-base-col,
.tax-bracket-table .bracket-tax-col {
  width: 28%;
}

.tax-bracket-table th,
.tax-bracket-table td {
  font-size: 14px;
  line-height: 1.25;
  padding: 8px 6px;
  white-space: normal;
}

.tax-bracket-table .muted-row {
  color: var(--muted);
}

.tax-bracket-table tfoot td {
  background: #f7f8fa;
  border-top: 2px solid #cfd8e3;
  font-weight: 700;
}

.tax-bracket-table th:nth-child(2),
.tax-bracket-table th:nth-child(3),
.tax-bracket-table th:nth-child(4) {
  text-align: center;
}

.muted-text {
  color: var(--muted);
  margin: 6px 0 0;
}

.pill {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.simple-steps {
  line-height: 1.7;
  margin: 12px 0;
  padding-left: 22px;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #c6ced8;
  border-radius: 6px;
  font: inherit;
  padding: 9px;
  width: 100%;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inline-form input {
  width: auto;
}

.upload-box {
  background: var(--surface-soft);
  border: 1px dashed #9aa8b8;
  border-radius: 8px;
  padding: 18px;
}

.drag-upload {
  display: grid;
  gap: 14px;
}

.drag-upload.is-dragover {
  background: #eef8f3;
  border-color: var(--accent);
}

.upload-dropzone {
  align-items: center;
  background: #ffffff;
  border: 2px dashed #9aa8b8;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 130px;
  padding: 24px;
  text-align: center;
}

.upload-dropzone strong {
  color: var(--text);
  font-size: 18px;
}

.upload-dropzone span {
  color: #52616f;
}

.ticket-records-page {
  --records-target-height: 75vh;
}

.compact-page-title {
  margin-bottom: 10px;
}

.compact-page-title h1 {
  font-size: 24px;
  line-height: 1.15;
}

.title-metrics {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.compact-upload-panel {
  margin-bottom: 12px;
  padding: 12px 14px;
}

.compact-ticket-upload {
  align-items: stretch;
  gap: 12px;
  grid-template-columns: minmax(280px, 1fr) 132px;
  min-width: 0;
  padding: 10px;
}

.compact-ticket-upload .compact-dropzone {
  justify-items: start;
  min-height: 64px;
  padding: 10px 14px;
  text-align: left;
}

.compact-ticket-upload .compact-dropzone strong {
  font-size: 15px;
}

.compact-ticket-upload .compact-dropzone span {
  font-size: 13px;
}

.compact-ticket-upload button {
  min-height: 64px;
  padding: 0 16px;
  text-align: center;
  width: 100%;
}

.drag-upload input[type="file"] {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
}

.quarter-tax-table {
  font-size: 14px;
  min-width: 1220px;
}

.quarter-tax-table th {
  color: #405162;
  font-size: 13px;
  text-align: left;
}

.quarter-tax-table th,
.quarter-tax-table td {
  border-bottom: 1px solid #e3e8ee;
  padding: 10px 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.quarter-tax-table td:last-child,
.quarter-tax-table th:last-child {
  width: 1%;
}

.quarter-tax-table tfoot td {
  background: #f2f6f6;
  color: #183b3f;
  font-weight: 700;
}

.strong-amount {
  color: var(--accent-strong);
  font-weight: 700;
}

.muted-block {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
}

.quarter-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: max-content;
}

.quarter-actions form {
  margin: 0;
}

.quarter-actions .button {
  white-space: nowrap;
}

.invoice-list-table {
  font-size: clamp(11px, 0.76vw, 14px);
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.generated-invoices-table {
  min-width: 1380px;
}

.historical-invoices-table {
  min-width: 1720px;
}

.invoice-list-table .invoice-col-year {
  width: 5%;
}

/* Copias de seguridad y actualización */
.update-columns {
  margin-bottom: 16px;
}

.update-repository-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

.update-repository-grid div {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.update-repository-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.update-repository-grid strong {
  overflow-wrap: anywhere;
}

.update-actions {
  align-items: flex-end;
}

.update-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
}

.update-steps {
  line-height: 1.7;
  margin-bottom: 0;
}

.update-progress-page {
  align-items: center;
  background: var(--background);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.update-progress-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(27, 42, 55, 0.14);
  max-width: 620px;
  padding: 32px;
  width: 100%;
}

.update-progress-bar {
  background: var(--surface-soft);
  border-radius: 999px;
  height: 8px;
  margin: 24px 0;
  overflow: hidden;
}

.update-progress-bar span {
  animation: update-progress 1.6s ease-in-out infinite;
  background: var(--accent);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 40%;
}

@keyframes update-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

.invoice-list-table .invoice-col-quarter {
  width: 3%;
}

.invoice-list-table .invoice-col-observations {
  width: 14.5%;
}

.invoice-list-table .invoice-col-number {
  width: 10.5%;
}

.invoice-list-table .invoice-col-date {
  width: 8%;
}

.invoice-list-table .invoice-col-client {
  width: 10.5%;
}

.invoice-list-table .invoice-col-concept {
  width: 340px;
}

.invoice-list-table .invoice-col-money {
  width: 7.5%;
}

.invoice-list-table .invoice-col-money-wide {
  width: 10%;
}

.invoice-list-table .invoice-col-status {
  width: 7.5%;
}

.invoice-list-table .invoice-col-actions {
  width: 108px;
}

.invoice-list-table .invoice-col-actions-wide {
  width: 8%;
}

.invoice-quarter-cell {
  padding-left: 4px !important;
  padding-right: 4px !important;
}

.invoice-observations-cell {
  overflow: visible !important;
  position: relative;
}

.invoice-observation summary {
  color: #26727a;
  cursor: pointer;
  display: block;
  overflow: hidden;
  text-decoration: underline dotted;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-observation summary::-webkit-details-marker {
  display: none;
}

.invoice-observation[open] > div {
  background: #fff;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(20, 38, 55, 0.2);
  left: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 12px 14px;
  position: absolute;
  top: calc(100% - 5px);
  white-space: normal;
  width: 360px;
  z-index: 20;
}

.invoice-list-table th,
.invoice-list-table td {
  border-bottom: 1px solid #e3e8ee;
  overflow: hidden;
  padding: 10px clamp(4px, 0.5vw, 10px);
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.invoice-list-table th {
  color: #405162;
  font-size: clamp(10px, 0.7vw, 13px);
  line-height: 1.15;
  text-align: left;
  white-space: normal;
}

.invoice-list-table .amount-cell,
.invoice-list-table .column-total-amount,
.invoice-list-table .amount-heading {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.invoice-list-table .actions-heading {
  text-align: left;
}

.invoice-list-table .invoice-actions-cell {
  overflow: visible;
  padding-left: 2px;
  padding-right: 2px;
  text-align: left;
}

.invoice-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: flex-start;
  min-width: 0;
}

.invoice-list-table .invoice-actions-cell .button {
  min-width: 0;
  padding-left: clamp(5px, 0.5vw, 10px);
  padding-right: clamp(5px, 0.5vw, 10px);
  text-align: center;
}
.invoice-lines-editor { border: 1px solid #dbe3e9; border-radius: 9px; padding: 14px; }
.invoice-lines-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 10px; }
.invoice-line-row { align-items: end; display: grid; gap: 10px; grid-template-columns: minmax(260px, 1fr) 150px 42px; margin-top: 8px; }
.invoice-line-row label { margin: 0; }

.prep-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prep-grid article {
  background: var(--surface-soft);
  border: 1px solid #e1e7ed;
  border-radius: 8px;
  padding: 14px;
}

.prep-grid strong,
.prep-grid span {
  display: block;
}

.prep-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 6px;
}

.history-filter-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 0.7fr) minmax(170px, 1fr) minmax(190px, 1fr) auto;
}

.history-filter-row label {
  color: #52616f;
  display: grid;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.history-filter-row label span {
  font-size: 13px;
}

.history-filter-row button {
  min-height: 40px;
  white-space: nowrap;
}

.history-edit-table {
  font-size: clamp(9px, 0.7vw, 14px);
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.history-edit-table th {
  background: #f4f6f8;
  color: #415162;
  font-size: 12px;
  letter-spacing: 0.03em;
  overflow: visible;
  position: relative;
  text-transform: uppercase;
}

.history-edit-table th,
.history-edit-table td {
  padding: 6px clamp(2px, 0.3vw, 5px);
  vertical-align: middle;
}

.history-edit-table tbody tr {
  height: 48px;
}

.history-edit-table input,
.history-edit-table select {
  font-size: inherit;
  min-width: 0;
  padding: 6px clamp(2px, 0.35vw, 7px);
  width: 100%;
}

.history-edit-table td {
  white-space: nowrap;
}

.history-edit-table th:nth-child(1),
.history-edit-table td:nth-child(1) {
  width: 4%;
}

.history-edit-table th:nth-child(2),
.history-edit-table td:nth-child(2) {
  width: 3%;
}

.history-edit-table th:nth-child(3),
.history-edit-table td:nth-child(3) {
  width: 6%;
}

.history-edit-table th:nth-child(4),
.history-edit-table td:nth-child(4) {
  width: 7%;
}

.history-edit-table th:nth-child(5),
.history-edit-table td:nth-child(5) {
  width: 8%;
}

.history-edit-table th:nth-child(6),
.history-edit-table td:nth-child(6) {
  width: 8%;
}

.history-edit-table th:nth-child(7),
.history-edit-table td:nth-child(7) {
  width: 12%;
}

.history-edit-table th:nth-child(8),
.history-edit-table td:nth-child(8) {
  width: 14%;
}

.history-edit-table th:nth-child(9),
.history-edit-table td:nth-child(9) {
  width: 7%;
}

.history-edit-table th:nth-child(10),
.history-edit-table td:nth-child(10) {
  width: 7%;
}

.history-edit-table th:nth-child(11),
.history-edit-table td:nth-child(11) {
  width: 7%;
}

.history-edit-table th:nth-child(12),
.history-edit-table td:nth-child(12) {
  width: 9%;
}

.history-edit-table th:nth-child(13),
.history-edit-table td:nth-child(13) {
  width: 8%;
}

.history-edit-table .amount-input {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.column-filter-toolbar {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.visible-totals-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
}

.visible-totals-summary article {
  background: #f4f7f8;
  border: 1px solid #dbe4ec;
  border-radius: 6px;
  min-width: 0;
  padding: 9px 10px;
}

.visible-totals-summary span {
  color: #52616f;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.visible-totals-summary strong {
  color: var(--text);
  display: block;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-filter-heading {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.column-filter-heading > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.column-filter-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #52616f;
  display: inline-flex;
  flex: 0 0 24px;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 24px;
}

.column-filter-button:hover,
.column-filter-button:focus-visible {
  background: #e9eef3;
  color: var(--accent-strong);
  outline: none;
}

.column-filter-button svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 14px;
}

.excel-filter-table th.is-filtered .column-filter-button {
  background: #e5f1f1;
  border-color: #9bc6c8;
  color: var(--accent-strong);
}

.column-filter-menu {
  background: #ffffff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(31, 41, 51, 0.18);
  color: var(--text);
  display: grid;
  gap: 9px;
  letter-spacing: 0;
  padding: 10px;
  position: fixed;
  text-transform: none;
  width: 270px;
  z-index: 1000;
}

.column-filter-title {
  color: var(--text);
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.column-filter-field {
  color: #52616f;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}

.column-filter-field input {
  font-size: 13px;
  padding: 7px 8px;
}

.column-filter-range {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.column-filter-mini-actions {
  display: flex;
  gap: 8px;
}

.column-filter-mini-actions button {
  background: #eef3f7;
  color: #33475b;
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
}

.column-filter-mini-actions button:hover {
  background: #dfe8ef;
}

.column-filter-list {
  border: 1px solid #e2e8ef;
  border-radius: 6px;
  display: grid;
  max-height: 190px;
  overflow: auto;
  padding: 4px;
}

.column-filter-option {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 13px;
  font-weight: 400;
  gap: 7px;
  min-width: 0;
  padding: 5px 4px;
  text-transform: none;
}

.column-filter-option input {
  flex: 0 0 auto;
  height: 14px;
  margin: 0;
  width: 14px;
}

.column-filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-filter-blank-option {
  border-top: 1px solid #e2e8ef;
  margin-top: 2px;
  padding-top: 8px;
}

.column-filter-footer {
  display: flex;
  justify-content: flex-end;
}

.column-filter-empty-row td {
  color: var(--muted);
  font-weight: 700;
  padding: 14px 10px;
  text-align: center;
}

.history-edit-table tfoot td {
  background: #f4f7f8;
  border-top: 2px solid #cfd8e2;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  height: 42px;
  text-align: right;
}

.history-edit-table tfoot td:first-child {
  color: #415162;
  text-align: left;
  text-transform: uppercase;
}

.history-edit-table .row-actions {
  align-items: center;
  background: #ffffff;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.history-edit-table .row-actions form {
  display: none;
}

.history-edit-table .row-actions .button,
.history-edit-table .row-actions button {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
  min-height: 30px;
  padding: 6px 8px;
}

.history-edit-table .row-actions .icon-button {
  flex-basis: 30px;
  height: 30px;
  padding: 0;
  width: 30px;
}

.history-edit-table .history-file-cell {
  display: table-cell;
  text-align: right;
}

.history-file-name {
  color: #52616f;
  display: none;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autosave-status {
  color: var(--muted);
  display: none;
  font-size: 12px;
  min-width: 0;
}

.autosave-status[data-state="saved"] {
  color: #28623d;
}

.autosave-status[data-state="error"] {
  color: #9b2c2c;
  font-weight: 700;
}

.compact-table {
  min-width: 1320px;
}

.path-text {
  background: var(--surface-soft);
  border: 1px solid #e2e6eb;
  border-radius: 6px;
  color: #52616f;
  font-size: 13px;
  padding: 10px 12px;
  word-break: break-all;
}

.path-inline {
  color: #52616f;
  font-size: 13px;
  word-break: break-all;
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.settings-form {
  margin-top: 14px;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  margin-top: 10px;
  padding: 6px 10px;
}

.status-pill.ok {
  background: var(--success-bg);
  color: #28623d;
}

.status-pill.warning {
  background: #fff8e5;
  color: #72580f;
}

.status-pill.mini {
  font-size: 12px;
  margin-top: 0;
  padding: 4px 8px;
}

.records-header {
  align-items: flex-start;
  gap: 14px;
}

.records-table-wrap {
  border: 1px solid #dce3ea;
  border-radius: 8px;
}

.records-panel-main {
  display: flex;
  flex-direction: column;
  height: var(--records-target-height);
  margin-bottom: 0;
  min-height: 560px;
  overflow: hidden;
  padding: 14px;
}

.records-toolbar {
  align-items: center;
  color: #52616f;
  display: flex;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.toolbar-copy {
  display: grid;
  gap: 3px;
}

.records-toolbar strong {
  color: var(--text);
  font-size: 15px;
}

.batch-toolbar-form {
  justify-content: flex-end;
}

.batch-toolbar-form input[type="date"] {
  min-width: 150px;
}

.compact-notice {
  margin-bottom: 10px;
  padding: 8px 10px;
}

.records-panel-main .records-table-wrap {
  background: #ffffff;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.records-panel-main .records-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.records-table {
  min-width: 980px;
  table-layout: fixed;
  width: 100%;
}

.records-table th {
  background: #f4f6f8;
  border-bottom-color: #d5dde6;
  color: #415162;
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 9px 10px;
  text-transform: uppercase;
}

.records-table .sort-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: inherit;
  gap: 6px;
  justify-content: space-between;
  letter-spacing: inherit;
  min-width: 0;
  padding: 0;
  text-align: left;
  text-decoration: none;
  text-transform: inherit;
  width: 100%;
}

.records-table .sort-button:hover,
.records-table .sort-button:focus-visible {
  background: transparent;
  color: var(--accent-strong);
  outline: none;
}

.records-table .sort-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sort-indicator {
  color: currentColor;
  display: inline-block;
  flex: 0 0 8px;
  height: 11px;
  position: relative;
  width: 8px;
}

.sort-indicator::before,
.sort-indicator::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  content: "";
  left: 0;
  opacity: 0.32;
  position: absolute;
}

.sort-indicator::before {
  border-bottom: 5px solid currentColor;
  top: 0;
}

.sort-indicator::after {
  border-top: 5px solid currentColor;
  bottom: 0;
}

.records-table th[aria-sort="ascending"] .sort-indicator::before,
.records-table th[aria-sort="descending"] .sort-indicator::after {
  opacity: 1;
}

.records-table td {
  height: 48px;
  max-width: 220px;
  overflow: hidden;
  padding: 8px 10px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.records-table th:nth-child(1),
.records-table td:nth-child(1) {
  width: 58px;
}

.records-table th:nth-child(2),
.records-table td:nth-child(2) {
  width: 92px;
}

.records-table th:nth-child(4),
.records-table td:nth-child(4) {
  width: 96px;
}

.records-table th:nth-child(5),
.records-table td:nth-child(5) {
  width: 145px;
}

.records-table th:nth-child(6),
.records-table td:nth-child(6) {
  width: 116px;
}

.records-table th:nth-child(7),
.records-table td:nth-child(7) {
  width: 88px;
}

.records-table th:nth-child(9),
.records-table td:nth-child(9) {
  width: 160px;
}

.company-records-table th:nth-child(1),
.company-records-table td:nth-child(1) {
  width: 110px;
}

.company-records-table th:nth-child(2),
.company-records-table td:nth-child(2) {
  width: 58px;
}

.company-records-table th:nth-child(3),
.company-records-table td:nth-child(3) {
  width: 92px;
}

.company-records-table th:nth-child(5),
.company-records-table td:nth-child(5) {
  width: 96px;
}

.company-records-table th:nth-child(6),
.company-records-table td:nth-child(6) {
  width: 145px;
}

.company-records-table th:nth-child(8),
.company-records-table td:nth-child(8) {
  width: 120px;
}

.records-table tbody tr:hover {
  background: #f7f9fb;
}

.record-id {
  color: #667789;
  font-weight: 700;
  width: 58px;
}

.amount-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.record-chip {
  background: #eef3f7;
  border: 1px solid #dbe4ec;
  border-radius: 999px;
  color: #3f5062;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  max-width: 170px;
  overflow: hidden;
  padding: 5px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-inline {
  color: var(--muted);
}

.file-link {
  color: #3f5062;
  display: inline-block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.row-actions {
  min-width: 156px;
  text-align: right;
}

.row-actions .button + .button {
  margin-left: 6px;
}

.record-icon-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 76px;
}

.record-icon-actions .inline-row-form {
  display: inline-flex;
  margin-left: 0;
}

.record-icon-actions .icon-button {
  flex: 0 0 30px;
}

.empty-record-row td {
  color: var(--muted);
}

.empty-record-row strong {
  color: var(--text);
  margin-right: 8px;
}

.batches-panel {
  margin-top: 16px;
}

.latest-batch-panel {
  align-items: center;
  background: #24313d;
  border-color: #24313d;
  color: #ffffff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.latest-batch-panel .eyebrow,
.latest-batch-panel p {
  color: #d8e0e7;
}

.latest-batch-panel h2 {
  color: #ffffff;
  font-size: 24px;
  margin: 2px 0 7px;
}

.latest-batch-panel p {
  margin: 0;
}

.latest-batch-actions {
  flex: 0 0 auto;
}

.latest-batch-actions .button {
  background: #f0c36a;
  color: #24313d;
}

.latest-batch-actions .button:hover {
  background: #e1b352;
}

.pending-invoices-table {
  font-size: clamp(10px, 0.72vw, 14px);
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.table-wrap.tax-bracket-wrap {
  overflow-x: visible;
}

.table-wrap.tax-bracket-wrap .tax-bracket-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.tax-bracket-table th:first-child,
.tax-bracket-table td:first-child {
  width: 29%;
}

.tax-bracket-table th:nth-child(2),
.tax-bracket-table td:nth-child(2) {
  width: 15%;
}

.tax-bracket-table th:nth-child(3),
.tax-bracket-table td:nth-child(3),
.tax-bracket-table th:nth-child(4),
.tax-bracket-table td:nth-child(4) {
  width: 28%;
}

.pending-entry-panel {
  margin-bottom: 12px;
  padding: 14px;
}

.pending-entry-toolbar {
  margin-bottom: 10px;
}

.pending-entry-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(0, 1.15fr)
    minmax(0, 1.6fr)
    minmax(0, 0.85fr)
    minmax(0, 0.95fr)
    minmax(0, 0.95fr)
    minmax(0, 0.75fr);
}

.pending-entry-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.pending-entry-form input,
.pending-entry-form select,
.pending-entry-form textarea {
  padding: 8px;
}

.pending-notes-field {
  grid-column: 1 / 7;
}

.pending-notes-field textarea {
  min-height: 42px;
  resize: vertical;
}

.pending-entry-form .pending-entry-actions {
  align-self: end;
  grid-column: 7;
  justify-content: flex-end;
}

.pending-entry-form .pending-entry-actions button {
  min-height: 42px;
  width: 100%;
}

.pending-records-panel {
  height: calc(100vh - 270px);
  min-height: 500px;
}

.pending-detail-layout {
  align-items: start;
}

.pending-detail-summary .detected-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pending-detail-form textarea {
  resize: vertical;
}

.pending-invoices-table th:nth-child(1),
.pending-invoices-table td:nth-child(1) {
  width: 8%;
}

.pending-invoices-table th:nth-child(2),
.pending-invoices-table td:nth-child(2) {
  width: 7%;
}

.pending-invoices-table th:nth-child(3),
.pending-invoices-table td:nth-child(3) {
  width: 8%;
}

.pending-invoices-table th:nth-child(4),
.pending-invoices-table td:nth-child(4) {
  width: 10%;
}

.pending-invoices-table th:nth-child(5),
.pending-invoices-table td:nth-child(5) {
  width: 15%;
}

.pending-invoices-table .pending-concept-cell {
  line-height: 1.35;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.pending-invoices-table th:nth-child(6),
.pending-invoices-table th:nth-child(7),
.pending-invoices-table th:nth-child(8),
.pending-invoices-table th:nth-child(9),
.pending-invoices-table td:nth-child(6),
.pending-invoices-table td:nth-child(7),
.pending-invoices-table td:nth-child(8),
.pending-invoices-table td:nth-child(9) {
  width: 7%;
}

.pending-invoices-table th:nth-child(6) .sort-button,
.pending-invoices-table th:nth-child(7) .sort-button,
.pending-invoices-table th:nth-child(8) .sort-button,
.pending-invoices-table th:nth-child(9) .sort-button {
  justify-content: flex-end;
  text-align: right;
}

.pending-invoices-table th:nth-child(12) .sort-button {
  justify-content: flex-end;
  text-align: right;
}

.pending-invoices-table th:nth-child(10),
.pending-invoices-table td:nth-child(10) {
  width: 6%;
}

.pending-invoices-table th:nth-child(11),
.pending-invoices-table td:nth-child(11) {
  width: 6%;
}

.pending-invoices-table th:nth-child(12),
.pending-invoices-table td:nth-child(12) {
  width: 12%;
}

.pending-invoices-table th {
  font-size: clamp(9px, 0.64vw, 12px);
  line-height: 1.15;
  padding-left: clamp(3px, 0.45vw, 9px);
  padding-right: clamp(3px, 0.45vw, 9px);
  white-space: normal;
}

.pending-invoices-table td {
  padding-left: clamp(3px, 0.45vw, 9px);
  padding-right: clamp(3px, 0.45vw, 9px);
}

.pending-invoices-table .sort-button span:first-child {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.pending-invoices-table th:nth-child(12) {
  background: #f4f6f8;
  position: sticky;
  right: 0;
  z-index: 4;
}

.pending-invoices-table td:nth-child(12) {
  background: #ffffff;
  position: sticky;
  right: 0;
  z-index: 2;
}

.pending-invoices-table tbody tr:hover td:nth-child(12) {
  background: #f7f9fb;
}

.pending-invoices-table td.row-actions {
  max-width: none;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.pending-invoices-table tfoot td {
  background: #f4f7f8;
  border-top: 2px solid #cfd8e2;
  color: var(--text);
  font-weight: 800;
  height: 46px;
}

.pending-invoices-table tfoot td:first-child {
  color: #415162;
  text-transform: uppercase;
}

.pending-invoices-table tfoot td:last-child {
  background: #f4f7f8;
}

.pending-row-actions {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-content: flex-end;
  white-space: nowrap;
}

.pending-row-actions .inline-row-form {
  display: inline-flex;
  margin-left: 0;
}

.pending-row-actions .icon-button {
  border-radius: 6px;
}

.inline-row-form {
  display: inline-flex;
  margin-left: 6px;
}

.import-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.import-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.import-summary-grid article {
  background: var(--surface-soft);
  border: 1px solid #dce3ea;
  border-radius: 8px;
  padding: 12px;
}

.import-summary-grid span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.import-summary-grid strong {
  display: block;
  font-size: 22px;
}

.document-card {
  align-content: start;
}

.document-card .file-list {
  max-height: 260px;
  min-width: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.ticket-review-layout {
  align-items: start;
  grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
}

.ticket-preview-panel {
  position: sticky;
  top: 22px;
}

.ticket-image-preview,
.ticket-pdf-preview {
  background: #ffffff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  display: block;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

.ticket-image-preview {
  cursor: zoom-in;
}

.ticket-pdf-preview {
  min-height: 620px;
}

.file-list {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 12px 0 0;
  min-width: 0;
  padding: 0;
}

.file-list li {
  min-width: 0;
}

.file-list a {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

th,
td {
  border-bottom: 1px solid #e2e6eb;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #52616f;
  font-size: 13px;
}

.table-column-totals th {
  background: var(--surface-soft);
  border-bottom: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  padding-bottom: 4px;
  white-space: nowrap;
}

.table-column-totals + tr th {
  padding-top: 4px;
}

.table-column-totals .column-total-spacer {
  color: transparent;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label {
  display: grid;
  gap: 6px;
}

.checkbox-line {
  align-content: center;
  display: flex !important;
  gap: 8px !important;
}

.checkbox-line input {
  width: auto;
}

.form-grid .full,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-pair {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-area {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .rent-history-upload-form {
    align-items: flex-start;
    width: 100%;
  }

  .upload-summary {
    white-space: normal;
  }

  .compact-ticket-upload {
    grid-template-columns: minmax(0, 1fr);
  }

  .compact-ticket-upload button {
    justify-self: stretch;
    min-height: 46px;
  }

  .records-panel-main {
    height: 75vh;
    min-height: 460px;
  }

  .records-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-toolbar-form {
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
  }

  .pending-entry-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-filter-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .visible-totals-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pending-notes-field,
  .pending-entry-form .pending-entry-actions {
    grid-column: auto;
  }

  .pending-records-panel {
    height: 75vh;
    min-height: 460px;
  }

  .evolution-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .evolution-years {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .evolution-years input {
    width: 100%;
  }

  .metric-picker {
    width: 100%;
  }

  .evolution-controls button {
    width: 100%;
  }

  .evolution-matrix-table {
    min-width: 680px;
  }

  .evolution-matrix-table th,
  .evolution-matrix-table td {
    padding: 10px 12px;
  }

  .evolution-matrix-table th:first-child {
    min-width: 160px;
  }

  .stats-grid,
  .module-grid,
  .form-grid,
  .simulator-two-columns,
  .simulator-result-layout,
  .simulator-source-strip,
  .simulator-history-summary,
  .simulator-review-groups,
  .simulator-deduction-grid,
  .simulator-result-data-grid,
  .tax-simulation-grid,
  .import-summary-grid,
  .income-compare-grid,
  .checklist-grid,
  .prep-grid,
  .prep-metrics,
  .update-repository-grid,
  .three-columns,
  .two-columns,
  .detected-grid,
  .mobile-access dl {
    grid-template-columns: 1fr;
  }

  .income-hero,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .stat.wide {
    grid-column: auto;
  }

  .ticket-preview-panel {
    position: static;
  }

  .sim-field {
    grid-template-columns: minmax(0, 1fr);
  }

  .sim-field-entry {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(20, 35, 33, 0.92), rgba(47, 111, 115, 0.72)),
    #142321;
}

.login-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(4, 10, 12, 0.28);
  display: grid;
  gap: 18px;
  max-width: 440px;
  padding: 34px;
  width: min(100%, 440px);
}

.login-card h1 {
  font-size: 30px;
}

.login-card p,
.login-card small {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.login-button {
  align-items: center;
  background: #111827;
  border-radius: 7px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  padding: 13px 16px;
}

.login-button:hover {
  background: #263241;
  color: #ffffff;
}

.microsoft-mark {
  align-items: center;
  background: #ffffff;
  border-radius: 4px;
  color: #111827;
  display: inline-flex;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.logout-link {
  color: #d8dee6;
  display: inline-block;
  font-size: 12px;
  margin-top: 8px;
  text-decoration: underline;
}

.hello-card .login-button,
.hello-card .secondary-login-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.hello-card .login-button:disabled,
.hello-card .secondary-login-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.hello-status {
  background: #f3f7f6;
  border: 1px solid #dbe6e3;
  border-radius: 7px;
  color: #324b57;
  line-height: 1.45;
  padding: 12px 14px;
}

.hello-status.error {
  background: #fff1f0;
  border-color: #f5b5ae;
  color: #9b241a;
}

.secondary-login-button {
  background: #eef3f1;
  border-radius: 7px;
  color: #193331;
  font-weight: 700;
  padding: 11px 14px;
}

.secondary-login-button:hover {
  background: #dfe9e6;
}

.subtle-link {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-decoration: underline;
}
