:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg-soft: #0b1020;
  --surface: #101728;
  --surface-2: #131c31;
  --surface-3: #17223a;
  --surface-hover: #1a2641;
  --text: #f3f6ff;
  --text-soft: #c8d0e3;
  --muted: #8894ad;
  --border: #25314a;
  --border-soft: rgba(132, 151, 188, 0.14);
  --purple: #8b5cf6;
  --purple-strong: #6d3ee8;
  --purple-soft: rgba(139, 92, 246, 0.15);
  --blue: #3b82f6;
  --blue-strong: #2563eb;
  --blue-soft: rgba(59, 130, 246, 0.15);
  --green: #22c985;
  --green-strong: #0fa968;
  --green-soft: rgba(34, 201, 133, 0.14);
  --red: #fb7185;
  --red-strong: #e84d68;
  --red-soft: rgba(251, 113, 133, 0.14);
  --orange: #f7b955;
  --orange-soft: rgba(247, 185, 85, 0.15);
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.36);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --sidebar-width: 280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% -10%, rgba(59, 130, 246, 0.14), transparent 30%),
    radial-gradient(circle at 12% 12%, rgba(139, 92, 246, 0.1), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.32);
  outline-offset: 2px;
}

::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #080c16;
}

::-webkit-scrollbar-thumb {
  background: #273550;
  border: 2px solid #080c16;
  border-radius: 999px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 25px 19px 20px;
  overflow-y: auto;
  border-right: 1px solid rgba(130, 149, 184, 0.14);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.08), transparent 24%),
    linear-gradient(180deg, #0c111f 0%, #090d17 100%);
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.18);
}

.brand,
.auth-logo {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand {
  padding: 0 7px 28px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: linear-gradient(145deg, #7650f2 0%, #335adf 58%, #158761 120%);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.8px;
  box-shadow: 0 14px 30px rgba(77, 67, 220, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand strong,
.auth-logo strong {
  display: block;
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.brand small,
.auth-logo small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-caption {
  margin: 3px 13px 10px;
  color: #68748e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 48px;
  padding: 10px 13px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #aeb8cd;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.sidebar-nav a::before {
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.sidebar-nav a:hover {
  border-color: rgba(127, 147, 187, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  transform: translateX(2px);
}

.sidebar-nav a.active {
  border-color: rgba(139, 92, 246, 0.24);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.07));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-nav a.active::before {
  background: linear-gradient(180deg, var(--purple), var(--blue));
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.6);
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #9eabca;
  font-size: 17px;
  transition: 0.2s ease;
}

.sidebar-nav a.active .nav-icon {
  background: rgba(139, 92, 246, 0.18);
  color: #d8ccff;
}

.sidebar-tip {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 11px;
  margin-top: auto;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid rgba(89, 130, 246, 0.18);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.09), rgba(139, 92, 246, 0.07));
}

.sidebar-tip-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--purple-soft);
  color: #c9b8ff;
  font-size: 15px;
}

.sidebar-tip strong {
  display: block;
  margin-top: 1px;
  color: #dce4f8;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.sidebar-tip p {
  margin: 6px 0 0;
  color: #8895af;
  font-size: 10px;
  line-height: 1.55;
}

.sidebar-user {
  display: grid;
  grid-template-columns: 40px 1fr 30px;
  align-items: center;
  gap: 10px;
  padding: 16px 5px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user strong {
  display: block;
  overflow: hidden;
  color: #eef2fb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #717d96;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.13));
  color: #d8ccff;
  font-weight: 850;
}

.avatar.large {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 16px;
}

.logout-link {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #7d89a1;
  font-size: 18px;
  transition: 0.2s ease;
}

.logout-link:hover {
  background: var(--red-soft);
  color: var(--red);
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  max-width: 1680px;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 22px 36px 36px;
}

.desktop-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 35px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
}

.online-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.25px;
}

.online-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(34, 201, 133, 0.7);
}

.topbar-date {
  padding: 7px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.mobile-header,
.bottom-nav {
  display: none;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
}

.page-heading > div {
  min-width: 0;
}

.page-heading h1 {
  margin: 5px 0 7px;
  color: #fff;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -1.35px;
  line-height: 1.06;
}

.page-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.eyebrow,
.panel-kicker,
.auth-step {
  color: #9e87ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, var(--purple-strong), var(--blue-strong));
  box-shadow: 0 14px 30px rgba(68, 64, 218, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button.primary:hover {
  box-shadow: 0 17px 38px rgba(68, 64, 218, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button.secondary {
  border-color: var(--border);
  background: var(--surface-3);
  color: var(--text-soft);
}

.button.secondary:hover {
  border-color: rgba(139, 92, 246, 0.35);
  color: #fff;
}

.full {
  grid-column: 1 / -1;
  width: 100%;
}

.organization-banner {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) minmax(240px, 0.56fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 17px;
  padding: 20px 22px;
  overflow: hidden;
  border: 1px solid rgba(90, 133, 229, 0.22);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(115deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08) 55%, rgba(34, 201, 133, 0.06)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.organization-banner.warning {
  border-color: rgba(247, 185, 85, 0.25);
  background: linear-gradient(115deg, rgba(247, 185, 85, 0.11), rgba(139, 92, 246, 0.07)), var(--surface);
}

.organization-banner.danger {
  border-color: rgba(251, 113, 133, 0.27);
  background: linear-gradient(115deg, rgba(251, 113, 133, 0.11), rgba(59, 130, 246, 0.06)), var(--surface);
}

.organization-banner.success {
  border-color: rgba(34, 201, 133, 0.25);
  background: linear-gradient(115deg, rgba(34, 201, 133, 0.1), rgba(59, 130, 246, 0.06)), var(--surface);
}

.organization-icon,
.context-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.26);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.13));
  color: #cbbdff;
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.organization-copy span {
  color: #8e9ab4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.organization-copy h2 {
  margin: 5px 0 4px;
  color: #fff;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.organization-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.organization-progress {
  padding: 12px 14px;
  border: 1px solid rgba(128, 146, 179, 0.12);
  border-radius: 15px;
  background: rgba(5, 9, 17, 0.25);
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: #a9b3c8;
  font-size: 10px;
}

.progress-label strong {
  color: #fff;
  font-size: 13px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #202a41;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purple));
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.38);
}

.organization-progress small {
  display: block;
  margin-top: 8px;
  color: #76839d;
  font-size: 9px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 15px;
}

.stat-card {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)), var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  position: absolute;
  right: -20px;
  bottom: -36px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
  content: "";
}

.stat-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 14px;
  background: var(--purple-soft);
  color: #c7b6ff;
  font-size: 19px;
  font-weight: 900;
}

.stat-card.income .stat-icon {
  border-color: rgba(34, 201, 133, 0.2);
  background: var(--green-soft);
  color: var(--green);
}

.stat-card.expense .stat-icon,
.stat-card.negative .stat-icon {
  border-color: rgba(251, 113, 133, 0.2);
  background: var(--red-soft);
  color: var(--red);
}

.stat-card.pending .stat-icon {
  border-color: rgba(247, 185, 85, 0.2);
  background: var(--orange-soft);
  color: var(--orange);
}

