:root {
  --bg: #eef4f2;
  --bg-accent: #d8ebe3;
  --surface: #ffffff;
  --surface-soft: #f4f8f6;
  --line: #e1ece7;
  --text: #242424;
  --muted: #5f7670;
  --primary: #30CE00;
  --primary-dark: #30CE00;
  --danger: #d73342;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 16px 38px rgba(21, 46, 38, 0.12);
  --shadow-soft: 0 10px 24px rgba(21, 46, 38, 0.08);
  --font-main: "Inter", "Segoe UI", "SF Pro Text", Roboto, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0e1412;
  --bg-accent: #151f1c;
  --surface: #121a18;
  --surface-soft: #1a2320;
  --line: #26312d;
  --text: #e6f0ec;
  --muted: #9fb1aa;
  --primary: #38db00;
  --primary-dark: #24b200;
  --danger: #f05b68;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 26px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-main);
  font-weight: 500;
  letter-spacing: -0.03em;
  background: #f3f3f1;
  padding-bottom: 86px;
}

button,
input,
select {
  font: inherit;
}

.finance-app {
  max-width: 420px;
  margin: 14px auto 0;
  padding: 8px 20px 96px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #30CE00 0%, #30CE00 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.avatar-lg {
  width: 72px;
  height: 72px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.icon-btn,
.pill-btn,
.add-btn {
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-btn:hover,
.pill-btn:hover,
.add-btn:hover {
  transform: translateY(-1px);
}

.icon-btn:active,
.pill-btn:active,
.add-btn:active {
  transform: translateY(0);
}

.icon-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.icon-gear {
  display: block;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-7px);
}

.back-arrow {
  width: 10px;
  height: 10px;
  border-left: 2px solid #6d7b76;
  border-bottom: 2px solid #6d7b76;
  transform: rotate(45deg);
  display: inline-block;
  margin-left: 1px;
}

.pill-btn {
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
}

.pill-btn .count {
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
}

.earn-title {
  margin: 0 0 10px;
  font-size: 33px;
  line-height: 1.2;
  font-weight: 300;
}

.month-select {
  border: none;
  border-bottom: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  padding: 0;
}

.earn-amount {
  margin: 18px 0;
  font-size: 78px;
  font-weight: 500;
  letter-spacing: -1.8px;
  line-height: 1.04;
}


.divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

.rest-title {
  margin: 0;
  font-size: 26px;
  color: #7b8380;
  font-weight: 300;
}

.rest-amount {
  margin: 10px 0 0;
  font-size: 44px;
  font-weight: 300;
  color: #6f7673;
}

.add-below-card {
  margin: 26px 0 30px;
}

.add-btn {
  width: 100%;
  border-radius: 999px;
  padding: 20px;
  background: linear-gradient(145deg, #30CE00 0%, #30CE00 100%);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 22px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.add-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.add-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}

.add-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 13px;
  border-radius: 999px;
  background: var(--primary);
}

.section-title {
  margin: 0 0 10px;
  font-size: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.stats-view .section-head {
  margin-bottom: 4px;
}

.stats-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-card {
  display: grid;
  gap: 18px;
}

.profile-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.profile-avatar {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.profile-avatar-btn {
  font-size: 12px;
  padding: 8px 10px;
}

.profile-meta {
  display: grid;
  gap: 4px;
}

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

.profile-subscription {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fbfa;
}

.profile-pay {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.profile-year {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: #ffffff;
}

.profile-year-main {
  display: grid;
  gap: 4px;
}

.profile-year-title {
  font-size: 12px;
  color: #6a7672;
}

.profile-year-price {
  font-size: 16px;
  color: var(--text);
}

.profile-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f7e6;
  color: #1b6c2a;
  font-size: 12px;
  border: 1px solid #cfe9c6;
  text-align: center;
}

.profile-plan {
  margin: 0;
  font-size: 18px;
}

.profile-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: #7b8380;
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-page {
  max-width: 520px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.auth-head {
  display: grid;
  gap: 6px;
}

.auth-title {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
}

.auth-subtitle {
  margin: 0;
  color: #6f7673;
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  justify-content: center;
}

.auth-tab {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #5d6a66;
  cursor: pointer;
  min-width: 120px;
}

.auth-tab.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f3fbf1;
}

.auth-form {
  display: none;
  gap: 10px;
  justify-items: center;
}

.auth-form.is-active {
  display: grid;
}

.auth-label {
  font-size: 12px;
  color: #6a7672;
}

.auth-submit {
  margin-top: 4px;
  align-self: center;
  min-width: 220px;
  text-align: center;
}

.auth-note {
  margin: 0;
  font-size: 12px;
  color: #7b8380;
}

.auth-link {
  border: none;
  background: transparent;
  color: #7b8380;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  padding: 0;
  margin-top: 6px;
}

.stats-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #5d6a66;
  cursor: pointer;
}

.tab-btn.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f3fbf1;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.clients-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clients-list {
  display: grid;
  gap: 12px;
}

.client-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  border: 1px solid #eef2f0;
}

.client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-card .accordion-head {
  justify-content: space-between;
  align-items: center;
}

.client-card .accordion-body {
  margin-top: 12px;
}

.accordion-spacer {
  width: 32px;
  height: 32px;
  display: inline-block;
}

.client-name {
  margin: 0;
  font-size: 20px;
}

.client-earned {
  margin: 0;
  font-size: 16px;
  color: #6f7673;
  font-weight: 300;
}

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

.client-projects {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-add-inline {
  margin-top: 12px;
  width: 100%;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
}

.client-delete-inline {
  margin-top: 8px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #f1c0c5;
  background: #ffffff;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
}

.client-project {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f4f7f6;
  font-size: 12px;
  color: #5d6a66;
}

.client-edit-button {
  width: 42px;
  height: 42px;
  border: 1px solid #e2e0dc;
  border-radius: 14px;
  background: #ffffff;
  color: #5f5f5f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px;
  cursor: pointer;
  flex: 0 0 42px;
}


.client-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.client-card-actions form {
  margin: 0;
  display: flex;
}

.client-delete-button {
  border-color: #f0c9cd;
  color: #30302d;
}

.client-delete-button:hover {
  background: #fff7f8;
  border-color: #f0b8bf;
}

.client-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.client-menu-trigger {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.client-menu-panel form {
  margin: 0;
}
.client-card .project-card-head {
  flex-direction: row;
}

.client-edit-button svg {
  width: 100%;
  height: 100%;
  display: block;
}

.client-contact-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.client-contact-item {
  min-width: 0;
  min-height: 74px;
  border: 1px solid #e5e5e1;
  border-radius: 14px;
  background: #fbfbf9;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.client-contact-item-wide {
  grid-column: 1 / -1;
}

.client-contact-item span {
  color: #7f8b86;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.client-contact-item strong,
.client-contact-item a {
  color: #30302d;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.client-notes-field {
  min-height: 96px;
  resize: vertical;
  line-height: 1.35;
  padding-top: 14px;
}

.client-projects-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #ecece8;
}

.client-projects-title {
  margin-bottom: 10px;
  color: #7f8b86;
  font-size: 13px;
  font-weight: 600;
}

.client-projects-list {
  display: grid;
  gap: 8px;
}

.client-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e5e1;
  border-radius: 10px;
  background: #fbfbf9;
}

.client-project-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-project-row-name {
  overflow: hidden;
  color: #2f2f2f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-project-row-status {
  color: var(--status-color, #84928d);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.client-project-row-cost {
  color: #30302d;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.client-project-btn {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.client-project-btn:hover {
  border-color: #cfe0d9;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.client-modal-payments {
  margin-top: 12px;
}

.client-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  color: #43514d;
}

.client-add-project {
  margin-top: 12px;
  width: 100%;
}

.stats-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  width: 100%;
}

.stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.stats-title {
  margin: 0;
  font-size: 16px;
  color: #5d6a66;
}

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

.stats-chart {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  height: 140px;
  align-items: end;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.chart-bar {
  width: 100%;
  max-width: 18px;
  border-radius: 999px;
  background: var(--primary);
  min-height: 6px;
  transition: height 0.2s ease;
  order: 1;
}

.chart-value {
  display: none;
  font-size: 10px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  order: 2;
  white-space: nowrap;
}

.chart-col:hover .chart-value,
.chart-col.is-active .chart-value {
  display: inline-flex;
}

.chart-label {
  font-size: 10px;
  color: #7b8380;
  text-align: center;
  order: 2;
}

.clients-top {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.client-top-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 13px;
}

.client-top-rank {
  color: #7b8380;
}

.client-top-name {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-top-meta {
  color: #7b8380;
}

.client-top-value {
  color: var(--text);
  font-weight: 500;
}

.stats-redesign {
  display: grid;
  gap: 14px;
}

.stats-redesign > * {
  min-width: 0;
}

.stats-redesign-head {
  margin-bottom: 2px;
}

.stats-period-tabs {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid #e4e4df;
  border-radius: 16px;
  background: #ffffff;
}

.stats-period-tab {
  min-width: 0;
  min-height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7d837f;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.stats-period-tab.is-active {
  background: #effbea;
  color: #278917;
}

.stats-panel {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(40, 40, 36, 0.08);
}

.stats-panel-top {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.stats-period-kicker {
  color: #87928d;
  font-size: 13px;
  font-weight: 700;
}

.stats-period-title {
  margin: 4px 0 0;
  color: #2f2f2d;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.1;
}

.stats-period-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 118px);
  gap: 8px;
  max-width: 100%;
}

.stats-period-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #e3e3df;
  border-radius: 14px;
  background: #f8f8f6;
  padding: 0 12px;
  color: #30302d;
  outline: none;
}

.stats-period-submit {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: none;
  border-radius: 14px;
  background: #2f2f2d;
  color: #ffffff;
  padding: 0 10px;
  cursor: pointer;
}

.stats-hero-metric {
  margin-top: 18px;
  display: grid;
  gap: 6px;
}

.stats-hero-label {
  color: #87928d;
  font-size: 13px;
  font-weight: 700;
}

.stats-hero-metric strong {
  color: #2e2e2e;
  font-size: 50px;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.stats-metric-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.stats-mini-card {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e4e4df;
  border-radius: 12px;
  background: #fbfbf9;
  padding: 12px;
}

.stats-mini-card span {
  color: #87928d;
  font-size: 12px;
  font-weight: 700;
}

.stats-mini-card strong {
  color: #2f2f2d;
  font-size: 20px;
  line-height: 1.15;
}

.stats-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stats-block-head h3 {
  margin: 0;
  color: #2f2f2d;
  font-size: 22px;
  line-height: 1.1;
}

.stats-block-head span {
  color: #87928d;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.stats-bars-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  overscroll-behavior-x: contain;
}

.stats-bars-scroll::-webkit-scrollbar {
  height: 0;
}

.stats-bars {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--bar-count), minmax(18px, 1fr));
  gap: 5px;
  min-height: 174px;
  align-items: end;
}

.stats-bars-week,
.stats-bars-year {
  min-width: 100%;
}

.stats-bars-month {
  grid-template-columns: repeat(var(--bar-count), 18px);
  min-width: max-content;
}

.stats-bar-item {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  align-items: end;
}

.stats-bar-track {
  height: 132px;
  display: flex;
  align-items: end;
  border-radius: 999px;
  background: #f1f1ee;
  overflow: hidden;
}

.stats-bar-fill {
  width: 100%;
  min-height: 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #37d416 0%, #249414 100%);
}

.stats-bar-label {
  overflow: hidden;
  color: #8a928d;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.stats-client-list {
  display: grid;
  gap: 8px;
}

.stats-client-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e4e4df;
  border-radius: 14px;
  background: #fbfbf9;
}

.stats-client-rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #effbea;
  color: #278917;
  font-size: 12px;
  font-weight: 800;
}

