@charset "UTF-8";
:root {
  --bg: #f6f5f1;
  --paper: #fff;
  --ink: #29263b;
  --muted: #85818f;
  --line: #e9e7ef;
  --violet: #8066db;
  --violet-dark: #6b50c7;
  --purple-bg: #eee9fb;
  --green: #26806a;
  --green-bg: #e7f4ed;
  --orange: #b66d35;
  --orange-bg: #fff2e7;
  --red: #b34a53;
  --red-bg: #fae9eb;
  --sidebar: #242234;
  --radius: 19px;
  --shadow: 0 6px 20px rgba(46, 39, 64, 0.035);
}
* {
  box-sizing: border-box;
}
html {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
body {
  margin: 0;
  background: var(--bg);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.install-link {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: center;
  margin-top: 22px;
}
.install-link button,
.install-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--violet-dark);
  background: transparent;
  padding: 8px;
  font-size: 12px;
}
.install-steps {
  padding-left: 23px;
  color: var(--muted);
  line-height: 1.7;
}
.install-steps li {
  margin: 12px 0;
}
.install-steps strong {
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #b5a2ef;
  outline-offset: 3px;
}
a {
  color: var(--violet-dark);
  text-decoration: none;
}
button {
  border: 0;
}
svg.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  line-height: 1.2;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 15px;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.mono {
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.9px;
  text-transform: uppercase;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.boot {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.boot img {
  width: 160px;
}
.spinner {
  display: inline-block;
  border: 2px solid #e4ddf5;
  border-top-color: var(--violet);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.app-shell {
  min-height: 100vh;
  padding-left: 228px;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 228px;
  background: var(--sidebar);
  color: #b4b0c5;
  padding: 32px 22px 21px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: #fff;
}
.brand svg {
  width: 36px;
  height: 38px;
}
.brand b {
  color: #b8a2ff;
}
.brand-sub {
  margin: 12px 0 35px 5px;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #8c879d;
}
.nav-caption {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 700;
  margin: 4px 12px 12px;
  color: #716b85;
}
.side-nav {
  display: grid;
  gap: 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b5b0c4;
  padding: 13px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-link:hover {
  background: #302d44;
  color: #fff;
}
.nav-link.active {
  background: #8270cd;
  color: #fff;
  box-shadow: 0 4px 12px #19152626;
}
.nav-link .nav-count {
  margin-left: auto;
  font-size: 11px;
  background: #ffffff22;
  padding: 1px 7px;
  border-radius: 5px;
}
.sidebar-bottom {
  margin-top: auto;
}
.side-note {
  margin: 35px 3px 20px;
  padding: 17px 14px;
  border: 1px solid #423b56;
  border-radius: 13px;
  color: #9d96b3;
  font-size: 11px;
  line-height: 1.7;
}
.side-note .icon {
  width: 18px;
  color: #b6a2ee;
  margin-bottom: 9px;
}
.side-note strong {
  color: #d2cbe3;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.side-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 20px;
  border-top: 1px solid #3d374f;
}
.side-profile .profile-text {
  min-width: 0;
  flex: 1;
}
.side-profile strong {
  display: block;
  color: #eeebf5;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-profile small {
  color: #8a819c;
  font-size: 10px;
  display: block;
}
.side-profile button {
  color: #9a92ad;
  background: none;
  padding: 3px;
}
.avatar {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #e9e2fa;
  color: #7159ad;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid white;
}
.avatar.color-1 {
  background: #f3e3db;
  color: #b3795a;
}
.avatar.color-2 {
  background: #dfebe7;
  color: #528272;
}
.avatar.color-3 {
  background: #e4e8f3;
  color: #667ca5;
}
.avatar.color-4 {
  background: #f4e7ef;
  color: #a46f95;
}
.side-profile .avatar {
  border: 0;
  background: #4e4564;
  color: #d9cbfa;
}
.main {
  max-width: 1512px;
  margin: auto;
  padding: 30px 42px 45px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #9892a5;
}
.crumb .icon {
  width: 14px;
  height: 14px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.private-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8e879a;
  font-size: 11px;
}
.private-label .icon {
  width: 14px;
  height: 14px;
}
.topbar-right .avatar {
  width: 32px;
  height: 32px;
  font-size: 10px;
}
.mobile-brand {
  display: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 11px 17px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
  min-height: 40px;
  transition: all 0.15s;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 3px 7px #8066db18;
}
.btn-primary:hover {
  background: var(--violet-dark);
}
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: #f8f6fd;
  border-color: #d7cee9;
}
.btn-soft {
  background: var(--purple-bg);
  color: var(--violet-dark);
}
.btn-soft:hover {
  background: #e4dcf8;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
}
.btn-ghost:hover {
  background: #efecf4;
  color: var(--ink);
}
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
}
.btn-sm {
  padding: 7px 11px;
  min-height: 32px;
  font-size: 11px;
}
.btn-wide {
  width: 100%;
}
.icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 8px;
  color: #96909f;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: var(--purple-bg);
  color: var(--violet-dark);
}
.icon-btn.danger:hover {
  color: var(--red);
  background: var(--red-bg);
}
.icon-btn .icon {
  width: 16px;
  height: 16px;
}
.hero {
  position: relative;
  min-height: 226px;
  border-radius: 22px;
  overflow: hidden;
  background: #e8e1f7;
  display: flex;
  align-items: center;
  padding: 31px 37px;
  margin-bottom: 27px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: 58%;
}
.hero-copy .eyebrow {
  font-size: 9px;
  color: #9179b9;
  margin-bottom: 13px;
}
.hero h2 {
  font-size: 32px;
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -1.05px;
  color: #453354;
}
.hero p {
  font-size: 12px;
  color: #8c769d;
  max-width: 330px;
  line-height: 1.7;
  margin-top: 13px;
}
.hero .hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  margin-top: 18px;
  color: #6b547d;
}
.hero-tag .icon {
  width: 14px;
  height: 14px;
}
.hero-art {
  position: absolute;
  right: 10px;
  top: 6px;
  width: 43%;
  height: 100%;
  min-width: 260px;
}
.hero-art .halo {
  position: absolute;
  right: 4%;
  top: -38%;
  width: 325px;
  height: 325px;
  border-radius: 50%;
  background: #e0d6f2;
}
.hero-art .halo:after {
  content: "";
  position: absolute;
  width: 235px;
  height: 235px;
  border: 1px solid #c8b4e260;
  border-radius: 50%;
  left: 45px;
  top: 45px;
}
.receipt-art {
  position: absolute;
  left: 23%;
  top: 30px;
  width: 158px;
  height: 172px;
  background: #fff;
  border-radius: 12px 12px 3px 3px;
  transform: rotate(-8deg);
  box-shadow: 0 13px 25px #8261b01d;
  padding: 18px 16px;
  color: #51445e;
  z-index: 2;
}
.receipt-art:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 9px;
  background: radial-gradient(circle at 50% 100%, transparent 4px, white 4.5px)
    0 0/14px 9px;
}
.receipt-art .tiny-logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #8b73bc;
}
.receipt-art .art-title {
  font-size: 8px;
  margin: 9px 0 11px;
  color: #a596b1;
}
.art-line {
  height: 5px;
  width: 95%;
  background: #ece7f2;
  margin: 7px 0;
  border-radius: 6px;
}
.art-line:nth-child(4) {
  width: 70%;
}
.art-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #e2dbe8;
  margin-top: 11px;
  padding-top: 11px;
  font-size: 9px;
}
.art-total b {
  font-size: 15px;
}
.art-check {
  position: absolute;
  right: 12%;
  top: 47%;
  background: #7760ac;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  transform: rotate(10deg);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  z-index: 3;
  box-shadow: 0 8px 15px #7960b22e;
}
.art-check .icon {
  width: 30px;
  height: 30px;
}
.art-avatars {
  position: absolute;
  left: 10%;
  bottom: 21px;
  display: flex;
  z-index: 4;
}
.art-avatars .avatar {
  margin-left: -8px;
  width: 37px;
  height: 37px;
  font-size: 13px;
  box-shadow: 0 3px 7px #8b74a91c;
}
.spark {
  position: absolute;
  right: 24%;
  top: 13px;
  font-size: 32px;
  color: #c49f83;
  z-index: 4;
}
.spark.two {
  left: 14%;
  top: 60%;
  font-size: 25px;
  color: #aa89d8;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 29px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 23px 20px;
  box-shadow: var(--shadow);
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.stat-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--purple-bg);
  color: #9277c4;
}
.stat-icon .icon {
  width: 16px;
  height: 16px;
}
.stat-icon.green {
  background: var(--green-bg);
  color: #5b947e;
}
.stat-icon.orange {
  background: var(--orange-bg);
  color: #c58d60;
}
.stat-amount {
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -0.9px;
  margin: 10px 0 4px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-amount span {
  font-size: 17px;
  font-weight: 500;
  margin-left: 4px;
  color: #a39cad;
}
.stat-note {
  font-size: 10px;
  color: #a29caa;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 17px;
}
.section-head small {
  font-size: 11px;
}
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #a199ac;
  background: #eae6ee;
  min-width: 21px;
  height: 21px;
  border-radius: 7px;
  margin-left: 7px;
  vertical-align: middle;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.table-wrap {
  overflow: auto;
  border-radius: inherit;
}
.bills-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.bills-table th {
  font-size: 9px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  text-align: left;
  color: #a39baa;
  font-weight: 600;
  padding: 16px 21px;
  background: #fdfcfe;
  border-bottom: 1px solid var(--line);
}
.bills-table th:first-child {
  width: 38%;
}
.bills-table th:nth-child(2) {
  width: 19%;
}
.bills-table th:nth-child(3) {
  width: 19%;
}
.bills-table th:nth-child(4) {
  width: 19%;
}
.bills-table th:last-child {
  width: 5%;
}
.bills-table td {
  padding: 18px 21px;
  border-bottom: 1px solid #f0edf3;
  font-size: 12px;
  vertical-align: middle;
}
.bills-table tr:last-child td {
  border-bottom: 0;
}
.bill-row {
  cursor: pointer;
  transition: background 0.15s;
}
.bill-row:hover {
  background: #faf8fe;
}
.bill-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bill-icon {
  width: 41px;
  height: 41px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f2ecfa;
  color: #aa91c7;
}
.bill-icon.closed {
  background: #eaf2ee;
  color: #83a892;
}
.bill-name-cell strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.bill-name-cell small {
  font-size: 10px;
  color: #a299a9;
  margin-top: 4px;
  display: block;
}
.bill-total {
  font-size: 13px;
  font-weight: 650;
}
.bill-balance {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #a196a8;
  margin-top: 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  font-size: 10px;
  padding: 4px 8px;
  white-space: nowrap;
  color: var(--orange);
  background: var(--orange-bg);
}
.badge:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.badge.green {
  background: var(--green-bg);
  color: var(--green);
}
.badge.purple {
  background: var(--purple-bg);
  color: var(--violet-dark);
}
.empty {
  padding: 42px 25px;
  text-align: center;
}
.empty-illustration {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--purple-bg);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.empty-illustration .icon {
  width: 28px;
  height: 28px;
}
.empty h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.empty p {
  max-width: 365px;
  margin: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.empty .btn {
  margin-top: 20px;
}
.below-home {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-top: 23px;
}
.hint-card {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid #e6e1ec;
  border-radius: 16px;
  background: #f0edf6;
}
.hint-card .hint-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9b88b3;
  flex-shrink: 0;
}
.hint-card h3 {
  font-size: 11px;
  margin-bottom: 5px;
  color: #78688c;
}
.hint-card p {
  font-size: 10px;
  color: #9a8ba8;
  line-height: 1.7;
}
.hint-card.soft {
  background: #f1f0eb;
  border-color: #e6e4db;
}
.hint-card.soft h3 {
  color: #918876;
}
.hint-card.soft p {
  color: #a49b8c;
}
.hint-card.soft .hint-icon {
  color: #b0a184;
}
.page-footer {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b5aebc;
  font-size: 9px;
  letter-spacing: 0.2px;
}
.page-footer .footer-heart {
  color: #bdacda;
}
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  justify-content: space-between;
}
.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: #ebe8f0;
  border-radius: 10px;
}
.filter-tab {
  background: transparent;
  color: #92899e;
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 11px;
}
.filter-tab.active {
  color: #5f4c7d;
  background: #fff;
  box-shadow: 0 2px 4px #2923340c;
}
.search-wrap {
  position: relative;
  max-width: 280px;
  flex: 1;
}
.search-wrap .icon {
  position: absolute;
  left: 12px;
  top: 11px;
  color: #a59aaf;
  width: 17px;
  height: 17px;
}
.search-wrap input {
  padding-left: 38px;
  min-height: 38px;
  font-size: 11px;
  background: #fff;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field label,
.field > span.label {
  font-size: 11px;
  font-weight: 600;
  color: #80758d;
}
.field small {
  font-size: 10px;
  color: #a397ae;
  line-height: 1.6;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #e3dfea;
  border-radius: 9px;
  background: #fdfcfe;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-size: 12px;
  min-height: 40px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #b49bdf;
  box-shadow: 0 0 0 3px #ac91d314;
  background: #fff;
}
input::placeholder,
textarea::placeholder {
  color: #b2a8bb;
}
input:disabled,
select:disabled,
textarea:disabled {
  background: #f7f5f8;
  color: #8a7f96;
}
input[type="checkbox"] {
  width: 15px;
  min-height: 15px;
  height: 15px;
  accent-color: var(--violet);
  padding: 0;
  flex-shrink: 0;
  box-shadow: none;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.span-2 {
  grid-column: 1/-1;
}
.form-stack {
  display: grid;
  gap: 18px;
}
.form-error {
  color: var(--red);
  background: var(--red-bg);
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.6;
  display: none;
}
.form-error:not(:empty) {
  display: block;
}
.form-message {
  color: var(--green);
  background: var(--green-bg);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.7;
}
.inline-note {
  border-radius: 11px;
  background: #f4f0fa;
  color: #9a88ad;
  padding: 12px 15px;
  font-size: 11px;
  line-height: 1.7;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.inline-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.inline-note.warning {
  background: var(--orange-bg);
  color: var(--orange);
}
.inline-note.success {
  background: var(--green-bg);
  color: var(--green);
}
.inline-note strong {
  font-weight: 650;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94849d;
  font-size: 10px;
  cursor: pointer;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.bill-heading {
  align-items: flex-start;
}
.bill-heading h1 {
  font-size: 25px;
}
.bill-heading .subline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
  color: #9c91a5;
  font-size: 11px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a094ac;
  font-size: 11px;
  margin-bottom: 18px;
}
.back-link .icon {
  width: 14px;
  height: 14px;
}
.bill-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}
.editor-column {
  min-width: 0;
  display: grid;
  gap: 20px;
}
.edit-section {
  padding: 23px 24px;
}
.edit-section > .section-head {
  margin-bottom: 19px;
}
.step-badge {
  font-size: 9px;
  font-weight: 650;
  width: 22px;
  height: 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #f2eef9;
  color: #b09ac6;
  border-radius: 7px;
  margin-right: 8px;
  vertical-align: 2px;
}
.section-head h2 {
  font-size: 15px;
}
.section-caption {
  font-size: 11px;
  color: #a498ae;
  margin: -9px 0 18px;
  line-height: 1.7;
}
.participant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.person-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f7f4fb;
  border: 1px solid #eee7f5;
  border-radius: 11px;
  padding: 5px 7px;
}
.person-chip .avatar {
  width: 28px;
  height: 28px;
  font-size: 9px;
  border: 0;
}
.person-chip .name {
  font-size: 11px;
  font-weight: 550;
}
.person-chip .handle {
  font-size: 9px;
  color: #a494b1;
  display: block;
}
.person-chip .icon-btn {
  width: 23px;
  height: 23px;
}
.person-chip .icon-btn .icon {
  width: 13px;
  height: 13px;
}
.person-chip .person-actions {
  display: flex;
  gap: 0;
}
.add-person {
  border: 1px dashed #d7cbe5;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 11px;
  color: #a48ab9;
  background: #fcfaff;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.add-person .icon {
  width: 14px;
  height: 14px;
}
.line-items {
  display: grid;
  gap: 13px;
}
.line-item {
  background: #fdfcfe;
  border: 1px solid #ece6f2;
  border-radius: 13px;
  padding: 15px;
}
.line-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}
.line-item-head .line-no {
  font-size: 9px;
  color: #b3a2c2;
  font-weight: 700;
  width: 16px;
}
.line-item-head input {
  background: #fff;
  font-weight: 550;
  flex: 1;
  min-height: 36px;
  padding: 8px 9px;
}
.line-grid {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr;
  gap: 10px;
}
.line-grid label {
  font-size: 9px;
}
.line-grid input {
  min-height: 35px;
  padding: 8px 9px;
  background: #fff;
  font-size: 11px;
}
.allocation-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #eee8f4;
  flex-wrap: wrap;
  justify-content: space-between;
}
.allocation-head select {
  min-height: 31px;
  width: auto;
  max-width: 100%;
  font-size: 10px;
  padding: 5px 26px 5px 8px;
  background: #f5f0fa;
  color: #9680ab;
  border-color: #e8dff1;
  border-radius: 6px;
}
.allocation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.allocation-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  padding: 5px 8px;
  background: #f5f2f8;
  font-size: 10px;
  color: #ab9cb7;
  cursor: pointer;
  border: 1px solid #eee8f2;
}
.allocation-chip:has(input:checked) {
  color: #8b6ca4;
  background: #efe7f8;
  border-color: #dfd0ee;
}
.allocation-chip input {
  width: 12px;
  height: 12px;
  min-height: 12px;
}
.allocation-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.allocation-value {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #f8f5fb;
  border-radius: 7px;
  font-size: 10px;
  color: #a28ab4;
}
.allocation-value span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.allocation-value input {
  width: 78px;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 10px;
  background: #fff;
}
.all-shared {
  font-size: 10px;
  color: #ad9bb8;
  margin-top: 10px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.all-shared .icon {
  width: 12px;
  height: 12px;
}
.add-line {
  margin-top: 14px;
  border: 1px dashed #d9cae6;
  width: 100%;
  border-radius: 9px;
  padding: 10px;
  background: #fcfaff;
  color: #aa8cbf;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.add-line:hover {
  background: #f1eaf8;
  color: #8b60ab;
}
.add-line .icon {
  width: 14px;
  height: 14px;
}
.payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 27px;
  gap: 10px;
  align-items: end;
  margin-bottom: 11px;
}
.payment-row .icon-btn {
  margin-bottom: 4px;
}
.payment-row label {
  font-size: 10px;
}
.payment-row input,
.payment-row select {
  font-size: 11px;
  min-height: 36px;
}
.summary-column {
  min-width: 0;
  position: sticky;
  top: 25px;
  display: grid;
  gap: 14px;
}
.summary-card {
  padding: 23px;
}
.summary-card h2 {
  font-size: 15px;
  margin-bottom: 19px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  font-size: 11px;
  color: #a08daa;
}
.summary-row strong {
  font-weight: 500;
  color: #8a7398;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.summary-total {
  border-top: 1px solid #eee6f3;
  margin-top: 15px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: #8c709d;
  font-size: 12px;
}
.summary-total strong {
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.7px;
  color: #674c7a;
  white-space: nowrap;
}
.calc-status {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 10px;
  line-height: 1.7;
  padding: 11px 13px;
  border-radius: 9px;
  margin-top: 16px;
  color: var(--green);
  background: var(--green-bg);
}
.calc-status .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}
.calc-status.warning {
  color: var(--orange);
  background: var(--orange-bg);
}
.calc-status.stale {
  color: #9480a5;
  background: #f0eaf7;
}
.calc-issues {
  padding: 0;
  margin: 9px 0 0;
  list-style: none;
  font-size: 10px;
  color: var(--orange);
  line-height: 1.7;
}
.calc-issues li + li {
  margin-top: 5px;
}
.save-state {
  margin-top: 10px;
  font-size: 9px;
  color: #b2a0bd;
  text-align: center;
}
.balance-card {
  padding: 21px;
}
.balance-card h2 {
  font-size: 14px;
  margin-bottom: 19px;
}
.balance-person {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 16px;
}
.balance-person:last-child {
  margin-bottom: 0;
}
.balance-person .avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
  border: 0;
}
.balance-person .info {
  min-width: 0;
  flex: 1;
}
.balance-person .info strong {
  display: block;
  font-size: 11px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-person .info small {
  font-size: 9px;
  color: #a794b4;
  display: block;
  margin-top: 1px;
}
.balance-person .amount {
  text-align: right;
  font-size: 11px;
  white-space: nowrap;
  font-weight: 600;
}
.amount.positive {
  color: var(--green);
}
.amount.negative {
  color: var(--orange);
}
.balance-person .amount small {
  display: block;
  font-size: 8px;
  font-weight: 450;
  margin-top: 2px;
}
.transfer-card {
  padding: 21px;
  background: #eeebf7;
  border: 1px solid #e4dbef;
  border-radius: var(--radius);
}
.transfer-card h2 {
  font-size: 14px;
  color: #87709d;
}
.transfer {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid #e1d7ec;
}
.transfer-name {
  font-size: 11px;
  color: #a08caf;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.transfer-name .icon {
  width: 12px;
  height: 12px;
}
.transfer strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #7e5b98;
  margin-top: 5px;
}
.transfer-card > p {
  font-size: 10px;
  color: #ab98b8;
  margin-top: 10px;
  line-height: 1.8;
}
.transfer-card .btn {
  margin-top: 16px;
  background: #e1d5f0;
  color: #9672b0;
}
.rounding-info {
  font-size: 9px;
  color: #ac9cb8;
  line-height: 1.7;
  margin-top: 12px;
}
.rounding-info summary {
  cursor: pointer;
  color: #9a82ad;
}
.rounding-info ul {
  padding-left: 15px;
  margin: 7px 0 0;
}
.locked-banner {
  margin-bottom: 20px;
}
.toolbar .dirty-tag {
  font-size: 10px;
  color: #c49d74;
  padding-right: 5px;
}
.profile-panel {
  padding: 28px;
  max-width: 720px;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 17px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.profile-head .avatar {
  width: 64px;
  height: 64px;
  font-size: 21px;
}
.profile-head h2 {
  font-size: 20px;
}
.profile-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.profile-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.profile-info dt {
  font-size: 10px;
  color: #b3a2be;
  margin-bottom: 5px;
}
.profile-info dd {
  margin: 0;
  font-size: 13px;
  color: #8c759d;
}
.profile-panel .inline-note {
  margin-top: 25px;
}
.activity-list {
  max-height: 380px;
  overflow: auto;
}
.activity {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.activity:last-child {
  border-bottom: 0;
}
.activity strong {
  font-size: 12px;
}
.activity small {
  font-size: 10px;
  color: var(--muted);
}
.activity p {
  font-size: 11px;
  color: #a28cae;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.user-results {
  display: grid;
  gap: 6px;
  max-height: 200px;
  overflow: auto;
}
.user-result {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f3fb;
  border: 1px solid #eae2f2;
  padding: 9px;
  border-radius: 9px;
  text-align: left;
  color: var(--ink);
}
.user-result:hover {
  background: #efe7f7;
}
.user-result strong {
  font-size: 11px;
  display: block;
}
.user-result small {
  color: #a38eaf;
  font-size: 10px;
}
.user-result .avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
}
.not-found {
  padding: 45px;
  text-align: center;
}
.not-found h2 {
  margin-bottom: 13px;
}
.not-found p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}
.loading-panel {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
dialog {
  border: 1px solid #ebe3f1;
  border-radius: 20px;
  padding: 0;
  width: 480px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 32px);
  box-shadow: 0 30px 100px #21152a35;
  background: white;
  color: var(--ink);
}
dialog::backdrop {
  background: #251c3955;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 25px 0;
  align-items: center;
}
.modal-head h2 {
  font-size: 19px;
}
.modal-body {
  padding: 22px 25px 25px;
}
.modal-description {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
}
.toasts {
  position: fixed;
  right: 24px;
  bottom: 23px;
  z-index: 100;
  display: grid;
  gap: 9px;
  max-width: 390px;
  pointer-events: none;
}
.toast {
  background: #342b42;
  color: #f0e8f7;
  border-radius: 12px;
  box-shadow: 0 10px 30px #27163722;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
  animation: toast-in 0.2s ease;
}
.toast .icon {
  width: 17px;
  height: 17px;
  color: #c3aadf;
}
.toast.error {
  background: #a05b64;
  color: #fff;
}
.toast.error .icon {
  color: #fff;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fbfaf8;
}
.auth-story {
  position: relative;
  background: #282334;
  padding: 45px 65px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
}
.auth-story:after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid #61516c;
  border-radius: 50%;
  left: -260px;
  bottom: -120px;
}
.auth-story .brand {
  position: relative;
  z-index: 2;
}
.auth-intro {
  margin: auto 0;
  position: relative;
  z-index: 2;
  padding: 65px 0 45px;
}
.auth-intro .eyebrow {
  color: #b398c7;
  margin-bottom: 21px;
}
.auth-intro h1 {
  font-size: 49px;
  line-height: 1.17;
  font-weight: 620;
  letter-spacing: -1.8px;
  max-width: 400px;
  color: #f4ecf8;
}
.auth-intro h1 span {
  color: #b299d3;
}
.auth-intro p {
  max-width: 330px;
  font-size: 14px;
  line-height: 1.85;
  color: #a595b4;
  margin-top: 22px;
}
.auth-receipt {
  margin-top: 44px;
  background: #3b3049;
  border: 1px solid #51415f;
  border-radius: 18px;
  padding: 25px 28px;
  max-width: 350px;
  position: relative;
  box-shadow: 0 12px 35px #180b211f;
}
.auth-receipt .eyebrow {
  font-size: 9px;
  color: #9b80b4;
  margin-bottom: 18px;
}
.auth-receipt .receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #b49bc7;
  gap: 16px;
}
.auth-receipt .receipt-row + .receipt-row {
  margin-top: 13px;
}
.auth-receipt .receipt-row strong {
  font-size: 14px;
  font-weight: 550;
  color: #dac7ea;
}
.auth-receipt .receipt-bottom {
  border-top: 1px dashed #5c446c;
  padding-top: 16px;
  margin-top: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a38ab4;
  font-size: 10px;
}
.auth-receipt .receipt-bottom .icon {
  width: 15px;
  height: 15px;
  color: #bdaa84;
}
.auth-receipt .receipt-sticker {
  position: absolute;
  right: -20px;
  top: -19px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: #b29bcf;
  color: #46304f;
  transform: rotate(12deg);
  box-shadow: 0 5px 15px #24142f42;
}
.auth-receipt .receipt-sticker .icon {
  width: 25px;
  height: 25px;
}
.auth-story-footer {
  font-size: 10px;
  color: #71617f;
  position: relative;
  z-index: 2;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
}
.auth-form {
  width: 100%;
  max-width: 370px;
}
.auth-form h2 {
  font-size: 29px;
  letter-spacing: -0.8px;
  font-weight: 650;
  margin-bottom: 10px;
}
.auth-form > p {
  font-size: 12px;
  color: #a08da8;
  line-height: 1.8;
  margin-bottom: 29px;
}
.auth-form .field label {
  font-size: 11px;
  color: #9c85aa;
}
.auth-form input {
  min-height: 45px;
  background: #fff;
  border-color: #e6ddea;
}
.auth-form .btn-primary {
  min-height: 45px;
  font-size: 12px;
  background: #9577b6;
}
.auth-form .btn-primary:hover {
  background: #8566a8;
}
.auth-form .form-stack {
  gap: 18px;
}
.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  gap: 12px;
  color: #b09cbb;
  margin-top: 18px;
}
.auth-links button {
  padding: 0;
  background: transparent;
  color: #a083b4;
  font-size: 10px;
}
.auth-switch {
  margin-top: 28px;
  border-top: 1px solid #e9e0ed;
  padding-top: 25px;
  font-size: 11px;
  text-align: center;
  color: #b19aba;
}
.auth-switch button {
  background: transparent;
  color: #9673ad;
  font-size: 11px;
  font-weight: 600;
  padding-left: 6px;
}
.auth-notice {
  margin-bottom: 22px;
}
.auth-form .dev-link {
  margin-top: 13px;
  font-size: 11px;
  display: block;
  background: #ece5f3;
  border-radius: 8px;
  padding: 9px;
  color: #9d79b5;
  width: 100%;
  text-align: center;
}
.auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 9px;
  color: #bcabca;
  margin-top: 27px;
}
.auth-trust .icon {
  width: 12px;
  height: 12px;
}
.noscript {
  padding: 20px;
  text-align: center;
}
@media (min-width: 1450px) {
  .main {
    padding-left: 55px;
    padding-right: 55px;
  }
  .hero {
    min-height: 245px;
  }
  .hero-art {
    right: 55px;
  }
  .hero-copy h2 {
    font-size: 36px;
  }
  .receipt-art {
    top: 37px;
  }
}
@media (max-width: 1180px) {
  .main {
    padding: 26px 27px 35px;
  }
  .bill-layout {
    grid-template-columns: minmax(0, 1fr) 278px;
    gap: 17px;
  }
  .summary-card {
    padding: 20px;
  }
  .edit-section {
    padding: 21px;
  }
  .bills-table td,
  .bills-table th {
    padding-left: 17px;
    padding-right: 17px;
  }
  .hero {
    padding: 29px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .hero-art {
    right: -14px;
  }
  .hero-copy {
    width: 56%;
  }
  .auth-story {
    padding: 40px 42px;
  }
  .auth-intro h1 {
    font-size: 43px;
  }
}
@media (max-width: 1020px) {
  .app-shell {
    padding-left: 200px;
  }
  .sidebar {
    width: 200px;
    padding: 28px 17px 20px;
  }
  .brand {
    font-size: 30px;
  }
  .brand svg {
    width: 32px;
  }
  .side-profile strong {
    font-size: 11px;
  }
  .side-profile .avatar {
    width: 31px;
    height: 31px;
    font-size: 10px;
  }
  .main {
    padding-left: 23px;
    padding-right: 23px;
  }
  .hero-copy h2 {
    font-size: 26px;
  }
  .hero {
    min-height: 222px;
    padding: 27px;
  }
  .hero p {
    font-size: 11px;
    max-width: 235px;
  }
  .hero-art {
    right: -32px;
    transform: scale(0.9);
    transform-origin: right center;
  }
  .stats-grid {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
  .stat-amount {
    font-size: 24px;
  }
  .stat-head {
    font-size: 10px;
  }
  .bill-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .summary-column {
    position: static;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .summary-column .summary-card {
    grid-row: span 2;
  }
  .summary-column .transfer-card {
    grid-column: 2;
  }
  .bill-heading {
    flex-wrap: wrap;
  }
  .bill-heading .toolbar {
    width: 100%;
    justify-content: flex-end;
  }
  .edit-section {
    padding: 23px;
  }
  .hero .hero-tag {
    font-size: 9px;
  }
  .bills-table th:nth-child(2),
  .bills-table td:nth-child(2) {
    display: none;
  }
  .bills-table th:first-child {
    width: 45%;
  }
  .bills-table th:nth-child(3) {
    width: 26%;
  }
  .bills-table th:nth-child(4) {
    width: 24%;
  }
  .bills-table th:last-child {
    width: 5%;
  }
  .below-home {
    grid-template-columns: 1fr;
  }
  .below-home .hint-card.soft {
    display: none;
  }
  .auth-intro h1 {
    font-size: 37px;
  }
  .auth-story {
    padding: 35px;
  }
  .auth-form-wrap {
    padding: 32px;
  }
  .auth-receipt {
    padding: 22px;
  }
  .auth-story .brand {
    font-size: 32px;
  }
}
@media (max-width: 760px) {
  .app-shell {
    padding-left: 0;
    padding-bottom: 70px;
  }
  .sidebar {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 66px;
    padding: 6px 18px 7px;
    background: #fff;
    border-top: 1px solid #e8e2ed;
    display: block;
    color: var(--ink);
    box-shadow: 0 -3px 20px #3a20460a;
  }
  .sidebar > .brand,
  .sidebar > .brand-sub,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  .side-nav {
    display: flex;
    justify-content: space-around;
    gap: 20px;
  }
  .nav-link {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 6px 15px;
    color: #b2a1bf;
    border-radius: 10px;
    font-size: 9px;
    max-width: 120px;
  }
  .nav-link .icon {
    width: 20px;
    height: 20px;
  }
  .nav-link.active {
    background: #f0e8f8;
    box-shadow: none;
    color: #a583bd;
  }
  .nav-link:hover {
    background: #f4eef9;
    color: #a583bd;
  }
  .nav-count {
    display: none !important;
  }
  .main {
    padding: 19px 22px 24px;
  }
  .topbar {
    margin-bottom: 24px;
  }
  .crumb {
    display: none;
  }
  .mobile-brand {
    display: flex;
    font-size: 26px;
    color: #7f5f95;
    gap: 5px;
  }
  .mobile-brand svg {
    height: 30px;
    width: 30px;
  }
  .mobile-brand b {
    color: #b499ce;
  }
  .private-label {
    font-size: 10px;
  }
  .topbar-right .avatar {
    width: 28px;
    height: 28px;
    font-size: 8px;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 21px;
  }
  .page-heading h1 {
    font-size: 25px;
    letter-spacing: -0.7px;
  }
  .page-heading p {
    font-size: 11px;
    margin-top: 6px;
  }
  .page-heading > .btn {
    padding: 10px 12px;
    font-size: 11px;
  }
  .hero {
    border-radius: 18px;
    min-height: 210px;
    padding: 25px;
    margin-bottom: 20px;
  }
  .hero-copy h2 {
    font-size: 26px;
  }
  .hero-copy p {
    max-width: 280px;
    font-size: 11px;
  }
  .hero-art {
    right: 0;
    transform: scale(0.87);
    transform-origin: right center;
  }
  .hero-copy {
    width: 58%;
  }
  .stats-grid {
    margin-bottom: 25px;
  }
  .stat {
    padding: 17px;
  }
  .stat-amount {
    font-size: 24px;
    margin-top: 12px;
  }
  .stat-icon {
    width: 27px;
    height: 27px;
  }
  .stat-note {
    font-size: 9px;
  }
  .stat-head {
    font-size: 9px;
  }
  .section-head h2 {
    font-size: 15px;
  }
  .bills-table td,
  .bills-table th {
    padding-left: 16px;
    padding-right: 16px;
  }
  .bill-name-cell strong {
    font-size: 11px;
  }
  .bill-name-cell small {
    font-size: 9px;
  }
  .bill-total {
    font-size: 12px;
  }
  .bill-name-cell {
    gap: 9px;
  }
  .bill-icon {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }
  .bill-icon .icon {
    width: 17px;
    height: 17px;
  }
  .bills-table th:nth-child(3) {
    width: 24%;
  }
  .bills-table th:nth-child(4) {
    width: 26%;
  }
  .bills-table th:first-child {
    width: 45%;
  }
  .bills-table th:last-child {
    width: 5%;
  }
  .page-footer {
    margin-top: 25px;
  }
  .bill-heading h1 {
    font-size: 24px;
  }
  .bill-heading > .toolbar {
    justify-content: flex-start;
    gap: 6px;
  }
  .toolbar .btn {
    font-size: 10px;
    padding: 8px 11px;
    min-height: 35px;
  }
  .bill-layout {
    gap: 18px;
  }
  .editor-column {
    gap: 18px;
  }
  .edit-section {
    padding: 21px;
  }
  .summary-column {
    gap: 16px;
  }
  .summary-card,
  .balance-card,
  .transfer-card {
    padding: 20px;
  }
  .toasts {
    right: 15px;
    bottom: 80px;
    left: 15px;
    max-width: 100%;
  }
  .toast {
    font-size: 11px;
    padding: 12px 14px;
  }
  .auth-page {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }
  .auth-story {
    padding: 23px 27px 25px;
    min-height: 0;
  }
  .auth-story .brand {
    font-size: 28px;
  }
  .auth-story .brand svg {
    width: 30px;
    height: 31px;
  }
  .auth-intro {
    padding: 28px 0 2px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 25px;
  }
  .auth-intro > div:first-child {
    flex: 1;
  }
  .auth-intro h1 {
    font-size: 29px;
    letter-spacing: -0.9px;
  }
  .auth-intro .eyebrow {
    font-size: 8px;
    margin-bottom: 12px;
  }
  .auth-intro p {
    font-size: 10px;
    max-width: 300px;
    line-height: 1.7;
    margin-top: 13px;
  }
  .auth-receipt,
  .auth-story-footer {
    display: none;
  }
  .auth-form-wrap {
    padding: 30px 27px 40px;
    align-items: flex-start;
  }
  .auth-form {
    max-width: 420px;
  }
  .auth-form h2 {
    font-size: 25px;
  }
  .auth-form > p {
    margin-bottom: 23px;
    font-size: 11px;
  }
  .auth-switch {
    margin-top: 23px;
    padding-top: 20px;
  }
  .auth-trust {
    margin-top: 22px;
  }
  .profile-panel {
    padding: 23px;
  }
  .profile-info {
    gap: 19px;
  }
}
@media (max-width: 520px) {
  .main {
    padding: 17px 17px 23px;
  }
  .topbar {
    margin-bottom: 24px;
  }
  .private-label span {
    display: none;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .page-heading > .btn {
    font-size: 10px;
    padding: 9px 11px;
    gap: 5px;
    min-height: 36px;
  }
  .page-heading > .btn .icon {
    width: 14px;
  }
  .hero {
    min-height: 220px;
    padding: 23px 22px;
  }
  .hero h2 {
    font-size: 25px;
    line-height: 1.25;
  }
  .hero-copy {
    width: 80%;
    z-index: 2;
  }
  .hero-copy .eyebrow {
    font-size: 8px;
    margin-bottom: 12px;
  }
  .hero p {
    max-width: 206px;
    font-size: 10px;
    margin-top: 10px;
  }
  .hero .hero-tag {
    margin-top: 15px;
    font-size: 8px;
  }
  .hero-art {
    right: -72px;
    top: 50px;
    transform: scale(0.63);
    opacity: 0.55;
    min-width: 280px;
    transform-origin: top right;
  }
  .hero-art .halo {
    right: -60px;
    top: -100px;
  }
  .hero-art .receipt-art {
    left: 22%;
    top: 20px;
  }
  .hero-art .art-check {
    right: 14%;
    top: 39%;
  }
  .hero-art .art-avatars {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }
  .stat:first-child {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 17px 19px;
  }
  .stat:first-child .stat-head {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
    gap: 8px;
    font-size: 10px;
  }
  .stat:first-child .stat-icon {
    order: -1;
  }
  .stat:first-child .stat-amount {
    grid-column: 2;
    grid-row: 1/3;
    margin: 0;
    font-size: 27px;
  }
  .stat:first-child .stat-note {
    grid-column: 1;
    grid-row: 2;
    margin-left: 35px;
    margin-top: -1px;
  }
  .stat {
    padding: 16px 18px;
    border-radius: 16px;
  }
  .stat-head {
    font-size: 10px;
  }
  .stat-amount {
    font-size: 23px;
    margin-top: 11px;
  }
  .stat-amount span {
    font-size: 14px;
  }
  .stat-note {
    font-size: 8px;
  }
  .stat-icon {
    width: 26px;
    height: 26px;
  }
  .stat-icon .icon {
    width: 14px;
    height: 14px;
  }
  .bills-table thead {
    display: none;
  }
  .bills-table,
  .bills-table tbody,
  .bills-table tr,
  .bills-table td {
    display: block;
  }
  .bills-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 8px;
    padding: 16px;
  }
  .bills-table tr + tr {
    border-top: 1px solid var(--line);
  }
  .bills-table td {
    border: 0;
    padding: 0;
  }
  .bills-table td:first-child {
    grid-column: 1;
    grid-row: 1/3;
  }
  .bills-table td:nth-child(2) {
    display: none;
  }
  .bills-table td:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .bills-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }
  .bills-table td:last-child {
    display: none;
  }
  .bill-name-cell {
    align-items: flex-start;
    gap: 10px;
  }
  .bill-name-cell strong {
    font-size: 11px;
    max-width: 170px;
    overflow-wrap: anywhere;
    padding-top: 2px;
  }
  .bill-name-cell small {
    font-size: 9px;
  }
  .bill-total {
    font-size: 13px;
  }
  .bill-balance {
    font-size: 9px;
  }
  .badge {
    font-size: 8px;
    padding: 3px 6px;
  }
  .bill-icon {
    width: 34px;
    height: 34px;
    margin-top: 1px;
  }
  .below-home {
    margin-top: 19px;
  }
  .hint-card {
    padding: 17px;
  }
  .hint-card h3 {
    font-size: 10px;
  }
  .hint-card p {
    font-size: 9px;
  }
  .page-footer {
    font-size: 8px;
  }
  .section-head {
    margin-bottom: 13px;
  }
  .section-head small {
    font-size: 10px;
  }
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 18px;
  }
  .filter-tabs {
    align-self: flex-start;
  }
  .filter-tab {
    font-size: 10px;
    padding: 6px 13px;
  }
  .search-wrap {
    max-width: 100%;
  }
  .edit-section {
    padding: 18px 17px;
  }
  .bill-heading .subline {
    font-size: 10px;
  }
  .bill-heading .toolbar {
    gap: 7px;
  }
  .bill-heading h1 {
    font-size: 24px;
    overflow-wrap: anywhere;
  }
  .toolbar .dirty-tag {
    font-size: 9px;
    width: 100%;
  }
  .toolbar .btn {
    font-size: 9px;
    padding: 8px 10px;
    gap: 5px;
  }
  .toolbar .btn .icon {
    width: 13px;
    height: 13px;
  }
  .bill-heading .toolbar > .btn-primary {
    flex: 1;
  }
  .form-grid {
    gap: 13px;
  }
  .form-grid.mobile-single {
    grid-template-columns: 1fr;
  }
  .form-grid.mobile-single > .span-2 {
    grid-column: auto;
  }
  .field label,
  .field > span.label {
    font-size: 10px;
  }
  .field input,
  .field select {
    font-size: 11px;
  }
  .line-item {
    padding: 13px 11px;
  }
  .line-item-head {
    gap: 4px;
  }
  .line-item-head .line-no {
    width: 12px;
  }
  .line-item-head input {
    font-size: 11px;
    min-height: 35px;
  }
  .line-grid {
    gap: 7px;
    grid-template-columns: 0.7fr 1fr 1fr;
  }
  .line-grid input {
    padding: 8px 7px;
    font-size: 10px;
  }
  .line-grid label {
    font-size: 8px;
  }
  .allocation-head {
    gap: 10px;
  }
  .allocation-head select {
    font-size: 9px;
    padding-right: 20px;
    max-width: 165px;
  }
  .checkbox-label {
    font-size: 9px;
    gap: 5px;
  }
  .allocation-chip {
    font-size: 9px;
    padding: 5px 7px;
    gap: 4px;
  }
  .allocation-inputs {
    grid-template-columns: 1fr;
  }
  .payment-row {
    grid-template-columns: minmax(0, 1fr) 102px 23px;
    gap: 7px;
  }
  .payment-row select {
    font-size: 10px;
    padding: 8px;
  }
  .payment-row input {
    font-size: 10px;
    padding: 8px;
  }
  .payment-row .icon-btn {
    width: 23px;
  }
  .summary-column {
    grid-template-columns: 1fr;
  }
  .summary-column .summary-card {
    grid-row: auto;
  }
  .summary-column .transfer-card {
    grid-column: auto;
  }
  .summary-card h2 {
    font-size: 16px;
  }
  .summary-row {
    font-size: 12px;
  }
  .summary-total strong {
    font-size: 28px;
  }
  .summary-total {
    font-size: 13px;
  }
  .summary-card .btn {
    min-height: 44px;
  }
  .balance-card h2 {
    font-size: 15px;
  }
  .balance-person .info strong,
  .balance-person .amount {
    font-size: 12px;
  }
  .balance-person .info small {
    font-size: 10px;
  }
  .transfer-card h2 {
    font-size: 15px;
  }
  .transfer-name {
    font-size: 12px;
  }
  .transfer strong {
    font-size: 21px;
  }
  .form-grid .span-2 {
    grid-column: 1/-1;
  }
  .profile-info {
    grid-template-columns: 1fr;
  }
  .profile-head h2 {
    font-size: 18px;
  }
  .profile-head .avatar {
    width: 54px;
    height: 54px;
    font-size: 17px;
  }
  .profile-panel {
    padding: 22px;
  }
  .modal-head {
    padding: 21px 20px 0;
  }
  .modal-head h2 {
    font-size: 18px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-actions .btn {
    font-size: 11px;
  }
  .empty {
    padding: 33px 20px;
  }
  .empty h3 {
    font-size: 15px;
  }
  .empty p {
    font-size: 11px;
  }
  .auth-story {
    padding: 22px 24px;
  }
  .auth-intro {
    padding-top: 25px;
  }
  .auth-intro h1 {
    font-size: 29px;
  }
  .auth-intro p {
    max-width: 290px;
  }
  .auth-form-wrap {
    padding: 28px 24px 36px;
  }
  .auth-form .form-grid {
    gap: 12px;
  }
  .auth-form .form-stack {
    gap: 16px;
  }
  .auth-form h2 {
    font-size: 24px;
  }
  .auth-form input {
    font-size: 12px;
  }
  .auth-links {
    font-size: 10px;
  }
  .auth-trust {
    font-size: 8px;
  }
  .btn,
  .nav-link,
  input,
  select {
    -webkit-touch-callout: none;
  }
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
  .line-grid input,
  .allocation-value input {
    font-size: 16px !important;
    padding-left: 6px;
    padding-right: 6px;
  }
  .allocation-head select {
    font-size: 12px !important;
  }
  .line-grid input {
    min-height: 39px;
  }
  .payment-row select {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 14px !important;
  }
  .person-chip .name {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.kpi-explanation {
  font-size: 10px;
  color: #9b91a5;
  line-height: 1.7;
  margin: -15px 0 24px;
  max-width: 600px;
}
@media (max-width: 520px) {
  .kpi-explanation {
    font-size: 9px;
    margin: -10px 0 22px;
  }
}

.line-item-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  font-size: 10px;
  color: #aa98b7;
}
.line-item-total strong {
  color: #8f6fa6;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bill-heading h1 {
  overflow-wrap: anywhere;
}
.editor-column[aria-busy="true"] {
  opacity: 0.7;
  transition: opacity 0.15s;
}
