﻿@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0a10;
  --bg-soft: #120f18;
  --card: rgba(20, 18, 26, 0.9);
  --text: #e7e9f0;
  --muted: #9aa3b2;
  --primary: #7d0080;
  --primary-strong: #b400b8;
  --accent: #ff47ff;
  --border: #2a2433;
  --success: #22c55e;
  --success-soft: #34d399;
  --danger: #f97316;
  --danger-soft: #f87171;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  --secondary: #e8c441;
}

* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #15121f 0%, var(--bg) 48%, #07060b 100%);
  color: var(--text);
  position: relative;
  overflow-x: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/logo.png") center/55vw no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

body.login-body::before {
  display: none;
}

.header-center {
  display: none;
}

.brand-logo {
  display: none !important;
}

.header-center {
  display: none !important;
}

header {
  padding: 32px 24px 8px;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 8px;
}

p {
  margin: 0 0 12px;
  color: var(--muted);
}

main {
  padding: 16px 24px 110px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(42, 36, 51, 0.9);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.main-panel {
  background: transparent;
  border-color: rgba(42, 36, 51, 0.5);
  box-shadow: none;
}

.section-title--center {
  justify-content: center;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 16, 24, 0.85);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2b2136, #1b1725);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #d7c8ea;
}

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

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(232, 196, 65, 0.18);
  color: #f6e9a9;
  font-weight: 600;
  font-size: 12px;
}

button,
.btn {
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 0 10px rgba(125, 0, 128, 0.35), 0 0 16px rgba(255, 71, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button.secondary,
.btn.secondary {
  background: rgba(232, 196, 65, 0.12);
  color: var(--secondary);
  border: 1px solid rgba(232, 196, 65, 0.4);
  box-shadow: 0 0 8px rgba(232, 196, 65, 0.35);
}

button.ghost,
.btn.ghost {
  background: rgba(20, 18, 26, 0.75);
  color: #d2c7e0;
  border: 1px solid var(--border);
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(125, 0, 128, 0.3), 0 0 18px rgba(255, 71, 255, 0.28);
  filter: brightness(1.08);
}

.table button,
.table .btn,
#invoice-pagination button,
#invoice-pagination .btn,
#bank-pagination button,
#bank-pagination .btn {
  box-shadow: none;
  background: rgba(26, 22, 34, 0.85);
  border: 1px solid var(--border);
  color: var(--text);
}

.table button.secondary,
.table .btn.secondary,
#invoice-pagination button.secondary,
#invoice-pagination .btn.secondary,
#bank-pagination button.secondary,
#bank-pagination .btn.secondary {
  background: rgba(232, 196, 65, 0.12);
  color: var(--secondary);
  border-color: rgba(232, 196, 65, 0.4);
  box-shadow: none;
}

.table button:hover,
.table .btn:hover,
#invoice-pagination button:hover,
#invoice-pagination .btn:hover,
#bank-pagination button:hover,
#bank-pagination .btn:hover {
  box-shadow: none;
  filter: none;
}

button.secondary:hover,
.btn.secondary:hover {
  box-shadow: 0 10px 20px rgba(232, 196, 65, 0.35), 0 0 16px rgba(232, 196, 65, 0.28);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  background: rgba(17, 16, 22, 0.9);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 0, 128, 0.35);
}

.navbar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  background: rgba(18, 16, 24, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  justify-content: space-around;
  padding: 12px 16px;
  z-index: 10;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.navbar a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
}

.navbar a.active {
  color: #f6e9a9;
  background: rgba(232, 196, 65, 0.18);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.table tbody tr:hover {
  background: rgba(226, 232, 240, 0.4);
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.table td.expense-cell {
  cursor: pointer;
  transition: background 0.2s ease;
}

.table td.expense-cell:hover {
  background: rgba(232, 196, 65, 0.12);
}

.progress {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
  position: relative;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  position: relative;
  z-index: 1;
}

.progress-over {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.progress-over.positive {
  color: #22a862;
}

.progress-over.negative {
  color: #e25555;
}

.progress span.progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background-color: rgba(34, 168, 98, 0.95);
  display: block;
  height: 100%;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0px,
    rgba(255, 255, 255, 0.35) 6px,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0) 12px
  );
  z-index: 2;
}

