body {
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f3f4f6;
}
.headings {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.headings h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 2.25rem;
}
.headings h3 {
  font-weight: 300;
  opacity: 0.9;
  font-size: 1.15rem;
}
.navbar {
  background: #2a6aca;
}
table {
  width: 100%;
}
.reset-btn {
  visibility: hidden;
}
.btn-xs {
  --bs-btn-padding-y: 0px;
  --bs-btn-padding-x: 4px;
  --bs-btn-border-radius: 100%;
  --bs-btn-font-size: 14px;
}
.slider {
  padding: 20px 5px;
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.slider:first-child {
  margin-top: 0px;
  padding-top: 0px;
}
.slider .slider-label {
  font-size: 17px;
  font-weight: 500;
  margin-right: 10px;
  flex-basis: 30%;
}
.slider .input-group {
  flex: 1;
  margin-bottom: 10px;
  align-items: center;
  margin-right: 0;
}
.slider .range {
  flex-basis: 100%;
}
.period-select {
  flex: 0 1 max-content !important;
}
.inline-select {
  font-size: 12px;
  background-size: 10px 10px;
  background-position: right 8px center;
  padding-right: 24px;
}
.btn-group:hover .dropdown-menu {
  display: block;
  transform: translate3d(0px, 30px, 0px);
}
tr#expense_0,
tr#income_0,
tr#loan_0 {
  display: none;
}
.menu-btn:after {
  content: none !important;
}
.check-btn {
  user-select: none;
}
.detail-row,
.detail-row td {
  background: #f2f2f2;
}
.tooltip {
  --bs-tooltip-font-size: 12px;
}
.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  transition: all 0.2s;
}
.form-control:focus,
.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.btn {
  border-radius: 8px;
  font-weight: 500;
}
.btn-sm {
  border-radius: 6px;
}
td {
  vertical-align: top;
  border-bottom-color: #f3f4f6;
}
th {
  text-wrap: nowrap;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb !important;
  padding-bottom: 12px !important;
}
.form-check-label {
  text-wrap: nowrap;
}
td .interest-btn.active {
  color: #fff;
  background-color: rgb(25 136 85) !important;
}
td.button-cell {
  padding: 0;
  vertical-align: middle;
}
td.button-cell ul.inline-options {
  display: flex;
  justify-content: end;
  list-style: none;
  margin: 0;
  padding: 2px 0;
  border-radius: 20px;
  z-index: 200;
  position: relative;
  box-shadow: 10px 0 10px -6px #0000008a;
}
td.button-cell ul.inline-options > li {
  height: 40px;
  width: 40px;
}
td.button-cell ul.inline-options > li button {
  height: 100%;
  width: 100%;
  font-size: 19px;
}
td.button-cell button:hover {
  background-color: #dedede;
}
td.interest-check-sm {
  display: none;
}
colgroup.expenses col {
  width: 150px;
}
colgroup.expenses col.c-2 {
  width: 180px;
}
colgroup.expenses col.c-3 {
  width: 100px;
}
colgroup.expenses col.c-4 {
  width: 40px;
}
colgroup.incomes col {
  width: 150px;
}
colgroup.incomes col.c-2 {
  width: 180px;
}
colgroup.incomes col.c-3 {
  text-align: right;
}
.slider-input {
  touch-action: none;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  cursor: pointer;
  outline: none;
  border-radius: 15px;
  height: 6px;
  background: #b6b6b6;
}
.slider-input.inline {
  height: 4px;
}
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 15px;
  width: 15px;
  background-color: rgb(223 76 209);
  border-radius: 50%;
  border: none;
  transition: 0.2s ease-in-out;
}
.slider-input::-moz-range-thumb {
  height: 15px;
  width: 15px;
  background-color: rgb(223 76 209);
  border-radius: 50%;
  border: none;
  transition: 0.2s ease-in-out;
}
.slider-input.inline::-webkit-slider-thumb {
  height: 12px;
  width: 12px;
}
.slider-input.inline::-moz-range-thumb {
  height: 12px;
  width: 12px;
}
.slider_value {
  text-align: center;
}
.amortisation-container {
  max-height: 400px;
}
.slider-prepend {
  margin-right: 10px;
  --bs-gutter-x: 0;
  flex-basis: 110px;
  flex-grow: 0;
}
.range {
  width: 100%;
}
.range.col {
  display: flex;
  align-items: center;
  --bs-gutter-x: 0;
}
td.value-col {
  width: 130px;
  text-align: right;
  vertical-align: top;
}
table.table {
  margin-bottom: 0;
}
table.table-footer {
  margin-top: auto;
}
table.table-footer tfoot tr:first-child td {
  border-top: 1px solid;
  border-color: inherit;
}
table#summary td {
  border-top: 0;
}
.table-col {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  padding: 24px;
  border: 1px solid #e5e7eb;
}
.table-col > table:not(.table-footer) tr:last-child td {
  border-bottom: 0;
}
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.modal-header {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.loan-stats {
  font-size: 16px;
}
span[readonly] {
  background-color: transparent;
  border: 0 !important;
  display: block;
  padding: 8px 5px;
  width: 100%;
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
#signupModal label {
  font-size: 14px;
}
td.title-cell {
  font-weight: bold;
  display: none;
}
input[type=checkbox] {
  cursor: pointer;
  vertical-align: text-top;
}
.add {
  position: relative;
  width: 100%;
}
.add-dropdown {
  width: 100%;
}
@media (max-width: 991.98px) {
  body {
    --bs-input-font-size: 16px;
    font-size: 16px;
  }
  .form-control,
  .form-select,
  span[readonly],
  button.btn,
  button,
  label.btn {
    font-size: 16px;
  }
  .table-col {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    gap: 0;
  }
  #incomes tbody,
  #expenses tbody,
  #table-view .table tbody {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  #incomes tbody tr,
  #expenses tbody tr,
  #table-view .table tbody tr {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }
  #incomes tbody tr td,
  #expenses tbody tr td,
  #table-view .table tbody tr td {
    padding: 12px 0;
    border: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
  }
  #incomes tbody tr td:has(div.range),
  #expenses tbody tr td:has(div.range),
  #table-view .table tbody tr td:has(div.range) {
    padding-bottom: 16px;
  }
  #incomes tbody tr td:nth-last-child(2),
  #expenses tbody tr td:nth-last-child(2),
  #table-view .table tbody tr td:nth-last-child(2),
  #incomes tbody tr td:nth-last-child(1),
  #expenses tbody tr td:nth-last-child(1),
  #table-view .table tbody tr td:nth-last-child(1) {
    border-bottom: none !important;
  }
  #incomes tbody tr td:not(.title-cell),
  #expenses tbody tr td:not(.title-cell),
  #table-view .table tbody tr td:not(.title-cell) {
    flex-basis: 65%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  #incomes tbody tr td:not(.title-cell) input,
  #expenses tbody tr td:not(.title-cell) input,
  #table-view .table tbody tr td:not(.title-cell) input {
    text-align: right;
  }
  #incomes tbody tr td:not(.title-cell) > input.inline-input,
  #expenses tbody tr td:not(.title-cell) > input.inline-input,
  #table-view .table tbody tr td:not(.title-cell) > input.inline-input {
    flex: 0 0 auto;
    width: 100%;
  }
  #incomes tbody tr td:not(.title-cell) div.input-group,
  #expenses tbody tr td:not(.title-cell) div.input-group,
  #table-view .table tbody tr td:not(.title-cell) div.input-group,
  #incomes tbody tr td:not(.title-cell) div.range,
  #expenses tbody tr td:not(.title-cell) div.range,
  #table-view .table tbody tr td:not(.title-cell) div.range {
    width: 100%;
  }
  #incomes tbody tr td:not(.title-cell).interest-check-sm,
  #expenses tbody tr td:not(.title-cell).interest-check-sm,
  #table-view .table tbody tr td:not(.title-cell).interest-check-sm {
    display: table-cell;
    flex-basis: 100%;
  }
  #incomes tbody tr td:not(.title-cell).interest-check,
  #expenses tbody tr td:not(.title-cell).interest-check,
  #table-view .table tbody tr td:not(.title-cell).interest-check {
    display: none;
  }
  #incomes tbody tr td:not(.title-cell).value-col,
  #expenses tbody tr td:not(.title-cell).value-col,
  #table-view .table tbody tr td:not(.title-cell).value-col {
    align-items: flex-end;
  }
  #incomes tbody tr td.title-cell,
  #expenses tbody tr td.title-cell,
  #table-view .table tbody tr td.title-cell {
    display: flex;
    align-items: center;
    flex-basis: 35%;
    font-weight: 600;
    color: #4b5563;
  }
  #incomes tbody tr td.title-cell:has(.interest-label),
  #expenses tbody tr td.title-cell:has(.interest-label),
  #table-view .table tbody tr td.title-cell:has(.interest-label) {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  #incomes tbody tr td:nth-last-child(3),
  #expenses tbody tr td:nth-last-child(3),
  #table-view .table tbody tr td:nth-last-child(3) {
    display: flex !important;
  }
  #incomes tbody tr td:nth-child(-n+2),
  #expenses tbody tr td:nth-child(-n+2),
  #table-view .table tbody tr td:nth-child(-n+2) {
    border-top: none;
  }
  #incomes tfoot,
  #expenses tfoot,
  #table-view .table tfoot {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
  }
  #incomes tfoot tr.totalRow,
  #expenses tfoot tr.totalRow,
  #table-view .table tfoot tr.totalRow {
    order: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }
  #incomes tfoot tr.totalRow td,
  #expenses tfoot tr.totalRow td,
  #table-view .table tfoot tr.totalRow td {
    border: none !important;
    padding: 0;
  }
  #incomes tfoot tr.totalRow td.total-label,
  #expenses tfoot tr.totalRow td.total-label,
  #table-view .table tfoot tr.totalRow td.total-label {
    flex: 1;
    text-align: left !important;
    font-weight: 700;
    color: #111827;
    vertical-align: middle;
  }
  #incomes tfoot tr.totalRow #balance_label,
  #expenses tfoot tr.totalRow #balance_label,
  #table-view .table tfoot tr.totalRow #balance_label {
    vertical-align: middle;
  }
  #incomes tfoot tr.totalRow td.value-col,
  #expenses tfoot tr.totalRow td.value-col,
  #table-view .table tfoot tr.totalRow td.value-col {
    text-align: right;
    font-size: 1.1em;
  }
  #incomes tfoot tr.totalRow td.value-col span[readonly],
  #expenses tfoot tr.totalRow td.value-col span[readonly],
  #table-view .table tfoot tr.totalRow td.value-col span[readonly] {
    width: max-content;
  }
  #incomes tfoot tr.noprint,
  #expenses tfoot tr.noprint,
  #table-view .table tfoot tr.noprint {
    display: none;
  }
  #incomes colgroup,
  #expenses colgroup,
  #table-view .table colgroup {
    display: none;
  }
  #incomes thead,
  #expenses thead,
  #table-view .table thead {
    display: none;
  }
  #incomes .button-cell,
  #expenses .button-cell,
  #table-view .table .button-cell {
    display: none;
  }
  #incomes .mobile-btn,
  #expenses .mobile-btn,
  #table-view .table .mobile-btn {
    flex-basis: 100% !important;
    display: table-cell !important;
  }
  #incomes .mobile-btn div,
  #expenses .mobile-btn div,
  #table-view .table .mobile-btn div {
    grid-auto-flow: column;
  }
  #incomes .mobile-btn div button.btn,
  #expenses .mobile-btn div button.btn,
  #table-view .table .mobile-btn div button.btn {
    padding-top: 15px;
    padding-bottom: 15px;
  }
  #incomes tr.mobile-btn,
  #expenses tr.mobile-btn,
  #table-view .table tr.mobile-btn {
    display: flex !important;
  }
  #incomes tr.mobile-btn td,
  #expenses tr.mobile-btn td,
  #table-view .table tr.mobile-btn td {
    flex: 1;
    border: 0;
  }
  #incomes tr.mobile-btn td button,
  #expenses tr.mobile-btn td button,
  #table-view .table tr.mobile-btn td button {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  label.interest-label {
    font-size: 12px;
    padding: 5px;
  }
  .dropdown-center {
    position: relative;
  }
  .dropdown-center .dropdown-menu {
    min-width: 100%;
    background-color: #f3f3f3;
  }
  .dropdown-menu {
    background-color: #f3f3f3;
  }
  .dropdown-menu li:not(:last-child) {
    border-bottom: 1px solid #dadada;
  }
  td.title-cell {
    display: table-cell;
    flex-basis: 35%;
  }
  colgroup.expenses {
    display: none;
  }
  td.spacer {
    display: none;
  }
  #save-btn {
    width: 100%;
    padding: 15px 0;
  }
  #balance_total {
    text-wrap: nowrap;
  }
  #incomes #income_0,
  #expenses #expense_0,
  #expenses #loan_0 {
    display: none;
  }
  .btn-group:hover .dropdown-menu {
    transform: translate3d(0px, 55px, 0px) !important;
  }
  .slider-input.inline {
    margin-top: 4px;
    height: 20px;
  }
  input[type=number]::-webkit-inner-spin-button,
  input[type=number]::-webkit-outer-spin-button {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0;
  }
  input[type=number] {
    -moz-appearance: textfield;
  }
  .total-label {
    font-size: 15px;
  }
  .slider-input.inline::-webkit-slider-thumb {
    height: 22px;
    width: 22px;
    background-color: rgb(156 50 146);
  }
  .slider-input.inline::-moz-range-thumb {
    height: 22px;
    width: 22px;
    background-color: rgb(156 50 146);
  }
  .slider-input.inline::-webkit-slider-thumb:hover {
    box-shadow: none;
  }
  .slider-input.inline:active::-webkit-slider-thumb {
    box-shadow: none;
  }
  .slider-input.inline::-moz-range-thumb:hover {
    box-shadow: none;
  }
  .slider-input.inline:active::-moz-range-thumb {
    box-shadow: none;
  }
  td.button-cell {
    display: none !important;
  }
  .mobile-hide {
    display: none;
  }
}
