:root {
  color-scheme: light;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: #f5f7fb;
  color: #18243b;
  --floating-scrollbar-height: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.has-floating-scrollbar {
  padding-bottom: calc(var(--floating-scrollbar-height) + env(safe-area-inset-bottom));
}

.floating-h-scroll {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--floating-scrollbar-height) + env(safe-area-inset-bottom));
  padding: 0.4rem clamp(0.75rem, 2vw, 1.5rem) calc(0.4rem + env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: rgba(245, 247, 251, 0.95);
  border-top: 1px solid rgba(19, 42, 109, 0.12);
  box-shadow: 0 -8px 18px rgba(24, 36, 59, 0.1);
  z-index: 50;
  display: none;
  align-items: center;
  touch-action: none;
}

.floating-h-scroll.is-active {
  display: flex;
}

.floating-h-scroll__track {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(24, 36, 59, 0.18);
}

.floating-h-scroll__thumb {
  position: absolute;
  top: 50%;
  height: 12px;
  border-radius: 999px;
  background: #3c8bf7;
  box-shadow: 0 4px 10px rgba(24, 36, 59, 0.2);
  transform: translateY(-50%);
  cursor: grab;
}

.floating-h-scroll__thumb:active {
  cursor: grabbing;
}

.floating-h-scroll.is-disabled .floating-h-scroll__thumb {
  background: rgba(24, 36, 59, 0.35);
}

.app-header,
.app-footer {
  background: linear-gradient(135deg, #132a6d, #3c8bf7);
  color: #fff;
  padding: 2rem clamp(1rem, 3vw, 3rem);
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
}

.app-footer {
  min-height: 40px;
}

.app-header h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

main {
  flex: 1;
  padding: clamp(1rem, 2vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tabs {
  display: inline-flex;
  gap: 0.5rem;
  background-color: #fff;
  padding: 0.5rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(19, 42, 109, 0.12);
  align-self: flex-start;
}

.app-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.company-selector label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #132a6d;
}

.company-selector select {
  min-width: 220px;
  font-weight: 500;
}

.tab-button {
  border: none;
  background: transparent;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  color: #132a6d;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-button:hover,
.tab-button:focus {
  background-color: rgba(60, 139, 247, 0.15);
  outline: none;
}

.tab-button.active {
  background-color: #3c8bf7;
  color: #fff;
}

.tab-button.pulse {
  animation: pulse 1.2s ease;
}

.tab-content {
  background: #fff;
  padding: clamp(1.25rem, 2vw, 2rem);
  border-radius: 1.2rem;
  box-shadow: 0 20px 40px rgba(24, 36, 59, 0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-meta {
  margin: 0 0 1.5rem;
  font-weight: 600;
  color: #132a6d;
}

.plan-meta.subtle {
  font-weight: 500;
  color: #4c5a78;
}


.alert-panel {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border-left: 4px solid #c0392b;
  background-color: rgba(192, 57, 43, 0.12);
  color: #7a1f17;
  box-shadow: 0 10px 20px rgba(192, 57, 43, 0.18);
}

.alert-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: #922b21;
}

.alert-panel ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
}

.alert-panel li {
  font-size: 0.92rem;
}

.alert-panel li strong {
  font-weight: 700;
  color: #7a1f17;
}

.plan-header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1.75rem;
  margin-bottom: 1rem;
}

.plan-totals-stack {
  display: grid;
  gap: 0.2rem;
}

.plan-inline-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  font-weight: 600;
}

.plan-summary {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.plan-summary h3 {
  margin: 0;
  color: #132a6d;
  font-size: 1.1rem;
}

.plan-summary-bank {
  background: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #d6deed;
  box-shadow: 0 18px 36px rgba(24, 36, 59, 0.14);
  height: 100%;
  width: 100%;
  max-width: none;
  overflow: hidden;
}

.plan-summary-bank h4 {
  margin: 0 0 0.65rem;
  color: #132a6d;
  font-size: 1rem;
}

.plan-summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.plan-summary-table th,
.plan-summary-table td {
  text-align: right;
  padding: 0.65rem 0.75rem;
  word-break: break-word;
  vertical-align: top;
}

.plan-summary-table th {
  text-align: left;
  font-size: 0.95rem;
}

.plan-summary-table th:nth-child(2),
.plan-summary-table th:nth-child(3) {
  text-align: center;
}

.plan-summary-table th:nth-child(4) {
  text-align: right;
}

.summary-week-label {
  white-space: nowrap;
}

.summary-final {
  font-weight: 600;
  text-align: right;
}

.summary-pending {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  text-align: right;
  color: #7b869c;
}

.summary-amount-cell {
  vertical-align: top;
  text-align: right;
}

.summary-final-cell {
  text-align: right;
}

.summary-amount {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  width: 100%;
}

.summary-week-cell {
  text-align: left;
}

.col-week {
  width: 32%;
}

.col-in,
.col-out {
  width: 20%;
}

.col-balance {
  width: 28%;
}

.summary-validated {
  font-weight: 600;
}

.summary-pending-amount {
  font-size: 0.8rem;
  color: #7b869c;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.summary-pending-amount.pending-in {
  color: #5f7f67;
}

.summary-pending-amount.pending-out {
  color: #8a5b5b;
}

.bank-week-final-pending.negative {
  color: #8a5b5b;
}

.plan-summary-table thead th {
  background-color: #132a6d;
  color: #fff;
  border-bottom: none;
}

.plan-summary-table tbody tr:nth-child(even) {
  background-color: rgba(60, 139, 247, 0.08);
}

.plan-summary-table tbody tr:hover {
  background-color: rgba(60, 139, 247, 0.16);
}

.plan-banks {
  display: grid;
  gap: 0.75rem;
}

.plan-banks-slider,
.plan-summary-slider {
  position: relative;
}

.plan-banks-track,
.plan-summary-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  justify-content: flex-start;
}

.plan-banks-slide,
.plan-summary-slide {
  flex: 0 0 100%;
  display: grid;
  gap: 1.25rem;
}

.plan-banks-slide {
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  justify-items: stretch;
  align-items: stretch;
}

.plan-summary-slide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
  justify-content: center;
  align-items: stretch;
}

