@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");
:root {
  --green: #00a878;
  --green-dark: #008d66;
  --ink: #142d32;
  --muted: #7b8c91;
  --line: #e7edef;
  --red: #ed5364;
  --bg: #f5f8f9;
  --mint: #e9f8f1;
  --radius: 18px;
  font-family:
    Manrope,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #55cdae;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button {
  background: none;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 800;
}
h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.35px;
}
h3 {
  font-size: 15px;
}
small {
  font-size: 11px;
}
.muted {
  color: var(--muted);
}
.green {
  color: var(--green-dark);
}
.red {
  color: var(--red);
}
.blue {
  color: #3785d9;
}
.yellow {
  color: #ca8800;
}
.flex {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stack {
  display: grid;
  gap: 20px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 232px;
  padding: 35px 20px 24px;
  background: #092e2c;
  color: #b8ceca;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 21px;
  letter-spacing: -0.6px;
  font-weight: 800;
  padding: 0 10px;
}
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--green);
  display: grid;
  place-items: center;
  color: white;
}
.brand-icon svg {
  width: 24px;
  height: 24px;
}
.sidebar .eyebrow {
  margin: 42px 15px 16px;
  color: #73968f;
  font-size: 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 11px;
  font-weight: 600;
  text-align: left;
  transition: 0.18s;
  margin-bottom: 6px;
}
.nav-item:hover {
  background: #123e38;
}
.nav-item.active {
  background: #135042;
  color: #6de6b3;
}
.nav-item svg {
  width: 21px;
  height: 21px;
}
.nav-count {
  margin-left: auto;
  background: #eb5366;
  color: #fff;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
}
.side-tip {
  border: 1px solid #2a5148;
  background: #123b35;
  border-radius: 13px;
  padding: 17px 15px;
  font-size: 12px;
  line-height: 1.7;
  color: #a4c5bd;
  margin-bottom: 24px;
}
.side-tip .tip-title {
  color: #d5efe6;
  font-weight: 700;
  margin-bottom: 5px;
}
.user {
  border-top: 1px solid #2c4942;
  padding: 20px 9px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user b {
  display: block;
  color: #e4eee9;
  font-size: 12px;
}
.user small {
  color: #90afa3;
}
.user .avatar {
  background: #295647;
  color: #cce6d7;
}
.workspace {
  margin-left: 232px;
}
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.breadcrumb {
  font-size: 12px;
  color: #8c999a;
}
.breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.mode-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #708b80;
}
.mode-badge i,
.online-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  position: relative;
}
.icon-btn:hover {
  background: #e9f0ee;
}
.notification-dot {
  position: absolute;
  right: 10px;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border: 1px solid white;
  border-radius: 50%;
}
.main {
  padding: 33px 38px 45px;
  max-width: 1560px;
  margin: 0 auto;
}
.page-heading {
  margin-bottom: 27px;
}
.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.page-heading .date {
  font-size: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  background: var(--green);
  color: white;
  transition: 0.15s;
}
.btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}
.btn svg {
  width: 17px;
  height: 17px;
}
.btn.secondary {
  background: #edf2f3;
  color: #34575a;
}
.btn.secondary:hover {
  background: #e2eaeb;
}
.btn.outline {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.btn.danger {
  background: #ffedf0;
  color: #d64759;
}
.btn.full {
  width: 100%;
}
.btn.small {
  padding: 9px 12px;
  font-size: 11px;
}
.text-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}
.text-btn svg {
  width: 15px;
  height: 15px;
}
.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}
.hero {
  background:
    radial-gradient(ellipse at 90% 0%, #167b5b 0, transparent 65%), #0b4035;
  color: white;
  border-radius: 20px;
  padding: 28px 29px;
  overflow: hidden;
  position: relative;
}
.hero:after {
  content: "";
  position: absolute;
  border: 1px solid #81b39818;
  border-radius: 50%;
  width: 320px;
  height: 320px;
  right: -60px;
  top: -120px;
  pointer-events: none;
}
.hero .eyebrow {
  color: #abd4c2;
  letter-spacing: 1px;
}
.hero .balance {
  font-size: 42px;
  letter-spacing: -1.5px;
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 6px;
}
.hero .balance small {
  font-size: 24px;
  color: #a5d5be;
  font-weight: 600;
}
.hero-tag {
  border: 1px solid #9ee2bb40;
  background: #86e1bc16;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 11px;
  color: #bdedd4;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-tag svg {
  width: 13px;
  height: 13px;
}
.hero-caption {
  font-size: 11px;
  color: #a3cbbb;
}
.hero-progress {
  display: flex;
  height: 6px;
  border-radius: 8px;
  overflow: hidden;
  margin: 23px 0 17px;
  gap: 3px;
}
.hero-progress span {
  border-radius: 3px;
}
.hero-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.hero-breakdown span {
  font-size: 10px;
  color: #abd0bd;
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-breakdown b {
  display: block;
  font-size: 16px;
  margin-top: 6px;
  font-weight: 700;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
}
.dot.blue {
  background: #509cdd;
}
.dot.red {
  background: var(--red);
}
.dot.yellow {
  background: #eab43e;
}
.summary-side {
  display: grid;
  gap: 14px;
}
.metric-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 17px;
  padding: 23px;
  display: flex;
  gap: 15px;
  align-items: center;
}
.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #e4f8ef;
  color: var(--green);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.metric-icon.red {
  color: var(--red);
  background: #fff0f2;
}
.metric-card .label {
  font-size: 11px;
  color: #748d84;
}
.metric-card .number {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-top: 3px;
}
.metric-detail {
  display: flex;
  gap: 15px;
  margin-top: 7px;
  font-size: 10px;
  color: var(--muted);
}
.metric-card .chevron {
  margin-left: auto;
  color: #9ab1a5;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 20px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 21px 23px 17px;
}
.card-header .subtext {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.card-pad {
  padding: 23px;
}
.card-head-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef7f2;
  color: var(--green);
}
.card-head-icon svg {
  width: 17px;
  height: 17px;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  background: #e6f7ef;
  color: #16966c;
}
.badge.red {
  background: #fff0f1;
  color: #d84e60;
}
.badge.yellow {
  background: #fff7e7;
  color: #b28a31;
}
.badge.blue {
  background: #edf5ff;
  color: #548cc5;
}
.badge.gray {
  background: #f0f4f5;
  color: #7b8d92;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th {
  font-size: 10px;
  font-weight: 600;
  color: #849497;
  background: #fafcfc;
  padding: 12px 23px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 14px 23px;
  border-bottom: 1px solid #edf1f2;
  font-size: 12px;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr[data-action] {
  cursor: pointer;
}
.table tbody tr:hover {
  background: #fbfdfb;
}
.table .amount {
  font-weight: 800;
  white-space: nowrap;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  background: #f0e9dc;
  color: #9b7b43;
  border: 3px solid #fff;
}
.avatar.c1 {
  background: #e3edf7;
  color: #5084ad;
}
.avatar.c2 {
  background: #e6e9df;
  color: #789459;
}
.avatar.c3 {
  background: #f2e5e9;
  color: #b46c89;
}
.avatar.c4 {
  background: #e9e4f2;
  color: #8b73b0;
}
.avatar.c5 {
  background: #dfeeea;
  color: #558979;
}
.person-name {
  font-weight: 700;
  font-size: 12px;
}
.person-detail {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.table .avatar {
  width: 32px;
  height: 32px;
  font-size: 10px;
}
.table-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #b2c0c0;
}
.table-action svg {
  width: 15px;
  height: 15px;
}
.card-footer {
  padding: 13px 23px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.overdue-row {
  padding: 16px 23px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f0f3f3;
}
.overdue-row .value {
  font-size: 13px;
  font-weight: 800;
  color: var(--red);
  margin-top: 4px;
}
.overdue-row .info {
  flex: 1;
}
.overdue-row .actions {
  display: flex;
  gap: 6px;
}
.overdue-row .actions .icon-btn {
  width: 31px;
  height: 31px;
  background: #f2f6f6;
  color: #708b86;
  border-radius: 8px;
}
.overdue-row .actions .icon-btn svg {
  width: 15px;
  height: 15px;
}
.chart-wrap {
  padding: 0 23px 19px;
}
.chart {
  height: 125px;
  display: flex;
  gap: 6px;
  align-items: flex-end;
  padding: 12px 0 0;
  position: relative;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent 30px,
    #eef3f3 30px,
    #eef3f3 31px
  );
}
.chart .bar {
  flex: 1;
  background: #0eb681;
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  position: relative;
  overflow: hidden;
}
.chart .bar .penalty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #ef6c78;
  min-height: 2px;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  color: #99a7a8;
  font-size: 9px;
}
.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #74888b;
  margin-top: 16px;
}
.legend span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.activity-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 23px;
  border-top: 1px solid #f0f3f3;
}
.activity-row .activity-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #edf8f1;
  color: var(--green);
}
.activity-icon svg {
  width: 15px;
  height: 15px;
}
.activity-row .amount {
  font-size: 12px;
  color: var(--green-dark);
  font-weight: 800;
  margin-left: auto;
  white-space: nowrap;
}
.welcome-strip {
  margin-top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #91a1a0;
  font-size: 10px;
}
.welcome-strip svg {
  width: 13px;
  height: 13px;
}
.bottom-nav {
  display: none;
}
.section-tabs {
  display: flex;
  gap: 4px;
  background: #edf2f3;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 22px;
  width: max-content;
  max-width: 100%;
  overflow: auto;
}
.tab {
  padding: 10px 17px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  white-space: nowrap;
}
.tab.active {
  background: white;
  color: var(--green-dark);
  box-shadow: 0 2px 4px #142d3206;
}
.tab:hover {
  color: var(--green-dark);
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 0 13px;
  width: 300px;
}
.searchbox svg {
  width: 17px;
  height: 17px;
  color: #9aabab;
}
.searchbox input {
  border: 0;
  background: none;
  width: 100%;
  padding: 12px 0;
  outline: none;
  font-size: 12px;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.toolbar .section-tabs {
  margin: 0;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  padding: 21px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.stat .label {
  font-size: 11px;
  color: var(--muted);
}
.stat .value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 9px;
  letter-spacing: -0.7px;
}
.detail-profile {
  display: flex;
  align-items: center;
  gap: 15px;
}
.detail-profile .avatar {
  width: 62px;
  height: 62px;
  font-size: 21px;
}
.detail-profile p {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}
.loan-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 17px;
}
.loan-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 23px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: 0.18s;
}
.loan-card:hover {
  border-color: #91c9b4;
  transform: translateY(-2px);
}
.loan-card .original {
  font-size: 22px;
  font-weight: 800;
  margin: 10px 0 5px;
}
.loan-card .detail {
  font-size: 11px;
  color: var(--muted);
}
.progress {
  height: 5px;
  display: flex;
  border-radius: 5px;
  background: #edf2f3;
  overflow: hidden;
  margin: 20px 0 15px;
}
.progress span {
  background: var(--green);
}
.loan-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.loan-values span {
  font-size: 10px;
  color: var(--muted);
}
.loan-values b {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.breakdown-row {
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  border-bottom: 1px solid #eff2f3;
}
.breakdown-row:last-child {
  border-bottom: 0;
}
.breakdown-row .dot {
  margin-right: 8px;
}
.breakdown-row strong {
  font-size: 14px;
}
.big-number {
  font-weight: 800;
  font-size: 35px;
  letter-spacing: -1px;
  margin: 12px 0;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}
.action-grid .btn {
  padding: 11px 5px;
  min-width: 0;
}
.interest-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
  margin: 22px 0;
}
.interest-stats .label {
  display: block;
  line-height: 1.5;
}
.interest-stats b {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  overflow-wrap: anywhere;
}
.interest-summary > .muted {
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.debtor-comment {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.debtor-comment small {
  color: var(--muted);
  font-size: 10px;
}
.debtor-comment p {
  margin-top: 8px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  line-height: 1.9;
}
.empty svg {
  display: block;
  width: 35px;
  height: 35px;
  margin: 0 auto 12px;
  color: #99c5b3;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}
.calendar-weekday {
  font-size: 11px;
  color: var(--muted);
  padding: 13px 0;
}
.calendar-day {
  height: 67px;
  border-radius: 12px;
  font-size: 14px;
  position: relative;
  border: 1px solid transparent;
}
.calendar-day:hover {
  background: #f4f9f6;
}
.calendar-day.selected {
  background: var(--green);
  color: white;
}
.calendar-day.today:not(.selected) {
  border-color: #97d8bf;
  color: var(--green-dark);
}
.calendar-day.dim {
  color: #b8c4c5;
}
.calendar-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 7px;
}
.calendar-dots .dot {
  width: 4px;
  height: 4px;
}
.calendar-day.selected .dot {
  background: white;
}
.calendar-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
}
.schedule-row {
  padding: 18px 23px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.schedule-row .value {
  font-weight: 800;
  white-space: nowrap;
  margin-left: auto;
}
.schedule-row .person-detail {
  margin-top: 5px;
}
.month-title {
  text-transform: capitalize;
}
.notification {
  display: flex;
  gap: 15px;
  padding: 22px;
  border-top: 1px solid var(--line);
  align-items: flex-start;
}
.notification .metric-icon {
  width: 40px;
  height: 40px;
}
.notification p {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 7px;
}
.notification .time {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.timeline {
  padding: 22px;
}
.timeline-date {
  font-size: 13px;
  font-weight: 800;
  margin: 20px 0 12px;
}
.timeline-date:first-child {
  margin-top: 0;
}
.timeline-event {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-bottom: 0;
  padding: 15px;
}
.timeline-event:last-child,
.timeline-event:has(+ .timeline-date) {
  border-bottom: 1px solid var(--line);
}
.timeline-event .event-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf8f3;
  color: var(--green);
}
.timeline-event .event-icon svg {
  width: 16px;
  height: 16px;
}
.timeline-event .value {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.timeline-event .event-body {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.history-card > .section-tabs {
  margin: 0 18px;
  width: auto;
}
.timeline-event .time {
  font-size: 10px;
  color: var(--muted);
  min-width: 35px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 18px;
}
.field label {
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #dfe8e7;
  background: #fcfdfd;
  border-radius: 9px;
  padding: 12px;
  min-width: 0;
  color: var(--ink);
  outline: none;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #33b58f;
  box-shadow: 0 0 0 3px #00a8780c;
}
.field textarea {
  resize: vertical;
  min-height: 100px;
}
.field small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.field input[type="range"] {
  padding: 0;
  accent-color: var(--green);
  border: 0;
  box-shadow: none;
}
.rate-value {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.inset {
  background: #f5f9f8;
  border-radius: 11px;
  padding: 17px;
  margin: 16px 0;
  font-size: 12px;
  line-height: 1.9;
}
.inset.green {
  background: #edf9f2;
}
.inset.red {
  background: #fff1f2;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.settings-row p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #062e2b70;
  backdrop-filter: blur(5px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: #fff;
  width: 520px;
  max-width: 100%;
  border-radius: 23px;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 30px 100px #052c2a26;
  animation: modal-in 0.18s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 27px 14px;
}
.modal-body {
  padding: 10px 27px 27px;
}
.modal .profile-strip {
  padding: 15px;
  border-radius: 12px;
  background: #f5f9f7;
  margin-bottom: 19px;
}
.modal .field input.amount-input {
  font-size: 28px;
  font-weight: 800;
  padding: 13px 16px;
}
.amount-presets {
  display: flex;
  gap: 7px;
  margin-top: -9px;
  margin-bottom: 20px;
}
.amount-presets button {
  background: #f0f5f5;
  flex: 1;
  padding: 9px 0;
  border-radius: 8px;
  font-size: 11px;
}
.amount-presets button.active {
  color: white;
  background: var(--green);
}
.method-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 20px;
}
.method-options button {
  padding: 13px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}
.method-options button.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.split-bar {
  height: 7px;
  display: flex;
  border-radius: 5px;
  overflow: hidden;
  margin: 14px 0;
}
.split-bar span {
  min-width: 0;
}
.payment-result {
  background: #e9f8ee;
  border-radius: 9px;
  padding: 13px;
  font-size: 11px;
  line-height: 1.8;
  margin: 18px 0;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 25px;
  position: relative;
}
.stepper:before {
  content: "";
  height: 2px;
  background: #eff3f3;
  position: absolute;
  top: 15px;
  left: 25px;
  right: 25px;
}
.step-item {
  z-index: 1;
  text-align: center;
  font-size: 10px;
  color: #809392;
}
.step-item span {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #f0f5f6;
  display: grid;
  place-items: center;
  margin: 0 auto 7px;
  font-size: 12px;
}
.step-item.active span {
  background: var(--green);
  color: white;
}
.step-item.active {
  color: var(--ink);
  font-weight: 700;
}
.wizard-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.wizard-actions .btn {
  flex: 1;
}
.error {
  color: var(--red);
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0;
}
.back-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
}
.back-link svg {
  width: 15px;
  height: 15px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: calc(50% + 116px);
  transform: translateX(-50%) translateY(15px);
  background: #103f34;
  color: white;
  padding: 14px 23px;
  border-radius: 11px;
  box-shadow: 0 5px 25px #092e2c20;
  font-size: 12px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90vw;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.loading {
  height: 100vh;
  display: grid;
  place-items: center;
  background: #f5f8f9;
}
.loading .brand {
  color: var(--ink);
}
.mobile-brand {
  display: none;
}
.mobile-add {
  display: none;
}
.check-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  line-height: 1.7;
}
.check-label input {
  accent-color: var(--green);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1600px) {
  .main {
    padding-top: 42px;
  }
  .hero {
    padding: 32px;
  }
  .hero .balance {
    font-size: 48px;
  }
  .chart {
    height: 160px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 205px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace {
    margin-left: 205px;
  }
  .main {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .summary-layout,
  .content-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  }
  .table td,
  .table th {
    padding-left: 17px;
    padding-right: 17px;
  }
  .hero-breakdown {
    gap: 8px;
  }
  .hero-breakdown b {
    font-size: 14px;
  }
  .table .person-name {
    font-size: 11px;
  }
  #toast {
    left: calc(50% + 102px);
  }
}
@media (max-width: 1050px) {
  .summary-layout,
  .content-grid {
    grid-template-columns: 1fr;
  }
  .summary-side {
    grid-template-columns: 1fr 1fr;
  }
  .content-grid > .stack {
    grid-template-columns: 1fr 1fr;
  }
  .content-grid > .stack:first-child {
    grid-template-columns: 1fr;
  }
  .calendar-layout {
    grid-template-columns: 1fr;
  }
  .metric-card {
    padding: 20px;
  }
  .mini-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  body {
    font-size: 13px;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .topbar {
    height: 64px;
    padding: 0 19px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: flex;
    font-size: 17px;
    color: var(--ink);
    padding: 0;
    gap: 8px;
  }
  .mobile-brand .brand-icon {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }
  .mobile-brand .brand-icon svg {
    width: 18px;
    height: 18px;
  }
  .topbar-actions {
    gap: 4px;
  }
  .mode-badge {
    font-size: 9px;
    margin-right: 8px;
  }
  .topbar-actions > .avatar {
    display: grid;
  }
  .main {
    padding: 24px 18px 100px;
  }
  .page-heading {
    margin-bottom: 23px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .page-heading > .flex > .date {
    display: none;
  }
  .page-heading > .flex > .btn {
    padding: 11px 13px;
    font-size: 11px;
  }
  .hero {
    padding: 23px;
  }
  .hero .balance {
    font-size: 36px;
  }
  .hero .balance small {
    font-size: 21px;
  }
  .hero .eyebrow {
    font-size: 10px;
  }
  .hero-tag {
    font-size: 9px;
    padding: 5px 8px;
  }
  .hero-breakdown b {
    font-size: 13px;
  }
  .hero-breakdown span {
    font-size: 9px;
  }
  .summary-layout {
    gap: 13px;
    margin-bottom: 22px;
  }
  .summary-side {
    gap: 12px;
  }
  .metric-card {
    padding: 16px 13px;
    align-items: flex-start;
    gap: 9px;
    border-radius: 14px;
    flex-wrap: wrap;
  }
  .metric-card .metric-icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }
  .metric-icon svg {
    width: 17px;
    height: 17px;
  }
  .metric-card .number {
    font-size: 20px;
  }
  .metric-card .label {
    font-size: 10px;
  }
  .metric-detail {
    font-size: 9px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .metric-card .chevron {
    display: none;
  }
  .content-grid {
    gap: 17px;
  }
  .content-grid > .stack {
    grid-template-columns: 1fr;
  }
  .stack {
    gap: 17px;
  }
  .card-header {
    padding: 18px;
  }
  .card-pad {
    padding: 18px;
  }
  .card h2 {
    font-size: 15px;
  }
  .card-header .subtext {
    font-size: 10px;
  }
  .table td,
  .table th {
    padding: 13px 13px;
    font-size: 11px;
  }
  .table th {
    font-size: 9px;
  }
  .table .person-name {
    font-size: 11px;
  }
  .table .person-detail {
    font-size: 9px;
  }
  .table .avatar {
    width: 29px;
    height: 29px;
  }
  .table .flex {
    gap: 7px;
  }
  .table .badge {
    font-size: 9px;
    padding: 4px 6px;
  }
  .table .hide-mobile {
    display: none;
  }
  .table th:first-child,
  .table td:first-child {
    padding-left: 16px;
  }
  .table th:last-child,
  .table td:last-child {
    padding-right: 16px;
  }
  .card-footer {
    padding: 12px 18px;
    font-size: 9px;
  }
  .overdue-row {
    padding: 15px 18px;
  }
  .activity-row {
    padding: 13px 18px;
  }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fffefc;
    border-top: 1px solid var(--line);
    padding: 9px 8px calc(10px + env(safe-area-inset-bottom));
    z-index: 20;
    justify-content: space-around;
    box-shadow: 0 -3px 20px #0b403504;
  }
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #8a9e9c;
    font-size: 10px;
    min-width: 55px;
    min-height: 44px;
    padding: 4px 6px;
    border-radius: 12px;
    line-height: 1.2;
  }
  .bottom-nav svg {
    width: 21px;
    height: 21px;
  }
  .bottom-nav button.active {
    color: var(--green-dark);
    font-weight: 800;
    background: var(--mint);
  }
  .bottom-nav button[data-id="today"].active .home-shape {
    fill: currentColor;
  }
  .welcome-strip {
    font-size: 9px;
    line-height: 1.7;
  }
  .welcome-strip > span:last-child {
    display: none;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .searchbox {
    width: 100%;
  }
  .toolbar .section-tabs {
    width: 100%;
  }
  .debtors-toolbar .section-tabs,
  .detail-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }
  .debtors-toolbar .tab,
  .detail-tabs .tab {
    grid-column: span 2;
    white-space: normal;
    min-height: 40px;
    padding: 9px 6px;
  }
  .debtors-toolbar .tab:nth-child(-n + 2),
  .detail-tabs .tab:nth-child(-n + 2) {
    grid-column: span 3;
  }
  .section-tabs {
    width: 100%;
    gap: 2px;
  }
  .tab {
    padding: 9px 13px;
    flex: 1;
    text-align: center;
    font-size: 11px;
  }
  .mini-stats {
    gap: 10px;
    margin-bottom: 18px;
  }
  .stat {
    padding: 17px;
  }
  .stat .value {
    font-size: 21px;
  }
  .stat .label {
    font-size: 10px;
  }
  .loan-cards {
    grid-template-columns: 1fr;
  }
  .loan-card {
    padding: 19px;
  }
  .detail-profile .avatar {
    width: 48px;
    height: 48px;
    font-size: 16px;
  }
  .detail-profile {
    gap: 10px;
  }
  .detail-profile h1 {
    font-size: 21px;
  }
  .detail-profile p {
    font-size: 11px;
  }
  .detail-heading {
    align-items: flex-start;
  }
  .detail-heading > .flex {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  .detail-heading > .flex > .btn {
    font-size: 10px;
    padding: 9px;
  }
  .action-grid .btn {
    flex-direction: column;
    min-height: 58px;
    white-space: normal;
    padding: 10px 4px;
    font-size: 11px;
    line-height: 1.25;
    gap: 5px;
  }
  .detail-profile > div {
    min-width: 0;
  }
  .history-card > .section-tabs .tab {
    padding: 9px 6px;
    white-space: normal;
  }
  .calendar-grid {
    gap: 2px;
  }
  .calendar-day {
    height: 49px;
    font-size: 12px;
  }
  .calendar-weekday {
    font-size: 10px;
  }
  .calendar-layout {
    gap: 15px;
  }
  .schedule-row {
    padding: 15px;
  }
  .schedule-row .value {
    font-size: 12px;
  }
  .schedule-row .btn {
    padding: 8px;
    font-size: 10px;
  }
  .chart {
    gap: 4px;
  }
  .chart-wrap {
    padding: 0 18px 18px;
  }
  .notification {
    padding: 17px;
    gap: 10px;
  }
  .notification p {
    font-size: 12px;
  }
  .notification .metric-icon {
    width: 31px;
    height: 31px;
  }
  .notification .time {
    font-size: 9px;
  }
  .timeline {
    padding: 16px;
  }
  .timeline-event {
    padding: 12px 9px;
    gap: 8px;
  }
  .timeline-event .person-name {
    font-size: 11px;
  }
  .timeline-event .person-detail {
    font-size: 9px;
  }
  .timeline-event .value {
    font-size: 10px;
  }
  .timeline-event .time {
    font-size: 9px;
  }
  .form-grid {
    gap: 12px;
  }
  .overlay {
    padding: 12px;
    align-items: flex-end;
  }
  .modal {
    width: 100%;
    max-height: 92dvh;
    border-radius: 23px 23px 15px 15px;
  }
  .modal-header {
    padding: 20px 20px 12px;
  }
  .modal-body {
    padding: 10px 20px 22px;
  }
  .field {
    font-size: 11px;
  }
  #toast {
    left: 50%;
    bottom: 90px;
  }
  .settings-row {
    align-items: flex-start;
  }
  .settings-row .btn {
    font-size: 10px;
    padding: 9px;
  }
  .big-number {
    font-size: 31px;
  }
  .hero-progress {
    margin: 20px 0 15px;
  }
  .hero-caption {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep content clear of Telegram controls and device cutouts in fullscreen. */
.telegram-app {
  --app-safe-top: calc(
    max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) +
      var(--tg-content-safe-area-inset-top, 0px)
  );
  --app-safe-bottom: calc(
    max(
        env(safe-area-inset-bottom, 0px),
        var(--tg-safe-area-inset-bottom, 0px)
      ) +
      var(--tg-content-safe-area-inset-bottom, 0px)
  );
  --app-safe-left: calc(
    max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) +
      var(--tg-content-safe-area-inset-left, 0px)
  );
  --app-safe-right: calc(
    max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) +
      var(--tg-content-safe-area-inset-right, 0px)
  );
}
.telegram-app body {
  padding: var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom)
    var(--app-safe-left);
}
.telegram-app .sidebar {
  top: var(--app-safe-top);
  bottom: var(--app-safe-bottom);
  left: var(--app-safe-left);
}
.telegram-app .overlay {
  top: var(--app-safe-top);
  bottom: var(--app-safe-bottom);
  left: var(--app-safe-left);
  right: var(--app-safe-right);
}
.telegram-app .modal {
  max-height: calc(90dvh - var(--app-safe-top) - var(--app-safe-bottom));
}
.telegram-app .loading {
  height: calc(100dvh - var(--app-safe-top) - var(--app-safe-bottom));
}
@media (max-width: 760px) {
  .telegram-app .bottom-nav {
    left: var(--app-safe-left);
    right: var(--app-safe-right);
    padding-bottom: calc(10px + var(--app-safe-bottom));
  }
  .telegram-app .main {
    padding-bottom: calc(100px + var(--app-safe-bottom));
  }
  .telegram-app #toast {
    bottom: calc(85px + var(--app-safe-bottom));
  }
}

[hidden] {
  display: none !important;
}
.debtor-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  margin: 4px 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}
.rates-column .debtor-rates {
  margin: 0;
  flex-direction: column;
  gap: 6px;
}
.mobile-debtor-status {
  display: none;
}
@media (max-width: 760px) {
  .debtor-list {
    table-layout: fixed;
  }
  .debtor-list th:first-child {
    width: 45%;
  }
  .debtor-list th:nth-child(2) {
    width: 24%;
  }
  .debtor-list th:nth-child(3) {
    width: 31%;
  }
  .debtor-list td, .debtor-list th {
    padding-left: 8px;
    padding-right: 8px;
  }
  .debtor-list td:first-child, .debtor-list th:first-child {
    padding-left: 12px;
  }
  .debtor-list .flex > div:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .debtor-list .avatar {
    width: 24px;
    height: 24px;
  }
  .debtor-list .partner-label {
    overflow-wrap: anywhere;
  }
  .debtor-list .rates-column .debtor-rates {
    font-size: 10px;
  }
  .mobile-debtor-status {
    display: block;
    margin-top: 6px;
  }
}
.audit-list { display: grid; gap: 12px; margin-top: 20px; }
.audit-entry { padding: 20px; border: 1px solid var(--line); border-left: 4px solid #b8c9ca; border-radius: 14px; background: #fff; overflow-wrap: anywhere; }
.audit-entry.green { border-left-color: #00a878; }
.audit-entry.red { border-left-color: #f56879; }
.audit-entry h3 { margin: 12px 0 7px; font-size: 15px; }
.audit-entry time, .audit-meta { font-size: 12px; color: #758c91; }
.audit-entry details { margin-top: 14px; }
.audit-entry summary { color: #008e68; cursor: pointer; }
.audit-details { margin-top: 12px; }
.audit-value { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; border-bottom: 1px solid #edf2f2; font-size: 12px; }
.audit-value span { color: #758c91; flex: 0 0 35%; }
.audit-value b { white-space: pre-wrap; text-align: right; font-weight: 500; }
.audit-change { margin-top: 16px; }
.audit-filters { display: flex; align-items: end; gap: 12px; }
.audit-filters .field { margin-bottom: 0; flex: 1; }
.audit-filters .field:first-child { flex: 2; }
.audit-trace { margin-top: 14px; font-size: 12px; }
.audit-trace-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 12px; }
.audit-more { display: flex; justify-content: center; margin-top: 20px; }
.audit-error { display: block; margin-top: 12px; }
@media (max-width: 760px) {
  .audit-filters { flex-wrap: wrap; }
  .audit-filters .field:first-child { flex-basis: 100%; }
  .audit-entry { padding: 16px; }
  .audit-value { gap: 12px; }
}
.summary-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0;
  font-size: 12px;
}
.modal-body > p {
  line-height: 1.7;
  margin-bottom: 15px;
}
.partner-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.partner-label {
  margin: 8px 0;
  color: var(--green-dark, #007e57);
  white-space: normal;
}
.partner-loan {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 15px 0;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
.partner-loan > span:first-child {
  flex: 1;
  min-width: 0;
}
.partner-loan small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.partner-loan svg {
  width: 15px;
  flex-shrink: 0;
}
.partner-card {
  align-self: start;
}
@media (max-width: 760px) {
  .partner-cards {
    grid-template-columns: 1fr;
  }
  .bottom-nav button {
    font-size: 10px;
  }
}