.stat-card > div {
  min-width: 0;
}

.stat-card small,
.stat-card span:not(.stat-icon) {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card strong {
  display: block;
  margin: 4px 0;
  overflow: hidden;
  color: #fff;
  font-size: clamp(17px, 1.7vw, 22px);
  letter-spacing: -0.6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: var(--border-soft);
}

.quick-overview > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  background: rgba(16, 23, 40, 0.96);
}

.quick-overview p {
  min-width: 0;
  margin: 0;
}

.quick-overview small,
.quick-overview strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-overview small {
  color: var(--muted);
  font-size: 9px;
}

.quick-overview strong {
  margin-top: 3px;
  color: #eaf0fc;
  font-size: 13px;
}

.quick-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #7f8aa1;
  box-shadow: 0 0 12px currentColor;
}

.quick-dot.blue { background: var(--blue); color: var(--blue); }
.quick-dot.purple { background: var(--purple); color: var(--purple); }
.quick-dot.green { background: var(--green); color: var(--green); }
.quick-dot.red { background: var(--red); color: var(--red); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.78fr);
  gap: 15px;
}

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.018), transparent 34%), var(--surface);
  box-shadow: var(--shadow-sm);
}

.large-panel {
  grid-row: span 2;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.panel-header h2 {
  margin: 4px 0 4px;
  color: #f5f7fd;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.panel-header > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  color: #9fb5ff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-header > a:hover {
  background: var(--blue-soft);
  color: #d7e2ff;
}

.transaction-list {
  display: grid;
}

.transaction-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}

.transaction-row:last-child {
  border-bottom: 0;
}

.transaction-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 13px;
  background: var(--purple-soft);
  color: #c5b4ff;
  font-size: 16px;
  font-weight: 850;
}

.transaction-icon.income {
  border-color: rgba(34, 201, 133, 0.18);
  background: var(--green-soft);
  color: var(--green);
}

.transaction-icon.expense {
  border-color: rgba(251, 113, 133, 0.16);
  background: var(--red-soft);
  color: var(--red);
}

.transaction-main {
  min-width: 0;
  flex: 1;
}

.transaction-main strong,
.transaction-main small,
.transaction-value strong,
.transaction-value small {
  display: block;
}

.transaction-main strong {
  overflow: hidden;
  color: #edf2fd;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-main small,
.transaction-value small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.transaction-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-value {
  min-width: 105px;
  text-align: right;
}

.transaction-value strong {
  color: #e9edf8;
  font-size: 12px;
  white-space: nowrap;
}

.transaction-value.income strong,
.text-income {
  color: var(--green) !important;
}

.transaction-value.expense strong,
.text-expense {
  color: var(--red) !important;
}

.text-warning {
  color: var(--orange) !important;
}

.status-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid rgba(247, 185, 85, 0.17);
  border-radius: 999px;
  background: var(--orange-soft);
  color: #f7c875;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.status-chip.paid {
  border-color: rgba(34, 201, 133, 0.18);
  background: var(--green-soft);
  color: #73dfae;
}

.status-chip.pending {
  border-color: rgba(247, 185, 85, 0.18);
  background: var(--orange-soft);
  color: #f8ca76;
}

.compact-list {
  display: grid;
  gap: 4px;
}

.compact-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border-soft);
}

.compact-item:last-child {
  border-bottom: 0;
}

.compact-item > div {
  min-width: 0;
}

.compact-item strong,
.compact-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item strong {
  color: #e8edf8;
  font-size: 11px;
}

.compact-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.priority-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.priority-dot.low { background: var(--green); box-shadow: 0 0 10px rgba(34, 201, 133, 0.5); }
.priority-dot.medium { background: var(--orange); box-shadow: 0 0 10px rgba(247, 185, 85, 0.45); }
.priority-dot.high { background: var(--red); box-shadow: 0 0 10px rgba(251, 113, 133, 0.5); }

.reminder-date {
  display: grid;
  width: 38px;
  height: 42px;
  flex: 0 0 38px;
  place-content: center;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 11px;
  background: var(--blue-soft);
  color: #bfd0ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.reminder-date small {
  margin-top: 4px;
  color: #7da4ff;
  font-size: 7px;
  letter-spacing: 0.5px;
}

.empty-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 70px;
  color: var(--muted);
  font-size: 10px;
}

.empty-mini > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--purple-soft);
  color: #beaaff;
}

.empty-mini p {
  margin: 0;
}

.empty-state {
  display: grid;
  min-height: 245px;
  place-items: center;
  align-content: center;
  padding: 30px 15px;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 17px;
  background: var(--purple-soft);
  color: #c5b4ff;
  font-size: 22px;
}

.empty-state h3 {
  margin: 0 0 6px;
  color: #f0f3fb;
  font-size: 14px;
}

.empty-state p {
  max-width: 360px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.context-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 16px 18px;
  border: 1px solid rgba(83, 124, 217, 0.19);
  border-radius: 17px;
  background: linear-gradient(110deg, rgba(59, 130, 246, 0.09), rgba(139, 92, 246, 0.055)), var(--surface);
}

.context-banner .context-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  font-size: 18px;
}

.context-banner strong {
  display: block;
  color: #e9eefb;
  font-size: 12px;
}

.context-banner p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.task-banner {
  border-color: rgba(139, 92, 246, 0.2);
  background: linear-gradient(110deg, rgba(139, 92, 246, 0.09), rgba(59, 130, 246, 0.05)), var(--surface);
}

.reminder-banner {
  border-color: rgba(59, 130, 246, 0.2);
}

.people-banner {
  border-color: rgba(34, 201, 133, 0.19);
  background: linear-gradient(110deg, rgba(34, 201, 133, 0.075), rgba(59, 130, 246, 0.05)), var(--surface);
}

.month-filter label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.month-filter input {
  width: 175px;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  color-scheme: dark;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.mini-stats > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: var(--surface);
}

.mini-stats p {
  min-width: 0;
  margin: 0;
}

.mini-stats small,
.mini-stats strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-stats small {
  color: var(--muted);
  font-size: 9px;
}

.mini-stats strong {
  margin-top: 4px;
  color: #edf1fb;
  font-size: 14px;
}

.mini-stat-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border-radius: 11px;
  background: var(--purple-soft);
  color: #beaaff;
  font-weight: 850;
}

.mini-stat-icon.income { background: var(--green-soft); color: var(--green); }
.mini-stat-icon.expense { background: var(--red-soft); color: var(--red); }
.mini-stat-icon.pending { background: var(--orange-soft); color: var(--orange); }
.mini-stat-icon.balance { background: var(--blue-soft); color: var(--blue); }

.content-grid {
  display: grid;
  gap: 15px;
}

.form-list-grid {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.38fr);
  align-items: start;
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

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

.field {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span {
  color: #9aa6bd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1120;
  color: #f1f4fb;
  font-size: 12px;
  transition: 0.2s ease;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.5;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #56627a;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #334260;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(139, 92, 246, 0.65);
  background: #0d1425;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
  outline: 0;
}

.field input[type="date"],
.field input[type="datetime-local"],
.field input[type="month"] {
  color-scheme: dark;
}

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

.password-toggle {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-3);
  color: #9eabca;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.password-toggle:hover {
  color: #fff;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #0b1120;
}