@media (min-width: 1280px) {
  .plan-banks-slide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .plan-banks-slide,
  .plan-summary-slide {
    grid-template-columns: 1fr;
  }
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 38px;
  width: 38px;
  border-radius: 50%;
  border: 1px solid #d6deed;
  background: #fff;
  color: #132a6d;
  box-shadow: 0 12px 24px rgba(24, 36, 59, 0.18);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider-nav:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 16px 30px rgba(24, 36, 59, 0.22);
}

.slider-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.slider-nav.prev {
  left: -12px;
}

.slider-nav.next {
  right: -12px;
}

.plan-bank-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 18px 36px rgba(24, 36, 59, 0.14);
  padding: 1.5rem 1.75rem;
  border: 1px solid #d6deed;
  width: 100%;
  max-width: none;
}

.plan-bank-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plan-bank-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #132a6d;
}

.plan-bank-meta {
  font-size: 0.9rem;
  color: #4c5a78;
}

.plan-bank-summary {
  background: rgba(19, 42, 109, 0.08);
  border: 1px solid #d6deed;
  border-radius: 0.85rem;
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
}

.plan-bank-summary__header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #132a6d;
}

.plan-bank-summary__table-wrapper {
  overflow: auto;
}

.plan-bank-summary .plan-summary-table {
  background: #fff;
  border-radius: 0.75rem;
}

.plan-bank-summary .summary-final {
  font-size: 0.95rem;
}

.plan-bank-summary .summary-pending {
  font-size: 0.78rem;
}

.plan-bank-weeks {
  display: grid;
  gap: 1rem;
}

.bank-alert {
  margin: 0 0 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(192, 57, 43, 0.35);
  background-color: rgba(192, 57, 43, 0.1);
  color: #7a1f17;
  display: grid;
  gap: 0.4rem;
}

.bank-alert strong {
  color: #922b21;
}

.bank-alert ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.3rem;
}

.bank-alert li {
  font-size: 0.92rem;
}

.bank-week-card {
  border-radius: 0.9rem;
  border: 1px solid rgba(24, 36, 59, 0.12);
  padding: 1rem 1.1rem;
  background: rgba(241, 245, 255, 0.65);
  display: grid;
  gap: 0.75rem;
}