.stats-client-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.stats-client-main strong {
  overflow: hidden;
  color: #30302d;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-client-main span {
  color: #87928d;
  font-size: 12px;
}

.stats-client-value {
  color: #30302d;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.stats-empty {
  padding: 14px;
  border: 1px dashed #d9d9d4;
  border-radius: 14px;
  color: #7d837f;
  font-size: 14px;
}

.settings-page {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  margin: 0 auto;
}

.settings-panel {
  border-radius: 24px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(40, 40, 36, 0.08);
}

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

.settings-panel-head h3 {
  margin: 0;
  color: #2f2f2d;
  font-size: 22px;
  line-height: 1.12;
}

.settings-panel-head p {
  margin: 6px 0 0;
  color: #87928d;
  font-size: 13px;
  line-height: 1.35;
}

.settings-muted {
  color: #87928d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.settings-form {
  display: grid;
  gap: 12px;
}

.settings-field {
  display: grid;
  gap: 4px;
}

.settings-field span {
  color: #87928d;
  font-size: 12px;
  font-weight: 700;
}

.settings-field .field {
  margin-top: 0;
}

.settings-check {
  min-height: 48px;
  border: 1px solid #e6e6e1;
  border-radius: 14px;
  background: #fbfbf9;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #30302d;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.settings-check input {
  width: 18px;
  height: 18px;
  accent-color: #30CE00;
  flex: 0 0 auto;
}