.progress span.progress-overlay--danger {
  background-color: rgba(231, 86, 86, 0.95);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0px,
    rgba(255, 255, 255, 0.35) 6px,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0) 12px
  );
}

.progress span.progress-overlay--warning {
  background-color: rgba(231, 86, 86, 0.95);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.35) 0px,
    rgba(255, 255, 255, 0.35) 6px,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0) 12px
  );
}

.progress-muted {
  opacity: 0.5;
}

.dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  width: min(520px, 90vw);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
  background: rgba(18, 16, 24, 0.98);
}

.dialog header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.dialog main {
  padding: 20px;
}

.dialog footer {
  padding: 16px 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(10, 8, 14, 0.96), rgba(12, 9, 18, 0.9)),
    url("assets/login-bg.png") center/cover no-repeat;
}

.login-card {
  width: min(420px, 92vw);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 10, 18, 0.85);
  box-sizing: border-box;
}

.login-logo {
  width: min(180px, 60vw);
  margin: 0 auto;
  display: block;
}

.header-center {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  width: 220px;
}

.brand-logo {
  width: 140px;
  max-width: 180px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.actions-right {
  justify-content: flex-end;
}

.bank-month-filter {
  text-transform: uppercase;
  font-size: 11px;
}

.dashboard-filters {
  margin-bottom: 8px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi strong {
  font-size: 22px;
}

.kpi-value {
  font-family: "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: -0.01em;
}

.kpi-value--neutral {
  color: #e7e9f0;
}

.kpi-value--danger {
  color: #ff8a65;
}

.kpi-value--success {
  color: #5dff9a;
}

.kpi-value--warning {
  color: #f59e0b;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 196, 65, 0.18);
  color: #f6e9a9;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status {
  font-weight: 600;
  color: var(--success);
}

.status.pending {
  color: var(--danger);
}

.status--paid {
  color: var(--success-soft);
}

.status--pending {
  color: var(--danger-soft);
}

.status--urgent {
  color: #f97316;
}

.status--confirm {
  color: rgba(100, 116, 139, 0.8);
}

.footer-note {
  font-size: 12px;
  color: var(--muted);
}

.card.kpi {
  background: linear-gradient(135deg, rgba(22, 20, 30, 0.95), rgba(26, 22, 34, 0.9));
  border-color: rgba(58, 46, 74, 0.6);
}

.kpi-subvalue {
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.kpi-subvalue--warning {
  color: #f97316;
}

.kpi-subvalue--success {
  color: var(--success-soft);
}

.kpi-subvalue--danger {
  color: #f87171;
}

.inline-actions {
  align-items: center;
}

.action-row {
  justify-content: flex-end;
  width: 100%;
}

.action-row .footer-note {
  align-self: center;
}

.actions-inline {
  justify-content: flex-start;
}

.actions-inline button {
  padding: 6px 10px;
  font-size: 12px;
}

.bank-account-card {
  position: relative;
}

.bank-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bank-account-delete {
  width: 28px;
  height: 28px;
  font-size: 16px;
  color: #ef4444;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-meta {
  font-size: 12px;
  color: rgba(100, 116, 139, 0.7);
}

.action-row--center {
  justify-content: center;
}

.is-loading {
  opacity: 0.6;
  pointer-events: none;
  filter: grayscale(0.2);
}

.loading-dots::after {
  content: "...";
  display: inline-block;
  width: 0ch;
  overflow: hidden;
  animation: loadingDots 1.2s steps(4, end) infinite;
}

@keyframes loadingDots {
  0% {
    width: 0ch;
  }
  100% {
    width: 3ch;
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.btn-large {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 16px;
}

.icon-button {
  background: rgba(18, 16, 24, 0.9);
  color: #f6e9a9;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  font-weight: 600;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  line-height: 1;
  font-size: 18px;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.icon-button:focus {
  outline: none;
  box-shadow: none;
}

.icon-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

#dialog-day header {
  display: flex;
  align-items: center;
  gap: 12px;
}

#dialog-day header h3 {
  margin: 0;
  flex: 1;
}

#dialog-day header .icon-button:first-child {
  margin-left: -18px;
}

.profile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(18, 16, 24, 0.9);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: rgba(30, 26, 38, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #e7e9f0;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: #e7e9f0;
}

.profile-role {
  font-size: 12px;
  font-weight: 700;
  color: rgba(212, 200, 226, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  padding: 0;
}

.profile-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  color: #b4b1bf;
  display: none;
}

.profile-card.is-open .profile-details {
  display: block;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
}

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

.day-cell {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px;
  min-height: 92px;
  background: rgba(18, 16, 24, 0.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.day-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.day-cell.is-empty {
  background: transparent;
  border-style: dashed;
  cursor: default;
  box-shadow: none;
}

.day-cell.has-budget {
  background: rgba(255, 236, 170, 0.55);
  border-color: rgba(255, 214, 120, 0.65);
}

.day-cell.has-actual {
  background: rgba(178, 255, 210, 0.52);
  border-color: rgba(120, 240, 180, 0.65);
}

.day-cell.is-closed {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  color: #f3f1f8;
}

.day-number {
  font-weight: 600;
  color: #f8f7ff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.day-meta {
  font-size: 11px;
  color: rgba(245, 243, 255, 0.78);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-card strong {
  font-size: 18px;
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.table-compact th,
.table-compact td {
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.table .total-row td {
  font-weight: 700;
  background: rgba(18, 16, 24, 0.7);
  backdrop-filter: blur(8px);
}

.expense-breakdown {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(17, 15, 24, 0.7);
}

.expense-breakdown h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

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

.expense-breakdown li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.expense-breakdown li span {
  color: var(--muted);
}

.expense-breakdown li strong {
  color: var(--text);
  font-weight: 600;
}

.expense-breakdown-total {
  margin: 10px 0 0;
  color: #f6e9a9;
  font-weight: 700;
  font-size: 13px;
}

.expense-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(17, 15, 24, 0.55);
}

.expense-current span {
  color: var(--muted);
  font-size: 13px;
}

.expense-current strong {
  color: #f6e9a9;
  font-size: 15px;
}

.add-sales {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.add-sales .btn-large {
  width: 100%;
}

.day-cell.is-locked {
  opacity: 0.6;
  pointer-events: none;
}

.panel-slide {
  animation: panelSlideIn 0.18s ease;
}

@keyframes panelSlideIn {
  from {
    transform: translateX(12px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  min-height: 180px;
  overflow: auto;
}

.ocr-details {
  margin-top: 12px;
}

.ocr-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-strong);
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .login-page {
    background-position: left center;
    padding: 16px;
  }

  .login-logo {
    width: min(160px, 55vw);
  }

  .login-card {
    width: 100%;
    max-width: 360px;
    padding: 18px;
    margin: 0 auto;
  }

  .login-card h1 {
    font-size: 20px;
    line-height: 1.25;
  }

  .login-card label {
    font-size: 13px;
  }

  .login-card input {
    font-size: 14px;
    padding: 10px 12px;
  }

  .login-card button {
    font-size: 14px;
    padding: 12px 16px;
  }

  .navbar {
    width: min(92vw, 360px);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 12px;
    align-items: center;
    justify-content: center;
  }

  .navbar a {
    text-align: center;
    font-size: 12px;
    padding: 8px 10px;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 calc(33.333% - 12px);
    max-width: calc(33.333% - 12px);
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-row .account-link {
    order: -1;
    align-self: flex-end;
    margin-left: auto;
    margin-bottom: 8px;
  }

  .header-center {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 12px;
  }

  .account-link {
    align-self: flex-end;
  }

  .card {
    padding: 16px;
  }

  .kpi strong {
    font-size: 18px;
  }

  .inline-actions {
    flex-wrap: wrap;
  }

  .inline-actions > * {
    max-width: 100%;
  }

  .page-invoices .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-invoices .section-title .inline-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .page-invoices .section-title .inline-actions > * {
    flex: 1 1 auto;
    min-width: 140px;
  }

  .page-cashflow .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-cashflow .section-title .inline-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .page-cashflow .section-title .inline-actions > * {
    flex: 1 1 auto;
    min-width: 140px;
  }

  .page-billing .card {
    min-width: 0;
    max-width: 100%;
  }

  .page-billing .table-scroll {
    max-width: 100%;
  }

  .page-billing .table-scroll .table {
    width: max-content;
    min-width: 100%;
  }

  .page-billing .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .table-scroll {
    -webkit-overflow-scrolling: touch;
  }

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

  .page-cashflow #bank-accounts {
    grid-template-columns: 1fr;
  }

  .page-cashflow .cashflow-summary-grid {
    grid-template-columns: 1fr;
  }

  .page-cashflow .card,
  .page-cashflow .cashflow-summary-grid .card {
    min-width: 0;
    max-width: 100%;
  }

  .page-cashflow .table-scroll {
    max-width: 100%;
  }

  .page-cashflow .table-scroll .table {
    width: max-content;
    min-width: 100%;
  }

  .page-invoices .card {
    min-width: 0;
    max-width: 100%;
  }

  .page-invoices .table-scroll {
    max-width: 100%;
  }

  .page-invoices .table-scroll .table {
    width: max-content;
    min-width: 100%;
  }

  .page-account .card {
    min-width: 0;
    max-width: 100%;
  }

  .page-account .table-scroll {
    max-width: 100%;
  }

  .page-account .table-scroll .table {
    width: max-content;
    min-width: 100%;
  }

  .page-budget .card {
    min-width: 0;
    max-width: 100%;
  }

  .page-budget .table-scroll {
    max-width: 100%;
  }

  .page-budget .table-scroll .table {
    width: max-content;
    min-width: 100%;
  }

  .main-panel .grid {
    grid-template-columns: 1fr;
  }

  .main-panel .grid.cols-2,
  .main-panel .grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .main-panel .card {
    width: 100%;
    max-width: 100%;
  }

  .main-panel .section-title h2 {
    font-size: 18px;
  }

  .main-panel .section-title {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .main-panel .section-title select,
  .main-panel .section-title .ghost {
    width: 100%;
    max-width: 100%;
  }

  .main-panel .progress-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .budget-providers-table th:nth-child(1),
  .budget-providers-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 110px;
    background: rgba(16, 14, 22, 0.95);
  }

  .budget-providers-table th:nth-child(1) {
    z-index: 3;
  }

  .bank-account-card p,
  .bank-account-card .footer-note {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .bank-history-table th:nth-child(1),
  .bank-history-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 96px;
    background: rgba(16, 14, 22, 0.95);
  }

  .bank-history-table th:nth-child(2),
  .bank-history-table td:nth-child(2) {
    position: sticky;
    left: 96px;
    z-index: 2;
    min-width: 120px;
    background: rgba(16, 14, 22, 0.95);
    box-shadow: 6px 0 12px rgba(5, 5, 12, 0.35);
  }

  .bank-history-table th:nth-child(1),
  .bank-history-table th:nth-child(2) {
    z-index: 3;
  }

  .action-row {
    justify-content: center;
  }

  .action-row button {
    flex: 1 1 100%;
  }

  .action-row--split button {
    flex: 1 1 calc(50% - 6px);
  }

  .action-row .footer-note {
    flex-basis: 100%;
    text-align: center;
  }

  .calendar-grid {
    gap: 8px;
  }

  .day-cell {
    min-height: 78px;
  }

  .day-number {
    font-size: 12px;
  }

  .day-meta {
    font-size: 10px;
    line-height: 1.2;
  }
}