.bank-week-card.alert {
  border-color: rgba(192, 57, 43, 0.6);
  background: rgba(192, 57, 43, 0.08);
}

.bank-week-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.bank-week-card header h4 {
  margin: 0;
  font-size: 1rem;
  color: #132a6d;
  white-space: nowrap;
}

.bank-week-meta {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #4c5a78;
}

.bank-week-meta strong {
  color: #18243b;
}

.bank-week-section {
  display: grid;
  gap: 0.6rem;
}

.bank-week-section h5 {
  margin: 0;
  font-size: 0.92rem;
  color: #132a6d;
}

.bank-week-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.quick-add-button {
  border: 1px solid #d6deed;
  background: #eef2ff;
  color: #132a6d;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  line-height: 1;
  padding: 0;
}

.quick-add-button:hover,
.quick-add-button:focus {
  background: #dbe5ff;
  transform: translateY(-1px);
  outline: none;
}

.quick-add-panel {
  display: none;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d6deed;
  border-radius: 0.75rem;
  background: #f8f9ff;
  box-shadow: 0 12px 24px rgba(24, 36, 59, 0.12);
}

.quick-add-panel.open {
  display: grid;
}

.quick-add-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #132a6d;
}

.quick-add-panel input {
  padding: 0.45rem 0.6rem;
  border: 1px solid #d6deed;
  border-radius: 0.55rem;
  font-size: 0.9rem;
}

.quick-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.quick-add-save {
  border: none;
  background: #3c8bf7;
  color: #fff;
  border-radius: 0.55rem;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.quick-add-cancel {
  border: 1px solid #d6deed;
  background: #fff;
  color: #132a6d;
  border-radius: 0.55rem;
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.bank-week-balance {
  font-weight: 600;
  font-size: 0.95rem;
}

.bank-week-totals {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.bank-week-totals span {
  display: flex;
  justify-content: space-between;
}

.bank-week-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.bank-week-final {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-weight: 600;
  font-size: 0.95rem;
  color: #132a6d;
}

.bank-week-final-amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.bank-week-final-main {
  font-size: 1rem;
}

.bank-week-final-pending {
  font-size: 0.88rem;
  color: #5f7f67;
  font-weight: 600;
}

.bank-week-final-pending.negative {
  color: #8a5b5b;
}

.week-opening-inline {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-weight: 600;
  color: #132a6d;
  font-size: 0.9rem;
}

.week-opening-inline input {
  width: 140px;
  padding: 0.5rem 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid #d6deed;
  font-size: 0.95rem;
  text-align: right;
  -moz-appearance: textfield;
}

.week-opening-inline input::-webkit-outer-spin-button,
.week-opening-inline input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.week-opening-inline .week-opening-helper {
  font-weight: 400;
  color: #4c5a78;
  font-size: 0.8rem;
}

.plan-summary p,
.plan-banks p {
  margin: 0;
}

p.empty {
  color: #4c5a78;
}

.week-card {
  background-color: #fff;
  border-radius: 1.1rem;
  box-shadow: 0 18px 40px rgba(24, 36, 59, 0.18);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid #d6deed;
}

.week-card--alert {
  border-color: rgba(192, 57, 43, 0.65);
  box-shadow: 0 22px 45px rgba(192, 57, 43, 0.22);
  position: relative;
}

.week-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(24, 36, 59, 0.12);
  background: linear-gradient(120deg, rgba(60, 139, 247, 0.12), rgba(19, 42, 109, 0.08));
  border-radius: 0.8rem;
  padding: 1rem 1.25rem;
}

.week-card__header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #132a6d;
}

.week-opening {
  margin: 0;
  font-weight: 600;
  color: #132a6d;
}

.week-opening-input {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: #132a6d;
}

.week-opening-input input {
  max-width: 200px;
}

.week-opening-input input::-webkit-outer-spin-button,
.week-opening-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.week-opening-input input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.week-opening-helper {
  font-size: 0.8rem;
  font-weight: 500;
  color: #4c5a78;
}

.week-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid #d6deed;
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  background-color: rgba(19, 42, 109, 0.04);
}

.week-section h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #132a6d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(19, 42, 109, 0.12);
}

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