.segmented label {
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #8490a8;
  font-size: 11px;
  font-weight: 800;
  transition: 0.2s ease;
}

.segmented input:checked + span {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(59, 130, 246, 0.18));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.28);
}

.icon-button,
.check-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: #aeb8cc;
  cursor: pointer;
  transition: 0.2s ease;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
}

.icon-button:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: var(--blue-soft);
  color: #cbd8ff;
}

.icon-button.danger:hover {
  border-color: rgba(251, 113, 133, 0.28);
  background: var(--red-soft);
  color: var(--red);
}

.task-list,
.reminder-list,
.people-list {
  display: grid;
}

.task-item,
.reminder-item,
.person-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.task-item:last-child,
.reminder-item:last-child,
.person-row:last-child {
  border-bottom: 0;
}

.check-button {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  font-size: 13px;
}

.check-button:hover,
.task-item.completed .check-button {
  border-color: rgba(34, 201, 133, 0.28);
  background: var(--green-soft);
  color: var(--green);
}

.task-main,
.reminder-main {
  min-width: 0;
  flex: 1;
}

.task-title-line,
.reminder-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.task-title-line strong,
.reminder-title-line strong {
  min-width: 0;
  overflow: hidden;
  color: #eaf0fb;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-main p,
.reminder-main p {
  margin: 5px 0 0;
  color: #8793aa;
  font-size: 10px;
  line-height: 1.5;
}

.task-main small,
.reminder-main small {
  display: block;
  margin-top: 6px;
  color: #69758e;
  font-size: 9px;
}

.task-item.completed,
.reminder-item.completed {
  opacity: 0.58;
}

.task-item.completed .task-main strong,
.reminder-item.completed .reminder-main strong {
  text-decoration: line-through;
}

.priority-badge,
.role-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid rgba(247, 185, 85, 0.17);
  border-radius: 999px;
  background: var(--orange-soft);
  color: #f7c875;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.priority-badge.low {
  border-color: rgba(34, 201, 133, 0.17);
  background: var(--green-soft);
  color: #72dfaE;
}

.priority-badge.high {
  border-color: rgba(251, 113, 133, 0.17);
  background: var(--red-soft);
  color: #ff9cab;
}

.calendar-box {
  display: grid;
  width: 47px;
  height: 51px;
  flex: 0 0 47px;
  place-content: center;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 14px;
  background: var(--blue-soft);
  text-align: center;
}

.calendar-box strong {
  color: #d7e1ff;
  font-size: 16px;
  line-height: 1;
}

.calendar-box small {
  margin-top: 5px;
  color: #76a0ff;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.6px;
}

.person-row > div {
  min-width: 0;
  flex: 1;
}

.person-row strong,
.person-row small,
.person-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-row strong {
  color: #edf1fb;
  font-size: 12px;
}

.person-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.person-row em {
  margin-top: 5px;
  color: #66728b;
  font-size: 8px;
  font-style: normal;
}

.role-badge {
  border-color: rgba(59, 130, 246, 0.17);
  background: var(--blue-soft);
  color: #9eb9ff;
}

.role-badge.owner {
  border-color: rgba(139, 92, 246, 0.2);
  background: var(--purple-soft);
  color: #c5b2ff;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 15px;
  padding: 13px 15px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 13px;
  background: var(--blue-soft);
  color: #cbd8ff;
  font-size: 11px;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}

.alert > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  font-weight: 900;
}

.alert-success {
  border-color: rgba(34, 201, 133, 0.23);
  background: var(--green-soft);
  color: #aeeccc;
}

.alert-success > span {
  background: rgba(34, 201, 133, 0.18);
}

.alert-error {
  border-color: rgba(251, 113, 133, 0.23);
  background: var(--red-soft);
  color: #ffc1cb;
}

.alert-error > span {
  background: rgba(251, 113, 133, 0.18);
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 18px 2px 4px;
  border-top: 1px solid var(--border-soft);
  color: #65718a;
  font-size: 9px;
}

.app-footer > span {
  color: #7f8ca4;
  font-weight: 800;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.2), transparent 27%),
    radial-gradient(circle at 85% 85%, rgba(34, 201, 133, 0.12), transparent 25%),
    linear-gradient(135deg, #070a12, #0a1020 54%, #07100e);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 1.06fr) minmax(430px, 0.94fr);
}

.auth-showcase {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 70px);
  overflow: hidden;
  border-right: 1px solid rgba(127, 145, 180, 0.12);
}

.auth-showcase::before,
.auth-showcase::after {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  content: "";
}

.auth-showcase::before {
  top: 18%;
  right: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 100px rgba(139, 92, 246, 0.08), inset 0 0 100px rgba(59, 130, 246, 0.05);
}

.auth-showcase::after {
  right: 18%;
  bottom: 12%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(34, 201, 133, 0.11), transparent 66%);
}

.auth-logo {
  position: relative;
  z-index: 1;
  width: max-content;
}

.showcase-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: auto 0;
  padding: 60px 0;
}

.showcase-copy h1 {
  max-width: 720px;
  margin: 13px 0 18px;
  color: #fff;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 800;
  letter-spacing: -2.8px;
  line-height: 0.99;
}

.showcase-copy p {
  max-width: 600px;
  margin: 0;
  color: #9ca9bf;
  font-size: 14px;
  line-height: 1.75;
}

.showcase-features {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.showcase-features > div {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 13px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.showcase-features > div > span {
  color: #6f7b94;
  font-size: 10px;
  font-weight: 850;
}

.showcase-features p {
  margin: 0;
}

.showcase-features strong,
.showcase-features small {
  display: block;
}

.showcase-features strong {
  color: #dfe6f5;
  font-size: 11px;
}

.showcase-features small {
  margin-top: 4px;
  color: #79869e;
  font-size: 9px;
  line-height: 1.5;
}

.auth-quote {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0;
  padding: 20px 22px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.04));
}

.auth-quote > span {
  color: #9b83ff;
  font-size: 28px;
  line-height: 0.8;
}

.auth-quote p {
  margin: 6px 0 0;
  color: #a4b0c4;
  font-size: 11px;
  line-height: 1.65;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(24px, 5vw, 70px);
}

.auth-card {
  width: min(100%, 480px);
  padding: clamp(25px, 4vw, 39px);
  border: 1px solid rgba(125, 145, 181, 0.16);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 30%), rgba(16, 23, 40, 0.93);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.auth-card.install-card {
  width: min(100%, 520px);
}

.auth-card-heading {
  margin-bottom: 22px;
}

.auth-card-heading h2 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: 25px;
  letter-spacing: -0.8px;
}

.auth-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.auth-form {
  gap: 14px;
}

.auth-form .field input {
  min-height: 48px;
}

.auth-form .button {
  min-height: 49px;
  margin-top: 2px;
}

.auth-note {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.auth-note > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: #9eb8ff;
  font-size: 10px;
  font-weight: 900;
}