.settings-submit,
.settings-danger-submit,
.settings-secondary-link {
  min-height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.settings-submit {
  border: none;
  background: #2f2f2d;
  color: #ffffff;
}

.settings-secondary-link {
  border: 1px solid #e3e3df;
  background: #f8f8f6;
  color: #30302d;
}

.settings-danger-panel {
  border: 1px solid #f0d4d7;
}

.settings-danger-submit {
  border: 1px solid #f0c9cd;
  background: #ffffff;
  color: #c43846;
}

.settings-logout-panel {
  padding: 14px;
}

.settings-logout-link {
  display: flex;
  width: 100%;
  box-sizing: border-box;
}


.settings-telegram-state {
  border: 1px solid #e6e6e1;
  border-radius: 14px;
  background: #fbfbf9;
  padding: 14px;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.settings-telegram-state strong {
  color: #30302d;
  font-size: 16px;
}

.settings-telegram-state span,
.settings-telegram-hint {
  color: #87928d;
  font-size: 13px;
  line-height: 1.35;
}

.settings-telegram-code {
  border: 1px solid #d9f0d2;
  border-radius: 16px;
  background: #f4fff0;
  color: #23a812;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 4px;
  text-align: center;
  padding: 14px;
  margin-bottom: 8px;
}

.settings-telegram-state-linked {
  border-color: #d9f0d2;
  background: #f7fff4;
}

.settings-telegram-state-linked strong {
  color: #23a812;
}



.settings-telegram-open-link {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
}
.settings-telegram-attach-form {
  margin-top: 12px;
}
.settings-status-list {
  display: grid;
  gap: 10px;
}

.settings-status-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px 38px;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  border: 1px solid #e6e6e1;
  border-radius: 16px;
  background: #fbfbf9;
  padding: 10px 12px;
}

.settings-status-row form {
  margin: 0;
  display: flex;
}

.settings-status-name {
  min-width: 0;
  color: #30302d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.settings-status-swatch {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--status-color, #30CE00);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 1px #deded9;
}

.settings-status-icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid #e2e0dc;
  border-radius: 14px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  cursor: pointer;
}

.settings-status-icon-button img {
  width: 100%;
  height: 100%;
  display: block;
}

.settings-status-delete-button {
  border-color: #f0c9cd;
}

.settings-status-add-button {
  border: none;
  border-radius: 14px;
  background: #2f2f2d;
  color: #ffffff;
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.settings-status-add-button span {
  font-size: 18px;
  line-height: 1;
}

.settings-status-color-field {
  height: 52px;
  padding: 8px;
  cursor: pointer;
}

.stats-select {
  margin-top: 0;
  min-width: 160px;
}

.stats-range {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  justify-items: stretch;
}

.stats-range .field {
  width: 100%;
  margin-top: 0;
}

.stats-input {
  margin-top: 0;
  min-width: 0;
}

.stats-apply {
  height: 42px;
  padding: 0 14px;
}

.search-wrap {
  min-width: 240px;
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  transform: translateY(-15px);
}

.search-field {
  width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 12px;
  height: 12px;
  border: 2px solid #8f9c97;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: #8f9c97;
  right: -5px;
  bottom: -1px;
  transform: rotate(45deg);
  border-radius: 999px;
}

.search-input {
  width: 100%;
  padding: 10px 12px;
  padding-left: 34px;
  border-radius: 14px;
  border: 1px solid #dfe7e3;
  background: #f1f4f3;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.filter-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #dfe7e3;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.filter-icon {
  width: 14px;
  height: 12px;
  position: relative;
  display: block;
}

.filter-icon::before,
.filter-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #7f928c;
  border-radius: 999px;
}

.filter-icon::before {
  top: 2px;
}

.filter-icon::after {
  bottom: 2px;
}

.filter-icon span {
  display: none;
}

.sort-options {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e3ece8;
  border-radius: 12px;
  background: #f8fbfa;
  cursor: pointer;
}