.week-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.6rem;
  background-color: #fff;
  border: 1px solid rgba(19, 42, 109, 0.08);
  box-shadow: 0 8px 16px rgba(24, 36, 59, 0.08);
}

.week-list li.empty {
  background-color: transparent;
  padding-left: 0.5rem;
  padding-right: 0;
  color: #4c5a78;
}

.week-list__details {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.week-list__sequence {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.week-list__title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-list__date {
  font-size: 0.8rem;
  color: #4c5a78;
  white-space: nowrap;
}

.week-list__separator {
  font-size: 0.75rem;
  color: #4c5a78;
}

.week-list__meta {
  font-size: 0.8rem;
  color: #4c5a78;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-list__status {
  font-size: 0.8rem;
  color: #4c5a78;
  white-space: nowrap;
}

.week-list__actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-end;
  margin-left: auto;
}

.inline-action-button {
  border: none;
  background-color: rgba(19, 42, 109, 0.12);
  color: #132a6d;
  padding: 0.3rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.inline-action-button:hover,
.inline-action-button:focus {
  background-color: rgba(60, 139, 247, 0.3);
  transform: translateY(-1px);
  outline: none;
}

.inline-action-button.danger {
  background-color: rgba(192, 57, 43, 0.18);
  color: #922b21;
}

.status-menu-wrapper {
  position: relative;
}

.status-chip {
  border: 1px solid #d6deed;
  background: #eef2ff;
  color: #132a6d;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  z-index: 1;
}

.status-chip__chevron {
  font-size: 0.7rem;
  opacity: 0.7;
}

.status-menu {
  position: fixed;
  top: auto;
  left: auto;
  background: #fff;
  border: 1px solid #d6deed;
  box-shadow: 0 12px 28px rgba(24, 36, 59, 0.16);
  border-radius: 0.65rem;
  padding: 0.35rem;
  display: none;
  gap: 0.15rem;
  min-width: 160px;
  z-index: 3000;
  overflow: visible;
}

.status-menu[hidden] {
  display: none !important;
}

.status-menu--open {
  display: grid;
}

.status-menu__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  color: #132a6d;
  cursor: pointer;
}

.status-menu__item:hover,
.status-menu__item:focus {
  background: rgba(60, 139, 247, 0.12);
  outline: none;
}

.week-list__amount {
  font-weight: 700;
  color: #132a6d;
}

.import-instructions {
  background-color: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 12px 24px rgba(24, 36, 59, 0.12);
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.import-instructions h2 {
  margin: 0;
  color: #132a6d;
}

.import-note {
  font-size: 0.85rem;
  color: #4c5a78;
  margin: 0;
}

.import-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-top: 0.5rem;
}

.import-column {
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 16px 30px rgba(24, 36, 59, 0.14);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.import-column header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.import-column h3 {
  margin: 0;
  color: #132a6d;
}

.import-defaults {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.import-table-wrapper {
  overflow-x: auto;
  border-radius: 0.8rem;
  border: 1px solid #d6deed;
  background: #fff;
}

.import-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.import-table th,
.import-table td {
  border: 1px solid #d6deed;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}

.import-table thead {
  background-color: #132a6d;
  color: #fff;
}

.import-table td {
  min-width: 120px;
}

.import-table td[contenteditable="true"]:focus {
  outline: 3px solid rgba(60, 139, 247, 0.25);
  background-color: rgba(60, 139, 247, 0.08);
}

.import-table td[contenteditable="true"].selected {
  background-color: rgba(19, 42, 109, 0.18);
  outline: 2px solid rgba(19, 42, 109, 0.4);
}

.import-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.import-actions .primary {
  margin-left: auto;
}

.week-list__amount.positive {
  color: #0a8a3b;
}

.week-list__amount.negative {
  color: #c0392b;
}

.week-alert {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  background-color: rgba(192, 57, 43, 0.16);
  color: #7a1f17;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.week-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #132a6d;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  background-color: rgba(19, 42, 109, 0.05);
}

.week-total.positive {
  color: #0a8a3b;
  background-color: rgba(10, 138, 59, 0.12);
}

.week-total.negative {
  color: #c0392b;
  background-color: rgba(192, 57, 43, 0.12);
}

.week-final {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
  color: #132a6d;
  border-top: 1px solid rgba(19, 42, 109, 0.15);
  padding-top: 0.85rem;
  text-align: right;
}

.week-card--alert .week-final {
  color: #c0392b;
}

label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  gap: 0.35rem;
}

select,
input {
  padding: 0.6rem 0.8rem;
  border: 1px solid #d6deed;
  border-radius: 0.7rem;
  font: inherit;
  color: inherit;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input:focus {
  border-color: #3c8bf7;
  box-shadow: 0 0 0 3px rgba(60, 139, 247, 0.25);
  outline: none;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 1rem;
}

.table-scroll table {
  min-width: 720px;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 1rem;
  overflow: hidden;
  background-color: #fff;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
}

thead {
  background-color: #132a6d;
  color: #fff;
}

tbody tr:nth-child(even) {
  background-color: #f1f5ff;
}

tbody tr:hover {
  background-color: rgba(60, 139, 247, 0.12);
}

.positive {
  color: #0a8a3b;
  font-weight: 600;
}

.negative {
  color: #c0392b;
  font-weight: 600;
}

.pending-positive {
  color: rgba(10, 138, 59, 0.6);
  font-weight: 600;
}

.pending-negative {
  color: rgba(192, 57, 43, 0.6);
  font-weight: 600;
}

.pending-neutral {
  color: #7b869c;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--pending {
  background-color: rgba(243, 156, 18, 0.18);
  color: #c47a06;
}

.badge--validated {
  background-color: rgba(10, 138, 59, 0.15);
  color: #0a8a3b;
}

.badge--archived {
  background-color: rgba(76, 90, 120, 0.15);
  color: #4c5a78;
}

.badge--carried {
  background-color: rgba(192, 57, 43, 0.16);
  color: #922b21;
}

.data-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 15px 35px rgba(24, 36, 59, 0.1);
}

.data-form h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #132a6d;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-actions {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.primary {
  align-self: flex-start;
  border: none;
  background-color: #3c8bf7;
  color: #fff;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  border-radius: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary:hover,
.primary:focus {
  background-color: #1f6ede;
  transform: translateY(-1px);
}

.ghost {
  border: 1px solid rgba(19, 42, 109, 0.25);
  background-color: transparent;
  color: #132a6d;
  padding: 0.6rem 1.2rem;
  border-radius: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost:hover,
.ghost:focus {
  background-color: rgba(19, 42, 109, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.records {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

#recurring-form {
  margin-top: 1.5rem;
}

.records h3 {
  margin: 0 0 0.75rem;
  color: #132a6d;
}

.parameters-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

#entity-list {
  display: grid;
  gap: 1rem;
}

.entity-item {
  background: #f1f5ff;
  border-left: 4px solid #3c8bf7;
  padding: 1rem 1.25rem;
  border-radius: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.entity-header strong {
  font-size: 1.05rem;
}

.recurring-grid {
  display: grid;
  gap: 1rem;
}

.recurring-item {
  background: #fff;
  border-left: 4px solid #3c8bf7;
  padding: 1rem 1.25rem;
  border-radius: 0.8rem;
  box-shadow: 0 12px 24px rgba(24, 36, 59, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recurring-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.recurring-meta {
  font-size: 0.9rem;
  color: #4c5a78;
}

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

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.bank-row span {
  display: inline-block;
  color: #132a6d;
}

.action-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.action-button {
  border: none;
  background-color: rgba(19, 42, 109, 0.08);
  color: #132a6d;
  padding: 0.35rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.action-button:hover,
.action-button:focus {
  background-color: rgba(60, 139, 247, 0.25);
  transform: translateY(-1px);
  outline: none;
}

.action-button.danger {
  background-color: rgba(192, 57, 43, 0.14);
  color: #922b21;
}

.app-footer {
  text-align: center;
  font-size: 0.85rem;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(60, 139, 247, 0.6);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(60, 139, 247, 0);
  }
}

@media (max-width: 768px) {
  .tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }

  .tab-button {
    flex: 1 1 30%;
    text-align: center;
  }

  th,
  td {
    font-size: 0.9rem;
    padding: 0.65rem;
  }
}