.auth-note p {
  margin: 0;
  color: #7f8ca5;
  font-size: 9px;
  line-height: 1.6;
}

.auth-note strong {
  color: #aab5ca;
}

.install-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 10px;
  background: var(--purple-soft);
  color: #d2c5ff;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 1240px) {
  :root {
    --sidebar-width: 248px;
  }

  .sidebar-tip {
    display: none;
  }

  .main-content {
    padding-right: 25px;
    padding-left: 25px;
  }

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

  .organization-banner {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .organization-progress {
    grid-column: 1 / -1;
  }

  .form-list-grid {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  }
}

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

  .auth-showcase {
    min-height: auto;
    padding: 28px 26px 34px;
    border-right: 0;
    border-bottom: 1px solid rgba(127, 145, 180, 0.12);
  }

  .showcase-copy {
    padding: 55px 0 35px;
  }

  .showcase-copy h1 {
    max-width: 760px;
    font-size: clamp(36px, 8vw, 56px);
  }

  .showcase-features {
    display: none;
  }

  .auth-quote {
    margin-top: 15px;
  }

  .auth-panel {
    min-height: auto;
    padding: 34px 22px 50px;
  }

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

  .large-panel {
    grid-row: auto;
  }

  .form-list-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 90% -5%, rgba(59, 130, 246, 0.13), transparent 26%),
      var(--bg);
  }

  .sidebar,
  .desktop-topbar {
    display: none;
  }

  .main-content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding: 78px 14px 96px;
  }

  .mobile-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(125, 145, 181, 0.14);
    background: rgba(7, 10, 18, 0.88);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
  }

  .mobile-brand .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 11px;
    font-size: 11px;
  }

  .bottom-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 45;
    display: grid;
    height: 73px;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid rgba(125, 145, 181, 0.14);
    background: rgba(8, 12, 21, 0.94);
    box-shadow: 0 -15px 42px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
  }

  .bottom-nav a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 12px;
    color: #727f99;
  }

  .bottom-nav a > span {
    font-size: 17px;
    line-height: 1;
  }

  .bottom-nav a > small {
    font-size: 8px;
    font-weight: 750;
  }

  .bottom-nav a.active {
    background: rgba(139, 92, 246, 0.1);
    color: #c7b6ff;
  }

  .bottom-nav .quick-action {
    position: relative;
    top: -21px;
    width: 59px;
    height: 59px;
    justify-self: center;
    border: 5px solid #090d17;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--purple-strong), var(--blue-strong));
    color: #fff;
    box-shadow: 0 13px 28px rgba(70, 67, 220, 0.4);
  }

  .bottom-nav .quick-action > span {
    font-size: 25px;
  }

  .bottom-nav .quick-action > small {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .page-heading h1 {
    font-size: 27px;
    letter-spacing: -0.9px;
  }

  .page-heading p {
    font-size: 11px;
  }

  .page-heading > .button {
    display: none;
  }

  .month-filter label > span {
    display: none;
  }

  .month-filter input {
    width: 140px;
    height: 40px;
  }

  .organization-banner {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 13px;
    padding: 16px;
    border-radius: 19px;
  }

  .organization-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 17px;
  }

  .organization-copy h2 {
    font-size: 14px;
  }

  .organization-copy p {
    font-size: 10px;
  }

  .organization-progress {
    padding: 11px 12px;
  }

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

  .stat-card {
    align-items: flex-start;
    padding: 14px;
  }

  .stat-icon {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
    border-radius: 11px;
    font-size: 16px;
  }

  .stat-card strong {
    font-size: 15px;
  }

  .stat-card small,
  .stat-card span:not(.stat-icon) {
    font-size: 8px;
  }

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

  .quick-overview > div {
    padding: 11px 12px;
  }

  .context-banner {
    align-items: flex-start;
    padding: 14px;
  }

  .context-banner .context-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .panel {
    padding: 16px;
    border-radius: 17px;
  }

  .panel-header {
    margin-bottom: 14px;
  }

  .panel-header h2 {
    font-size: 14px;
  }

  .transaction-row {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 12px 0;
  }

  .transaction-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
  }

  .transaction-value {
    min-width: 0;
  }

  .transaction-value strong {
    font-size: 10px;
  }

  .transaction-row .status-chip {
    grid-column: 2;
    width: max-content;
    margin-top: -3px;
  }

  .transaction-row > form {
    position: absolute;
    right: 0;
    bottom: 9px;
  }

  .detailed .transaction-row {
    padding-bottom: 45px;
  }

  .detailed .transaction-row > form {
    bottom: 10px;
  }

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

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

  .task-item,
  .reminder-item,
  .person-row {
    align-items: flex-start;
  }

  .task-title-line,
  .reminder-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .person-row {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
  }

  .person-row .role-badge {
    grid-column: 2;
    width: max-content;
  }

  .app-footer {
    display: none;
  }

  .auth-layout {
    display: block;
  }

  .auth-showcase {
    min-height: 310px;
    padding: 23px 20px 30px;
  }

  .auth-logo .brand-mark {
    width: 39px;
    height: 39px;
    flex-basis: 39px;
    border-radius: 12px;
  }

  .showcase-copy {
    padding: 45px 0 15px;
  }

  .showcase-copy h1 {
    margin-top: 10px;
    font-size: 36px;
    letter-spacing: -1.7px;
  }

  .showcase-copy p {
    font-size: 11px;
  }

  .auth-quote {
    display: none;
  }

  .auth-panel {
    padding: 20px 14px 38px;
  }

  .auth-card {
    padding: 23px 18px;
    border-radius: 21px;
  }

  .auth-card-heading h2 {
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .page-heading {
    display: block;
  }

  .month-filter {
    margin-top: 13px;
  }

  .month-filter input {
    width: 100%;
  }

  .stats-grid,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    align-items: center;
  }

  .quick-overview {
    grid-template-columns: 1fr 1fr;
  }

  .reminder-item {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr) 31px;
  }

  .reminder-item > form:last-child {
    grid-column: 3;
  }
}

/* =========================================================
   Deline House 1.3 — camada visual e correção de contraste
   ========================================================= */

:root {
  --bg: #050812;
  --bg-soft: #080d19;
  --surface: #0e1626;
  --surface-2: #111c30;
  --surface-3: #16243b;
  --surface-hover: #1a2a45;
  --text: #f4f7ff;
  --text-soft: #cbd5e7;
  --muted: #8f9bb2;
  --border: #263650;
  --border-soft: rgba(135, 157, 198, 0.18);
  --shadow-sm: 0 18px 42px rgba(0, 0, 0, 0.34), 0 2px 8px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.5), 0 8px 22px rgba(0, 0, 0, 0.26);
}

