@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(../fonts/inter-latin-400-normal.woff2) format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(../fonts/inter-latin-500-normal.woff2) format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(../fonts/inter-latin-600-normal.woff2) format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(../fonts/inter-latin-700-normal.woff2) format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(../fonts/inter-latin-800-normal.woff2) format('woff2');
}
:root {
  font-family: Inter, Arial, sans-serif;
  color: #100b18;
  background: #eee9f8;
  font-synthesis: none;
  font-weight: 700;
  font-size: 16px;
  --purple: #4405ad;
  --purple-deep: #2d0878;
  --purple-bright: #6500ed;
  --line: #b799ff;
  --lavender: #e7d9ff;
  --surface: #fbf9ff;
  --green: #078c08;
  --red: #ed1b0c;
  --blue: #0067ff;
  --shadow: 0 3px 9px #38088e0a;
}
.settings-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: white;
  border-radius: 10px;
  background: #ffffff16;
}
.settings-link .icon {
  width: 22px;
  height: 22px;
}
.market-add {
  padding: 16px;
  border-radius: 16px;
}
.market-add-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.market-add-controls input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
}
.market-add-controls button {
  width: auto;
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 16px;
}
.market-help,
.market-empty {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 16px 0;
}
.market-empty a {
  color: var(--purple);
  text-decoration: underline;
}
.configured-markets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.configured-markets li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--lavender);
}
.configured-markets strong {
  font-size: 16px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.configured-markets button {
  flex-shrink: 0;
}
.invalid-strip {
  margin: 14px 0;
  border: 1px solid #f1c9c3;
  border-left: 3px solid #dc725e;
  border-radius: 12px;
  background: linear-gradient(100deg, #fff1ec, #fff8f5);
  color: #833e32;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  overflow: hidden;
}
.invalid-strip-single {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}
.invalid-strip .warning-icon {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: #c65d45;
}
.invalid-strip-message {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.invalid-strip strong {
  font-size: 14px;
  font-weight: 700;
}
.invalid-strip-message > span {
  font-size: 13px;
  color: #985b4b;
  overflow-wrap: anywhere;
}
.invalid-strip-message bdi {
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.invalid-strip summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  cursor: pointer;
  list-style: none;
}
.invalid-strip summary::-webkit-details-marker {
  display: none;
}
.invalid-strip summary strong {
  flex: 1;
  min-width: 0;
}
.invalid-strip summary > span {
  font-size: 12px;
  color: #985b4b;
}
.invalid-strip summary > .icon:last-child {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}
.invalid-strip[open] summary > .icon:last-child {
  transform: rotate(180deg);
}
.invalid-strip ul {
  list-style: none;
  margin: 0;
  padding: 0 12px 9px 42px;
  display: grid;
  gap: 8px;
}
.invalid-strip li {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid #f1d9d2;
}
.app-content {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.7;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffb700;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #7a3bee;
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button svg,
a svg {
  flex-shrink: 0;
}
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 1.2em;
  height: 1.2em;
}
[hidden], [x-cloak] {
  display: none !important;
}
.blue {
  color: var(--blue);
}
.green {
  color: var(--green);
}
.red {
  color: var(--red);
}
.amber {
  color: #f4a000;
}
.purple {
  color: var(--purple-bright);
}
.app-shell {
  max-width: 500px;
  margin: 24px auto;
  min-height: calc(100dvh - 48px);
  background: linear-gradient(115deg, #fff 5%, #f7f3ff 60%, #fbf9ff);
  border: 2px solid #d2bef8;
  border-radius: 38px;
  box-shadow: 0 12px 50px #2d087817;
  overflow: clip;
  position: relative;
}
.brand-header {
  gap: 14px;
  min-height: 98px;
  padding: 23px 26px 20px;
  color: white;
  background:
    radial-gradient(ellipse at 90% -60%, #6508d4 5%, transparent 75%),
    linear-gradient(115deg, #300675, #390598 75%, #4900ba);
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand > span:last-child {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.4;
  padding-top: 6px;
  white-space: nowrap;
}
.brand-logo {
  display: block;
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 9px;
  background: #fff6df;
  box-shadow: 0 0 0 1px #fff7;
}
.brand-logo img {
  position: absolute;
  max-width: none;
  width: 67px;
  height: 67px;
  left: -13.5px;
  top: 0;
  object-fit: contain;
}
.back-button {
  color: white !important;
  background: transparent !important;
  border-radius: 0 !important;
  border-right: 1px solid #b39cd9 !important;
  padding-right: 14px !important;
  width: 39px !important;
  height: 35px !important;
  flex-shrink: 0;
}
.back-button .icon {
  width: 25px;
  height: 25px;
}
.page {
  padding: 13px 13px 30px;
  flex: 1;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  border: 1px solid #ffffff45;
  border-radius: 15px;
  color: white;
  background: linear-gradient(160deg, #6410d4, #3c079a 74%);
  box-shadow: inset 0 1px 1px #9a48ed55;
  font-weight: 800;
  font-size: 23px;
  line-height: 1.2;
}
.primary:hover {
  filter: brightness(1.1);
}
.primary:active {
  transform: translateY(1px);
}
.primary.small {
  width: auto;
  min-height: 34px;
  padding: 8px 13px;
  gap: 5px;
  border-radius: 12px;
  font-size: 16px;
}
.icon-button {
  width: 36px;
  height: 36px;
  padding: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: transparent;
  color: var(--purple);
  flex-shrink: 0;
}
.icon-button:hover {
  background: #6b20de15;
}
.icon-button .icon {
  width: 21px;
  height: 21px;
}
.bordered {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(115deg, #fff, #f9f5ff);
  box-shadow: var(--shadow);
}
.home-page {
  padding-top: 0;
}
.summary-shell {
  margin: 0 -7px 8px;
  padding: 8px 8px 10px;
  background: linear-gradient(135deg, #f4edff 5%, #e8d9ff 60%);
  border: 1px solid #fff;
  border-radius: 27px;
  box-shadow:
    0 9px 0 4px #3e099a,
    0 12px 0 4px #3e099a;
  margin-bottom: 24px;
}
.summary-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 3px 9px;
}
.summary-top h1 {
  font-family: 'Noto Sans Devanagari', sans-serif;
  color: #2c086b;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  padding-top: 6px;
}
.period-filter {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.period-filter button {
  white-space: nowrap;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid #bd9be9;
  background: linear-gradient(#fbf8ff, #e2ceff);
  border-radius: 9px;
  color: #370a8d;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
}
.period-filter .selected {
  background: linear-gradient(145deg, #6804dd, #44039d);
  color: #fff;
  border-color: transparent;
}
.period-filter .icon {
  width: 14px;
  height: 14px;
}
.summary-top .period-filter {
  flex-wrap: wrap;
  gap: 3px;
}
.summary-top .period-filter button {
  min-height: 28px;
}
.summary-top .period-filter button:last-child {
  flex-basis: 100%;
}
.metrics {
  padding: 8px 7px 7px;
}
.metric-columns {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr 1.15fr;
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 5px 4px;
  border-right: 1px solid var(--line);
  font-size: 19px;
  letter-spacing: -0.6px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.25;
}
.metric:last-child {
  border: 0;
}
.metric-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  letter-spacing: -0.4px;
  font-size: 13px;
  font-weight: 800;
}
.metric-label .icon {
  width: 17px;
  height: 17px;
}
.metric-work .icon {
  color: var(--green);
}
.metric-commission .icon {
  color: #ff2900;
}
.metric-payout .icon {
  color: var(--blue);
}
.metric-balance .icon {
  color: var(--green);
}
.amount-pill {
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}
.amount-pill.positive {
  color: #087c06;
  background: linear-gradient(110deg, #d4f5cf, #dcf2da);
}
.amount-pill.negative {
  color: #e01809;
  background: linear-gradient(110deg, #ffd8e1, #ffe0e7);
}
.metric .amount-pill {
  padding: 2px 6px;
}
.previous-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 5px 2px 0 auto;
  gap: 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}
.previous-row > span:first-child {
  padding: 5px 12px;
  background: #e2ceff;
  border-radius: 10px 0 0 10px;
  color: #3e118e;
}
.previous-row > span:nth-child(2) {
  padding: 4px 12px;
  min-width: 76px;
  text-align: center;
  border-radius: 0 10px 10px 0;
}
.previous-row > span:nth-child(2):not(.amount-pill) {
  background: #e8dcfc;
}
.summary-metrics {
  background: linear-gradient(115deg, #fff9, #fff7);
  border: 1px solid #fff;
  border-radius: 20px;
  padding: 10px 5px 7px;
}
.summary-metrics .metric {
  font-size: 21px;
  padding: 0 4px 5px;
  gap: 8px;
}
.summary-metrics .metric-label {
  flex-direction: column;
  font-size: 14px;
  gap: 4px;
}
.summary-metrics .metric-label .icon {
  width: 24px;
  height: 24px;
}
.summary-metrics .metric-balance {
  background: linear-gradient(#ddf2de88, #e9f5df00);
}
.customers-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: linear-gradient(110deg, #e7daff, #eee4fc);
  border-radius: 24px;
  padding: 4px 5px 4px 14px;
  margin: 0 0 9px;
}
.customers-title h2 {
  font-size: 24px;
  letter-spacing: -0.7px;
  color: #310476;
  display: flex;
  align-items: center;
  gap: 10px;
}
.customers-title h2 .icon {
  color: #5d00df;
  width: 31px;
  height: 31px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff8;
  min-height: 38px;
  padding: 0 12px;
  margin-bottom: 10px;
  color: #3c078b;
}
.search-box > .icon {
  width: 24px;
  height: 24px;
}
.search-box input {
  border: 0;
  box-shadow: none;
  padding: 5px 0;
  font-size: 18px;
  background: transparent;
  flex: 1;
  min-width: 0;
  outline: none;
}
.search-box input::placeholder {
  color: #8b8b8b;
  font-weight: 600;
}
.search-box .icon-button {
  width: 25px;
  height: 25px;
  padding: 3px;
}
.customer-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.customer-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(120deg, #fff, #f9f6ff);
  box-shadow: var(--shadow);
}
.customer-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(110deg, #eee5ff, #e3d4f9);
  padding: 6px 8px 6px 15px;
  min-height: 58px;
}
.customer-open {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.avatar {
  color: var(--blue);
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 1px 0 #fff);
}
.customer-details {
  min-width: 0;
}
.customer-details h3 {
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
}
.customer-pills {
  display: flex;
  gap: 8px;
  margin-top: 3px;
}
.customer-pills span,
.identity-pill {
  font-size: 13px;
  line-height: 1.1;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #d0b2ff;
  background: linear-gradient(120deg, #f8f0ff80, #decbff80);
  color: #380c85;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.customer-edit {
  width: 29px;
  height: 32px;
  padding: 5px;
}
.customer-edit .icon {
  width: 18px;
  height: 18px;
}
.customer-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 35px;
}
.customer-chevron .icon {
  width: 26px;
  height: 26px;
  stroke-width: 3;
}
.customer-metrics-link {
  display: block;
}
.empty-state {
  font-weight: 500;
  text-align: center;
  color: #655778;
  padding: 25px 10px;
  font-size: 14px;
}
.range-caption {
  font-size: 12px;
  color: #4c2386;
  text-align: right;
  padding: 1px 5px 7px;
}
.balance-guide {
  margin: 8px 0 0;
  color: #655778;
  font-size: 12px;
  line-height: 1.4;
}
.form-page {
  padding-top: 14px;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(115deg, #fff, #f6f0ff);
  margin-top: -1px;
}
.page-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-radius: 40px;
  background: linear-gradient(110deg, #e1d0fd, #e6d6ff);
  color: #360579;
  font-size: 31px;
  font-weight: 800;
  line-height: 1.4;
  padding: 9px 10px;
  margin-bottom: 12px;
  letter-spacing: -0.6px;
}
.page-banner .icon {
  color: #6000e4;
  width: 44px;
  height: 44px;
}
.customer-form {
  padding: 17px 14px 20px;
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  min-width: 0;
}
.field-label > span {
  display: flex;
  align-items: center;
  gap: 14px;
}
.customer-form > .field-label {
  margin-bottom: 24px;
}
.field-label > span > .icon {
  width: 33px;
  height: 33px;
}
.field-label input,
input[type='date'] {
  width: 100%;
  min-width: 0;
  background: linear-gradient(115deg, #fff, #f7f1ff);
  border: 1px solid #8e53ff;
  border-radius: 12px;
  padding: 11px 15px;
  min-height: 47px;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 600;
  color: #100b18;
}
.field-label input::placeholder {
  color: #8a878b;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.4px;
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.rate-fields {
  margin-bottom: 28px;
  position: relative;
}
.rate-fields:after {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
}
.rate-fields .field-label {
  font-size: 19px;
  gap: 8px;
  letter-spacing: -0.3px;
}
.rate-fields .field-label > span {
  gap: 8px;
  white-space: nowrap;
}
.label-tile {
  padding: 7px;
  border-radius: 10px;
  background: #e1caff;
  width: 37px !important;
  height: 37px !important;
}
.label-tile.red {
  background: #ffccd4;
}
.create-customer {
  font-size: 25px;
  min-height: 60px;
}
.create-customer > .icon {
  width: 34px;
  height: 34px;
}
.form-page {
  min-height: 655px;
}
.entry-page {
  padding-top: 0;
}
.identity-shell {
  border: 1px solid #fff;
  background: linear-gradient(120deg, #fff, #f7f2ff);
  border-radius: 19px;
  padding: 6px;
  margin-bottom: 14px;
  box-shadow: 0 8px 0 3px #3e099a;
}
.identity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(110deg, #e6d8fc, #e6d6fb);
  border-radius: 14px;
  padding: 9px 12px;
  min-height: 54px;
}
.identity-row > .avatar {
  width: 36px;
  height: 36px;
}
.identity-row > strong {
  font-size: 26px;
  line-height: 1.05;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  padding-right: 7px;
  letter-spacing: -0.6px;
}
.identity-pill {
  font-size: 16px;
  padding: 5px 10px;
}
.identity-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 10px 0 5px;
}
.identity-totals > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}
.identity-totals > div:first-child {
  border-right: 1px solid var(--line);
}
.identity-totals .icon {
  width: 35px;
  height: 35px;
}
.identity-totals > div > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.identity-totals .amount-pill,
.identity-totals > div > span > span {
  font-size: 23px;
  text-align: center;
  font-weight: 800;
  background: #dbefe4;
  border-radius: 10px;
  padding: 4px 12px;
  line-height: 1.1;
}
.identity-totals .amount-pill.negative {
  background: #ffdae4;
}
.entry-tabs {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: linear-gradient(110deg, #e6d5ff, #dfc9fb);
  border-radius: 30px;
  margin: 24px 0 13px;
}
.entry-tabs .entry-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 9px 8px;
  border-radius: 30px;
  color: #35087d;
  background: transparent;
  font-size: 17px;
  letter-spacing: -0.4px;
  font-weight: 800;
  white-space: nowrap;
}
.entry-tabs .active {
  color: white;
  background: linear-gradient(160deg, #7017db, #43049c);
  box-shadow: inset 0 1px 2px #a45eff;
}
.entry-tabs .icon {
  width: 24px;
  height: 24px;
}
.paste-box {
  position: relative;
  padding: 10px 13px;
  min-height: 147px;
}
.paste-box textarea {
  resize: vertical;
  min-height: 125px;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.1px;
  padding: 0 77px 0 0;
  color: #16121a;
  font-weight: 600;
}
.paste-button {
  position: absolute;
  right: 9px;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(110deg, #f1e7ff, #e1ceff);
  color: #350875;
  font-size: 16px;
  font-weight: 800;
}
.paste-button .icon {
  width: 20px;
  height: 20px;
}
.clear-message {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: #78767d;
}
.manual-form {
  padding: 9px 12px 10px;
}
.market-field {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 11px;
}
.select-wrap {
  position: relative;
  flex: 1;
}
.select-wrap select {
  display: block;
  appearance: none;
  width: 100%;
  min-height: 36px;
  background: linear-gradient(110deg, #fff, #f0e7ff);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 6px 34px 6px 13px;
  color: #100b18;
  font-size: 19px;
  font-weight: 800;
}
.select-wrap .icon {
  position: absolute;
  right: 13px;
  top: 8px;
  color: #625b70;
  pointer-events: none;
}
.manual-form .select-wrap select {
  height: 37px;
}
.manual-form .two-fields {
  gap: 22px;
}
.manual-form .field-label {
  font-size: 16px;
  gap: 6px;
}
.manual-form .field-label input {
  font-size: 17px;
  min-height: 36px;
  padding: 8px 12px;
  border-color: var(--line);
  border-radius: 11px;
}
.manual-form .field-label input::placeholder {
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
}
.manual-form .primary {
  font-size: 18px;
  min-height: 39px;
  margin-top: 12px;
  border-radius: 10px;
  padding: 8px;
}
.manual-form .primary .icon {
  width: 22px;
  height: 22px;
}
.entries-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 5px 9px;
  font-size: 23px;
  letter-spacing: -0.6px;
}
.entries-title > .icon {
  color: #6200e9;
  width: 30px;
  height: 30px;
}
.entries-title > span {
  padding: 5px 14px;
  border-radius: 20px;
  background: #e4d0ff;
  font-size: 16px;
  letter-spacing: -0.3px;
  color: #390582;
}
.entry-table-wrap {
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #fff8;
  padding: 1px;
}
.entry-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}
.entry-table th,
.entry-table td {
  padding: 6px 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.entry-table th:last-child,
.entry-table td:last-child {
  border-right: 0;
}
.entry-table thead {
  background: linear-gradient(110deg, #f0e6ff, #e8d9fc);
}
.entry-table thead th {
  font-size: 14px;
  padding: 5px 3px;
  vertical-align: bottom;
  letter-spacing: -0.4px;
}
.entry-table thead .icon {
  display: block;
  margin: 0 auto 2px;
  width: 19px;
  height: 19px;
}
.entry-table th:first-child {
  width: 21%;
}
.entry-table th:nth-child(2) {
  width: 25%;
}
.entry-table th:nth-child(3) {
  width: 18%;
}
.entry-table th:nth-child(4) {
  width: 19%;
}
.entry-table th.actions-column {
  width: 17%;
}
.row-actions {
  padding: 0 !important;
  white-space: nowrap;
}
.row-actions .icon-button {
  width: 30px;
  height: 30px;
  padding: 5px;
}
.row-actions .icon-button .icon {
  width: 19px;
  height: 19px;
}
.entry-table tfoot {
  background: linear-gradient(110deg, #e5d1ff, #e7d5ff);
  color: #37057c;
  font-size: 20px;
}
.entry-table tfoot td,
.entry-table tfoot th {
  border-bottom: 0;
  padding: 8px 3px;
}
.entry-table tfoot td:nth-child(4) {
  border-right: 0;
}
.calculate-button {
  margin-top: 22px;
  min-height: 56px;
  font-size: 25px;
  gap: 16px;
}
.calculate-button > .icon {
  width: 33px;
  height: 33px;
}
.calculate-button > span {
  padding-left: 13px;
  border-left: 1px solid #d3adff;
}
.preview-page {
  padding: 0 11px 28px;
}
.preview-page .identity-shell {
  margin-bottom: 18px;
}
.identity-compact {
  padding: 5px;
}
.identity-compact .identity-row {
  padding: 7px 10px;
  min-height: 44px;
}
.identity-compact .avatar {
  width: 29px;
  height: 29px;
}
.identity-compact .identity-row > strong {
  font-size: 23px;
}
.identity-compact .identity-pill {
  font-size: 14px;
  padding: 4px 9px;
}
.calculation-card {
  overflow: hidden;
  border-radius: 16px;
}
.calculation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 9px 12px;
  background: linear-gradient(120deg, #5905bb, #3b0891);
  color: white;
}
.calculation-heading h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  letter-spacing: -0.5px;
  font-weight: 800;
}
.calculation-heading h1 .icon {
  width: 24px;
  height: 24px;
}
.status-badge {
  color: #3d1281;
  background: linear-gradient(110deg, #f5edff, #d9bfff);
  border-radius: 10px;
  padding: 5px 9px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}
.calculation-rows {
  padding: 0 8px 6px;
}
.calculation-row {
  display: grid;
  grid-template-columns: 47px 1fr auto;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid #d2bef8;
  min-height: 32px;
  padding: 4px 7px 4px 5px;
  background: linear-gradient(110deg, #fff8, #f2ebff80);
  border-radius: 8px;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: -0.4px;
}
.calculation-row > .icon {
  width: 28px;
  height: 28px;
  justify-self: center;
}
.calculation-label {
  font-weight: 800;
}
.calculation-label small {
  display: block;
  color: #68606c;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}
.calculation-row strong {
  font-size: 21px;
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.calculation-row.net-balance {
  margin-top: 3px;
  border-bottom: 0;
  background: linear-gradient(110deg, #cafac7, #d0f9ca);
  min-height: 43px;
  font-size: 22px;
}
.calculation-row.net-balance strong {
  font-size: 27px;
}
.calculation-row.net-balance .icon {
  width: 33px;
  height: 33px;
}
.calculation-row.net-negative {
  background: linear-gradient(110deg, #ffd8df, #ffe3e7);
}
.confirm-button {
  margin: 9px 0 24px;
  font-size: 26px;
  min-height: 45px;
  padding: 7px 12px;
  border-radius: 12px;
}
.confirm-button > .icon {
  width: 29px;
  height: 29px;
}
.confirm-button > span {
  padding-left: 14px;
  border-left: 1px solid #d9b8ff;
}
.history-section {
  border-radius: 15px;
  overflow: hidden;
}
.entry-page > .history-section {
  margin-top: 24px;
}
.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px;
  background: linear-gradient(110deg, #4a049f, #320a80);
  color: #fff;
  border-radius: 14px 14px 0 0;
}
.history-heading h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 23px;
  white-space: nowrap;
  letter-spacing: -0.6px;
}
.history-heading h2 .icon {
  width: 24px;
  height: 24px;
}
.history-heading .period-filter {
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 1 245px;
  gap: 3px;
}
.history-heading .period-filter button {
  font-size: 11px;
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 8px;
  flex: 1;
}
.history-heading .period-filter button:last-child {
  flex: 0 1 auto;
}
.history-heading .period-filter .icon {
  width: 11px;
  height: 11px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}
.history-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff9;
  padding: 5px;
}
.history-card.expanded {
  padding: 5px 5px 7px;
}
.history-date {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  width: 100%;
  min-height: 36px;
  text-align: left;
  background: linear-gradient(115deg, #e4d1fd, #e4d7f8);
  padding: 7px 10px;
  color: #100a18;
}
.history-date > .icon {
  color: #39068a;
  width: 20px;
  height: 20px;
}
.history-date strong {
  font-size: 19px;
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.history-date > .icon:last-child {
  margin-left: auto;
  width: 24px;
  height: 24px;
}
.saved-time {
  padding-left: 15px;
  border-left: 1px solid #ab80f8;
  color: #6312c6;
  font-style: italic;
  font-size: 13px;
  white-space: nowrap;
  font-weight: 600;
}
.mini-closing {
  margin-left: auto;
  font-size: 15px;
}
.history-work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 5px 1px;
  gap: 5px;
}
.history-work > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 16px;
  white-space: nowrap;
}
.history-work > span:first-child {
  border-right: 1px solid var(--line);
}
.history-work .icon {
  width: 24px;
  height: 24px;
}
.history-work .amount-pill {
  font-size: 17px;
  padding: 3px 7px;
}
.history-work > span:first-child > span {
  background: #def3e5;
  padding: 3px 7px;
  border-radius: 9px;
}
.historical-table {
  border-radius: 12px;
}
.historical-table .entry-table {
  font-size: 16px;
}
.historical-table .entry-table th,
.historical-table .entry-table td {
  padding: 2px 3px;
}
.historical-table .entry-table thead th {
  font-size: 15px;
  padding: 4px 3px;
}
.historical-table .entry-table tfoot {
  font-size: 18px;
}
.historical-calculations {
  padding: 4px 5px 0;
}
.historical-calculations .calculation-row {
  font-size: 16px;
  grid-template-columns: 48px 1fr auto;
  min-height: 23px;
  padding: 2px 3px;
  border-radius: 0;
  background: transparent;
}
.historical-calculations .calculation-row > .icon {
  width: 21px;
  height: 21px;
}
.historical-calculations .calculation-row strong {
  font-size: 17px;
}
.historical-calculations .calculation-row:last-child {
  border: 0;
}
.error,
.storage-error {
  color: #aa1b16;
  background: #fff0f1;
  border: 1px solid #f3bbbf;
  border-radius: 9px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.storage-error {
  margin: 0;
  border-radius: 0;
}
.modal {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  width: min(440px, calc(100% - 28px));
  background: #fbf8ff;
  color: #1b102b;
  box-shadow: 0 20px 80px #23065040;
}
.modal::backdrop {
  background: #21074270;
  backdrop-filter: blur(3px);
}
.auth-screen {
  box-sizing: border-box;
  min-height: 100dvh;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 28px;
}
.splash-screen {
  background: radial-gradient(ellipse at 50% 38%, #8522ef 0%, #580cbb 38%, #30046f 100%);
  color: white;
  overflow: hidden;
}
.splash-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  animation: splash-reveal 500ms ease-out both;
}
.splash-identity img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 26px;
  filter: drop-shadow(0 12px 32px #1d004860);
}
.splash-identity h1 {
  margin: 0;
  font-size: clamp(24px, 6.8vw, 32px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.7px;
}
@keyframes splash-reveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .splash-identity {
    animation: none;
  }
}
.login-screen {
  background: radial-gradient(ellipse at 50% 20%, #e5d2ff 0%, #f9f5ff 65%);
}
.login-card {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  padding: 34px 24px 28px;
  border: 1px solid #e4d5f8;
  border-radius: 28px;
  background: #ffffffed;
  box-shadow: 0 18px 60px #4c168e14;
}
.login-logo {
  display: block;
  width: 106px;
  height: 106px;
  object-fit: contain;
  border-radius: 21px;
  margin: 0 auto 32px;
}
.pin-form-fields {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pin-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: #4b237c;
  font-size: 15px;
  font-weight: 650;
  min-width: 0;
}
.pin-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #d5bbed;
  border-radius: 13px;
  outline: none;
  background: #fbf8ff;
  text-align: center;
  font: inherit;
  font-size: 28px;
  letter-spacing: 0.38em;
  color: #4d138f;
}
.pin-field input::placeholder {
  color: #c8b3e1;
  opacity: 1;
}
.pin-field input:focus {
  border-color: #7c25dc;
  box-shadow: 0 0 0 3px #7c25dc16;
}
.pin-input-wrap {
  position: relative;
  display: block;
}
.pin-input-wrap.has-visibility-toggle input {
  padding-inline: 52px;
}
.pin-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #704099;
  transform: translateY(-50%);
}
.pin-visibility-toggle:hover,
.pin-visibility-toggle:focus-visible {
  background: #eadfff;
  color: var(--purple);
}
.pin-visibility-toggle .icon {
  width: 21px;
  height: 21px;
}
.pin-submit {
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  gap: 9px;
  font-size: 18px;
  text-decoration: none;
}
.pin-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.pin-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff0f3;
  color: #ac2340;
  font-size: 14px;
  line-height: 1.5;
}
.settings-menu {
  padding: 24px 16px 32px;
}
.settings-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: #3c1376;
}
.settings-intro h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.5px;
}
.settings-intro-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #dfcdf5;
  border-radius: 14px;
  background: #f0e5ff;
}
.settings-intro-icon .icon {
  width: 23px;
  height: 23px;
}
.settings-actions {
  display: grid;
  gap: 14px;
}
.settings-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  min-width: 0;
  border: 1px solid #e1d4f1;
  border-radius: 20px;
  background: linear-gradient(115deg, #fff 45%, #faf5ff);
  box-shadow: 0 5px 18px #4c168e08;
  text-decoration: none;
  color: #46157f;
}
.settings-action:hover {
  border-color: #b68adf;
  background: #faf5ff;
}
.settings-action:focus-visible {
  outline: 3px solid #c29be9;
  outline-offset: 3px;
}
.settings-action-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(140deg, #872ee7, #4c0aa6);
  box-shadow: 0 4px 10px #6022ab1a;
}
.settings-action-icon .icon {
  width: 23px;
  height: 23px;
}
.settings-action-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 7px;
  min-width: 0;
}
.settings-action-text strong {
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.settings-action-text small {
  font-size: 13px;
  line-height: 1.4;
  color: #8a769d;
  font-weight: 500;
}
.settings-action > .icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #9d7bbc;
}
.settings-logout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid #ebd8e1;
  border-radius: 15px;
  color: #a54767;
  background: #fffafd;
  font: inherit;
  font-size: 15px;
}
.settings-logout:hover {
  background: #fff0f5;
}
.settings-menu > .pin-error {
  margin-top: 18px;
}
.settings-panel {
  padding: 20px 16px;
  border: 1px solid #e2d5f2;
  border-radius: 22px;
  background: #ffffffd9;
  box-shadow: 0 5px 20px #4c168e08;
}
.settings-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.settings-panel-heading h1 {
  flex: 1;
  margin: 0;
  color: #431376;
  font-size: 23px;
}
.settings-count {
  display: grid;
  place-items: center;
  min-width: 30px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #efe4fd;
  color: #7645a5;
  font-size: 14px;
}
.markets-page .market-add {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.markets-page .market-add .field-label {
  font-size: 14px;
  color: #6e5288;
}
.markets-page .market-add-controls {
  gap: 8px;
}
.markets-page .market-add-controls input {
  min-height: 46px;
  background: #faf7ff;
}
.markets-page .market-add-controls button {
  min-height: 46px;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 15px;
}
.markets-page .market-help {
  margin: 15px 0 20px;
  color: #8a769d;
  font-size: 13px;
  line-height: 1.6;
}
.markets-page .configured-markets {
  gap: 10px;
}
.markets-page .configured-markets li {
  min-height: 56px;
  padding: 6px 8px 6px 14px;
  border-color: #e6dbf4;
  border-radius: 13px;
  color: #573080;
  background: #f8f3ff;
}
.markets-page .configured-markets strong {
  font-size: 15px;
}
.markets-page .configured-markets .icon-button {
  width: 36px;
  height: 36px;
  color: #956db9;
  background: #eee3fb;
  border-radius: 10px;
}
.pin-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 18px;
  color: #542291;
  text-decoration: none;
  font-size: 16px;
}
.change-pin-card {
  padding: 24px 20px;
  border-radius: 22px;
  background: #fffaff;
}
.change-pin-card h1 {
  text-align: center;
  color: #431376;
  font-size: 25px;
  margin: 12px 0 26px;
}
.pin-page-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #eee1ff;
  color: #6c1bc0;
  font-size: 27px;
}
.pin-success {
  text-align: center;
  color: #27763b;
  font-size: 16px;
}
.pin-success > svg {
  width: 38px;
  height: 38px;
}
.pin-success .pin-submit {
  margin-top: 24px;
}
.history-day {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 14px 2px 2px;
  font-size: 14px;
  color: #572b88;
}
.history-day span {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 20px;
  background: #eee5fa;
}
.history-bulk-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #d8c1f8;
  border-radius: 12px;
  background: #f3ebff;
}
.history-select-all,
.history-record-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #45157f;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.history-select-all input,
.history-record-select input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #5b0fbd;
  cursor: pointer;
}
.history-record-select input {
  width: 14px;
  height: 14px;
}
.history-select-all small {
  color: #755593;
}
.history-bulk-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #e5a9b5;
  border-radius: 9px;
  color: #b4233b;
  background: #fff0f3;
  font-size: 13px;
  font-weight: 800;
}
.history-bulk-delete:hover:not(:disabled) {
  background: #ffe0e6;
}
.history-bulk-delete .icon {
  width: 17px;
  height: 17px;
}
.history-card-heading {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
}
.history-record-select {
  flex: 0 0 22px;
  justify-content: center;
}
.history-card-heading .history-date {
  flex: 1;
  min-width: 0;
  grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1fr) 14px;
}
.history-card-heading .history-date strong {
  font-size: 14px;
}
.history-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 5px;
  border: 0;
  border-radius: 9px;
  background: #eee5fb;
  color: #542291;
  font-size: 12px;
}
.history-edit:hover {
  background: #e2d2f7;
}
@media (max-width: 380px) {
  .history-card-heading .history-date {
    grid-template-columns: 16px minmax(0, 1fr) 14px;
  }
  .history-card-heading .history-date > strong {
    grid-column: 2;
    grid-row: 1;
  }
  .history-card-heading .history-date .mini-closing {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    width: 100%;
  }
  .history-card-heading .history-date > .icon:last-child {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
.entry-date-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #dfd0f1;
  border-radius: 12px;
  background: #faf7ff;
  color: #542291;
  font-size: 14px;
}
.entry-date-field > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.entry-date-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 5px;
  border: 1px solid #d9c8ed;
  border-radius: 8px;
  background: white;
  color: #351164;
  font: inherit;
  font-size: 16px;
}
.entry-date-hint {
  margin: 0 0 12px;
  color: #725b8c;
  font-size: 13px;
  line-height: 1.5;
}
.editing-entry-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  margin: 14px 0;
  border-radius: 10px;
  background: #eee5fb;
  color: #542291;
  font-size: 14px;
}
.editing-entry-notice button {
  flex-shrink: 0;
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid #d9c8ed;
  border-radius: 8px;
  color: inherit;
  background: white;
}
.entry-stamp {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #644778;
  overflow-wrap: anywhere;
}
.delete-entry-dialog {
  max-width: 420px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px 20px 20px;
}
.delete-entry-dialog h2 {
  margin: 0 0 18px;
  font-size: 23px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.4px;
  color: #351164;
}
.delete-entry-dialog p {
  line-height: 1.5;
}
.delete-entry-preview {
  border: 1px solid #e3d8f2;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.delete-entry-meta {
  margin: 0;
  padding: 10px 12px;
  color: #7c6c8b;
  font-size: 12px;
  font-weight: 400;
  background: #f7f2fc;
}
.delete-entry-rows {
  max-height: 220px;
  overflow-y: auto;
}
.delete-entry-rows table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.delete-entry-rows th,
.delete-entry-rows td {
  padding: 10px 8px;
  text-align: right;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #f0e9f7;
  vertical-align: middle;
}
.delete-entry-rows th:first-child,
.delete-entry-rows td:first-child {
  text-align: left;
  width: 28%;
}
.delete-entry-rows th:nth-child(2) {
  width: 42%;
}
.delete-entry-rows thead th {
  position: sticky;
  top: 0;
  background: #fff;
  color: #725b8c;
  font-size: 13px;
  font-weight: 600;
  z-index: 1;
}
.delete-entry-rows tbody td:first-child {
  color: #532290;
  font-weight: 700;
}
.delete-entry-rows tfoot {
  background: #faf7ff;
  font-weight: 700;
}
.delete-entry-closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #eee5fb;
  color: #441580;
  font-size: 14px;
}
.delete-entry-closing strong {
  min-width: 0;
  text-align: right;
}
.delete-payment-detail {
  margin: 0;
  padding: 12px;
  overflow-wrap: anywhere;
}
.delete-payment-detail span {
  display: block;
  margin-top: 6px;
}
.bulk-delete-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 70px;
  margin: 0;
  padding: 14px;
  color: #4b227b;
  background: #f7f2fc;
}
.bulk-delete-summary strong {
  font-size: 24px;
  color: #b4233b;
}
.delete-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.delete-actions button {
  min-height: 44px;
  border: 1px solid #d8cce6;
  border-radius: 10px;
  background: white;
  font: inherit;
}
.delete-actions .danger-button {
  background: #b4233b;
  color: white;
  border-color: #b4233b;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #37077f;
}
.section-heading h2 {
  font-size: 24px;
}
.modal .field-label {
  font-size: 16px;
  gap: 8px;
}
.modal .field-label input {
  font-size: 17px;
  min-height: 44px;
}
.modal .two-fields {
  gap: 14px;
}
.modal .primary {
  font-size: 19px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 700px) {
  body {
    background:
      radial-gradient(ellipse at 15% 30%, #ded0f6, transparent 45%),
      radial-gradient(ellipse at 85% 80%, #dfd5f5, transparent 45%), #f1edf7;
  }
  .app-shell {
    min-height: 890px;
  }
  .home-page {
    padding-bottom: 37px;
  }
}
@media (max-width: 520px) {
  .app-shell {
    margin: 0 auto;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .brand-header {
    padding: 22px 22px 20px;
    min-height: 92px;
  }
  .brand > span:last-child {
    font-size: 24px;
  }
  .form-page {
    min-height: calc(100dvh - 162px);
  }
}
@media (max-width: 440px) {
  .brand-header {
    gap: 12px;
    padding: 20px 18px;
  }
  .brand > span:last-child {
    font-size: 22px;
  }
  .brand {
    gap: 12px;
  }
  .brand-logo {
    width: 36px;
    height: 36px;
  }
  .brand-logo img {
    width: 61px;
    height: 61px;
    left: -12px;
  }
  .summary-top h1 {
    font-size: 20px;
  }
  .summary-top {
    gap: 7px;
  }
  .period-filter button {
    font-size: 12px;
    padding: 5px 5px;
  }
  .summary-metrics .metric {
    font-size: 19px;
  }
  .metric {
    font-size: 17px;
  }
  .metric-label {
    font-size: 12px;
    gap: 3px;
  }
  .metric-label .icon {
    width: 15px;
    height: 15px;
  }
  .metrics {
    padding-left: 3px;
    padding-right: 3px;
  }
  .metric {
    padding-left: 3px;
    padding-right: 3px;
  }
  .previous-row {
    font-size: 12px;
  }
  .previous-row > span:first-child {
    padding: 5px 10px;
  }
  .customer-details h3 {
    font-size: 23px;
  }
  .customer-open {
    gap: 11px;
  }
  .customer-pills {
    gap: 5px;
  }
  .customer-pills span {
    font-size: 11px;
    padding: 3px 8px;
  }
  .customers-title h2 {
    font-size: 22px;
  }
  .primary.small {
    font-size: 14px;
    padding: 8px 10px;
  }
  .customer-strip {
    padding-left: 14px;
  }
  .identity-row {
    gap: 8px;
    padding: 8px;
  }
  .identity-row > .avatar {
    width: 31px;
    height: 31px;
  }
  .identity-row > strong {
    font-size: 24px;
    padding-right: 2px;
  }
  .identity-pill {
    font-size: 14px;
    padding: 4px 7px;
  }
  .identity-totals {
    margin: 10px 0 4px;
  }
  .identity-totals > div {
    gap: 8px;
  }
  .identity-totals > div > span {
    font-size: 14px;
  }
  .identity-totals .icon {
    width: 31px;
    height: 31px;
  }
  .identity-totals .amount-pill,
  .identity-totals > div > span > span {
    font-size: 22px;
  }
  .entry-tabs .entry-tab {
    font-size: 15px;
    gap: 6px;
  }
  .entry-tabs .icon {
    width: 22px;
    height: 22px;
  }
  .paste-box textarea {
    font-size: 14px;
    min-height: 116px;
  }
  .paste-box {
    min-height: 139px;
  }
  .entry-table {
    font-size: 17px;
  }
  .entry-table thead th {
    font-size: 12px;
  }
  .entry-table tfoot {
    font-size: 18px;
  }
  .row-actions .icon-button {
    width: 25px;
    height: 29px;
    padding: 4px;
  }
  .row-actions .icon-button .icon {
    width: 18px;
    height: 18px;
  }
  .page-banner {
    font-size: 29px;
    gap: 14px;
  }
  .field-label {
    font-size: 19px;
  }
  .field-label input::placeholder {
    font-size: 19px;
  }
  .rate-fields .field-label {
    font-size: 16px;
    letter-spacing: -0.5px;
  }
  .rate-fields .field-label > span {
    gap: 7px;
  }
  .label-tile {
    width: 32px !important;
    height: 32px !important;
    padding: 6px;
  }
  .rate-fields {
    gap: 20px;
  }
  .identity-compact .identity-row > strong {
    font-size: 22px;
  }
  .identity-compact .identity-pill {
    font-size: 12px;
    padding: 4px 7px;
  }
  .calculation-heading h1 {
    font-size: 19px;
    gap: 8px;
  }
  .status-badge {
    font-size: 12px;
    padding: 5px 7px;
  }
  .calculation-row {
    grid-template-columns: 42px 1fr auto;
    font-size: 17px;
    min-height: 31px;
  }
  .calculation-row strong {
    font-size: 19px;
  }
  .calculation-label small {
    font-size: 12px;
  }
  .calculation-row.net-balance {
    font-size: 21px;
  }
  .calculation-row.net-balance strong {
    font-size: 25px;
  }
  .history-heading {
    gap: 8px;
  }
  .history-heading h2 {
    font-size: 21px;
  }
  .history-heading .period-filter button {
    font-size: 10px;
  }
  .history-date strong {
    font-size: 17px;
  }
  .history-date {
    gap: 7px;
    padding: 7px;
  }
  .saved-time {
    font-size: 11px;
    padding-left: 10px;
  }
  .history-work > span {
    font-size: 14px;
    gap: 4px;
  }
  .history-work .amount-pill {
    font-size: 15px;
  }
  .history-work .icon {
    width: 22px;
    height: 22px;
  }
  .mini-closing {
    font-size: 13px;
  }
  .historical-calculations .calculation-row strong {
    font-size: 16px;
  }
  .historical-calculations .calculation-row {
    font-size: 15px;
  }
  .calculate-button {
    font-size: 23px;
  }
}
@media (max-width: 370px) {
  .brand > span:last-child {
    font-size: 19px;
  }
  .brand-header {
    padding-left: 14px;
    padding-right: 14px;
  }
  .brand {
    gap: 9px;
  }
  .page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .summary-top h1 {
    font-size: 18px;
  }
  .summary-metrics .metric {
    font-size: 16px;
  }
  .summary-metrics .metric-label {
    font-size: 12px;
  }
  .metric {
    font-size: 15px;
  }
  .metric-label {
    font-size: 10px;
    gap: 3px;
  }
  .metric-label .icon {
    width: 12px;
    height: 12px;
  }
  .customer-pills {
    gap: 4px;
  }
  .customer-pills span {
    font-size: 10px;
    padding: 3px 5px;
  }
  .customer-details h3 {
    font-size: 21px;
  }
  .customer-open {
    gap: 9px;
  }
  .customer-strip .avatar {
    width: 30px;
    height: 30px;
  }
  .customers-title h2 {
    font-size: 19px;
    gap: 6px;
  }
  .primary.small {
    font-size: 12px;
  }
  .previous-row {
    font-size: 11px;
  }
  .identity-row {
    gap: 5px;
  }
  .identity-row > .avatar {
    width: 27px;
    height: 27px;
  }
  .identity-row > strong {
    font-size: 20px;
  }
  .identity-pill {
    font-size: 12px;
    padding: 4px 5px;
  }
  .identity-totals > div > span {
    font-size: 12px;
  }
  .identity-totals .icon {
    width: 26px;
    height: 26px;
  }
  .identity-totals .amount-pill,
  .identity-totals > div > span > span {
    font-size: 19px;
  }
  .entry-tabs .entry-tab {
    font-size: 13px;
  }
  .entry-tabs .icon {
    width: 19px;
    height: 19px;
  }
  .paste-box textarea {
    font-size: 12px;
    letter-spacing: -0.2px;
    padding-right: 58px;
  }
  .paste-button {
    font-size: 13px;
    padding: 7px;
  }
  .paste-button .icon {
    width: 16px;
    height: 16px;
  }
  .entry-table {
    font-size: 15px;
  }
  .entry-table thead th {
    font-size: 10px;
  }
  .row-actions .icon-button {
    width: 21px;
    height: 29px;
    padding: 3px;
  }
  .row-actions .icon-button .icon {
    width: 16px;
    height: 16px;
  }
  .entry-table tfoot {
    font-size: 16px;
  }
  .page-banner {
    font-size: 26px;
  }
  .rate-fields .field-label {
    font-size: 14px;
  }
  .rate-fields .field-label > span {
    gap: 5px;
  }
  .field-label input::placeholder {
    font-size: 17px;
  }
  .create-customer {
    font-size: 22px;
  }
  .identity-compact .identity-pill {
    font-size: 11px;
    padding: 4px 5px;
  }
  .identity-compact .identity-row > strong {
    font-size: 19px;
  }
  .calculation-heading {
    padding: 8px;
  }
  .calculation-heading h1 {
    font-size: 17px;
    gap: 6px;
  }
  .calculation-heading h1 .icon {
    width: 21px;
    height: 21px;
  }
  .calculation-row {
    font-size: 15px;
    grid-template-columns: 34px 1fr auto;
  }
  .calculation-row strong {
    font-size: 17px;
  }
  .calculation-row.net-balance {
    font-size: 19px;
  }
  .calculation-row.net-balance strong {
    font-size: 23px;
  }
  .calculation-row > .icon {
    width: 25px;
    height: 25px;
  }
  .history-date strong {
    font-size: 15px;
  }
  .saved-time {
    font-size: 10px;
    padding-left: 7px;
  }
  .history-work > span {
    font-size: 12px;
  }
  .history-work .amount-pill {
    font-size: 13px;
  }
  .history-work .icon {
    width: 18px;
    height: 18px;
  }
  .historical-table .entry-table {
    font-size: 14px;
  }
  .historical-table .entry-table thead th {
    font-size: 13px;
  }
  .historical-table .entry-table tfoot {
    font-size: 16px;
  }
  .mini-closing {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a {
    transition:
      background 0.15s,
      filter 0.15s,
      transform 0.15s;
  }
}

.debit-button,
.credit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #f0b7c2;
  border-radius: 10px;
  color: #b4233b;
  background: #fff0f3;
  font-size: 14px;
  font-weight: 800;
}
.debit-button {
  border-color: #f0b7c2;
  color: #b4233b;
  background: #fff0f3;
}
.debit-button:hover {
  background: #ffe1e7;
}
.credit-button {
  border-color: #a9d9ae;
  color: #087c06;
  background: #e9f7e8;
}
.credit-button:hover {
  background: #d9f1d7;
}
.debit-button .icon,
.credit-button .icon {
  width: 18px;
  height: 18px;
}
.balance-dialog {
  max-width: 400px;
}
.balance-help {
  color: #725b8c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.balance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.balance-actions button {
  min-height: 46px;
  border: 1px solid #d8cce6;
  border-radius: 10px;
  background: white;
  color: #4d326c;
  font-weight: 800;
}
.balance-actions .debit-submit,
.balance-actions .credit-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: white;
}
.balance-actions .debit-submit {
  border-color: #b4233b;
  background: #b4233b;
}
.balance-actions .debit-submit:hover {
  background: #961d32;
}
.balance-actions .credit-submit {
  border-color: #087c06;
  background: #087c06;
}
.balance-actions .credit-submit:hover {
  background: #066405;
}

/* Keep summary controls on the same compact row as the approved Home. */
.summary-top .period-filter {
  flex-wrap: nowrap;
}
.summary-top .period-filter button:last-child {
  flex-basis: auto;
}
.summary-top .period-filter button {
  font-size: 11px;
  padding: 5px 5px;
}
.summary-top h1 {
  font-size: 20px;
}
.summary-top {
  gap: 8px;
}
@media (max-width: 440px) {
  .summary-top h1 {
    font-size: 18px;
  }
  .summary-top .period-filter button {
    font-size: 10px;
    padding: 5px 4px;
  }
  .summary-top .period-filter .icon {
    width: 12px;
    height: 12px;
  }
}
@media (max-width: 370px) {
  .summary-top {
    flex-wrap: wrap;
  }
  .summary-top h1 {
    font-size: 19px;
  }
  .summary-top .period-filter {
    flex-basis: 100%;
  }
  .summary-top .period-filter button {
    font-size: 11px;
  }
}

/* Compact brand, independent name editing and the continuous entry workflow. */
.brand > .brand-text {
  font-family: Inter, Arial, sans-serif;
  padding-top: 0;
  font-size: 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  white-space: normal;
}
.header-page-title {
  font-size: 14px;
  color: #e4d3ff;
  font-weight: 600;
  letter-spacing: 0.1px;
}
.summary-top {
  padding: 5px 4px 12px;
}
.summary-top .period-filter {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.4fr;
  gap: 7px;
  width: 100%;
}
.summary-top .period-filter button {
  min-height: 36px;
  padding: 8px 5px;
  font-size: 13px;
  border-radius: 10px;
}
.customer-strip {
  position: relative;
  gap: 15px;
  padding: 8px 14px;
}
.customer-strip-target {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.customer-strip-target:focus-visible {
  outline-offset: -3px;
}
.customer-details {
  flex: 1;
}
.customer-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.customer-name-row .customer-edit {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 6px;
  background: #ffffff75;
  border: 1px solid #d0b2ff;
  border-radius: 8px;
}
.customer-name-row .customer-edit:hover {
  background: #fff;
}
.customer-strip > .customer-chevron {
  width: 26px;
  height: 26px;
  margin-left: auto;
  pointer-events: none;
}
.inline-preview {
  margin-top: 24px;
  scroll-margin-top: 15px;
}
.inline-preview .preview-page {
  padding: 0;
}
.page {
  padding-bottom: 30px;
}
.toast-region {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(450px, calc(100vw - 28px));
  z-index: 1000;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border: 1px solid #b58cf4;
  border-radius: 14px;
  background: #300977;
  color: white;
  box-shadow: 0 6px 24px #24083d40;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}
.toast .icon {
  color: #c9fcbf;
  width: 20px;
  height: 20px;
}
@media (max-width: 440px) {
  .brand > .brand-text {
    font-size: 21px;
  }
  .summary-top .period-filter {
    gap: 5px;
  }
  .summary-top .period-filter button {
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  .brand > .brand-text {
    font-size: 18px;
  }
  .header-page-title {
    font-size: 12px;
  }
  .summary-top .period-filter button {
    font-size: 11px;
  }
  .customer-strip {
    gap: 11px;
  }
}
/* Content-aware sizing and consistent spacing across all approved screens. */
.fit-text {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fit-text[data-wrap='true'] {
  white-space: normal;
  overflow-wrap: anywhere;
}
.fit-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-shell,
.page,
.brand,
.brand-text {
  min-width: 0;
}
.page {
  padding: 16px 12px 28px;
}
.brand-header {
  gap: 10px;
  padding: 20px 16px;
}
.brand {
  flex: 1;
}
.brand > .brand-text {
  font-size: clamp(17px, 4.6vw, 24px);
  line-height: 1.25;
}
.brand-logo,
.back-button,
.avatar,
.customer-chevron,
.customer-edit {
  flex-shrink: 0;
}
.header-page-title {
  font-size: 14px;
  line-height: 1.4;
}
.metric-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric,
.summary-metrics .metric {
  min-width: 0;
  padding: 4px;
  gap: 8px;
}
.metric-label,
.summary-metrics .metric-label {
  flex-direction: column;
  width: 100%;
  min-width: 0;
  gap: 5px;
  line-height: 1.3;
}
.metric-label .icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.metric > .fit-text {
  max-width: 100%;
}
.metric > .amount-pill {
  padding-inline: 2px;
}
.previous-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: min(100%, 320px);
  gap: 0;
  margin-top: 10px;
  align-items: center;
}
.previous-row > span:first-child {
  white-space: normal;
  font-size: 13px;
  line-height: 1.3;
  padding: 6px 8px;
}
.previous-row > span:nth-child(2) {
  min-width: 0;
  padding: 5px 6px;
}
.previous-row-with-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  width: 100%;
  padding: 0 4px 8px;
  gap: 6px;
}
.previous-actions {
  display: flex;
  min-width: 0;
  gap: 5px;
}
.previous-row-with-actions .debit-button,
.previous-row-with-actions .credit-button {
  min-height: 34px;
  padding: 6px 8px;
  gap: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.previous-row-with-actions .debit-button .icon,
.previous-row-with-actions .credit-button .icon {
  width: 14px;
  height: 14px;
}
.customers-title {
  gap: 10px;
  margin: 18px 0 12px;
  flex-wrap: wrap;
}
.customers-title h2 {
  font-size: 22px;
  gap: 8px;
}
.primary.small {
  font-size: 14px;
  padding: 10px 12px;
}
.customer-strip {
  gap: 10px;
  padding: 12px;
}
.customer-details,
.customer-name-row,
.customer-name-row > a {
  min-width: 0;
}
.customer-name-row > a {
  flex: 1;
}
.customer-details h3 {
  margin: 0;
  line-height: 1.3;
}
.customer-name-row {
  gap: 8px;
}
.customer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.customer-pills > span {
  flex: 1 1 110px;
  min-width: 0;
  padding: 4px 6px;
  text-align: center;
}
.customer-strip > .customer-chevron {
  width: 20px;
  height: 24px;
}
.identity-shell {
  margin: 0 0 20px;
  padding: 7px;
}
.identity-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
}
.identity-row > .avatar {
  width: 30px;
  height: 30px;
}
.identity-row > strong {
  min-width: 0;
  padding: 0;
}
.identity-pills {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.identity-pill {
  flex: 1 1 110px;
  min-width: 0;
  padding: 5px 7px;
  text-align: center;
}
.identity-totals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.identity-totals > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  padding: 3px 5px;
  min-width: 0;
}
.identity-totals .icon {
  width: 22px;
  height: 22px;
}
.identity-totals > div > span {
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
}
.identity-totals .fit-text {
  padding: 4px 6px;
}
.entry-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0 14px;
}
.entry-tabs .entry-tab {
  min-width: 0;
  padding: 12px 6px;
  gap: 6px;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
}
.entry-tabs .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.entry-table th,
.entry-table td {
  min-width: 0;
  padding: 8px 3px;
}
.entry-table thead th {
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}
.row-actions {
  white-space: normal;
}
.row-actions .icon-button {
  width: 22px;
  height: 28px;
  padding: 3px;
}
.row-actions .icon-button .icon {
  width: 16px;
  height: 16px;
}
.field-label,
.rate-fields .field-label {
  font-size: 16px;
  line-height: 1.4;
  min-width: 0;
}
.field-label input,
.field-label input::placeholder,
.manual-form input {
  min-width: 0;
  font-size: 16px;
}
.two-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.page-banner {
  font-size: 24px;
  line-height: 1.35;
  gap: 10px;
  padding: 14px;
}
.page-banner .icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.calculation-heading {
  gap: 10px;
  padding: 12px;
  flex-wrap: wrap;
}
.calculation-heading h1 {
  min-width: 0;
  font-size: 18px;
  line-height: 1.35;
  gap: 8px;
}
.status-badge {
  font-size: 13px;
}
.calculation-row,
.calculation-row.net-balance {
  grid-template-columns: 25px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 8px;
  padding: 10px 5px;
  min-width: 0;
  font-size: 15px;
  line-height: 1.4;
}
.calculation-row > .icon,
.calculation-row.net-balance .icon {
  width: 23px;
  height: 23px;
}
.calculation-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.calculation-label small {
  font-size: 12px;
  line-height: 1.4;
}
.calculation-row strong {
  min-width: 0;
  text-align: right;
}
.history-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.history-heading h2 {
  font-size: 22px;
}
.history-heading .period-filter {
  display: grid;
  flex: none;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr);
  gap: 5px;
}
.history-heading .period-filter button {
  min-width: 0;
  padding: 8px 3px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}
.history-date {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1.1fr) 18px;
  gap: 6px;
  padding: 12px 8px;
}
.history-date > strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
}
.history-date .mini-closing {
  min-width: 0;
  max-width: 100%;
}
.saved-time {
  min-width: 0;
  font-size: 12px;
  white-space: normal;
  line-height: 1.4;
}
.history-work {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.history-work > span {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 5px;
  font-size: 14px;
}
.history-work .icon {
  width: 18px;
  height: 18px;
}
.primary {
  line-height: 1.4;
}
@media (max-width: 370px) {
  .page {
    padding-left: 10px;
    padding-right: 10px;
  }
  .customer-strip {
    padding: 10px;
    gap: 8px;
  }
  .customer-strip > .avatar {
    width: 28px;
    height: 28px;
  }
  .customers-title h2 {
    font-size: 20px;
  }
  .metric {
    padding-left: 2px;
    padding-right: 2px;
  }
  .calculation-row {
    grid-template-columns: 21px minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 6px;
  }
}

.metric-label .fit-text,
.metric > .fit-text {
  text-align: center;
}
@media (max-width: 370px) {
  .customers-title {
    padding: 8px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .customers-title h2 {
    font-size: 18px;
    gap: 6px;
  }
  .customers-title h2 .icon {
    width: 24px;
    height: 24px;
  }
  .primary.small {
    font-size: 13px;
    padding: 8px;
    gap: 5px;
  }
  .primary.small .icon {
    width: 16px;
    height: 16px;
  }
}

.payment-history-card .history-date {
  padding: 7px 8px;
}
.payment-history-card .history-card-heading .history-date strong {
  font-size: 13px;
}
.payment-history-card .history-work {
  gap: 6px;
  padding: 4px 1px;
}
.payment-history-card .history-work > span {
  gap: 4px;
  font-size: 13px;
}
.payment-history-card .history-work .icon {
  width: 16px;
  height: 16px;
}
.payment-history-card .history-work .amount-pill {
  padding: 2px 6px;
}
.payment-detail {
  display: grid;
  gap: 4px;
  margin: 2px 3px 0;
  padding: 5px 4px;
  color: #2f243a;
  font-size: 13px;
  line-height: 1.5;
}
.payment-detail-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.payment-previous-row {
  justify-content: space-between;
}
.payment-note {
  margin-left: auto;
  color: #4d287b;
  text-align: right;
  white-space: nowrap;
}
.payment-detail .fit-text {
  display: inline-block;
  width: auto;
  max-width: 100%;
  vertical-align: middle;
}
.payment-detail .amount-pill {
  padding: 2px 6px;
}

.daily-history-card .history-date {
  padding: 7px 8px;
}
.daily-history-card .history-card-heading .history-date strong {
  font-size: 13px;
}
.daily-history-card .history-edit {
  font-size: 11px;
}
.daily-history-card .history-work {
  gap: 6px;
  padding: 4px 1px;
}
.daily-history-card .history-work > span {
  gap: 4px;
  font-size: 13px;
}
.daily-history-card .history-work .icon {
  width: 16px;
  height: 16px;
}
.daily-history-card .history-work .amount-pill {
  padding: 2px 6px;
}
.daily-history-card .historical-table .entry-table {
  font-size: 13px;
}
.daily-history-card .historical-table .entry-table th,
.daily-history-card .historical-table .entry-table td {
  padding: 3px;
}
.daily-history-card .historical-table .entry-table thead th {
  padding: 4px 3px;
  font-size: 12px;
}
.daily-history-card .historical-table .entry-table tfoot {
  font-size: 14px;
}
.daily-history-card .historical-calculations .calculation-row {
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 4px;
  min-height: 25px;
  padding: 3px;
  font-size: 13px;
}
.daily-history-card .historical-calculations .calculation-row > .icon {
  width: 18px;
  height: 18px;
}
.daily-history-card .historical-calculations .calculation-row strong {
  font-size: 14px;
}
