:root {
    --business-accent: #8b5cf6;
    --business-accent-dark: #6d28d9;
    --business-ink: #111016;
    --business-muted: #777381;
    --business-border: #ebe8f0;
    --business-soft: #f7f5fa;
}

body,
button,
input,
select,
textarea {
    font-family: "Manrope", Inter, "Segoe UI", sans-serif;
}

.app-sidebar {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}

.business-page { max-width: 1680px; margin: 0 auto; }
.business-page h1,
.business-page h2,
.business-page h3,
.business-page strong { color: var(--business-ink); }

.business-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    min-height: 230px;
    padding: 2.3rem;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 5%, rgba(174,126,255,.45), transparent 35%),
        radial-gradient(circle at 15% 100%, rgba(118,59,214,.35), transparent 40%),
        linear-gradient(135deg, #0e0d11 0%, #1b1425 54%, #4c1d95 130%);
    box-shadow: 0 24px 60px rgba(23, 15, 35, .2);
}
.business-hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -60px;
    bottom: -110px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(255,255,255,.035), 0 0 0 60px rgba(255,255,255,.025);
}
.business-hero--projects { background: radial-gradient(circle at 80% 15%, rgba(119,81,255,.42), transparent 35%), linear-gradient(135deg,#101015,#171321 60%,#312e81); }
.business-hero--sales { background: radial-gradient(circle at 88% 0%, rgba(236,72,153,.34), transparent 35%), linear-gradient(135deg,#0e0d11,#20111f 58%,#581c87); }
.business-hero--calculator { background: radial-gradient(circle at 82% 10%, rgba(14,165,233,.28), transparent 38%), linear-gradient(135deg,#0d0c10,#171121 55%,#3b0764); }
.business-hero > * { position: relative; z-index: 1; }
.business-hero__eyebrow { margin-bottom: .8rem; color: #cdb8ff; font-size: .76rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.business-hero__title { margin: 0 0 .75rem; max-width: 820px; color: #fff !important; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; font-weight: 800; letter-spacing: -.045em; }
.business-hero__text { max-width: 800px; margin: 0; color: rgba(255,255,255,.72); font-size: 1.02rem; line-height: 1.7; }

.btn-business {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 12px 28px rgba(109,40,217,.25);
}
.btn-business:hover,
.btn-business:focus { color: #fff; background: linear-gradient(135deg,#7c3aed,#5b21b6); }
.business-back { display: inline-flex; align-items: center; gap: .45rem; color: #6d28d9; font-size: .88rem; font-weight: 700; }

.business-card {
    overflow: hidden;
    border: 1px solid var(--business-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(34,25,47,.055);
}
.business-card__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.45rem 1.55rem; }
.business-card__header h2 { margin: 0 0 .25rem; font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; }
.business-card__header p { margin: 0; color: var(--business-muted); font-size: .82rem; }

.metric-card {
    height: 100%; min-height: 142px; padding: 1.25rem; border: 1px solid var(--business-border); border-radius: 22px; background: #fff;
    box-shadow: 0 10px 28px rgba(34,25,47,.045); display: flex; flex-direction: column; justify-content: center;
}
.metric-card span { margin-bottom: .65rem; color: var(--business-muted); font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.metric-card strong { display: block; font-size: clamp(1.35rem,2vw,2rem); line-height: 1.1; letter-spacing: -.045em; }
.metric-card small { display: block; margin-top: .6rem; color: #918c99; }
.metric-card--success { background: linear-gradient(145deg,#fff,#f2fff9); border-color: #d8f4e5; }
.metric-card--warning { background: linear-gradient(145deg,#fff,#fff9eb); border-color: #f6e6bb; }
.metric-card--danger { background: linear-gradient(145deg,#fff,#fff3f5); border-color: #f6d7de; }

.business-table thead th { padding: .95rem 1rem; border-bottom: 1px solid #ece9ef; background: #faf9fc; color: #817c88 !important; font-size: .68rem; letter-spacing: .055em; white-space: nowrap; }
.business-table tbody td { padding: 1rem; color: #312d38 !important; vertical-align: middle; }
.business-table tbody tr:last-child td { border-bottom: 0; }
.business-table tbody tr:hover { background: #fcfbfe; }
.progress-thin { height: 7px; background: #ebe8f0; border-radius: 99px; }
.progress-thin .progress-bar { border-radius: inherit; background: linear-gradient(90deg,#8b5cf6,#a78bfa); }
.form-section-label { margin-top: .6rem; padding-top: 1rem; border-top: 1px solid #eeeaf1; color: #6d28d9; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.monthly-bars { display: grid; grid-template-columns: repeat(12, minmax(32px,1fr)); align-items: end; gap: .7rem; height: 230px; padding: 1rem 1.5rem 0; }
.monthly-bars__item { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .55rem; color: #8b8790; font-size: .7rem; }
.monthly-bars__plot { width: 100%; height: 185px; display: flex; align-items: end; justify-content: center; gap: 4px; border-bottom: 1px solid #ece9ef; }
.monthly-bars__bar { display: block; width: 9px; min-height: 2px; border-radius: 7px 7px 2px 2px; transition: .2s ease; }
.monthly-bars__bar:hover { filter: brightness(.88); }
.monthly-bars__bar--contract { background: #d8d2e4; }
.monthly-bars__bar--received { background: linear-gradient(180deg,#a78bfa,#6d28d9); }
.chart-legend { display: flex; justify-content: center; gap: 1.5rem; padding: .9rem 1.5rem 1.3rem; color: #7e7985; font-size: .76rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot--contract { background:#d8d2e4; } .legend-dot--received { background:#7c3aed; }
.status-stack { padding: 0 1.5rem 1.25rem; }
.status-stack__row { display:flex; justify-content:space-between; align-items:center; padding:.78rem 0; border-bottom:1px solid #f0edf3; color:#66616d; }
.status-stack__row:last-child { border-bottom:0; }
.status-stack__row strong { min-width:32px; text-align:center; padding:.25rem .55rem; border-radius:999px; background:#f2eff6; }

.payment-list,.attention-list,.calculation-history { padding: 0 1.35rem 1.35rem; }
.payment-list__item,.attention-list__item,.calculation-history__item { display:flex; align-items:center; gap:1rem; padding:.95rem 0; border-bottom:1px solid #f0edf3; color:inherit; }
.payment-list__item:last-child,.attention-list__item:last-child,.calculation-history__item:last-child { border-bottom:0; }
.payment-list__item div:first-child,.attention-list__item>div,.calculation-history__item>div:first-child { display:flex; flex-direction:column; gap:.18rem; min-width:0; }
.payment-list__item span,.attention-list__item span,.calculation-history__item span { color:#908a96; font-size:.76rem; }
.empty-inline { padding:1.2rem; border:1px dashed #ddd7e3; border-radius:16px; background:#faf9fc; color:#8d8792; text-align:center; }

.finance-breakdown { padding: 0 1.5rem 1.5rem; display:grid; grid-template-columns:repeat(2,1fr); gap:.8rem; }
.finance-breakdown>div { display:flex; justify-content:space-between; gap:1rem; padding:.9rem 1rem; border-radius:14px; background:#faf9fc; color:#716b78; }
.finance-breakdown__total { grid-column:1/-1; background:#f1ecff !important; }
.finance-breakdown__total strong { font-size:1.15rem; }

.team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(245px,1fr)); gap:1rem; padding:0 1.4rem 1.4rem; }
.team-load-card { padding:1rem; border:1px solid #ece8f0; border-radius:18px; background:#fcfbfd; }
.team-load-card__head { display:flex; align-items:center; gap:.8rem; }
.team-load-card__head>div:last-child { display:flex; flex-direction:column; }
.team-load-card__head span { color:#8f8995; font-size:.73rem; }
.team-avatar { width:42px; height:42px; display:grid; place-items:center; border-radius:14px; color:#fff; font-weight:800; background:linear-gradient(135deg,#111016,#8b5cf6); }
.team-load-card__metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; margin-top:1rem; }
.team-load-card__metrics div { padding:.65rem .5rem; border-radius:12px; background:#fff; text-align:center; }
.team-load-card__metrics span { display:block; color:#958e9b; font-size:.64rem; }
.team-load-card__metrics strong { display:block; margin-top:.2rem; }
.team-load-card__footer { display:flex; justify-content:space-between; gap:.8rem; margin-top:.8rem; padding-top:.8rem; border-top:1px solid #ece8f0; font-size:.75rem; color:#7f7984; }
.project-team-list { display:flex; flex-direction:column; gap:.7rem; }
.project-team-list__item { display:flex; justify-content:space-between; gap:1rem; padding:.85rem; border-radius:15px; background:#faf9fc; }
.project-team-list__item>div { display:flex; flex-direction:column; gap:.15rem; }
.project-team-list__item span { color:#8a8490; font-size:.75rem; }
.priority-dot { width:10px; height:10px; flex:0 0 10px; border-radius:50%; background:#8b5cf6; }
.priority-dot--critical { background:#dc2626; } .priority-dot--urgent { background:#f59e0b; } .priority-dot--low { background:#94a3b8; }

.sales-toolbar { display:flex; justify-content:space-between; gap:1rem; align-items:center; color:#797380; }
.sales-kanban { display:flex; gap:1rem; overflow-x:auto; align-items:flex-start; padding-bottom:1.2rem; scroll-snap-type:x proximity; }
.sales-column { flex:0 0 330px; border:1px solid #e9e5ed; border-radius:21px; background:#f7f5f9; scroll-snap-align:start; overflow:hidden; }
.sales-column__header { display:flex; justify-content:space-between; gap:.8rem; align-items:center; padding:1rem; border-top:4px solid var(--stage-color); background:#fff; }
.sales-column__header>div { display:flex; align-items:center; gap:.5rem; }
.sales-column__header em { min-width:24px; padding:.2rem .42rem; border-radius:99px; background:#f1edf4; color:#766f7c; font-size:.7rem; font-style:normal; text-align:center; }
.sales-column__header>span { color:#817b87; font-size:.75rem; }
.sales-column__dot { width:9px; height:9px; border-radius:50%; background:var(--stage-color); box-shadow:0 0 0 4px color-mix(in srgb,var(--stage-color) 14%,transparent); }
.sales-column__body { display:flex; flex-direction:column; gap:.75rem; min-height:230px; padding:.75rem; }
.sales-empty { padding:1.2rem; border:1px dashed #dcd6e1; border-radius:15px; color:#9a939e; text-align:center; font-size:.8rem; }
.sales-lead-card { overflow:hidden; border:1px solid #e9e5ed; border-radius:17px; background:#fff; box-shadow:0 8px 20px rgba(34,25,47,.05); }
.sales-lead-card--overdue { border-color:#f2b7c2; box-shadow:0 8px 20px rgba(190,24,63,.08); }
.sales-lead-card__main { display:block; padding:.9rem; color:inherit; }
.sales-lead-card__top { display:flex; justify-content:space-between; gap:.7rem; align-items:start; }
.sales-lead-card__top strong:first-child { font-size:.88rem; }
.sales-lead-card__top span { white-space:nowrap; color:#6d28d9; font-size:.78rem; font-weight:800; }
.sales-lead-card__service { margin:.38rem 0 .7rem; color:#85808b; font-size:.74rem; }
.sales-lead-card__meta { display:flex; justify-content:space-between; gap:.5rem; color:#79737f; font-size:.7rem; }
.sales-lead-card__meta span { display:inline-flex; align-items:center; gap:.3rem; }
.sales-next-action { display:flex; align-items:start; gap:.55rem; margin-top:.75rem; padding:.65rem; border-radius:12px; background:#f8f5ff; }
.sales-next-action>div { display:flex; flex-direction:column; gap:.12rem; }
.sales-next-action strong { font-size:.7rem; }
.sales-next-action span { color:#8b8491; font-size:.64rem; }
.sales-stage-select { padding:0 .9rem .75rem; }
.sales-stage-select select { width:100%; padding:.46rem .6rem; border:1px solid #e6e0ea; border-radius:10px; background:#faf8fc; color:#665f6c; font-size:.68rem; }
.sales-lead-card__footer { display:flex; justify-content:space-between; gap:.5rem; padding:.65rem .9rem; border-top:1px solid #efebf2; color:#99929d; font-size:.62rem; }
.sales-timeline { padding:0 1.5rem 1.5rem; }
.sales-timeline__item { position:relative; display:flex; gap:.9rem; padding-bottom:1.25rem; }
.sales-timeline__item:not(:last-child)::after { content:""; position:absolute; left:18px; top:38px; bottom:0; width:1px; background:#e7e1eb; }
.sales-timeline__icon { position:relative; z-index:1; flex:0 0 37px; width:37px; height:37px; display:grid; place-items:center; border-radius:12px; color:#6d28d9; background:#f1ebff; }
.sales-timeline__item>div:last-child { min-width:0; }
.sales-timeline__item span { color:#98919d; font-size:.7rem; }
.sales-timeline__item p { margin:.4rem 0; color:#4e4854; font-size:.82rem; line-height:1.6; }
.sales-timeline__item em { color:#6d28d9; font-size:.74rem; font-style:normal; }

.calculator-live-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.4rem .65rem; border-radius:99px; color:#6d28d9; background:#f1ebff; font-size:.72rem; font-weight:800; }
.calculator-result-card { padding:1.4rem; border-radius:25px; color:#fff; background:radial-gradient(circle at 100% 0%,rgba(167,139,250,.42),transparent 35%),linear-gradient(145deg,#121015,#261538 72%,#4c1d95); box-shadow:0 22px 45px rgba(31,18,47,.2); }
.calculator-result-card__header { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.calculator-result-card__header span { color:rgba(255,255,255,.6); font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; }
.calculator-result-card__header strong { color:#fff; }
.calculator-result-card__price { margin:1.2rem 0; padding:1.2rem; border:1px solid rgba(255,255,255,.12); border-radius:18px; background:rgba(255,255,255,.06); }
.calculator-result-card__price span { display:block; color:rgba(255,255,255,.62); font-size:.76rem; }
.calculator-result-card__price strong { display:block; margin-top:.3rem; color:#fff; font-size:2rem; letter-spacing:-.045em; }
.calculator-result-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:.7rem; }
.calculator-result-grid>div { padding:.8rem; border-radius:14px; background:rgba(255,255,255,.065); }
.calculator-result-grid span { display:block; color:rgba(255,255,255,.55); font-size:.65rem; }
.calculator-result-grid strong { display:block; margin-top:.25rem; color:#fff; font-size:.85rem; }
.calculator-rates { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:1rem; }
.calculator-rates span { padding:.35rem .55rem; border:1px solid rgba(255,255,255,.11); border-radius:99px; color:rgba(255,255,255,.72); font-size:.64rem; }
.calculator-explanation { padding:0 1.5rem 1.5rem; color:#665f6c; line-height:1.7; }
.formula-box { margin:1rem 0; padding:1rem; border-radius:16px; background:#f4effc; }
.formula-box span { display:block; color:#7b7481; font-size:.7rem; text-transform:uppercase; font-weight:800; letter-spacing:.05em; }
.formula-box strong { display:block; margin-top:.35rem; color:#5b21b6; }
.calculation-history__item { justify-content:space-between; }
.calculation-history__item>div { display:flex; flex-direction:column; gap:.16rem; }

@media (max-width: 1199.98px) {
    .business-hero { min-height:200px; }
    .monthly-bars { overflow-x:auto; grid-template-columns:repeat(12,55px); }
}
@media (max-width: 767.98px) {
    .business-hero { align-items:flex-start; flex-direction:column; padding:1.5rem; border-radius:22px; }
    .business-hero__title { font-size:2rem; }
    .metric-card { min-height:125px; padding:1rem; }
    .metric-card strong { font-size:1.25rem; }
    .business-card { border-radius:19px; }
    .business-card__header { padding:1.15rem; }
    .finance-breakdown { grid-template-columns:1fr; padding:0 1rem 1rem; }
    .finance-breakdown__total { grid-column:auto; }
    .calculator-result-grid { grid-template-columns:1fr 1fr; }
    .sales-toolbar { align-items:flex-start; flex-direction:column; }
}

/* Финансы: исключение проектов и ежемесячное обслуживание */
.finance-stat-switch { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.1rem; border:1px solid #e7e1eb; border-radius:18px; background:linear-gradient(135deg,#fbfaff,#f5f1fb); }
.finance-stat-switch .form-check-input { width:3rem; height:1.55rem; margin:0; cursor:pointer; }
.finance-excluded-row { opacity:.62; background:#f7f6f8; }
.finance-excluded-row:hover { opacity:.82; }
.mini-stat { height:100%; padding:1rem; border:1px solid #ece7f0; border-radius:16px; background:#fbfafd; }
.mini-stat span { display:block; color:#8d8692; font-size:.7rem; text-transform:uppercase; letter-spacing:.04em; }
.mini-stat strong { display:block; margin-top:.35rem; color:#2d2732; font-size:1.05rem; }
.recurring-editor { height:100%; padding:1rem; border:1px solid #e9e3ed; border-radius:18px; background:#faf8fc; }
.recurring-table-wrap { max-height:620px; overflow:auto; border:1px solid #ece7f0; border-radius:18px; }
.recurring-table-wrap thead th { position:sticky; top:0; z-index:2; background:#fff; }
.table-danger-subtle td { background:#fff5f6 !important; }

@media (max-width: 767.98px) {
    .finance-stat-switch { align-items:flex-start; }
    .recurring-table-wrap { max-height:none; }
}