html,
body,
body.app-page {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

body.app-page {
  background:
    radial-gradient(circle at 88% -10%, rgba(59, 130, 246, 0.2), transparent 31%),
    radial-gradient(circle at 18% 8%, rgba(139, 92, 246, 0.16), transparent 27%),
    linear-gradient(180deg, #070b15 0%, #050812 100%) !important;
}

.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  overflow: visible;
}

.brand-mark {
  box-shadow:
    0 15px 34px rgba(78, 67, 225, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sidebar {
  border-right-color: rgba(142, 158, 193, 0.18);
  background:
    radial-gradient(circle at 10% 6%, rgba(139, 92, 246, 0.15), transparent 24%),
    linear-gradient(180deg, #111329 0%, #0a0e1b 54%, #070b14 100%);
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.32);
}

.sidebar-nav a {
  min-height: 52px;
  border-radius: 15px;
}

.nav-icon {
  width: 31px;
  height: 31px;
  flex-basis: 31px;
  border: 1px solid rgba(139, 158, 198, 0.1);
  background: rgba(255, 255, 255, 0.035);
  font-size: 18px;
}

.nav-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.sidebar-nav a.active .nav-icon {
  border-color: rgba(139, 92, 246, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 22px rgba(64, 65, 200, 0.18);
}

.sidebar-tip {
  border-color: rgba(94, 135, 235, 0.24);
  background:
    linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.1)),
    rgba(8, 14, 26, 0.72);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.sidebar-tip-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.logout-link .ui-icon {
  width: 18px;
  height: 18px;
}

.main-content {
  position: relative;
  width: calc(100% - var(--sidebar-width));
  max-width: none;
  min-height: 100vh;
  padding: 25px 32px 40px;
  background:
    linear-gradient(180deg, rgba(17, 26, 45, 0.38), rgba(5, 8, 18, 0) 44%),
    transparent;
}

.main-content::before {
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 9%, rgba(57, 90, 220, 0.1), transparent 27%),
    radial-gradient(circle at 34% 100%, rgba(39, 199, 133, 0.055), transparent 31%);
  content: "";
}

.content-container {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.desktop-topbar {
  width: min(100%, 1480px);
  margin-right: auto;
  margin-left: auto;
}

.topbar-date {
  border-color: rgba(135, 157, 198, 0.16);
  background: rgba(14, 22, 38, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.page-heading {
  align-items: center;
  margin-bottom: 22px;
}

.page-heading h1 {
  font-size: clamp(30px, 3vw, 42px);
  letter-spacing: -1.55px;
}

.page-heading p {
  max-width: 820px;
  color: #9ca9c0;
  font-size: 13px;
}

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

.button.primary {
  min-height: 48px;
  padding-right: 20px;
  padding-left: 18px;
  border-color: rgba(170, 162, 255, 0.18);
  background: linear-gradient(135deg, #7041e8 0%, #3a63df 64%, #147d62 140%);
  box-shadow:
    0 16px 38px rgba(66, 61, 218, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.organization-banner {
  position: relative;
  isolation: isolate;
  min-height: 132px;
  margin-bottom: 18px;
  border-color: rgba(87, 130, 226, 0.32);
  background:
    linear-gradient(118deg, rgba(60, 104, 229, 0.18), rgba(112, 65, 232, 0.13) 54%, rgba(19, 138, 102, 0.09)),
    linear-gradient(180deg, #111c30 0%, #0d1626 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.organization-banner::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 12% 20%, rgba(139, 92, 246, 0.18), transparent 26%);
  content: "";
}

.organization-banner.success {
  background:
    linear-gradient(118deg, rgba(34, 201, 133, 0.16), rgba(59, 130, 246, 0.12) 54%, rgba(139, 92, 246, 0.09)),
    linear-gradient(180deg, #111d2c 0%, #0d1724 100%);
}

.organization-banner.warning {
  background:
    linear-gradient(118deg, rgba(247, 185, 85, 0.16), rgba(139, 92, 246, 0.11)),
    linear-gradient(180deg, #1a1a29 0%, #111522 100%);
}

.organization-banner.danger {
  background:
    linear-gradient(118deg, rgba(251, 113, 133, 0.16), rgba(59, 130, 246, 0.1)),
    linear-gradient(180deg, #1b1725 0%, #111522 100%);
}

.organization-icon {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.18));
  box-shadow: 0 12px 30px rgba(63, 73, 212, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.organization-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.organization-copy h2 {
  font-size: 19px;
}

.organization-copy p {
  max-width: 760px;
  color: #a6b2c8;
  font-size: 12.5px;
}

.organization-progress {
  border-color: rgba(137, 158, 198, 0.16);
  background: rgba(4, 8, 16, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.stats-grid {
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  min-height: 112px;
  padding: 19px;
  border-color: rgba(134, 155, 195, 0.2);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.035), transparent 40%),
    linear-gradient(180deg, #121d31 0%, #0e1728 100%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(139, 92, 246, 0.36);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4), 0 8px 26px rgba(45, 55, 160, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.stat-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  content: "";
  opacity: 0.72;
}

.stat-card.income::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
.stat-card.expense::before,
.stat-card.negative::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.stat-card.pending::before { background: linear-gradient(90deg, transparent, var(--orange), transparent); }

.stat-icon {
  width: 49px;
  height: 49px;
  flex-basis: 49px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.stat-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.stat-card small,
.stat-card span:not(.stat-icon) {
  color: #91a0b8;
}

.stat-card strong {
  color: #f8faff;
  font-size: clamp(19px, 1.6vw, 24px);
}

.quick-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 17px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quick-overview > div,
.quick-overview .quick-card {
  min-height: 68px;
  padding: 13px 15px;
  border: 1px solid rgba(134, 155, 195, 0.16);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(18, 29, 49, 0.92), rgba(13, 21, 36, 0.96));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.quick-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.9;
}

.quick-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.quick-card.blue .quick-icon { color: #73a6ff; background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.26); }
.quick-card.purple .quick-icon { color: #b69cff; background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.26); }
.quick-card.green .quick-icon { color: #4edba1; background: rgba(34, 201, 133, 0.11); border-color: rgba(34, 201, 133, 0.24); }
.quick-card.red .quick-icon { color: #ff91a4; background: rgba(251, 113, 133, 0.11); border-color: rgba(251, 113, 133, 0.24); }

.quick-overview small {
  color: #8998b0;
  font-size: 9.5px;
}

.quick-overview strong {
  color: #f2f6ff;
  font-size: 14px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.8fr);
  gap: 17px;
}

.panel {
  border-color: rgba(134, 155, 195, 0.2);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.03), transparent 34%),
    linear-gradient(180deg, #111c30 0%, #0d1626 100%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.large-panel {
  min-height: 458px;
}

.side-panel {
  min-height: 220px;
}

.panel-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(134, 155, 195, 0.12);
}

.panel-header h2 {
  color: #f7f9ff;
  font-size: 17px;
}

.panel-header p {
  color: #8795ad;
  font-size: 10.5px;
}

.panel-header > a {
  border: 1px solid rgba(89, 130, 229, 0.14);
  background: rgba(59, 130, 246, 0.055);
  color: #adc0ff;
}

.panel-header > a .ui-icon {
  width: 13px;
  height: 13px;
}

.panel-header > a:hover {
  border-color: rgba(89, 130, 229, 0.28);
  background: rgba(59, 130, 246, 0.12);
}

.empty-state {
  min-height: 300px;
}

.empty-state-icon,
.empty-state > span:first-child {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.26);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.11));
  color: #bcaaff;
  box-shadow: 0 12px 30px rgba(61, 61, 196, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.empty-state-icon .ui-icon,
.empty-state > span:first-child .ui-icon {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  color: #f1f5ff;
}

.empty-state p,
.empty-mini p {
  color: #8795ad;
}

.empty-mini > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(34, 201, 133, 0.2);
  border-radius: 11px;
  background: rgba(34, 201, 133, 0.08);
  color: var(--green);
}

.empty-mini > span .ui-icon {
  width: 17px;
  height: 17px;
}

.transaction-row {
  border-bottom-color: rgba(134, 155, 195, 0.12);
}

.transaction-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.transaction-main strong,
.compact-item strong {
  color: #edf2fc;
}

.compact-item {
  border-color: rgba(134, 155, 195, 0.12);
  background: rgba(6, 11, 20, 0.24);
}

.reminder-date {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.alert > span .ui-icon {
  width: 18px;
  height: 18px;
}

.bottom-nav .ui-icon {
  width: 20px;
  height: 20px;
}

.bottom-nav .quick-action .ui-icon {
  width: 26px;
  height: 26px;
}

.app-footer {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(134, 155, 195, 0.1);
  color: #7f8ca4;
}

@media (max-width: 1320px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.82fr);
  }
}

@media (max-width: 1240px) {
  .main-content {
    padding-right: 24px;
    padding-left: 24px;
  }

  .organization-banner {
    min-height: 0;
  }
}

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

  .large-panel,
  .side-panel {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  body.app-page {
    background:
      radial-gradient(circle at 90% -5%, rgba(59, 130, 246, 0.16), transparent 26%),
      linear-gradient(180deg, #070b15 0%, #050812 100%) !important;
  }

  .main-content {
    width: 100%;
    padding-right: 13px;
    padding-left: 13px;
  }

  .main-content::before {
    inset: 0;
  }

  .content-container,
  .desktop-topbar {
    width: 100%;
  }

  .mobile-header {
    background: rgba(7, 10, 18, 0.94);
  }

  .organization-banner {
    min-height: 0;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    min-height: 101px;
  }

  .quick-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .quick-overview > div,
  .quick-overview .quick-card {
    min-height: 64px;
  }

  .panel-header {
    padding-bottom: 12px;
  }
}

@media (max-width: 420px) {
  .quick-overview {
    grid-template-columns: 1fr 1fr;
  }

  .quick-overview > div,
  .quick-overview .quick-card {
    padding: 11px;
  }

  .quick-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }
}

/* Ícones vetoriais nas telas internas */
.context-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.mini-stat-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.icon-button .ui-icon,
.check-button .ui-icon {
  width: 16px;
  height: 16px;
}

.check-button .ui-icon {
  opacity: 0.28;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.check-button:hover .ui-icon,
.check-button.checked .ui-icon {
  opacity: 1;
  transform: scale(1.04);
}

.check-button.checked {
  border-color: rgba(34, 201, 133, 0.3);
  background: rgba(34, 201, 133, 0.13);
  color: var(--green);
}

.auth-note > span .ui-icon {
  width: 14px;
  height: 14px;
}

.context-banner {
  border-color: rgba(134, 155, 195, 0.2);
  background:
    linear-gradient(120deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.08)),
    linear-gradient(180deg, #111c30 0%, #0d1626 100%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.mini-stats > div {
  border-color: rgba(134, 155, 195, 0.18);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.028), transparent 45%),
    linear-gradient(180deg, #111c30 0%, #0d1626 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.icon-button,
.check-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 8px 18px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   Deline House 1.4 — módulos financeiros familiares
   ========================================================= */
.finance-tabs {
  display: flex;
  gap: 8px;
  margin: -2px 0 18px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(130, 149, 184, 0.16);
  border-radius: 16px;
  background: rgba(10, 16, 30, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  scrollbar-width: none;
}

.finance-tabs::-webkit-scrollbar { display: none; }

.finance-tabs a {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #94a2bd;
  font-size: 0.83rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.finance-tabs a .ui-icon { width: 17px; height: 17px; }
.finance-tabs a:hover {
  border-color: rgba(139, 92, 246, 0.22);
  background: rgba(139, 92, 246, 0.08);
  color: #e9e3ff;
}
.finance-tabs a.active {
  border-color: rgba(139, 92, 246, 0.34);
  background: linear-gradient(135deg, rgba(109, 62, 232, 0.28), rgba(59, 130, 246, 0.16));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 20px rgba(56, 34, 125, 0.18);
}

.context-banner {
  align-items: center;
}

.context-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(109, 146, 220, 0.24);
  border-radius: 12px;
  background: rgba(11, 22, 42, 0.72);
  color: #c9d8fa;
  font-size: 0.82rem;
  font-weight: 750;
}
.context-link .ui-icon { width: 17px; height: 17px; }
.context-link:hover { background: rgba(37, 99, 235, 0.16); color: #fff; }

.banner-metric {
  min-width: 210px;
  padding: 13px 16px;
  border: 1px solid rgba(132, 151, 188, 0.16);
  border-radius: 13px;
  background: rgba(5, 10, 21, 0.48);
  text-align: right;
}
.banner-metric small,
.banner-metric strong { display: block; }
.banner-metric small { margin-bottom: 5px; color: #8997b2; font-size: 0.72rem; }
.banner-metric strong { color: #fff; font-size: 1.22rem; }

.recurring-banner { border-color: rgba(139, 92, 246, 0.25); }
.installment-banner { border-color: rgba(59, 130, 246, 0.25); }

.finance-health-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.finance-health-strip article {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(132, 151, 188, 0.16);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(20, 31, 53, 0.98), rgba(11, 18, 32, 0.98));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.finance-health-strip small,
.finance-health-strip strong,
.finance-health-strip span { display: block; }
.finance-health-strip small { color: #8f9bb3; font-size: 0.73rem; }
.finance-health-strip strong { margin: 5px 0 3px; color: #f6f8ff; font-size: 1.15rem; }
.finance-health-strip span { color: #74819a; font-size: 0.72rem; }
.finance-health-strip a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #91abff;
  font-size: 0.74rem;
  font-weight: 700;
}
.finance-health-strip a .ui-icon { width: 14px; height: 14px; }

.source-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  color: #ad9bea;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.source-chip.installment { border-color: rgba(59, 130, 246, 0.22); background: rgba(59, 130, 246, 0.08); color: #8ab6ff; }
.source-chip.recurring { border-color: rgba(139, 92, 246, 0.22); color: #b9a3ff; }
.source-chip.pet { border-color: rgba(34, 201, 133, 0.22); background: rgba(34, 201, 133, 0.08); color: #65dba9; }
.source-chip.debt_payment { border-color: rgba(251, 113, 133, 0.22); background: rgba(251, 113, 133, 0.08); color: #fb9bac; }
.source-chip.manual { color: #8997b2; border-color: rgba(132, 151, 188, 0.16); background: rgba(132, 151, 188, 0.06); }

.transaction-row.is-overdue {
  border-color: rgba(251, 113, 133, 0.18);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.055), transparent 45%);
}
.status-chip.overdue { color: #ff9daf; background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.24); }
.transaction-actions { display: flex; align-items: center; gap: 6px; }
.transaction-actions form { margin: 0; }
.icon-button.success { color: var(--green); border-color: rgba(34, 201, 133, 0.2); background: rgba(34, 201, 133, 0.08); }
.icon-button.success:hover { background: rgba(34, 201, 133, 0.16); }

.finance-module-grid { align-items: start; }
.plan-list { display: grid; gap: 12px; }
.plan-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(132, 151, 188, 0.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18, 29, 50, 0.94), rgba(10, 17, 30, 0.94));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.plan-card.inactive { opacity: 0.62; }
.plan-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
}
.plan-card-icon .ui-icon { width: 22px; height: 22px; }
.plan-card-icon.recurring { color: #b69cff; background: rgba(139, 92, 246, 0.14); border: 1px solid rgba(139, 92, 246, 0.22); }
.plan-card-icon.installment { color: #83adff; background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.22); }
.plan-card-main { min-width: 0; }
.plan-title-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-title-line h3 { margin: 0; color: #f3f6ff; font-size: 1rem; }
.plan-card-main > p { margin: 5px 0 12px; color: #8996ae; font-size: 0.76rem; }
.plan-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plan-meta span {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(132, 151, 188, 0.11);
  border-radius: 10px;
  background: rgba(4, 9, 19, 0.33);
}
.plan-meta small,
.plan-meta strong { display: block; }
.plan-meta small { color: #74819a; font-size: 0.63rem; }
.plan-meta strong { margin-top: 3px; overflow: hidden; color: #dce4f8; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.plan-note { display: block; margin-top: 9px; color: #7f8da6; font-size: 0.69rem; }
.plan-actions { display: flex; gap: 6px; }
.plan-actions form { margin: 0; }
.plan-progress {
  height: 5px;
  margin: 8px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(132, 151, 188, 0.12);
}
.plan-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--blue)); }

.installment-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 13px;
  background: rgba(59, 130, 246, 0.07);
}
.installment-preview > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  background: rgba(59, 130, 246, 0.14);
  color: #8db5ff;
}
.installment-preview .ui-icon { width: 19px; height: 19px; }
.installment-preview small,
.installment-preview strong,
.installment-preview p { display: block; margin: 0; }
.installment-preview small { color: #7d8ca8; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; }
.installment-preview strong { margin: 3px 0 2px; color: #e8efff; font-size: 0.84rem; }
.installment-preview p { color: #8090ab; font-size: 0.7rem; }

.debt-summary-grid,
.pet-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.debt-summary-grid article,
.pet-summary-grid article {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 17px;
  border: 1px solid rgba(132, 151, 188, 0.16);
  border-radius: 17px;
  background: linear-gradient(155deg, rgba(19, 30, 51, 0.96), rgba(10, 17, 30, 0.96));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.summary-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 13px;
}
.summary-icon .ui-icon { width: 21px; height: 21px; }
.summary-icon.red { color: #ff91a5; background: rgba(251, 113, 133, 0.12); border: 1px solid rgba(251, 113, 133, 0.18); }
.summary-icon.purple { color: #b9a2ff; background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.18); }
.summary-icon.blue { color: #82b1ff; background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.18); }
.summary-icon.green { color: #63d9a6; background: rgba(34, 201, 133, 0.12); border: 1px solid rgba(34, 201, 133, 0.18); }
.debt-summary-grid small,
.debt-summary-grid strong,
.debt-summary-grid p,
.pet-summary-grid small,
.pet-summary-grid strong,
.pet-summary-grid p { display: block; margin: 0; }
.debt-summary-grid small,
.pet-summary-grid small { color: #8996ae; font-size: 0.68rem; }
.debt-summary-grid strong,
.pet-summary-grid strong { margin: 3px 0; color: #f3f6ff; font-size: 1.05rem; }
.debt-summary-grid p,
.pet-summary-grid p { color: #74819a; font-size: 0.68rem; }

.debt-list { display: grid; gap: 14px; }
.debt-card {
  padding: 18px;
  border: 1px solid rgba(251, 113, 133, 0.18);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(35, 23, 39, 0.72), rgba(12, 18, 31, 0.96) 45%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.debt-card.paid { border-color: rgba(34, 201, 133, 0.2); background: linear-gradient(145deg, rgba(19, 44, 37, 0.55), rgba(12, 18, 31, 0.96) 45%); }
.debt-card > header { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.debt-card h3 { margin: 5px 0 2px; color: #fff; font-size: 1.05rem; }
.debt-card header p { margin: 0; color: #939fb6; font-size: 0.76rem; }
.priority-label {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.priority-label.high { color: #ffa0b0; background: rgba(251, 113, 133, 0.11); }
.priority-label.medium { color: #f5c56f; background: rgba(247, 185, 85, 0.11); }
.priority-label.low { color: #8eb5ff; background: rgba(59, 130, 246, 0.11); }
.debt-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 10px; }
.debt-values span { padding: 10px; border: 1px solid rgba(132, 151, 188, 0.11); border-radius: 11px; background: rgba(3, 8, 18, 0.32); }
.debt-values small,
.debt-values strong { display: block; }
.debt-values small { color: #74819a; font-size: 0.62rem; }
.debt-values strong { margin-top: 3px; color: #e6ecfa; font-size: 0.8rem; }
.debt-progress span { background: linear-gradient(90deg, #22c985, #3b82f6); }
.debt-progress-label { display: flex; justify-content: space-between; color: #74819a; font-size: 0.65rem; }
.debt-note { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(132, 151, 188, 0.1); border-radius: 11px; background: rgba(5, 10, 20, 0.28); color: #8794ad; font-size: 0.7rem; }
.debt-note span { display: flex; align-items: center; gap: 6px; }
.debt-note .ui-icon { width: 14px; height: 14px; }
.debt-note p { margin: 7px 0 0; }
.payment-box,
.payment-history { margin-top: 13px; border: 1px solid rgba(132, 151, 188, 0.13); border-radius: 12px; background: rgba(5, 10, 20, 0.34); }
.payment-box summary,
.payment-history summary { display: flex; align-items: center; gap: 8px; padding: 11px 12px; color: #b9c7e2; cursor: pointer; font-size: 0.73rem; font-weight: 750; list-style: none; }
.payment-box summary::-webkit-details-marker,
.payment-history summary::-webkit-details-marker { display: none; }
.payment-box summary .ui-icon { width: 15px; height: 15px; color: #8daaff; }
.payment-box form { padding: 0 12px 12px; }
.compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.payment-list { display: grid; gap: 1px; padding: 0 10px 10px; }
.payment-list > div { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 7px; border-top: 1px solid rgba(132, 151, 188, 0.08); }
.payment-list strong,
.payment-list small { display: block; }
.payment-list strong { color: #cfe8dc; font-size: 0.77rem; }
.payment-list small { margin-top: 2px; color: #73819a; font-size: 0.64rem; }
.debt-delete { display: flex; justify-content: flex-end; margin-top: 10px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border: 0; background: transparent; color: #91a0bb; cursor: pointer; font-size: 0.68rem; }
.text-button .ui-icon { width: 14px; height: 14px; }
.text-button.danger { color: #df8192; }

.pet-management-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.inline-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pet-profile-list { display: grid; gap: 9px; margin-top: 15px; }
.pet-profile { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid rgba(132, 151, 188, 0.13); border-radius: 13px; background: rgba(6, 12, 23, 0.34); }
.pet-profile.inactive { opacity: 0.55; }
.pet-avatar { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(34, 201, 133, 0.2); border-radius: 13px; background: rgba(34, 201, 133, 0.1); color: #5bd5a0; }
.pet-avatar .ui-icon { width: 21px; height: 21px; }
.pet-profile h3,
.pet-profile p,
.pet-profile small { display: block; margin: 0; }
.pet-profile h3 { color: #f0f4ff; font-size: 0.88rem; }
.pet-profile p { margin: 2px 0; color: #8996ae; font-size: 0.68rem; }
.pet-profile small { color: #6f7d96; font-size: 0.63rem; }
.pet-expense-panel { margin-top: 0; }
.transaction-icon.pet { color: #61d7a4; background: rgba(34, 201, 133, 0.1); border-color: rgba(34, 201, 133, 0.18); }

.calendar-heading { align-items: center; }
.calendar-month-nav { display: flex; align-items: center; gap: 9px; padding: 5px; border: 1px solid rgba(132, 151, 188, 0.16); border-radius: 13px; background: rgba(9, 15, 28, 0.74); }
.calendar-month-nav a { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: #8fa4cc; }
.calendar-month-nav a:hover { background: rgba(139, 92, 246, 0.12); color: #fff; }
.calendar-month-nav a .ui-icon { width: 17px; height: 17px; }
.calendar-month-nav strong { min-width: 130px; text-align: center; color: #e9eefb; font-size: 0.8rem; }
.finance-calendar-panel { padding: 0; overflow: hidden; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid rgba(132, 151, 188, 0.13); background: rgba(7, 13, 25, 0.58); }
.calendar-weekdays span { padding: 11px 8px; color: #72809a; font-size: 0.66rem; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }
.finance-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-day { min-width: 0; min-height: 128px; padding: 9px; border-right: 1px solid rgba(132, 151, 188, 0.09); border-bottom: 1px solid rgba(132, 151, 188, 0.09); background: rgba(9, 15, 28, 0.32); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside { background: rgba(4, 8, 16, 0.2); }
.calendar-day.today { background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.055)); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.24); }
.calendar-day-number { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; color: #8390a9; font-size: 0.72rem; font-weight: 800; }
.calendar-day.today .calendar-day-number > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: #315ecb; color: #fff; }
.calendar-day-number small { color: #7fa8ff; font-size: 0.55rem; text-transform: uppercase; }
.calendar-day-items { display: grid; gap: 5px; }
.calendar-entry { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 1px 6px; padding: 6px; overflow: hidden; border: 1px solid rgba(132, 151, 188, 0.11); border-radius: 8px; background: rgba(9, 17, 31, 0.78); }
.calendar-entry > span { grid-row: 1 / 3; align-self: center; overflow: hidden; font-size: 0.72rem; }
.calendar-entry > span .ui-icon { width: 13px; height: 13px; }
.calendar-entry strong { overflow: hidden; color: #cbd5ea; font-size: 0.61rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-entry small { color: #8390a8; font-size: 0.57rem; }
.calendar-entry.pending { border-left: 2px solid var(--orange); }
.calendar-entry.paid { border-left: 2px solid var(--green); opacity: 0.7; }
.calendar-entry.income { border-left-color: var(--green); }
.calendar-list-panel { margin-top: 16px; }

.finance-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.finance-shortcuts > a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(132, 151, 188, 0.14);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(17, 27, 47, 0.92), rgba(9, 15, 27, 0.92));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: 0.2s ease;
}
.finance-shortcuts > a:hover { transform: translateY(-2px); border-color: rgba(139, 92, 246, 0.24); }
.finance-shortcuts > a > .ui-icon { width: 15px; height: 15px; color: #687997; }
.shortcut-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; }
.shortcut-icon .ui-icon { width: 18px; height: 18px; }
.shortcut-icon.purple { color: #b29bff; background: rgba(139, 92, 246, 0.12); }
.shortcut-icon.blue { color: #83adff; background: rgba(59, 130, 246, 0.12); }
.shortcut-icon.red { color: #ff92a5; background: rgba(251, 113, 133, 0.12); }
.shortcut-icon.green { color: #5fd7a3; background: rgba(34, 201, 133, 0.12); }
.finance-shortcuts small,
.finance-shortcuts strong,
.finance-shortcuts p { display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-shortcuts small { color: #77859f; font-size: 0.61rem; }
.finance-shortcuts strong { margin: 2px 0; color: #e8eefc; font-size: 0.77rem; }
.finance-shortcuts p { color: #68758d; font-size: 0.61rem; }

@media (max-width: 1240px) {
  .finance-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-calendar-grid .calendar-day { min-height: 112px; }
  .plan-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .finance-health-strip,
  .debt-summary-grid,
  .pet-summary-grid { grid-template-columns: 1fr; }
  .pet-management-grid { grid-template-columns: 1fr; }
  .banner-metric { min-width: 180px; }
  .finance-calendar-panel { overflow-x: auto; }
  .calendar-weekdays,
  .finance-calendar-grid { min-width: 820px; }
}

@media (max-width: 760px) {
  .finance-tabs { margin-right: -13px; margin-left: -13px; padding-right: 13px; padding-left: 13px; border-right: 0; border-left: 0; border-radius: 0; }
  .finance-tabs a { padding: 9px 11px; font-size: 0.76rem; }
  .context-banner { align-items: flex-start; }
  .context-link { width: 100%; justify-content: center; }
  .banner-metric { width: 100%; text-align: left; }
  .finance-health-strip { grid-template-columns: 1fr; gap: 9px; }
  .plan-card { grid-template-columns: 42px minmax(0, 1fr); }
  .plan-card-icon { width: 42px; height: 42px; }
  .plan-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .plan-meta { grid-template-columns: 1fr 1fr; }
  .debt-values { grid-template-columns: 1fr; }
  .compact-form,
  .inline-create-form { grid-template-columns: 1fr; }
  .calendar-heading { align-items: stretch; }
  .calendar-month-nav { width: 100%; justify-content: space-between; }
  .finance-shortcuts { grid-template-columns: 1fr 1fr; }
  .transaction-actions { grid-column: 1 / -1; justify-content: flex-end; width: 100%; }
  .calendar-transaction-list .transaction-row { scroll-margin-top: 80px; }
}

@media (max-width: 480px) {
  .finance-shortcuts { grid-template-columns: 1fr; }
  .plan-meta { grid-template-columns: 1fr; }
  .plan-title-line { align-items: flex-start; flex-direction: column; gap: 6px; }
  .debt-card > header { flex-direction: column; }
  .calendar-month-nav strong { min-width: 0; }
  .pet-profile { grid-template-columns: 38px minmax(0, 1fr) auto; }
}

.context-banner > div:not(.banner-metric) {
  min-width: 0;
  flex: 1 1 auto;
}