.sort-option input {
  accent-color: var(--primary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #dfe7e3;
}

.settings-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.settings-block:first-of-type {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

.settings-title {
  margin: 0 0 6px;
  font-size: 14px;
  color: #5d6a66;
  white-space: nowrap;
}

.settings-dirty {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b45309;
}

.settings-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.settings-row .field {
  margin-top: 0;
}

.settings-row .note {
  grid-column: 2 / -1;
  margin: 4px 0 0;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.toggle-inline {
  justify-self: end;
  transform: translateY(-5px);
}

.toggle input {
  display: none;
}

.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #e1e9e6;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.toggle input:checked + .toggle-track {
  background: #bdebb4;
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.toggle-label {
  font-size: 12px;
  color: #6a7672;
}

.status-hidden .status-badge {
  display: none;
}

.status-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.status-item-name {
  font-size: 13px;
  color: var(--text);
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker {
  position: relative;
}

.color-cycle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #dfe7e3;
  padding: 0;
  cursor: pointer;
}

.color-popover {
  position: absolute;
  right: 0;
  top: 26px;
  background: #fff;
  border: 1px solid #dfe7e3;
  border-radius: 10px;
  padding: 6px;
  display: none;
  gap: 6px;
  grid-template-columns: repeat(3, 18px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.color-picker.is-open .color-popover {
  display: grid;
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #dfe7e3;
  padding: 0;
  cursor: pointer;
}

.status-remove {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  color: #7a8783;
}

.status-add {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-add .btn {
  height: 48px;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: normal;
  padding: 0;
  margin: 0;
}

.status-add .field {
  height: 48px;
  flex: 1;
  padding: 0 14px;
  line-height: 48px;
  display: block;
  margin: 0;
}

.search-input:focus {
  border-color: #b7e3a7;
  box-shadow: 0 0 0 3px rgba(48, 206, 0, 0.14);
  background: #ffffff;
}

.filter-btn:hover {
  border-color: #cfe0d9;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.filter-btn:active {
  transform: translateY(0);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 12px;
  color: var(--muted);
  vertical-align: middle;
  margin-left: 6px;
}

.search-count {
  font-size: 12px;
  color: #7b8380;
  margin-left: 8px;
  transform: translateY(6px);
}

.section-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.info-banner {
  position: relative;
  margin: 0 0 16px;
  padding: 14px 44px 14px 16px;
  background: #f1f4f3;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.info-banner .section-sub {
  margin: 0;
}

.banner-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.project {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  margin-bottom: 14px;
}

.swipe-card {
  position: relative;
  overflow: hidden;
}

.swipe-content {
  transition: transform 0.18s ease;
}

.swipe-card.swipe-open .swipe-content {
  transform: translateX(-72px);
}

.swipe-delete {
  position: absolute;
  right: 0;
  top: 0;
  width: 72px;
  height: 100%;
  border: none;
  background: #e24a4a;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.swipe-card.swipe-open .swipe-delete {
  opacity: 1;
  pointer-events: auto;
}

.accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.accordion-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.accordion-head .quick-action {
  margin-left: auto;
}

.accordion-title-wrap {
  min-width: 0;
}

.project h3.project-name {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  word-break: break-word;
}

.project-client {
  margin: 4px 0 0;
  font-size: 12px;
  color: #7b8380;
}


.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  margin-top: 0;
  color: #5c6663;
  background: #f2f4f3;
  cursor: pointer;
}

.status-new {
  color: #4f6a66;
  background: #eef3f1;
  border-color: #d9e6e1;
}

.status-progress {
  color: #0b6a4a;
  background: #e7f6ef;
  border-color: #c7ead8;
}

.status-review {
  color: #6b5a1f;
  background: #f8f2e6;
  border-color: #efe0c8;
}

.status-done {
  color: #41555f;
  background: #eef2f5;
  border-color: #d7dee4;
}

.status-custom {
  color: #5c6663;
  background: #f2f4f3;
  border-color: #dfe7e3;
}

.accordion-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.accordion-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #7a8e87;
  border-bottom: 2px solid #7a8e87;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease;
}

.accordion-toggle.is-open .accordion-chevron {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.accordion-body {
  display: none;
  margin-top: 12px;
}

.accordion-body.is-open {
  display: block;
}

.project-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.project-actions {
  margin-left: 0;
  width: 100%;
}

.project h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.project-subtitle {
  margin: 0;
  font-size: 14px;
  color: #7f928c;
  font-weight: 500;
}

.project-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: #8a9a95;
  letter-spacing: 0.02em;
}

.project-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8a9a95;
}

.quick-action {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
}

.project-metrics {
  width: 100%;
  margin-top: 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.metric-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: #80908b;
  font-weight: 500;
}

.metric-value {
  margin: 0;
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  margin-top: auto;
}

.meta {
  margin: 0;
  color: #43514d;
  font-size: 17px;
  line-height: 1.4;
}

.meta strong {
  color: var(--text);
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.badge {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-row.single-action {
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 10px;
}

.pay-btn,
.gray-btn,
.danger-btn,
.btn-dark {
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
}

.pay-btn {
  border: none;
  background: var(--primary);
  color: #fff;
}

.pay-btn-wide {
  min-width: 0;
  width: 100%;
  text-align: center;
  padding: 12px 18px;
}

.action-menu {
  position: relative;
}

.menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.menu-dropdown {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  padding: 6px;
  display: none;
  z-index: 10;
}

.action-menu.is-open .menu-dropdown {
  display: block;
}

.menu-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}

.menu-item:hover {
  background: #f3f4f4;
}

.menu-item.danger {
  color: var(--danger);
}

.gray-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.danger-btn {
  border: 1px solid #f4c0c5;
  background: #fff;
  color: var(--danger);
}

.btn-dark {
  border: none;
  background: var(--text);
  color: #fff;
}

.payments {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}



.payments-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.pay-row {
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 16px;
  color: #36423f;
}

.pay-row .left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-btn {
  border: none;
  border-bottom: 1px dashed #95a8a2;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-size: 15px;
  cursor: pointer;
}

.op-actions {
  display: flex;
  align-items: center;
}

.tax-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #e3ece8;
  background: #f5f8f7;
  font-size: 12px;
  color: #6a7672;
}
.op-del {
  border: 1px solid #f5cdd1;
  border-radius: 12px;
  background: #fff;
  color: var(--danger);
  padding: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trash-icon {
  width: 14px;
  height: 14px;
  position: relative;
  display: block;
  border: 2px solid var(--danger);
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.trash-icon::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 18px;
  height: 2px;
  background: var(--danger);
  border-radius: 2px;
}

.trash-icon::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 3px;
  width: 8px;
  height: 2px;
  background: var(--danger);
  border-radius: 2px;
}

.empty-state {
  border: 1px dashed #c5ddd3;
  background: linear-gradient(160deg, #30CE00 0%, #30CE00 100%);
}

.empty-state h3,
.empty-state .meta,
.empty-state .muted {
  color: #ffffff;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(8, 17, 14, 0.0);
  z-index: 9999;
  transition: background 0.18s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal[aria-hidden="false"] {
  background: rgba(8, 17, 14, 0.48);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  width: min(530px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.modal[aria-hidden="false"] .modal-content {
  opacity: 1;
  transform: scale(1);
}

.undo-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  padding: 10px 12px;
  display: none;
  z-index: 10000;
}

.undo-toast[aria-hidden="false"] {
  display: block;
}

.undo-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}

.undo-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 10px;
  width: min(448px, calc(100% - 20px));
  height: 74px;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #e4e4e0;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(37, 37, 34, 0.12);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  padding: 8px;
  z-index: 1000;
}

.nav-add-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 0;
  padding-bottom: 0;
}

.nav-add-label {
  font-size: 11px;
  color: #7b8380;
  letter-spacing: 0;
  white-space: nowrap;
  margin-top: 0;
  line-height: 1.2;
  transform: translateY(-6px);
}

.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  min-width: 0;
  min-height: 56px;
  padding: 6px 4px;
  border-radius: 14px;
  position: relative;
  z-index: 1001;
  pointer-events: auto;
  color: #85857f;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
  background: #f6f6f3;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active {
  background: #effbea;
  color: #2a8f17;
}

.nav-label {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-add {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-15px);
}

.nav-add-plus {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.nav-add-plus::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.nav-add-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
}

.nav-add-placeholder {
  width: 52px;
  height: 52px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .undo-toast {
    width: calc(100% - 24px);
    left: 12px;
    transform: none;
  }

}

.modal-head {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-title {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
}

.close-x {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.field {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}

.field-stack {
  display: grid;
  gap: 6px;
}

.field-hint {
  margin: 0;
  font-size: 12px;
  color: #7b8380;
}

.field:focus {
  border-color: #30CE00;
  box-shadow: 0 0 0 3px rgba(48, 206, 0, 0.15);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.row .field {
  min-width: 160px;
  flex: 1;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 120px;
  border-radius: var(--radius-md);
  border: none;
  padding: 12px 14px;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.small,
.note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.text-note {
  margin: 6px 0 0;
  color: #394744;
  line-height: 1.45;
}

.archive-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
  padding: 18px;
}

@media (max-width: 760px) {
  .finance-app {
    margin: 18px auto;
    padding: 14px;
  }

  .card {
    padding: 20px;
  }

  .earn-title {
    font-size: 23px;
  }

  .earn-amount {
    font-size: 52px;
    letter-spacing: -1px;
  }

  .rest-title {
    font-size: 18px;
    color: #7b8380;
  }

  .rest-amount {
    font-size: 33px;
    color: #6f7673;
  }

  .section-title {
    font-size: 20px;
  }

  .section-head {
    align-items: stretch;
  }

  .search-wrap {
    min-width: 100%;
    justify-content: stretch;
  }

  .search-field {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .project-head-row {
    gap: 10px;
  }

  .project-actions {
    margin-left: 0;
  }

  .project h3 {
    font-size: 22px;
  }

  .accordion-head {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .accordion-title-wrap {
    flex: 1;
    min-width: 0;
  }

  .accordion-toggle {
    width: 32px;
    height: 32px;
  }

  .accordion-right {
    gap: 6px;
  }

  .quick-action {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
  }

  .project h3.project-name {
    font-size: 20px;
  }

  .project-metrics {
    gap: 9px;
  }

  .metric-card {
    min-height: 74px;
    padding: 10px 11px;
  }

  .metric-value {
    font-size: 15px;
  }

  .meta {
    font-size: 16px;
  }

  .pill-btn {
    font-size: 15px;
    padding: 11px 14px;
  }

  .icon-btn {
    width: 52px;
    height: 52px;
  }

  .add-btn {
    font-size: 18px;
    padding: 16px;
  }

  .add-below-card {
    margin: 22px 0 24px;
  }
}
.project h3,
.project h4,
.section-title,
.earn-title,
.rest-title {
  font-weight: 500;
}

strong {
  font-weight: 500;
}
  .status-add {
    gap: 8px;
  }

  .status-add .btn,
  .status-add .field {
    height: 44px;
  }

  .status-add .btn {
    min-width: 120px;
    line-height: normal;
  }

  .status-add .field {
    padding: 0 12px;
    line-height: 44px;
  }
  .bottom-nav {
    height: 70px;
    padding: 8px;
  }

  .nav-add-wrap {
    margin-top: 0;
    padding-bottom: 0;
  }

  .nav-add-label {
    font-size: 11px;
    margin-top: 0;
    transform: translateY(-6px);
  }

  .nav-add {
    transform: translateY(-15px);
  }

  body {
    padding-bottom: 82px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-chart {
    height: 120px;
    gap: 4px;
  }

  .chart-bar {
    max-width: 14px;
  }

  .client-top-row {
    grid-template-columns: 20px 1fr auto;
  }

  .client-top-meta {
    display: none;
  }

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

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

  .stats-apply {
    grid-column: 1 / -1;
    width: 100%;
  }
  .auth-page {
    max-width: 100%;
  }

  .auth-card {
    padding: 20px;
  }
  .profile-head {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .profile-subscription {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-pay {
    width: 100%;
    justify-items: stretch;
  }

  .profile-year {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .profile-save {
    width: 100%;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .project,
:root[data-theme="dark"] .stats-card,
:root[data-theme="dark"] .client-card,
:root[data-theme="dark"] .archive-item,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .bottom-nav,
:root[data-theme="dark"] .icon-btn,
:root[data-theme="dark"] .pill-btn,
:root[data-theme="dark"] .back-btn,
:root[data-theme="dark"] .profile-year,
:root[data-theme="dark"] .profile-subscription,
:root[data-theme="dark"] .client-top-row,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .filter-btn,
:root[data-theme="dark"] .status-item,
:root[data-theme="dark"] .status-remove,
:root[data-theme="dark"] .field,
:root[data-theme="dark"] .btn-ghost,
:root[data-theme="dark"] .gray-btn,
:root[data-theme="dark"] .danger-btn,
:root[data-theme="dark"] .menu-dropdown,
:root[data-theme="dark"] .menu-toggle,
:root[data-theme="dark"] .quick-action,
:root[data-theme="dark"] .accordion-toggle,
:root[data-theme="dark"] .undo-toast,
:root[data-theme="dark"] .auth-tab,
:root[data-theme="dark"] .tab-btn,
:root[data-theme="dark"] .client-project,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .count-badge,
:root[data-theme="dark"] .status-badge {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .search-input,
:root[data-theme="dark"] .search-field,
:root[data-theme="dark"] .field,
:root[data-theme="dark"] .client-project,
:root[data-theme="dark"] .status-badge,
:root[data-theme="dark"] .badge {
  background: var(--surface-soft);
}

:root[data-theme="dark"] .bottom-nav {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .nav-icon {
  color: currentColor;
}

:root[data-theme="dark"] .nav-label,
:root[data-theme="dark"] .nav-add-label {
  color: var(--muted);
}

:root[data-theme="dark"] .nav-item:hover {
  background: var(--surface-soft);
}

:root[data-theme="dark"] .nav-item.active {
  background: rgba(56, 219, 0, 0.16);
  color: var(--primary);
}

:root[data-theme="dark"] .nav-item.active .nav-label {
  color: currentColor;
}

:root[data-theme="dark"] .search-input {
  color: var(--text);
  border-color: var(--line);
}

:root[data-theme="dark"] .search-input:focus {
  border-color: rgba(56, 219, 0, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 219, 0, 0.22);
  background: var(--surface);
}

:root[data-theme="dark"] .filter-btn:hover {
  border-color: #31423c;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .toggle-track {
  background: #2b3531;
}

:root[data-theme="dark"] .toggle-track::after {
  background: var(--surface);
}

:root[data-theme="dark"] .toggle input:checked + .toggle-track {
  background: rgba(56, 219, 0, 0.35);
}

:root[data-theme="dark"] .rest-title,
:root[data-theme="dark"] .rest-amount,
:root[data-theme="dark"] .settings-title,
:root[data-theme="dark"] .toggle-label,
:root[data-theme="dark"] .note,
:root[data-theme="dark"] .auth-subtitle,
:root[data-theme="dark"] .client-earned,
:root[data-theme="dark"] .project-subtitle,
:root[data-theme="dark"] .project-label,
:root[data-theme="dark"] .project-hint,
:root[data-theme="dark"] .stats-title,
:root[data-theme="dark"] .chart-label,
:root[data-theme="dark"] .search-count,
:root[data-theme="dark"] .section-sub,
:root[data-theme="dark"] .text-note,
:root[data-theme="dark"] .client-top-meta,
:root[data-theme="dark"] .client-top-rank,
:root[data-theme="dark"] .auth-label,
:root[data-theme="dark"] .field-hint,
:root[data-theme="dark"] .profile-note,
:root[data-theme="dark"] .tax-pill,
:root[data-theme="dark"] .project-client {
  color: var(--muted);
}

:root[data-theme="dark"] .chart-value {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .client-projects-block {
  border-color: var(--line);
}

:root[data-theme="dark"] .client-project-row {
  background: var(--surface-soft);
  border-color: var(--line);
}

:root[data-theme="dark"] .client-project-row-name,
:root[data-theme="dark"] .client-project-row-cost {
  color: var(--text);
}

:root[data-theme="dark"] .client-projects-title,
:root[data-theme="dark"] .client-project-row-status {
  color: var(--status-color, var(--muted));
}

:root[data-theme="dark"] .settings-panel,
:root[data-theme="dark"] .settings-secondary-link,
:root[data-theme="dark"] .settings-status-row {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .settings-panel-head h3,
:root[data-theme="dark"] .settings-secondary-link {
  color: var(--text);
}

:root[data-theme="dark"] .settings-panel-head p,
:root[data-theme="dark"] .settings-muted,
:root[data-theme="dark"] .settings-field span {
  color: var(--muted);
}

:root[data-theme="dark"] .menu-item:hover {
  background: #1a2220;
}

:root[data-theme="dark"] .close-x,
:root[data-theme="dark"] .banner-close {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

:root[data-theme="dark"] .modal[aria-hidden="false"] {
  background: rgba(5, 10, 9, 0.7);
}

.finance-app-site {
  max-width: 1120px;
}

.site-topbar {
  margin-bottom: 28px;
}

.site-actions .pill-btn {
  text-decoration: none;
  color: var(--text);
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.section-block {
  margin-top: 24px;
}

.site-card,
.project-card-site {
  padding: 24px;
}

.section-title-sm {
  font-size: 24px;
  margin: 0;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form-inline {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.site-projects {
  display: grid;
  gap: 18px;
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.project-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.payments-block {
  margin: 18px 0 22px;
}

.table-wrap {
  overflow-x: auto;
}

.site-table {
  width: 100%;
  border-collapse: collapse;
}

.site-table th,
.site-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.site-table th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.btn-link-danger {
  background: none;
  border: none;
  padding: 0;
  color: var(--danger);
  cursor: pointer;
}

.alert {
  margin-bottom: 18px;
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
}

.alert-success {
  background: #e8f8e0;
  color: #1e6720;
}

.alert-error {
  background: #ffe5e8;
  color: #8d1524;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card-site {
  width: min(100%, 520px);
  margin: 0 auto;
}

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

  .project-card-head {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .client-contact-panel {
    grid-template-columns: 1fr;
  }
}

body {
  background: linear-gradient(180deg, #f3f2f0 0%, #ededeb 100%);
}

.finance-app-site {
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px 110px;
}

.site-topbar {
  margin-bottom: 20px;
}

.user {
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}

.avatar {
  width: 36px;
  height: 36px;
  background: radial-gradient(circle at center, #ffffff 0 30%, #d9d9d9 31% 100%);
  box-shadow: none;
}

.alert {
  border-radius: 20px;
  box-shadow: none;
}

.dashboard-mobile {
  display: grid;
  gap: 14px;
}

.dashboard-summary-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 19px;
  padding: 17px 18px 14px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.dashboard-summary-caption {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  color: #313131;
}

.dashboard-month-button {
  border: none;
  background: transparent;
  padding: 0;
  color: #35ce00;
  font-size: inherit;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}

.dashboard-summary-income {
  margin-top: 12px;
  font-size: 50px;
  line-height: 0.96;
  font-weight: 400;
  letter-spacing: -0.04em;
  color: #2e2e2e;
}

.dashboard-goal {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.dashboard-goal-head,
.dashboard-goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-goal-head span,
.dashboard-goal-meta {
  color: #7f8984;
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-goal-head strong {
  color: #238a16;
  font-size: 15px;
  font-weight: 700;
}

.dashboard-goal-track {
  height: 11px;
  border-radius: 999px;
  background: #eceee9;
  overflow: hidden;
}

.dashboard-goal-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #30CE00;
}

.dashboard-goal-meta {
  align-items: flex-start;
  flex-wrap: wrap;
}

.dashboard-summary-divider {
  height: 1px;
  margin: 13px 0 13px;
  background: #d4d4d4;
}

.dashboard-summary-rest-label {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: #696969;
}

.dashboard-summary-rest {
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 400;
  color: #2f2f2f;
}

.dashboard-add-button {
  width: 100%;
  min-height: 50px;
  border: none;
  border-radius: 18px;
  background: #34db00;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(52, 219, 0, 0.22);
  cursor: pointer;
}

.dashboard-add-button-icon {
  font-size: 24px;
  line-height: 1;
}

.dashboard-section-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 2px 0;
  color: #757575;
  font-size: 17px;
  font-weight: 400;
}

.dashboard-section-counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: #e5e5e5;
  color: #8f8f8f;
  font-size: 10px;
  vertical-align: middle;
}

.dashboard-archive-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid #e1e1dc;
  border-radius: 999px;
  background: #ffffff;
  color: #555550;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  vertical-align: middle;
}

.dashboard-project-list {
  display: grid;
  gap: 14px;
}

.dashboard-project-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  padding: 28px 24px 26px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.dashboard-project-card-empty {
  padding: 22px 18px;
}

.dashboard-project-empty {
  color: #757575;
  font-size: 16px;
}

.dashboard-project-name {
  background: transparent;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.2;
  padding: 6px 0 0;
  color: #2d2d2d;
}

.dashboard-project-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.dashboard-project-menu-wrap {
  position: relative;
}

.dashboard-project-menu-trigger {
  width: 40px;
  height: 40px;
  border: 1px solid #deded9;
  border-radius: 15px;
  background: #fbfbf9;
  color: #30302d;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 12px rgba(45, 45, 40, 0.04);
}

.dashboard-project-menu-trigger svg {
  width: 22px;
  height: 22px;
  display: block;
}

.dashboard-project-menu-trigger:hover {
  background: #ffffff;
  border-color: #d6d6d1;
}

.dashboard-project-pay-button-full {
  width: 100%;
  margin-top: 18px;
}

.dashboard-project-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 152px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(36, 36, 36, 0.14);
  padding: 8px;
  z-index: 20;
}

.dashboard-project-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  border-radius: 10px;
  padding: 10px 12px;
  color: #373737;
  cursor: pointer;
}

.dashboard-project-menu-item-danger {
  color: #c43846;
}

.dashboard-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.dashboard-project-metric {
  display: flex;
  min-height: 106px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e2df;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.dashboard-project-metric-label {
  font-size: 12px;
  color: #7a7a75;
  line-height: 1.15;
}

.dashboard-project-metric-value {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  color: #2e2e2e;
  word-break: break-word;
}

.dashboard-project-metric:nth-child(2) {
  border-color: #d5ead0;
  background: #fbfffa;
}

.dashboard-project-metric:nth-child(2) .dashboard-project-metric-value {
  color: #248a16;
}

.dashboard-project-metric:nth-child(3) {
  border-color: #eadfc9;
  background: #fffdf8;
}

.dashboard-project-metric:nth-child(3) .dashboard-project-metric-value {
  color: #8a6518;
}

.dashboard-project-footer {
  display: none;
}

.archive-project-card .dashboard-project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.dashboard-project-status {
  font-size: 14px;
  color: var(--status-color, #6b6b6b);
  font-weight: 700;
}

.dashboard-project-footer-muted {
  font-size: 13px;
  color: #9a9a9a;
}

.archive-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.archive-back-link {
  margin-left: 0;
  white-space: nowrap;
}

.archive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.archive-actions form {
  margin: 0;
}

.archive-restore-button,
.archive-delete-button {
  min-height: 34px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.archive-restore-button {
  border: none;
  background: #effbea;
  color: #278917;
}

.archive-delete-button {
  border: 1px solid #f0c9cd;
  background: #ffffff;
  color: #c43846;
}

.dashboard-project-complete-backdrop {
  padding: 18px;
}

.dashboard-project-complete-modal {
  max-width: 520px;
  border: 1px solid #d9f0d2;
  background: #f7fff4;
  text-align: center;
  display: grid;
  gap: 16px;
}

.dashboard-project-complete-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #e9fae4;
  color: #23a812;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.dashboard-project-complete-icon svg {
  width: 30px;
  height: 30px;
}

.dashboard-project-complete-copy h3 {
  margin: 0;
  color: #23a812;
  font-size: 20px;
  line-height: 1.2;
}

.dashboard-project-complete-copy p {
  margin: 8px auto 0;
  max-width: 410px;
  color: #6f7f72;
  font-size: 14px;
  line-height: 1.4;
}

.dashboard-project-complete-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.dashboard-project-complete-actions form {
  margin: 0;
}

.dashboard-project-complete-archive,
.dashboard-project-complete-keep {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 15px;
  cursor: pointer;
}

.dashboard-project-complete-archive {
  border: none;
  background: #30CE00;
  color: #ffffff;
  font-weight: 800;
}

.dashboard-project-complete-keep {
  border: 1px solid #e2e2df;
  background: #ffffff;
  color: #30302d;
  font-weight: 500;
}
.dashboard-project-operations {
  margin-top: 26px;
  padding: 0;
}

.dashboard-project-operations-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-project-operations-title {
  font-size: 18px;
  color: #2d2d2d;
  font-weight: 500;
}

.dashboard-project-operations-count {
  font-size: 13px;
  color: #888f8a;
  white-space: nowrap;
}

.dashboard-project-pay-button {
  border: none;
  border-radius: 18px;
  background: #2fd400;
  min-height: 57px;
  padding: 0 22px;
  color: #fff;
  font-size: 24px;
  font-weight: 500;
  cursor: pointer;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  justify-items: center;
  gap: 14px;
  box-shadow: 0 10px 20px rgba(44, 189, 0, 0.14);
}

.dashboard-project-pay-icon,
.dashboard-project-pay-arrow {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-project-pay-icon svg,
.dashboard-project-pay-arrow svg,
.dashboard-project-info-icon svg,
.dashboard-project-operation-icon svg,
.dashboard-project-operation-action svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dashboard-project-progress-card {
  margin-top: 18px;
  border: 1px solid #ebe6dd;
  border-radius: 18px;
  background: #fffdf9;
  padding: 22px 24px 24px;
  box-shadow: 0 8px 22px rgba(42, 34, 24, 0.04);
}

.dashboard-project-progress-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-project-progress-item {
  display: grid;
  gap: 12px;
}

.dashboard-project-progress-item span,
.dashboard-project-info-label,
.dashboard-project-operation-caption,
.dashboard-project-progress-caption {
  color: #7f8984;
  font-size: 14px;
  line-height: 1.25;
}

.dashboard-project-progress-item strong {
  color: #111827;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  word-break: break-word;
}

.dashboard-project-progress-paid {
  color: #168a13 !important;
}

.dashboard-project-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
}

.dashboard-project-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #eeeae3;
  overflow: hidden;
}

.dashboard-project-progress-track span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: #28aa12;
}

.dashboard-project-progress-percent {
  min-width: 58px;
  min-height: 34px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #ede8df;
  color: #343434;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-project-progress-caption {
  display: block;
  margin-top: 16px;
}

.dashboard-project-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid #ebe6dd;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
}

.dashboard-project-info-tile {
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
}

.dashboard-project-info-tile + .dashboard-project-info-tile {
  border-left: 1px solid #ebe6dd;
}

.dashboard-project-info-tile-rest {
  background: #fffaf0;
}

.dashboard-project-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff7d8;
  color: #9a6f11;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px #f0ddb4;
  padding: 12px;
}

.dashboard-project-info-icon-client {
  background: #f1fbea;
  color: #269016;
  box-shadow: inset 0 0 0 1px #d7efcf;
}

.dashboard-project-info-value {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  word-break: break-word;
}

.dashboard-project-info-value-rest {
  color: #8a6518;
}

.dashboard-project-operations-head .dashboard-project-pay-button {
  display: none;
}

.dashboard-project-operations-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-project-operation {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #ece9e3;
}

.dashboard-project-operation-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1fbea;
  color: #269016;
  padding: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dashboard-project-operation-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-project-operation-date {
  font-size: 16px;
  color: #1f1f1f;
  font-weight: 500;
}

.dashboard-project-operation-amount {
  font-size: 16px;
  font-weight: 500;
  color: #168a13;
  white-space: nowrap;
}

.dashboard-project-operation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dashboard-project-operation-actions form {
  margin: 0;
  display: flex;
  align-items: center;
}

.dashboard-project-operation-action {
  width: 38px;
  height: 38px;
  border: 1px solid #e2e0dc;
  border-radius: 14px;
  background: #ffffff;
  color: #5f5f5f;
  font-size: 0;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px;
  flex: 0 0 38px;
  vertical-align: middle;
}

.dashboard-project-operation-action:hover {
  background: #f7f7f5;
  color: #252525;
}

@media (max-width: 480px) {
  .finance-app {
    padding: 8px 14px 96px;
  }

  .dashboard-project-card {
    border-radius: 20px;
    padding: 14px 14px 18px;
  }

  .dashboard-project-name {
    font-size: 21px;
    line-height: 1.15;
  }

  .dashboard-project-menu-trigger {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .dashboard-project-pay-button-full {
    margin-top: 14px;
  }

  .dashboard-project-pay-button {
    min-height: 42px;
    border-radius: 16px;
    font-size: 18px;
    padding: 0 12px;
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    gap: 10px;
  }

  .dashboard-project-pay-icon,
  .dashboard-project-pay-arrow {
    width: 22px;
    height: 22px;
  }

  .dashboard-project-progress-card {
    margin-top: 14px;
    border-radius: 16px;
    padding: 18px 16px;
  }

  .dashboard-project-progress-top {
    gap: 12px;
  }

  .dashboard-project-progress-item {
    gap: 9px;
  }

  .dashboard-project-progress-item strong {
    font-size: 24px;
  }

  .dashboard-project-progress-row {
    gap: 10px;
    margin-top: 22px;
  }

  .dashboard-project-progress-percent {
    min-width: 50px;
    min-height: 30px;
    font-size: 13px;
  }

  .dashboard-project-info-grid {
    margin-top: 14px;
    border-radius: 16px;
  }

  .dashboard-project-info-tile {
    min-height: 96px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 12px;
  }

  .dashboard-project-info-icon {
    width: 38px;
    height: 38px;
    padding: 10px;
  }

  .dashboard-project-info-value {
    font-size: 18px;
  }

  .dashboard-project-grid {
    gap: 8px;
    margin-top: 14px;
  }

  .dashboard-project-metric {
    min-height: 86px;
    border-radius: 8px;
    padding: 12px;
  }

  .dashboard-project-metric-label {
    font-size: 12px;
  }

  .dashboard-project-metric-value {
    margin-top: 14px;
    font-size: 18px;
    line-height: 1.12;
  }

  .dashboard-project-operations {
    margin-top: 18px;
  }

  .dashboard-project-operations-title {
    font-size: 16px;
  }

  .dashboard-project-operations-count {
    font-size: 12px;
  }

  .dashboard-project-operation {
    grid-template-columns: 36px minmax(0, 1fr) auto auto;
    gap: 9px;
    min-height: 66px;
    padding: 10px;
    border-radius: 15px;
  }

  .dashboard-project-operation-icon {
    width: 36px;
    height: 36px;
    padding: 9px;
  }

  .dashboard-project-operation-date,
  .dashboard-project-operation-amount {
    font-size: 14px;
  }

  .dashboard-project-operation-caption {
    font-size: 12px;
  }

  .dashboard-project-operation-actions {
    gap: 6px;
  }

  .dashboard-project-operation-action {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 12px;
    padding: 8px;
  }
}

.dashboard-project-operation-empty {
  font-size: 14px;
  color: #8f8f8f;
}

.dashboard-payment-project-name {
  border-radius: 14px;
  background: #f3f3f3;
  padding: 12px 14px;
  color: #4b4b4b;
  font-size: 15px;
}

.dashboard-payment-hint {
  margin: -4px 0 0;
  color: #87928d;
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-confirm-modal {
  max-width: 360px;
}

.dashboard-confirm-copy {
  display: grid;
  gap: 12px;
}

.dashboard-confirm-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #4b4b4b;
}

.dashboard-confirm-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3f3f3;
  color: #2d2d2d;
  font-size: 15px;
}

.dashboard-confirm-meta strong {
  font-size: 16px;
  font-weight: 600;
}

.dashboard-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.dashboard-confirm-cancel,
.dashboard-confirm-delete {
  min-height: 50px;
  border-radius: 16px;
  border: none;
  font: inherit;
  cursor: pointer;
}

.dashboard-confirm-cancel {
  background: #f1f1f1;
  color: #4b4b4b;
}

.dashboard-confirm-delete {
  background: #d73342;
  color: #fff;
}

.dashboard-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 30, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  z-index: 3000;
}

.dashboard-modal-backdrop[hidden] {
  display: none;
}

.dashboard-modal {
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  background: #fff;
  padding: 18px 18px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.dashboard-modal-form {
  align-self: center;
}

.dashboard-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  color: #242424;
}

.dashboard-modal-close {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #8a8a8a;
  cursor: pointer;
}

.dashboard-month-picker {
  display: grid;
  gap: 16px;
}

.dashboard-month-picker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}

.dashboard-month-picker-field {
  display: grid;
  gap: 8px;
}

.dashboard-month-picker-label {
  font-size: 14px;
  color: #6f6f6f;
}

.dashboard-month-apply {
  border: none;
  border-radius: 16px;
  min-height: 52px;
  background: #34db00;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

.dashboard-add-project-form {
  display: grid;
  gap: 12px;
}

.dashboard-prepayment-block {
  display: grid;
  gap: 8px;
  border: 1px solid #e6e6e1;
  border-radius: 16px;
  background: #fbfbf9;
  padding: 12px;
}

.dashboard-prepayment-title {
  color: #87928d;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-prepayment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 118px);
  gap: 8px;
}

.dashboard-prepayment-row .field {
  margin-top: 0;
}

.dashboard-add-project-submit {
  border: none;
  border-radius: 16px;
  min-height: 54px;
  background: #34db00;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

.dashboard-modal-open {
  overflow: hidden;
}

.field {
  border-radius: 14px;
  border: 1px solid #e2e2e2;
  background: #f7f7f7;
  min-height: 50px;
  padding: 0 14px;
  color: #2c2c2c;
}

.bottom-nav {
  width: min(448px, calc(100% - 20px));
}

@media (min-width: 700px) {
  .finance-app-site {
    max-width: 560px;
  }

  .dashboard-summary-income {
    font-size: 60px;
  }
}

@media (max-width: 420px) {
  .stats-panel {
    padding: 18px;
  }

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

  .stats-period-submit {
    min-height: 44px;
  }

  .stats-hero-metric strong {
    font-size: 46px;
  }

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

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

@media (max-width: 520px) {
  .settings-telegram-panel .settings-panel-head {
    margin-bottom: 12px;
  }

  .settings-telegram-panel .settings-panel-head h3 {
    font-size: 22px;
  }

  .settings-telegram-state {
    padding: 12px;
  }

  .settings-telegram-state strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
  }
}
.settings-public-id {
  border: 1px solid #e6e6e1;
  border-radius: 14px;
  background: #fbfbf9;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-public-id span {
  color: #87928d;
  font-size: 13px;
  font-weight: 700;
}

.settings-public-id strong {
  color: #30302d;
  font-size: 18px;
  letter-spacing: 2px;
}

.admin-page {
  display: grid;
  gap: 14px;
  width: min(100%, 860px);
  margin: 0 auto;
}

.admin-summary {
  border-radius: 22px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(40, 40, 36, 0.08);
}

.admin-summary span {
  color: #87928d;
  font-size: 13px;
  font-weight: 700;
}

.admin-summary strong {
  display: block;
  margin-top: 6px;
  color: #30302d;
  font-size: 34px;
  line-height: 1;
}

.admin-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
}

.admin-users {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  border: 1px solid #e6e6e1;
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 130px 160px;
  gap: 12px;
  align-items: center;
}

.admin-user-id {
  color: #23a812;
  font-weight: 800;
  letter-spacing: 2px;
}

.admin-user-main strong {
  display: block;
  color: #30302d;
  font-size: 16px;
}

.admin-user-main span,
.admin-user-type,
.admin-user-last {
  color: #87928d;
  font-size: 13px;
}

@media (max-width: 720px) {
  .admin-search-form,
  .admin-user-row {
    grid-template-columns: 1fr;
  }
}