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

.report-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr); gap:16px; margin-top:16px; }
.report-card { min-height:330px; padding:20px; background:#fff; border:1px solid var(--line); border-radius:18px; }
.report-head { display:flex; align-items:flex-start; justify-content:space-between; gap:15px; margin-bottom:16px; }
.report-head h2 { margin:0 0 5px; font-size:17px; }
.report-head p { margin:0; color:var(--muted); font-size:12px; }
.legend { display:flex; gap:13px; color:var(--muted); font-size:10px; font-weight:800; }
.legend span::before { content:""; display:inline-block; width:8px; height:8px; margin-right:6px; border-radius:3px; }
.income-key::before { background:#7458ee; }
.expense-key::before { background:#f2a64b; }
.chart { display:block; width:100%; height:auto; overflow:visible; }
.chart text { fill:#8b8792; font-size:11px; font-weight:700; }
.chart .axis { stroke:#e9e7ed; stroke-width:1; }
.income-bar { fill:#7458ee; }
.expense-bar { fill:#f2a64b; }
.category-chart { display:flex; flex-direction:column; gap:17px; padding-top:8px; }
.category-row>div { display:flex; justify-content:space-between; gap:12px; margin-bottom:7px; font-size:12px; }
.category-row span { color:#625e67; }
.category-row b { font-size:11px; }
.category-row progress { width:100%; height:8px; border:0; border-radius:99px; overflow:hidden; background:#efedf3; }
.category-row progress::-webkit-progress-bar { background:#efedf3; }
.category-row progress::-webkit-progress-value { background:linear-gradient(90deg,#f4a442,#ffca73); border-radius:99px; }
.category-row progress::-moz-progress-bar { background:linear-gradient(90deg,#f4a442,#ffca73); border-radius:99px; }
.customer-link b { color:#4f35c3; }
.back-link { display:inline-flex; margin-bottom:20px; color:#6a6373; font-size:12px; font-weight:800; }
.customer-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; padding:25px; background:linear-gradient(135deg,#fff,#f6f2ff); border:1px solid #e5dfff; border-radius:20px; }
.customer-hero h1 { margin:0 0 7px; font-size:32px; letter-spacing:-.04em; }
.customer-hero p:last-child { margin:0; color:var(--muted); font-size:13px; }
.paytr-readiness { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:16px; padding:17px 19px; border:1px solid #dbe5fa; border-radius:15px; background:#f6f9ff; }
.paytr-readiness div>span { color:#3974e8; font-size:9px; font-weight:900; letter-spacing:.14em; }
.paytr-readiness strong { display:block; margin:4px 0; font-size:14px; }
.paytr-readiness p { margin:0; color:var(--muted); font-size:11px; }
.service-icon { display:inline-grid; place-items:center; width:28px; height:28px; margin-right:9px; border-radius:8px; color:#fff; background:linear-gradient(135deg,#7658ed,#ab72ff); font-weight:900; }
.check-label { flex-direction:row !important; align-items:center; padding-top:25px; }
.check-label input { width:auto; }
.large-dialog { width:min(760px,calc(100% - 30px)); max-height:92vh; }
.large-dialog .modal-card { max-height:92vh; overflow:auto; }
.form-section { padding:13px 14px; border-radius:11px; background:#f7f5fb; }
.form-section b { display:block; margin-bottom:3px; font-size:12px; }
.form-section small { color:var(--muted); font-size:10px; }
.catalog-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.catalog-card { display:flex; flex-direction:column; min-height:265px; padding:19px; background:#fff; border:1px solid var(--line); border-radius:17px; transition:.2s; }
.catalog-card:hover { transform:translateY(-2px); border-color:#d8d1ff; box-shadow:0 14px 35px rgba(35,25,65,.07); }
.catalog-top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.catalog-top span { color:var(--violet); font-size:9px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.catalog-top i { padding:4px 7px; border-radius:99px; background:#f2f0f5; color:#77717e; font-size:9px; font-style:normal; font-weight:800; }
.catalog-card h3 { margin:16px 0 9px; font-size:15px; line-height:1.35; }
.catalog-card>strong { color:#0b8a57; font-size:14px; line-height:1.45; }
.catalog-card>p { flex:1; margin:13px 0 18px; color:var(--muted); font-size:11px; line-height:1.55; }
.catalog-card .btn { width:100%; }
.close-link { display:grid; place-items:center; }
.discount-total { display:flex; align-items:center; justify-content:space-between; padding:15px; border-radius:12px; background:#f0edff; color:#5038b2; }
.discount-total span { font-size:11px; font-weight:800; }
.discount-total strong { font-size:22px; }
.settings-note { display:flex; flex-direction:column; gap:4px; margin-bottom:16px; padding:16px 18px; border:1px solid #ded8fa; border-radius:14px; background:#f6f3ff; }
.settings-note strong { font-size:13px; color:#533bb9; }
.settings-note span { color:var(--muted); font-size:11px; }
.monitor-warnings { display:grid; gap:8px; margin:16px 0; }
.monitor-warning,.monitor-ok { padding:12px 14px; border-radius:11px; font-size:12px; font-weight:750; }
.monitor-warning { color:#9a570c; background:#fff5df; border:1px solid #f2dfb3; }
.monitor-ok { color:#087b4a; background:#e9f8f1; border:1px solid #caeedc; }
.health-dot { display:inline-block; width:8px; height:8px; margin-right:9px; border-radius:50%; background:#aaa; }
.health-dot.online { background:#18a96b; box-shadow:0 0 0 4px #18a96b18; }
.health-dot.offline,.health-dot.errored,.health-dot.error { background:#d64d5d; box-shadow:0 0 0 4px #d64d5d18; }
.tag.online { background:#e9f8f1; color:#087b4a; }
.tag.offline,.tag.errored,.tag.error,.tag.cancelled { background:#fff0f1; color:#b43d4a; }

.finance-card {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.finance-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -25px;
  bottom: -35px;
  border-radius: 50%;
  background: currentColor;
  opacity: .08;
}

.finance-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.finance-card strong { display: block; margin-top: 18px; font-size: 28px; letter-spacing: -.04em; }
.finance-card.positive { color: var(--green); }
.finance-card.negative { color: var(--red); }
.finance-card.neutral { color: var(--violet); }
.actions.no-margin { margin-top: 0; justify-content: flex-end; }
.nav-section { margin: 20px 14px 3px; color: #65616e; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.security-badge { color: #087b4a; background: #e9f8f1; border: 1px solid #caeedc; border-radius: 99px; padding: 8px 12px; font-size: 11px; font-weight: 800; }
.module-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.module-card { display: flex; align-items: center; gap: 17px; min-height: 150px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; transition: .2s; }
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d8d1ff; }
.module-card>i { margin-left: auto; font-size: 23px; color: #aaa; font-style: normal; }
.module-icon { flex: 0 0 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(135deg,var(--violet),#ad71ff); font-size: 20px; font-weight: 900; }
.module-card.crm .module-icon { background: linear-gradient(135deg,#1ca36a,#58d199); }
.module-card.accounting .module-icon { background: linear-gradient(135deg,#e59a25,#ffc85f); }
.module-card.calendar .module-icon { background: linear-gradient(135deg,#3974e8,#67a3ff); }
.module-card.services .module-icon { background: linear-gradient(135deg,#6952d8,#a57af2); }
.module-card.server .module-icon { background: linear-gradient(135deg,#20232b,#59606f); }
.module-card h2 { margin: 0 0 7px; font-size: 19px; }
.module-card p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.module-card strong { font-size: 12px; color: #5d5863; }
.activity-list { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.activity-list li { display: flex; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--line); font-size: 13px; text-transform: capitalize; }
.activity-list li:last-child { border: 0; }
.activity-list small { color: var(--muted); }
.calendar-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.agenda { display: flex; flex-direction: column; gap: 10px; }
.agenda .empty { padding: 35px 18px; }
.agenda-item { display: grid; grid-template-columns: 112px 1fr; gap: 15px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.agenda-item.google { border-left: 4px solid #4285f4; }
.agenda-item time { font-size: 12px; font-weight: 800; color: #5f5b65; }
.agenda-item span { color: var(--violet); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.agenda-item h3 { margin: 4px 0; font-size: 14px; }
.agenda-item p { margin: 0; color: var(--muted); font-size: 11px; }
.notice { margin: -10px 0 20px; padding: 12px 14px; border-radius: 11px; background: #eeebff; color: #5c42c0; font-size: 12px; font-weight: 700; }
.pill.connected { background: #e9f8f1; color: #087b4a; }

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: #e3a526;
}
.status-dot.late { background: var(--red); box-shadow: 0 0 0 4px #d64d5d18; }

.tag {
  display: inline-block;
  border-radius: 99px;
  padding: 5px 8px;
  background: #f1eff5;
  color: #625d6a;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}
.tag.income,.tag.paid,.tag.active { background: #e9f8f1; color: #087b4a; }
.tag.expense { background: #fff0f1; color: #b43d4a; }
.tag.planned,.tag.sent,.tag.draft { background: #fff6df; color: #90630d; }

label select,label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
  font: inherit;
}
label textarea { min-height: 90px; resize: vertical; }
label select:focus,label textarea:focus { border-color: #9e87ff; box-shadow: 0 0 0 3px #7f62ff19; }

@media (max-width: 1050px) {
  .finance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-columns { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns:1fr; }
  .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .finance-stats { grid-template-columns: 1fr 1fr; }
  .finance-card { min-height: 100px; padding: 16px; }
  .finance-card strong { font-size: 21px; }
  .actions.no-margin { justify-content: flex-start; }
  .module-grid { grid-template-columns: 1fr; }
  .customer-hero { flex-direction:column; }
  .report-card { min-height:0; padding:16px; }
  .catalog-grid { grid-template-columns:1fr; }
}
