@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap");

* {
    box-sizing: border-box;
}

:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-soft: #f8f9fd;
    --text: #111827;
    --muted: #7b8498;
    --border: #e8ebf2;
    --primary: #3346f5;
    --primary-hover: #2637df;
    --primary-soft: #eef0ff;
    --green: #22b95b;
    --green-soft: #e9faef;
    --orange: #ff8a34;
    --orange-soft: #fff1e7;
    --blue: #3f6ff7;
    --blue-soft: #edf3ff;
    --red: #ef4444;
    --red-soft: #fff0f0;
    --violet: #7c5cff;
    --shadow: 0 8px 28px rgba(29, 40, 76, 0.045);
    --sidebar: 238px;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    font-optical-sizing: auto;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.no-scroll {
    overflow: hidden;
}

/* Login */

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 13% 14%, rgba(42, 190, 93, .08), transparent 27%),
        radial-gradient(circle at 88% 11%, rgba(51, 70, 245, .09), transparent 27%),
        #f8f9fc;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr);
}

.login-brand-panel {
    padding: 48px 60px;
    display: flex;
    flex-direction: column;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.login-brand img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.login-brand div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-brand strong {
    font-size: 20px;
}

.login-brand span {
    color: var(--muted);
    font-size: 13px;
}

.login-hero {
    max-width: 720px;
    margin: auto 0;
    padding: 60px 0;
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-weight: 750;
    font-size: 12px;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.login-hero h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(36px, 5vw, 70px);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.login-hero > p {
    max-width: 650px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.login-feature-grid {
    margin-top: 52px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.login-feature-grid > div {
    min-width: 0;
    padding: 19px;
    background: rgba(255, 255, 255, .68);
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 20px;
    backdrop-filter: blur(12px);
}

.login-feature-grid b,
.login-feature-grid span {
    display: block;
}

.login-feature-grid b {
    margin-bottom: 6px;
}

.login-feature-grid span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.login-form-panel {
    padding: 28px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(100%, 500px);
    background: rgba(255, 255, 255, .93);
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 30px 100px rgba(26, 34, 70, .09);
}

.login-mobile-logo {
    display: none;
}

.login-card h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -.04em;
}

.login-subtitle {
    color: var(--muted);
    margin: 9px 0 30px;
}

.login-form {
    display: grid;
    gap: 20px;
}

.login-form label > span,
.settings-form-preview label > span {
    display: block;
    margin: 0 0 8px;
    font-weight: 650;
    font-size: 13px;
}

.login-form input,
.settings-form-preview input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: .18s ease;
}

.login-form input:focus {
    border-color: #9aa5ff;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .08);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 92px;
}

.password-field button {
    position: absolute;
    right: 8px;
    top: 7px;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.login-submit {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    margin-top: 4px;
}

.login-help {
    margin: 25px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin: 0 0 20px;
    line-height: 1.5;
}

.alert-error {
    background: var(--red-soft);
    color: #b42318;
    border: 1px solid #ffd2d2;
}

.alert-info {
    background: var(--blue-soft);
    color: #2954c8;
    border: 1px solid #dae5ff;
    margin-bottom: 16px;
}

/* App shell */

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    min-width: 0;
    padding: 22px 18px;
    background: rgba(255, 255, 255, .95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    height: 62px;
    padding: 0 7px;
}

.brand img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.brand span {
    min-width: 0;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 760;
    letter-spacing: -.025em;
}

.brand b {
    font-weight: 850;
}

.main-nav {
    display: grid;
    gap: 7px;
    margin-top: 28px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 13px;
    color: #5d6880;
    border-radius: 13px;
    font-weight: 570;
    transition: .16s ease;
}

.nav-link:hover {
    background: #f6f7fb;
    color: var(--text);
}

.nav-link.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 720;
}

.nav-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.nav-icon svg {
    width: 21px;
    height: 21px;
}

.sidebar-spacer {
    flex: 1;
    min-height: 20px;
}

.sidebar-note {
    text-align: center;
    padding: 22px 15px;
    border-radius: 19px;
    background: linear-gradient(160deg, #fafbff, #f2f4ff);
    border: 1px solid #f0f2fa;
    margin: 15px 0;
}

.sidebar-note-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    color: var(--primary);
    background: #fff;
}

.sidebar-note strong,
.sidebar-note span {
    display: block;
}

.sidebar-note strong {
    font-size: 13px;
}

.sidebar-note span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    margin-top: 7px;
}

.logout-form {
    margin: 0;
}

.nav-button {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.main-content {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(260px, 390px) auto auto;
    align-items: center;
    gap: 18px;
    padding: 16px 25px;
    background: rgba(246, 248, 252, .92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232, 235, 242, .74);
}

.page-heading h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.04em;
}

.global-search {
    height: 46px;
    display: grid;
    grid-template-columns: 1fr 45px;
    align-items: center;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.global-search input {
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 0 0 15px;
    color: var(--text);
    background: transparent;
}

.global-search input::placeholder {
    color: #a1a8b8;
}

.global-search button {
    height: 100%;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #6f7990;
    cursor: pointer;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #3d4fff, #2e3eea);
    color: #fff;
    box-shadow: 0 7px 18px rgba(51, 70, 245, .19);
    font-weight: 680;
    cursor: pointer;
    transition: .16s ease;
}

.primary-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.primary-button svg {
    width: 18px;
    height: 18px;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.notification {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #58647c;
}

.notification b {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--bg);
    border-radius: 999px;
    font-size: 9px;
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #173440, #2f5965);
    color: white;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .02em;
}

.avatar-large {
    width: 45px;
    height: 45px;
}

.top-user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 650;
}

.mobile-menu-button {
    display: none;
}

.page-body {
    padding: 12px 25px 34px;
}

/* Dashboard */

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) repeat(3, minmax(165px, 1.25fr));
    gap: 11px;
}

.kpi-card {
    min-width: 0;
    min-height: 108px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.kpi-card > div {
    min-width: 0;
}

.kpi-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.kpi-card strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -.04em;
}

.kpi-money strong {
    font-size: 18px;
    white-space: nowrap;
}

.kpi-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid !important;
    place-items: center;
    font-size: 18px !important;
    font-weight: 800;
}

.kpi-icon svg {
    width: 19px;
    height: 19px;
}

.kpi-blue {
    background: var(--blue-soft);
    color: var(--blue) !important;
}

.kpi-orange {
    background: var(--orange-soft);
    color: var(--orange) !important;
}

.kpi-green {
    background: var(--green-soft);
    color: var(--green) !important;
}

.kpi-violet {
    background: #f1edff;
    color: var(--violet) !important;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 305px;
    gap: 13px;
    margin-top: 13px;
}

.dashboard-main-column,
.dashboard-right-column {
    min-width: 0;
}

.dashboard-main-column {
    display: grid;
    gap: 13px;
}

.dashboard-right-column {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.dashboard-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
    gap: 13px;
}

.content-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.card-heading {
    margin-bottom: 17px;
}

.card-heading-inline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.card-heading h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.025em;
}

.card-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.mini-chart {
    min-height: 195px;
    display: grid;
    grid-template-columns: repeat(6, minmax(30px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 20px 8px 0;
    border-bottom: 1px solid var(--border);
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 48px,
            #eef0f5 49px
        );
}

.chart-column {
    height: 174px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
}

.chart-bar {
    width: min(36px, 70%);
    min-height: 8px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #aabaff, #5f77ff);
}

.chart-value {
    font-size: 11px;
    font-weight: 720;
}

.chart-label {
    color: var(--muted);
    font-size: 11px;
    padding-bottom: 8px;
}

.type-list {
    display: grid;
    gap: 18px;
}

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

.type-row-head strong,
.type-row-head span {
    display: block;
}

.type-row-head strong {
    font-size: 16px;
}

.type-row-head span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 14px;
}

.type-row-head > b {
    font-size: 16px;
}

.progress {
    height: 5px;
    overflow: hidden;
    background: #eef0f4;
    border-radius: 999px;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4057ff, #6b79ff);
}

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

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.project-cover {
    height: 125px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(145deg, rgba(22, 60, 67, .96), rgba(32, 93, 72, .84)),
        #173c45;
    overflow: hidden;
}

.project-cover-bath {
    background: linear-gradient(145deg, #583d27, #214b3c);
}

.project-cover-aframe {
    background: linear-gradient(145deg, #233448, #5d5938);
}

.project-cover-barn {
    background: linear-gradient(145deg, #26333c, #4f5e5d);
}

.project-cover img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 6px 13px rgba(0, 0, 0, .18));
}

.project-card-body {
    padding: 13px;
}

.project-number {
    color: var(--muted);
    font-size: 9px;
}

.project-card h3 {
    margin: 4px 0 0;
    font-size: 14px;
}

.project-location {
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-top: 10px;
    font-size: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    width: fit-content;
    padding: 0 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 720;
    white-space: nowrap;
}

.status-working {
    color: #285dd8;
    background: var(--blue-soft);
}

.status-building {
    color: #dc6819;
    background: var(--orange-soft);
}

.status-completed {
    color: #188f48;
    background: var(--green-soft);
}

.status-neutral {
    color: #647086;
    background: #f0f2f6;
}

.project-stats {
    margin: 11px 0 0;
    display: grid;
    gap: 7px;
}

.project-stats div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.project-stats dt {
    color: var(--muted);
    font-size: 9px;
}

.project-stats dd {
    margin: 0;
    text-align: right;
    font-size: 9px;
    font-weight: 650;
}

.text-link {
    color: var(--primary);
    font-size: 11px;
    font-weight: 650;
}

.side-widget {
    padding: 15px;
}

.side-widget .card-heading {
    margin-bottom: 11px;
}

.widget-icon {
    color: #7e88a0;
}

.widget-icon svg {
    width: 18px;
    height: 18px;
}

.payment-list,
.activity-list,
.installment-mini-list {
    display: grid;
}

.payment-row {
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f0f2f5;
}

.date-box {
    width: 37px;
    height: 42px;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 9px;
    background: var(--surface-soft);
}

.date-box strong,
.date-box span {
    display: block;
}

.date-box strong {
    font-size: 16px;
    line-height: 1;
}

.date-box span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.payment-info {
    min-width: 0;
}

.payment-info strong,
.payment-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-info strong {
    font-size: 14px;
}

.payment-info span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.payment-row > b {
    font-size: 14px;
}

.widget-link {
    display: inline-block;
    margin-top: 12px;
}

.installment-mini {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f0f2f5;
}

.installment-mini strong,
.installment-mini span {
    display: block;
}

.installment-mini strong {
    font-size: 10px;
}

.installment-mini span {
    margin: 4px 0 7px;
    color: var(--muted);
    font-size: 8px;
}

.installment-mini > b {
    text-align: right;
    font-size: 10px;
}

.activity-row {
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f2f5;
}

.activity-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #edf0f7;
    color: #52607a;
    font-size: 8px;
    font-weight: 800;
}

.activity-row strong,
.activity-row span,
.activity-row small {
    display: block;
}

.activity-row strong {
    font-size: 12px;
}

.activity-row span {
    margin-top: 2px;
    color: #636f84;
    font-size: 10px;
    line-height: 1.4;
}

.activity-row small {
    margin-top: 3px;
    color: #a0a7b5;
    font-size: 10px;
}

.empty-compact {
    padding: 18px 8px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.empty-state {
    min-height: 250px;
    padding: 34px 18px;
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
}

.large-empty {
    min-height: 420px;
}

.empty-state-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 19px;
    color: var(--primary);
    background: var(--primary-soft);
}

.empty-state-icon svg {
    width: 28px;
    height: 28px;
}

.empty-state h3 {
    margin: 15px 0 0;
    font-size: 18px;
}

.empty-state p {
    max-width: 460px;
    margin: 8px 0 18px;
    color: var(--muted);
    line-height: 1.55;
}

/* Objects */

.objects-panel {
    padding: 0;
    overflow: hidden;
}

.tabs-row {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab-link {
    position: relative;
    min-height: 64px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    color: var(--muted);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 620;
}

.tab-link b {
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f2f4f8;
    color: #7b8496;
    font-size: 14px;
}

.tab-link.is-active {
    color: var(--primary);
}

.tab-link.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
}

.object-list {
    padding: 12px;
    display: grid;
    gap: 10px;
}

.object-row-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 78px minmax(180px, 1.4fr) repeat(3, minmax(110px, .7fr)) minmax(175px, .9fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid #edf0f5;
    border-radius: 13px;
    background: #fff;
}

.object-thumb {
    width: 78px;
    height: 65px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(145deg, #163942, #355b52);
}

.object-thumb img {
    width: 51px;
    height: 51px;
    object-fit: contain;
}

.object-primary {
    min-width: 0;
}

.object-primary > span,
.object-primary > p {
    color: var(--muted);
    font-size: 10px;
}

.object-primary h3 {
    margin: 4px 0 5px;
    font-size: 14px;
}

.object-primary p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.object-meta-cell span,
.object-meta-cell b {
    display: block;
}

.object-meta-cell span {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
}

.object-meta-cell b {
    font-size: 11px;
}

.object-money {
    min-width: 0;
}

.object-money strong,
.object-money > span {
    display: block;
}

.object-money strong {
    font-size: 12px;
}

.object-money > span {
    margin: 5px 0 8px;
    color: var(--muted);
    font-size: 9px;
}

/* Installments */

.installment-kpis {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    margin-bottom: 13px;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

.data-table th,
.data-table td {
    padding: 14px 13px;
    text-align: left;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.data-table td {
    font-size: 11px;
}

.data-table td strong,
.data-table td span,
.data-table td small {
    display: block;
}

.data-table td span,
.data-table td small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.table-progress {
    width: 120px;
    margin-top: 7px;
}

/* Users */

.users-list {
    display: grid;
}

.user-row {
    display: grid;
    grid-template-columns: 45px minmax(170px, 1fr) 150px 110px 170px;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #eef0f4;
}

.user-row:first-child {
    border-top: 0;
}

.user-main strong,
.user-main span,
.user-last span,
.user-last b {
    display: block;
}

.user-main span,
.user-last span {
    color: var(--muted);
    font-size: 10px;
    margin-top: 4px;
}

.user-role,
.user-last b {
    font-size: 11px;
}

.soft-badge {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 10px;
    font-weight: 680;
}

/* Settings */

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

.settings-grid > :last-child {
    grid-column: 1 / -1;
}

.settings-form-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-form-preview input:disabled {
    color: #5e687c;
    background: #f8f9fb;
}

.muted-note {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 11px;
}

.source-list {
    display: grid;
}

.source-list > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 11px 0;
    border-bottom: 1px solid #eef0f4;
    font-size: 11px;
}

.source-active {
    color: var(--green);
}

.source-inactive {
    color: var(--muted);
}

.feature-checklist {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 35px;
}

.feature-checklist li {
    break-inside: avoid;
    margin: 0 0 10px;
    color: #4f5b71;
    font-size: 11px;
    line-height: 1.45;
}

/* Responsive */

.mobile-overlay {
    display: none;
}

@media (max-width: 1420px) {
    .dashboard-kpis {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }

    .dashboard-kpis .kpi-money {
        grid-column: span 1;
    }

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

    .project-grid > :last-child {
        display: none;
    }

    .object-row-card {
        grid-template-columns: 72px minmax(180px, 1.4fr) repeat(2, minmax(105px, .7fr)) minmax(165px, .9fr);
    }

    .object-meta-cell:nth-of-type(4) {
        display: none;
    }
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: minmax(150px, 1fr) minmax(220px, 330px) auto;
    }

    .top-user-name {
        display: none;
    }

    .top-user {
        gap: 3px;
    }

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

    .dashboard-right-column {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .installment-kpis {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .user-row {
        grid-template-columns: 45px minmax(170px, 1fr) 130px 100px;
    }

    .user-last {
        display: none;
    }
}

@media (max-width: 920px) {
    :root {
        --sidebar: 240px;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar);
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 20px 0 45px rgba(20, 29, 55, .14);
    }

    .app-shell.menu-open .sidebar {
        transform: translateX(0);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(15, 23, 42, .28);
        backdrop-filter: blur(2px);
    }

    .mobile-overlay.is-visible {
        display: block;
    }

    .mobile-menu-button {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 4px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface);
    }

    .mobile-menu-button span {
        width: 17px;
        height: 1.5px;
        display: block;
        background: #4e5a70;
        border-radius: 999px;
    }

    .topbar {
        grid-template-columns: 42px minmax(120px, 1fr) auto;
        min-height: 76px;
        padding: 12px 16px;
    }

    .global-search {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
    }

    .top-add {
        grid-column: 3;
        grid-row: 1;
    }

    .top-user {
        display: none;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .page-body {
        padding: 12px 16px 28px;
    }

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

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

    .dashboard-right-column {
        grid-template-columns: 1fr;
    }

    .object-row-card {
        grid-template-columns: 68px minmax(0, 1fr) minmax(150px, .6fr);
    }

    .object-meta-cell {
        display: none;
    }

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

    .settings-grid > :last-child {
        grid-column: auto;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        padding: 20px;
    }

    .login-mobile-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 28px;
    }

    .login-mobile-logo img {
        width: 52px;
        height: 52px;
        object-fit: contain;
    }
}

@media (max-width: 640px) {
    .top-add {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .top-add span {
        display: none;
    }

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

    .kpi-card {
        min-height: 95px;
        padding: 13px;
    }

    .kpi-card strong {
        font-size: 19px;
    }

    .kpi-money strong {
        font-size: 14px;
        white-space: normal;
    }

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

    .project-grid > :last-child {
        display: block;
    }

    .project-cover {
        height: 155px;
    }

    .object-row-card {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .object-money {
        grid-column: 1 / -1;
        padding-left: 76px;
    }

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

    .user-row {
        grid-template-columns: 45px minmax(0, 1fr) auto;
    }

    .user-role {
        display: none;
    }

    .settings-form-preview {
        grid-template-columns: 1fr;
    }

    .muted-note {
        grid-column: auto;
    }

    .feature-checklist {
        columns: 1;
    }

    .login-card {
        padding: 30px 22px;
        border-radius: 24px;
    }
}

@media (max-width: 410px) {
    .dashboard-kpis,
    .installment-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .kpi-icon {
        width: 34px;
        height: 34px;
    }

    .tabs-row {
        padding: 0 8px;
    }

    .tab-link {
        padding: 0 11px;
    }
}


/* ===== v0.2: forms and project card ===== */

.alert-success {
    background: var(--green-soft);
    color: #177c42;
    border: 1px solid #ccefd9;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.form-page,
.project-page {
    display: grid;
    gap: 14px;
}

.form-page-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 8px 2px 2px;
}

.form-page-head > div {
    min-width: 0;
}

.form-page-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.035em;
}

.form-page-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    min-height: 34px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.project-form {
    display: grid;
    gap: 13px;
}

.form-section {
    padding: 20px;
}

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

.field {
    display: block;
    min-width: 0;
}

.field.span-2,
.details-grid .span-2 {
    grid-column: 1 / -1;
}

.field > span {
    display: block;
    margin-bottom: 8px;
    color: #4f5a70;
    font-size: 11px;
    font-weight: 680;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 13px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: .17s ease;
}

.field textarea {
    min-height: 110px;
    padding-top: 12px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #9ba6ff;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .07);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 3px 0 10px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: #4f5b70;
    font-weight: 650;
}

.secondary-button:hover {
    border-color: #d7dbea;
    background: #fafbfc;
}

.secondary-button svg {
    width: 17px;
    height: 17px;
}

.object-row-card {
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.object-row-card:hover {
    border-color: #dbe0f4;
    box-shadow: 0 10px 30px rgba(31, 43, 86, .06);
    transform: translateY(-1px);
}

.project-header-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    justify-content: space-between;
    margin-top: 11px;
}

.project-title-row h2 {
    margin: 4px 0 0;
    font-size: 25px;
    letter-spacing: -.04em;
}

.project-title-row p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.project-status-large {
    min-height: 30px;
    padding: 0 12px;
    font-size: 11px;
}

.project-header-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, auto));
    gap: 10px;
    align-items: center;
}

.project-header-summary > div {
    min-width: 0;
    padding: 11px 13px;
    border-left: 1px solid var(--border);
}

.project-header-summary span,
.project-header-summary strong {
    display: block;
}

.project-header-summary span {
    color: var(--muted);
    font-size: 9px;
}

.project-header-summary strong {
    margin-top: 5px;
    white-space: nowrap;
    font-size: 12px;
}

.edit-button {
    grid-column: 1 / -1;
    justify-self: end;
}

.project-tabs {
    display: flex;
    gap: 4px;
    min-height: 58px;
    padding: 0 8px;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.project-tabs a {
    position: relative;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    color: var(--muted);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 650;
}

.project-tabs a b {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f0f2f6;
    color: #778197;
    font-size: 8px;
}

.project-tabs a.is-active {
    color: var(--primary);
}

.project-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

.project-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 13px;
}

.project-side-stack {
    display: grid;
    align-content: start;
    gap: 13px;
}

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

.details-grid > div {
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f4;
}

.details-grid dt,
.details-grid dd {
    margin: 0;
}

.details-grid dt {
    color: var(--muted);
    font-size: 10px;
}

.details-grid dd {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 650;
    word-break: break-word;
}

.details-grid dd a {
    color: var(--primary);
}

.project-note {
    margin-top: 18px;
    padding: 15px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.project-note span {
    color: var(--muted);
    font-size: 10px;
}

.project-note p {
    margin: 7px 0 0;
    line-height: 1.55;
    font-size: 11px;
}

.payment-method-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 10px;
    font-weight: 700;
}

.finance-big {
    margin-top: 14px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.finance-progress {
    height: 7px;
    margin: 12px 0 15px;
}

.finance-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.finance-split > div {
    padding: 11px;
    background: var(--surface-soft);
    border-radius: 10px;
}

.finance-split span,
.finance-split strong {
    display: block;
}

.finance-split span {
    color: var(--muted);
    font-size: 9px;
}

.finance-split strong {
    margin-top: 5px;
    font-size: 11px;
}

.compact-list {
    display: grid;
}

.compact-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef0f4;
}

.compact-list > div:last-child {
    border-bottom: 0;
}

.compact-list span {
    color: var(--muted);
    font-size: 10px;
}

.compact-list b {
    text-align: right;
    font-size: 10px;
}

.payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.payment-summary-grid > div {
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.payment-summary-grid span,
.payment-summary-grid strong {
    display: block;
}

.payment-summary-grid span {
    color: var(--muted);
    font-size: 9px;
}

.payment-summary-grid strong {
    margin-top: 6px;
    font-size: 13px;
}

.compact-empty {
    min-height: 230px;
}

.history-list {
    display: grid;
}

.history-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #eef0f4;
}

.history-avatar {
    width: 38px;
    height: 38px;
}

.history-main {
    min-width: 0;
}

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

.history-head strong,
.history-head span {
    display: block;
}

.history-head strong {
    font-size: 11px;
}

.history-head span {
    margin-top: 4px;
    color: #5e697d;
    font-size: 10px;
}

.history-head time {
    color: var(--muted);
    white-space: nowrap;
    font-size: 9px;
}

.history-details {
    margin-top: 10px;
}

.history-details summary {
    color: var(--primary);
    cursor: pointer;
    font-size: 9px;
    font-weight: 650;
}

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

.history-json > div {
    min-width: 0;
}

.history-json span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
}

.history-json pre {
    max-height: 260px;
    overflow: auto;
    margin: 0;
    padding: 10px;
    border-radius: 9px;
    background: #f7f8fb;
    color: #465166;
    font: 9px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #fafbfe;
}

@media (max-width: 1180px) {
    .project-header-card {
        grid-template-columns: 1fr;
    }

    .project-header-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    }

    .edit-button {
        grid-column: auto;
        justify-self: stretch;
    }

    .project-content-grid {
        grid-template-columns: 1fr;
    }

    .project-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .form-page-head {
        display: block;
    }

    .form-page-head > div {
        margin-top: 7px;
    }

    .form-grid,
    .details-grid,
    .payment-summary-grid {
        grid-template-columns: 1fr;
    }

    .field.span-2,
    .details-grid .span-2 {
        grid-column: auto;
    }

    .project-header-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edit-button {
        grid-column: 1 / -1;
    }

    .project-side-stack {
        grid-template-columns: 1fr;
    }

    .history-json {
        grid-template-columns: 1fr;
    }

    .project-title-row {
        display: block;
    }

    .project-status-large {
        margin-top: 11px;
    }
}

@media (max-width: 480px) {
    .form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .project-header-summary {
        grid-template-columns: 1fr 1fr;
    }

    .project-header-summary > div {
        padding: 10px 0;
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }

    .project-title-row h2 {
        font-size: 21px;
    }
}


/* =========================================================
   МариКаркас ЦРМ v1.0
   ========================================================= */

button:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}

.alert-success {
    background: var(--green-soft);
    color: #177c42;
    border: 1px solid #ccefd9;
}

.alert-warning {
    background: #fff8e8;
    color: #9a6500;
    border: 1px solid #f3dfaa;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.form-page,
.project-page {
    display: grid;
    gap: 14px;
}

.form-page-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 8px 2px 2px;
}

.form-page-head > div {
    min-width: 0;
}

.form-page-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.035em;
}

.form-page-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    min-height: 34px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.project-form {
    display: grid;
    gap: 13px;
}

.form-section {
    padding: 20px;
}

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

.field {
    display: block;
    min-width: 0;
}

.field.span-2,
.details-grid .span-2,
.span-2 {
    grid-column: 1 / -1;
}

.field > span {
    display: block;
    margin-bottom: 8px;
    color: #4f5a70;
    font-size: 11px;
    font-weight: 680;
}

.field input,
.field select,
.field textarea,
.compact-form input,
.compact-form select,
.comment-form textarea,
.photo-edit-form input,
.photo-edit-form select,
.inline-create-form input,
.void-payment-details input,
.comment-menu input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 0 13px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: .17s ease;
}

.field textarea,
.comment-form textarea {
    min-height: 110px;
    padding-top: 12px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.compact-form input:focus,
.compact-form select:focus,
.comment-form textarea:focus,
.photo-edit-form input:focus,
.photo-edit-form select:focus {
    border-color: #9ba6ff;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .07);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 3px 0 10px;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    color: #4f5b70;
    font-weight: 650;
    cursor: pointer;
}

.secondary-button:hover {
    border-color: #d7dbea;
    background: #fafbfc;
}

.secondary-button svg {
    width: 17px;
    height: 17px;
}

.ghost-danger-button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #c94b4b;
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
}

.ghost-danger-button svg {
    width: 16px;
    height: 16px;
}

.inline-action-form {
    margin: 0;
}

.object-row-card {
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.object-row-card:hover {
    border-color: #dbe0f4;
    box-shadow: 0 10px 30px rgba(31, 43, 86, .06);
    transform: translateY(-1px);
}

.object-thumb.has-photo {
    background: #eef0f4;
}

.object-thumb.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.object-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(130px, .7fr)) auto auto;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: #fbfcfe;
}

.object-filters input,
.object-filters select {
    min-width: 0;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    outline: none;
    font-size: 12px;
}

.object-filters .secondary-button {
    min-height: 40px;
    height: 40px;
    font-size: 12px;
}

.filter-reset {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
}

.archive-tab {
    margin-left: auto;
}

.project-card-link {
    display: block;
}

.project-cover.has-real-cover {
    background: #e8ebef;
}

.real-cover-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: none !important;
}

.project-header-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    justify-content: space-between;
    margin-top: 11px;
}

.project-title-row h2 {
    margin: 4px 0 0;
    font-size: 25px;
    letter-spacing: -.04em;
}

.project-title-row p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.project-status-large {
    min-height: 30px;
    padding: 0 12px;
    font-size: 11px;
}

.project-header-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, auto));
    gap: 8px 10px;
    align-items: center;
}

.project-header-summary > div {
    min-width: 0;
    padding: 11px 13px;
    border-left: 1px solid var(--border);
}

.project-header-summary span,
.project-header-summary strong {
    display: block;
}

.project-header-summary span {
    color: var(--muted);
    font-size: 9px;
}

.project-header-summary strong {
    margin-top: 5px;
    white-space: nowrap;
    font-size: 12px;
}

.edit-button {
    grid-column: 1 / -1;
    justify-self: end;
}

.project-header-summary .inline-action-form {
    grid-column: 1 / -1;
    justify-self: end;
}

.project-tabs {
    display: flex;
    gap: 4px;
    min-height: 58px;
    padding: 0 8px;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.project-tabs a {
    position: relative;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    color: var(--muted);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 650;
}

.project-tabs a b {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f0f2f6;
    color: #778197;
    font-size: 8px;
}

.project-tabs a.is-active {
    color: var(--primary);
}

.project-tabs a.is-active::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 999px;
}

.project-content-grid,
.payment-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 13px;
}

.project-side-stack {
    display: grid;
    align-content: start;
    gap: 13px;
}

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

.details-grid > div {
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f4;
}

.details-grid dt,
.details-grid dd {
    margin: 0;
}

.details-grid dt {
    color: var(--muted);
    font-size: 10px;
}

.details-grid dd {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 650;
    word-break: break-word;
}

.details-grid dd a {
    color: var(--primary);
}

.project-note {
    margin-top: 18px;
    padding: 15px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.project-note span {
    color: var(--muted);
    font-size: 10px;
}

.project-note p {
    margin: 7px 0 0;
    line-height: 1.55;
    font-size: 11px;
}

.payment-method-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 10px;
    font-weight: 700;
}

.finance-big {
    margin-top: 14px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.finance-progress {
    height: 7px;
    margin: 12px 0 15px;
}

.finance-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.finance-split > div {
    padding: 11px;
    background: var(--surface-soft);
    border-radius: 10px;
}

.finance-split span,
.finance-split strong {
    display: block;
}

.finance-split span {
    color: var(--muted);
    font-size: 9px;
}

.finance-split strong {
    margin-top: 5px;
    font-size: 11px;
}

.compact-list {
    display: grid;
}

.compact-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef0f4;
}

.compact-list > div:last-child {
    border-bottom: 0;
}

.compact-list span {
    color: var(--muted);
    font-size: 14px;
}

.compact-list b {
    text-align: right;
    font-size: 14px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payment-summary-grid,
.payment-entry-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.payment-summary-grid > div,
.payment-entry-summary > div {
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.payment-summary-grid span,
.payment-summary-grid strong,
.payment-entry-summary span,
.payment-entry-summary strong {
    display: block;
}

.payment-summary-grid span,
.payment-entry-summary span {
    color: var(--muted);
    font-size: 9px;
}

.payment-summary-grid strong,
.payment-entry-summary strong {
    margin-top: 6px;
    font-size: 13px;
}

.mortgage-info-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: -4px 0 18px;
}

.mortgage-info-strip > div {
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.mortgage-info-strip span,
.mortgage-info-strip strong {
    display: block;
}

.mortgage-info-strip span {
    color: var(--muted);
    font-size: 9px;
}

.mortgage-info-strip strong {
    margin-top: 4px;
    font-size: 10px;
}

.schedule-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 700;
}

.payment-paid {
    background: var(--green-soft);
    color: #178c47;
}

.payment-partial {
    background: #fff8dd;
    color: #a87300;
}

.payment-overdue {
    background: var(--red-soft);
    color: #cf3d3d;
}

.payment-expected {
    background: var(--blue-soft);
    color: #3964d4;
}

.mini-action {
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
}

.muted-dash {
    color: #a5acba;
}

.payments-timeline {
    display: grid;
}

.payment-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #eef0f4;
}

.payment-history-item strong,
.payment-history-item span,
.payment-history-item small {
    display: block;
}

.payment-history-item strong {
    font-size: 11px;
}

.payment-history-item span {
    margin-top: 3px;
    color: #636e82;
    font-size: 9px;
}

.payment-history-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.payment-history-item.is-voided {
    opacity: .55;
}

.voided-label {
    display: inline-flex !important;
    padding: 5px 7px;
    border-radius: 7px;
    background: var(--red-soft);
    color: #c43f3f !important;
    font-weight: 700;
}

.void-payment-details,
.comment-menu {
    position: relative;
}

.void-payment-details summary,
.comment-menu summary {
    list-style: none;
    cursor: pointer;
    font-weight: 800;
    color: #8790a2;
}

.void-payment-details summary::-webkit-details-marker,
.comment-menu summary::-webkit-details-marker {
    display: none;
}

.void-payment-details form,
.comment-menu form {
    position: absolute;
    z-index: 10;
    right: 0;
    top: 23px;
    width: 220px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    box-shadow: 0 16px 40px rgba(24, 34, 69, .14);
}

.void-payment-details input,
.comment-menu input {
    min-height: 37px;
    font-size: 10px;
}

.void-payment-details button,
.comment-menu button {
    width: 100%;
    min-height: 34px;
    margin-top: 7px;
    border: 0;
    border-radius: 8px;
    background: var(--red-soft);
    color: #c43f3f;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

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

.tranche-card {
    position: relative;
    padding: 17px 15px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfcff;
}

.tranche-card .field + .field {
    margin-top: 13px;
}

.tranche-number {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    margin-bottom: 13px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #566176;
    font-size: 10px;
    line-height: 1.45;
}

.checkbox-field input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    flex: 0 0 auto;
}

.compact-empty {
    min-height: 230px;
}

/* Photos */

.photo-upload-form {
    padding: 0 0 18px;
    border-bottom: 1px solid #eef0f4;
    margin-bottom: 18px;
}

.upload-zone {
    min-height: 120px;
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
    padding: 20px;
    border: 1.5px dashed #cfd5e4;
    border-radius: 14px;
    background: #fafbfe;
    color: #647086;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #a9b3ff;
    background: #f8f9ff;
}

.upload-zone svg {
    width: 27px;
    height: 27px;
    color: var(--primary);
}

.upload-zone strong {
    margin-top: 9px;
    font-size: 11px;
    color: #3f4a60;
}

.upload-zone span {
    margin-top: 5px;
    font-size: 9px;
}

.upload-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-options {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-top: 10px;
}

.upload-options .field {
    width: min(320px, 100%);
}

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

.photo-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
}

.photo-card.is-cover {
    border-color: #a9b4ff;
    box-shadow: 0 0 0 2px rgba(51, 70, 245, .05);
}

.photo-image-link {
    display: block;
    height: 185px;
    background: #edf0f4;
}

.photo-image-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-card-body {
    padding: 11px;
}

.photo-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 9px;
}

.photo-meta-line b {
    padding: 4px 7px;
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 8px;
}

.photo-edit-form {
    display: grid;
    gap: 7px;
}

.photo-edit-form input,
.photo-edit-form select {
    min-height: 36px;
    padding: 0 9px;
    font-size: 9px;
}

.photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.photo-actions button {
    min-height: 29px;
    border: 0;
    border-radius: 8px;
    padding: 0 8px;
    background: #f0f2f7;
    color: #556176;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
}

.photo-actions .danger-text-button {
    color: #c84646;
    background: var(--red-soft);
}

.photo-card-body > small {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 8px;
}

/* Comments */

.comments-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 13px;
}

.comment-form {
    display: grid;
    gap: 9px;
    padding-bottom: 17px;
    border-bottom: 1px solid #eef0f4;
}

.comment-form .primary-button {
    justify-self: end;
}

.comments-list {
    display: grid;
}

.comment-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    padding: 16px 0;
    border-bottom: 1px solid #eef0f4;
}

.comment-item.is-hidden {
    opacity: .62;
}

.comment-avatar {
    width: 40px;
    height: 40px;
}

.comment-main {
    min-width: 0;
}

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

.comment-head strong,
.comment-head time {
    display: block;
}

.comment-head strong {
    font-size: 10px;
}

.comment-head time {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.comment-main > p {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
}

.hidden-comment-text {
    color: var(--muted);
    font-style: italic;
}

.comments-help p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
}

/* History */

.history-list {
    display: grid;
}

.history-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #eef0f4;
}

.history-avatar {
    width: 38px;
    height: 38px;
}

.history-main {
    min-width: 0;
}

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

.history-head strong,
.history-head span {
    display: block;
}

.history-head strong {
    font-size: 11px;
}

.history-head span {
    margin-top: 4px;
    color: #5e697d;
    font-size: 10px;
}

.history-head time {
    color: var(--muted);
    white-space: nowrap;
    font-size: 9px;
}

.history-reason {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #faf7ef;
    color: #7a6742;
    font-size: 9px;
}

.history-details {
    margin-top: 10px;
}

.history-details summary {
    color: var(--primary);
    cursor: pointer;
    font-size: 9px;
    font-weight: 650;
}

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

.history-json > div {
    min-width: 0;
}

.history-json span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
}

.history-json pre {
    max-height: 260px;
    overflow: auto;
    margin: 0;
    padding: 10px;
    border-radius: 9px;
    background: #f7f8fb;
    color: #465166;
    font: 9px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Users */

.users-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 13px;
}

.user-row-link {
    transition: background .15s ease;
}

.user-row-link:hover {
    background: #fafbfe;
}

.user-create-card {
    align-self: start;
}

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

.compact-form .field > span {
    margin-bottom: 6px;
}

.compact-form input,
.compact-form select {
    min-height: 42px;
}

/* Settings */

.inline-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 12px;
}

.inline-create-form input {
    min-height: 42px;
}

.inline-create-form .primary-button {
    min-height: 42px;
}

.source-list-actions > div {
    align-items: center;
}

.source-list-actions form {
    margin: 0;
}

.status-toggle-button {
    min-height: 29px;
    border: 0;
    border-radius: 8px;
    padding: 0 9px;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
}

.status-toggle-button.is-on {
    background: var(--green-soft);
    color: #178c47;
}

.status-toggle-button.is-off {
    background: #f0f2f6;
    color: #70798b;
}

.reference-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reference-chips span {
    padding: 8px 11px;
    border-radius: 9px;
    background: #f5f7fb;
    color: #59647a;
    font-size: 10px;
    font-weight: 650;
}

/* Installments */

.installment-tabs {
    justify-content: flex-start;
}

.overdue-kpi strong {
    color: #d64a4a;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #fafbfe;
}

.date-box-overdue {
    background: var(--red-soft) !important;
    color: #c43f3f;
}

.activity-row,
.payment-row,
.installment-mini {
    color: inherit;
}

/* Responsive additions */

@media (max-width: 1280px) {
    .object-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-search {
        grid-column: 1 / -1;
    }

    .users-page-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .project-header-card {
        grid-template-columns: 1fr;
    }

    .project-header-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    }

    .edit-button {
        grid-column: auto;
        justify-self: stretch;
    }

    .project-header-summary .inline-action-form {
        grid-column: auto;
        justify-self: stretch;
    }

    .project-content-grid,
    .payment-page-layout {
        grid-template-columns: 1fr;
    }

    .project-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .comments-layout {
        grid-template-columns: 1fr;
    }

    .comments-help {
        display: none;
    }

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

@media (max-width: 760px) {
    .form-page-head {
        display: block;
    }

    .form-page-head > div {
        margin-top: 7px;
    }

    .form-grid,
    .details-grid,
    .payment-summary-grid,
    .payment-entry-summary,
    .mortgage-info-strip {
        grid-template-columns: 1fr;
    }

    .field.span-2,
    .details-grid .span-2,
    .span-2 {
        grid-column: auto;
    }

    .project-header-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .edit-button,
    .project-header-summary .inline-action-form {
        grid-column: 1 / -1;
    }

    .project-side-stack {
        grid-template-columns: 1fr;
    }

    .history-json {
        grid-template-columns: 1fr;
    }

    .project-title-row {
        display: block;
    }

    .project-status-large {
        margin-top: 11px;
    }

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

    .object-filters {
        grid-template-columns: 1fr 1fr;
    }

    .filter-search {
        grid-column: 1 / -1;
    }

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

    .upload-options {
        display: grid;
        grid-template-columns: 1fr;
    }

    .upload-options .field {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .project-header-summary {
        grid-template-columns: 1fr 1fr;
    }

    .project-header-summary > div {
        padding: 10px 0;
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }

    .project-title-row h2 {
        font-size: 21px;
    }

    .object-filters {
        grid-template-columns: 1fr;
    }

    .filter-search {
        grid-column: auto;
    }
}

.mortgage-quick-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(170px, 1fr) auto;
    gap: 9px;
    align-items: end;
    padding: 12px;
    margin: -5px 0 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
}

.mortgage-quick-form .field > span {
    margin-bottom: 5px;
}

.mortgage-quick-form input,
.mortgage-quick-form select {
    min-height: 39px;
}

.mortgage-quick-form .secondary-button {
    min-height: 39px;
}

@media (max-width: 760px) {
    .mortgage-quick-form {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.0.1 — Dashboard finance redesign
   Финансовый блок в правой колонке в стиле референса.
   ========================================================= */

.dashboard-layout-finance {
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
}

.dashboard-layout-finance .dashboard-main-column {
    gap: 13px;
}

.dashboard-status-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.dashboard-status-kpis .kpi-card {
    min-height: 108px;
}

.finance-overview-widget {
    padding: 18px;
    overflow: hidden;
}

.finance-overview-heading {
    margin-bottom: 8px !important;
}

.finance-overview-heading p {
    max-width: 210px;
}

.finance-donut-wrap {
    display: grid;
    place-items: center;
    padding: 10px 0 15px;
}

.finance-donut {
    --finance-progress: 0;
    position: relative;
    width: 176px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        conic-gradient(
            from -25deg,
            #ad8df5 0 calc(var(--finance-progress) * 1%),
            #f1f3f7 calc(var(--finance-progress) * 1%) 100%
        );
    transform: rotate(0.001deg);
}

.finance-donut::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    right: 8px;
    top: 91px;
    border-radius: 50%;
    background: #ad8df5;
    box-shadow: 0 3px 10px rgba(126, 90, 220, .18);
}

.finance-donut-hole {
    position: relative;
    z-index: 2;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(238, 240, 245, .72);
}

.finance-donut-hole span,
.finance-donut-hole strong,
.finance-donut-hole small {
    display: block;
}

.finance-donut-hole span {
    color: var(--muted);
    font-size: 10px;
}

.finance-donut-hole strong {
    max-width: 112px;
    margin-top: 5px;
    font-size: 15px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.finance-donut-hole small {
    margin-top: 5px;
    color: #a0a7b5;
    font-size: 8px;
    line-height: 1.3;
}

.finance-overview-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 3px 14px;
}

.finance-overview-totals > div {
    min-width: 0;
}

.finance-overview-totals span,
.finance-overview-totals strong {
    display: block;
}

.finance-overview-totals span {
    color: var(--muted);
    font-size: 9px;
}

.finance-overview-totals strong {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.25;
    letter-spacing: -.02em;
    word-break: break-word;
}

.finance-overview-strips {
    display: grid;
    gap: 8px;
}

.finance-strip {
    min-height: 54px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
}

.finance-strip div {
    min-width: 0;
}

.finance-strip span,
.finance-strip strong {
    display: block;
}

.finance-strip span {
    color: #747b8b;
    font-size: 12px;
}

.finance-strip strong {
    margin-top: 3px;
    color: #313949;
    font-size: 16px;
    line-height: 1.2;
}

.finance-strip small {
    color: #7f8490;
    white-space: nowrap;
    font-size: 14px;
}

.finance-strip-total {
    background: #eee8ff;
}

.finance-strip-received {
    background: #eef8dc;
}

.finance-strip-balance {
    background: #fff0d5;
}

@media (max-width: 1420px) {
    .dashboard-layout-finance {
        grid-template-columns: minmax(0, 1fr) 315px;
    }

    .dashboard-status-kpis {
        grid-template-columns: repeat(4, minmax(125px, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-layout-finance {
        grid-template-columns: 1fr;
    }

    .dashboard-layout-finance .dashboard-right-column {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-layout-finance .finance-overview-widget {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
        column-gap: 28px;
        align-items: center;
    }

    .dashboard-layout-finance .finance-overview-heading {
        grid-column: 1 / -1;
    }

    .dashboard-layout-finance .finance-donut-wrap {
        grid-column: 1;
        grid-row: 2 / span 2;
    }

    .dashboard-layout-finance .finance-overview-totals,
    .dashboard-layout-finance .finance-overview-strips {
        grid-column: 2;
    }
}

@media (max-width: 920px) {
    .dashboard-status-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-layout-finance .dashboard-right-column {
        grid-template-columns: 1fr;
    }

    .dashboard-layout-finance .finance-overview-widget {
        grid-column: auto;
        display: block;
    }
}

@media (max-width: 520px) {
    .finance-donut {
        width: 158px;
    }

    .finance-donut-hole {
        width: 114px;
        height: 114px;
    }

    .finance-donut::after {
        width: 19px;
        height: 19px;
        right: 7px;
        top: 82px;
    }

    .finance-overview-totals {
        gap: 8px;
    }

    .finance-overview-totals strong {
        font-size: 11px;
    }
}


/* =========================================================
   МариКаркас v1.1
   ========================================================= */

/* Карточка объекта: в шапке только управление, финансы остаются в "Обзоре". */
.project-header-card {
    align-items: center;
}

.project-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    min-width: 170px;
}

.project-header-actions .inline-action-form {
    display: flex;
    justify-content: flex-end;
}

/* Автоматические транши 35/35/30. */
.automatic-tranche-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.automatic-tranche-card {
    position: relative;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.automatic-tranche-card > span,
.automatic-tranche-card > strong {
    display: block;
}

.automatic-tranche-card > span {
    color: var(--muted);
    font-size: 10px;
}

.automatic-tranche-card > strong {
    margin-top: 8px;
    font-size: 18px;
    letter-spacing: -.035em;
}

.automatic-tranche-percent {
    width: fit-content;
    margin-bottom: 18px;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.automatic-tranche-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.automatic-tranche-total span {
    color: var(--muted);
    font-size: 11px;
}

.automatic-tranche-total strong {
    font-size: 20px;
    letter-spacing: -.035em;
}

/* Photo upload preview. */
.photo-upload-simple {
    gap: 12px;
}

.upload-options-simple {
    justify-content: flex-end;
}

.photo-selection-preview {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafbfe;
}

.photo-selection-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.photo-selection-head strong {
    font-size: 12px;
}

.photo-selection-head span {
    color: var(--muted);
    font-size: 10px;
}

.photo-selection-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.photo-selection-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    background: #fff;
}

.photo-selection-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    background: #eef1f5;
}

.photo-selection-item > div {
    min-width: 0;
    padding: 8px;
}

.photo-selection-item strong,
.photo-selection-item span {
    display: block;
}

.photo-selection-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
}

.photo-selection-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

/* Простая галерея. */
.photo-gallery-card {
    position: relative;
}

.photo-image-link {
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    background: #eef1f5;
}

.photo-cover-badge {
    position: absolute;
    left: 9px;
    top: 9px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .82);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.photo-card-body-simple {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 10px 11px;
}

.photo-card-info {
    min-width: 0;
}

.photo-card-info strong,
.photo-card-info small {
    display: block;
}

.photo-card-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    font-size: 10px;
}

.photo-card-info small {
    color: var(--muted);
    font-size: 8px;
}

.photo-admin-settings {
    position: relative;
    flex: 0 0 auto;
}

.photo-settings-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: #6c778d;
    cursor: pointer;
}

.photo-settings-button:hover {
    color: var(--primary);
    border-color: #d9def6;
    background: #fafbff;
}

.photo-settings-button svg {
    width: 17px;
    height: 17px;
}

.photo-settings-panel {
    position: absolute;
    right: 0;
    bottom: 42px;
    z-index: 20;
    width: 245px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(28, 38, 70, .16);
}

.photo-settings-panel form + form {
    margin-top: 8px;
}

.photo-settings-panel .field {
    margin-bottom: 8px;
}

.photo-settings-panel .field input {
    min-height: 38px;
}

.photo-settings-action {
    width: 100%;
    min-height: 38px;
    font-size: 10px;
}

.danger-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #ffd3d3;
    border-radius: 10px;
    background: #fff8f8;
    color: #d33737;
    font-weight: 700;
    cursor: pointer;
}

/* Lightbox. */
.photo-lightbox[hidden] {
    display: none !important;
}

.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 22px;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 14, 25, .88);
    backdrop-filter: blur(9px);
}

.photo-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, 94vw);
    height: min(820px, 90vh);
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 60px;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .36);
}

.photo-lightbox-stage {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 18px 0;
}

.photo-lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.photo-lightbox-close {
    position: absolute;
    right: 14px;
    top: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

.photo-lightbox-nav {
    align-self: center;
    width: 44px;
    height: 64px;
    justify-self: center;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 38px;
    cursor: pointer;
}

.photo-lightbox-prev {
    grid-column: 1;
    grid-row: 1;
}

.photo-lightbox-next {
    grid-column: 3;
    grid-row: 1;
}

.photo-lightbox-footer {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.photo-lightbox-footer strong,
.photo-lightbox-footer span {
    display: block;
}

.photo-lightbox-footer strong {
    font-size: 12px;
}

.photo-lightbox-footer span {
    margin-top: 4px;
    color: rgba(255, 255, 255, .64);
    font-size: 9px;
}

.photo-lightbox-footer b {
    white-space: nowrap;
    color: rgba(255, 255, 255, .75);
    font-size: 10px;
}

.photo-lightbox-open {
    overflow: hidden;
}

/* Нагрузка по ответственным. */
.manager-workload-card {
    padding: 18px;
}

.manager-workload-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
}

.manager-workload-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 11px 0;
    border-bottom: 1px solid #eef0f4;
}

.manager-workload-avatar {
    width: 40px;
    height: 40px;
}

.manager-workload-main {
    min-width: 0;
}

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

.manager-workload-head strong,
.manager-workload-head span {
    display: block;
}

.manager-workload-head strong {
    font-size: 11px;
}

.manager-workload-head span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.manager-workload-head > b {
    white-space: nowrap;
    font-size: 10px;
}

.manager-workload-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 8px;
}

.manager-workload-meta b {
    color: #465168;
}

@media (max-width: 980px) {
    .photo-selection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .manager-workload-list {
        grid-template-columns: 1fr;
    }

    .project-header-actions {
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .automatic-tranche-grid {
        grid-template-columns: 1fr;
    }

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

    .photo-lightbox {
        padding: 8px;
    }

    .photo-lightbox-dialog {
        width: 100%;
        height: 86vh;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        border-radius: 12px;
    }

    .photo-lightbox-nav {
        width: 34px;
        height: 52px;
        font-size: 29px;
    }

    .photo-lightbox-footer {
        padding: 10px 12px;
    }

    .project-header-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        min-width: 0;
    }
}

@media (max-width: 460px) {
    .photo-selection-grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo-settings-panel {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 14px;
        width: auto;
    }

    .manager-workload-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}


/* v1.1.1 — дата начала стройки */
.field-hint {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.field-note {
    min-height: 75px;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.field-note > span {
    display: block;
    margin-bottom: 6px;
    color: #4f5a70;
    font-size: 11px;
    font-weight: 680;
}

.field-note p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}


/* =========================================================
   v1.1.2 — фотогалерея
   ========================================================= */

/* Фото отображаются как masonry, сохраняя естественные пропорции. */
.photo-gallery-grid {
    display: block !important;
    column-count: 3;
    column-gap: 12px;
}

.photo-gallery-card {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 0 0 12px;
    break-inside: avoid;
    overflow: visible;
    border-radius: 14px;
    background: transparent;
    border: 0;
}

.photo-gallery-card .photo-image-link {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #eef1f5;
}

.photo-gallery-card .photo-image-link img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    display: block;
    object-fit: contain;
    transition: transform .18s ease;
}

.photo-gallery-card .photo-image-link:hover img {
    transform: scale(1.015);
}

.photo-admin-settings-overlay {
    position: absolute;
    right: 9px;
    top: 9px;
    z-index: 6;
}

.photo-admin-settings-overlay .photo-settings-button {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 14px rgba(20, 28, 50, .12);
    backdrop-filter: blur(8px);
}

.photo-admin-settings-overlay .photo-settings-panel {
    right: 0;
    top: 42px;
    bottom: auto;
}

.photo-settings-meta {
    display: grid;
    gap: 7px;
    margin-bottom: 11px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.photo-settings-meta > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.photo-settings-meta span,
.photo-settings-meta strong {
    font-size: 9px;
}

.photo-settings-meta span {
    color: var(--muted);
}

.photo-settings-meta strong {
    max-width: 145px;
    text-align: right;
    color: #404b60;
    line-height: 1.35;
}

.photo-lightbox-footer-minimal {
    justify-content: center;
    min-height: 46px;
    padding: 8px 14px;
}

.photo-lightbox-footer-minimal b {
    color: rgba(255, 255, 255, .72);
}

/* На узких экранах число колонок уменьшается. */
@media (max-width: 1180px) {
    .photo-gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .photo-gallery-grid {
        column-count: 1;
    }

    .photo-gallery-card {
        margin-bottom: 10px;
    }
}


/* =========================================================
   v1.1.3 — фотогалерея в стиле портфолио / Pinterest
   ========================================================= */

/* Галерея: 4 независимые вертикальные колонки, как в референсе. */
.photo-gallery-grid {
    display: block !important;
    column-count: 4 !important;
    column-gap: 10px !important;
    width: 100%;
    margin-top: 6px;
}

.photo-gallery-card {
    position: relative;
    display: inline-block !important;
    width: 100%;
    margin: 0 0 10px !important;
    padding: 0;
    break-inside: avoid;
    page-break-inside: avoid;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

.photo-gallery-card .photo-image-link {
    display: block;
    width: 100%;
    height: auto !important;
    padding: 0;
    overflow: hidden;
    border: 0 !important;
    border-radius: 0 !important;
    background: #f3f3f3;
    cursor: zoom-in;
}

.photo-gallery-card .photo-image-link img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* Никаких карточек/подложек под фото — только сами изображения. */
.photo-gallery-card .photo-card-body,
.photo-gallery-card .photo-card-body-simple {
    display: none !important;
}

/* Шестерёнка администратора поверх фотографии. */
.photo-admin-settings-overlay {
    position: absolute;
    right: 7px;
    top: 7px;
    z-index: 10;
}

.photo-admin-settings-overlay .photo-settings-button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #2f394c;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .16);
    backdrop-filter: blur(8px);
}

.photo-admin-settings-overlay .photo-settings-button svg {
    width: 16px;
    height: 16px;
}

/* Метка обложки остаётся минимальной. */
.photo-gallery-card .photo-cover-badge {
    left: 7px;
    top: 7px;
    padding: 4px 7px;
    border-radius: 4px;
    background: rgba(17, 24, 39, .72);
    font-size: 7px;
}

/* На среднем экране — 3 колонки. */
@media (max-width: 1280px) {
    .photo-gallery-grid {
        column-count: 3 !important;
    }
}

/* Планшет — 2 колонки. */
@media (max-width: 860px) {
    .photo-gallery-grid {
        column-count: 2 !important;
        column-gap: 8px !important;
    }

    .photo-gallery-card {
        margin-bottom: 8px !important;
    }
}

/* Телефон — одна колонка. */
@media (max-width: 520px) {
    .photo-gallery-grid {
        column-count: 1 !important;
    }
}


/* =========================================================
   v1.1.4 — простой просмотр фото + сортировка галереи
   ========================================================= */

/* Полноэкранный просмотр: только фон, фото, стрелки и крестик. */
.photo-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000;
    display: block !important;
    padding: 0 !important;
    background: #f7f7f5;
}

.photo-lightbox[hidden] {
    display: none !important;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: #f7f7f5 !important;
    backdrop-filter: none !important;
}

.photo-lightbox-stage {
    position: absolute !important;
    inset: 28px 110px !important;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 0 !important;
    pointer-events: none;
}

.photo-lightbox-stage img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: contain !important;
    object-position: center center;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.photo-lightbox-close {
    position: absolute !important;
    right: 28px !important;
    top: 24px !important;
    z-index: 5;
    width: 44px !important;
    height: 44px !important;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #171717 !important;
    font-size: 35px !important;
    font-weight: 200;
    line-height: 1;
    box-shadow: none !important;
    cursor: pointer;
}

.photo-lightbox-nav {
    position: absolute !important;
    top: 50% !important;
    z-index: 5;
    width: 54px !important;
    height: 74px !important;
    padding: 0;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #181818 !important;
    font-size: 48px !important;
    font-weight: 200;
    line-height: 1;
    box-shadow: none !important;
    cursor: pointer;
}

.photo-lightbox-prev {
    left: 22px !important;
}

.photo-lightbox-next {
    right: 22px !important;
}

.photo-lightbox-nav:hover,
.photo-lightbox-close:hover {
    opacity: .55;
}

/* Старые элементы карточного lightbox не участвуют в раскладке. */
.photo-lightbox-dialog,
.photo-lightbox-footer,
.photo-lightbox-footer-minimal {
    display: contents !important;
}

/* Drag & drop сортировка. */
.gallery-sort-hint {
    align-self: center;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.gallery-sort-hint[data-state="saving"] {
    color: #6b7280;
}

.gallery-sort-hint[data-state="saved"] {
    color: #188f48;
}

.gallery-sort-hint[data-state="error"] {
    color: #d33737;
}

.photo-gallery-card[draggable="true"] {
    cursor: grab;
}

.photo-gallery-card[draggable="true"]:active {
    cursor: grabbing;
}

.photo-gallery-card.is-dragging {
    opacity: .35;
}

.photo-drag-handle {
    position: absolute;
    left: 7px;
    top: 7px;
    z-index: 9;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: #30394a;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .14);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -3px;
    user-select: none;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.photo-gallery-card.is-cover .photo-drag-handle + .photo-image-link .photo-cover-badge {
    left: 43px;
}

@media (max-width: 700px) {
    .photo-lightbox-stage {
        inset: 58px 14px 26px !important;
    }

    .photo-lightbox-close {
        right: 12px !important;
        top: 8px !important;
    }

    .photo-lightbox-nav {
        width: 42px !important;
        height: 58px !important;
        font-size: 39px !important;
        background: rgba(255, 255, 255, .74) !important;
    }

    .photo-lightbox-prev {
        left: 2px !important;
    }

    .photo-lightbox-next {
        right: 2px !important;
    }

    .gallery-sort-hint {
        white-space: normal;
        text-align: right;
    }
}


/* =========================================================
   v1.1.5 — публичный ID объекта и новая шапка
   ========================================================= */

.project-header-card-v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 24px;
}

.project-header-identity {
    margin-top: 10px;
}

.project-header-identity h2 {
    display: inline;
    margin: 0;
    font-size: 27px;
    letter-spacing: -.04em;
}

.project-public-id {
    display: inline-flex;
    vertical-align: middle;
    align-items: center;
    min-height: 24px;
    margin-left: 10px;
    padding: 0 8px;
    border-radius: 7px;
    background: #f2f4f8;
    color: #6f798d;
    font-size: 9px;
    font-weight: 750;
}

.project-header-identity p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.project-header-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-header-card-v2 .project-header-actions {
    min-width: 150px;
}

/* В галерее шестерёнка и маркер перемещения появляются только при hover. */
.photo-gallery-card .photo-drag-handle,
.photo-gallery-card .photo-admin-settings-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .14s ease, visibility .14s ease;
}

.photo-gallery-card:hover .photo-drag-handle,
.photo-gallery-card:hover .photo-admin-settings-overlay,
.photo-gallery-card:focus-within .photo-drag-handle,
.photo-gallery-card:focus-within .photo-admin-settings-overlay {
    opacity: 1;
    visibility: visible;
}

.photo-gallery-card:hover .photo-admin-settings-overlay,
.photo-gallery-card:focus-within .photo-admin-settings-overlay {
    pointer-events: auto;
}

.photo-gallery-card[draggable="true"] {
    cursor: default;
}

.photo-gallery-card[draggable="true"]:hover {
    cursor: grab;
}

.photo-gallery-card[draggable="true"]:active {
    cursor: grabbing;
}

@media (hover: none) {
    .photo-gallery-card .photo-drag-handle,
    .photo-gallery-card .photo-admin-settings-overlay {
        opacity: 1;
        visibility: visible;
    }

    .photo-gallery-card .photo-admin-settings-overlay {
        pointer-events: auto;
    }
}

@media (max-width: 900px) {
    .project-header-card-v2 {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .project-header-card-v2 .project-header-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
    }
}

@media (max-width: 620px) {
    .project-header-card-v2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-header-status {
        justify-content: flex-start;
    }

    .project-header-card-v2 .project-header-actions {
        grid-column: auto;
    }

    .project-header-identity h2 {
        font-size: 22px;
    }
}


/* v1.1.6 — редактируемый публичный ID */
.field input[name="public_id"] {
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
    font-weight: 750;
}

.field-note b {
    color: #3f4b62;
}


/* =========================================================
   v1.1.7 — исправление порядка и загрузки фотогалереи
   ========================================================= */

/*
 * CSS columns балансируют фотографии по высоте и при добавлении
 * новых файлов могут перераспределять ВСЮ галерею.
 * Grid сохраняет реальный порядок DOM / sort_order.
 */
.photo-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: 8px !important;
    grid-auto-flow: row !important;
    gap: 10px !important;
    column-count: initial !important;
    column-gap: normal !important;
    align-items: start;
}

.photo-gallery-card {
    display: block !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
    align-self: start;
}

.photo-gallery-card .photo-image-link {
    width: 100%;
    min-height: 80px;
    background: #f4f5f7;
}

.photo-gallery-card .photo-image-link img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
}

.photo-gallery-card.photo-load-failed .photo-image-link {
    min-height: 120px;
    display: grid;
    place-items: center;
}

.photo-gallery-card.photo-load-failed .photo-image-link::after {
    content: "Не удалось загрузить фото";
    color: #8a93a4;
    font-size: 10px;
}

.photo-gallery-card.photo-load-failed .photo-image-link img {
    display: none;
}

.photo-gallery-card.is-dragging {
    opacity: .35;
}

@media (max-width: 1280px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 860px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}

@media (max-width: 520px) {
    .photo-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   v1.1.8 — стабильная загрузка + строгий порядок галереи
   ========================================================= */

/*
 * ВАЖНО:
 * убираем masonry row-span. Он красивый, но визуально может поставить
 * более поздний снимок выше в свободное место.
 *
 * Теперь порядок строгий:
 * слева направо -> следующая строка -> ниже.
 * Пропорции фотографий при этом остаются натуральными.
 */
.photo-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
    align-items: start !important;
    gap: 10px !important;
    column-count: initial !important;
}

.photo-gallery-card {
    grid-row-end: auto !important;
    align-self: start !important;
    margin: 0 !important;
}

.photo-gallery-card .photo-image-link {
    min-height: 0 !important;
}

.photo-gallery-card .photo-image-link img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

/* Прогресс массовой загрузки */
.photo-upload-progress {
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fafbfe;
}

.photo-upload-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.photo-upload-progress-head strong {
    font-size: 10px;
}

.photo-upload-progress-head span {
    color: var(--muted);
    font-size: 9px;
}

.photo-upload-progress-bar {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf4;
}

.photo-upload-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--primary);
    transition: width .18s ease;
}

.photo-selection-more {
    min-height: 90px;
    display: grid;
    place-items: center;
    padding: 10px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 1280px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 860px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .photo-gallery-grid {
        grid-template-columns: 1fr !important;
    }
}


/* v1.1.9 — массовое удаление фотографий */
.photo-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.photo-heading-actions form {
    margin: 0;
}

.photo-delete-all-button {
    min-height: 36px;
    padding: 0 12px;
    white-space: nowrap;
    font-size: 9px;
}

@media (max-width: 720px) {
    .photo-heading-actions {
        width: 100%;
        justify-content: flex-start;
    }
}


/* =========================================================
   v1.2.0 — layout, objects, profile, documents, dashboard
   ========================================================= */

/* Убираем глобальную верхнюю шапку. */
.app-shell-no-topbar .main-content {
    min-width: 0;
}

.page-body-no-topbar {
    padding-top: 24px;
}

.mobile-menu-floating {
    display: none;
}

/* Пользователь рядом с выходом. */
.sidebar-account-footer {
    margin: 0 18px 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 5px;
    color: inherit;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar img,
.sidebar-user-avatar img,
.profile-avatar img,
.object-manager-avatar img,
.manager-workload-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.sidebar-user-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.sidebar-user-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.sidebar-user-copy small {
    color: var(--muted);
    font-size: 8px;
}

.sidebar-logout-form {
    margin: 4px 0 0;
}

.sidebar-logout-button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 6px;
    border: 0;
    background: transparent;
    color: #667188;
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
}

.sidebar-logout-button:hover {
    color: #d53b3b;
}

.sidebar-logout-button svg {
    width: 17px;
    height: 17px;
}

/* Profile */
.profile-page {
    max-width: 720px;
}

.profile-card {
    padding: 24px;
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.profile-avatar {
    width: 78px;
    height: 78px;
    overflow: hidden;
    font-size: 22px;
}

.profile-main h1 {
    margin: 0;
    font-size: 24px;
}

.profile-main p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.profile-avatar-form {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-bottom: 12px;
}

.profile-avatar-form .field {
    flex: 1;
}

/* Объекты — заголовок/поиск/кнопка только здесь. */
.objects-page {
    display: grid;
    gap: 16px;
}

.objects-page-header {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(300px, 430px) auto;
    align-items: center;
    gap: 16px;
}

.objects-page-header h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.045em;
}

.objects-header-search {
    min-height: 46px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.objects-header-search input {
    min-width: 0;
    flex: 1;
    height: 44px;
    padding: 0 13px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 11px;
}

.objects-header-search button {
    width: 45px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #748096;
    cursor: pointer;
}

.objects-header-search svg {
    width: 18px;
    height: 18px;
}

.objects-workspace {
    min-width: 0;
}

.objects-tabs {
    margin-bottom: 13px;
    border-bottom: 1px solid var(--border);
}

.object-filters-compact {
    margin-bottom: 16px;
}

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

.object-showcase-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    color: inherit;
    box-shadow: 0 6px 24px rgba(32, 43, 76, .035);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.object-showcase-card:hover {
    transform: translateY(-2px);
    border-color: #d9def0;
    box-shadow: 0 14px 38px rgba(32, 43, 76, .08);
}

.object-showcase-cover {
    width: 100%;
    aspect-ratio: 1.85 / 1;
    overflow: hidden;
    background: #f2f4f7;
}

.object-showcase-cover > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.object-cover-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.object-cover-placeholder img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    opacity: .55;
}

.object-showcase-body {
    padding: 15px 17px 16px;
}

.object-showcase-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.object-showcase-title > div > span {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.object-showcase-title h2 {
    margin: 4px 0 0;
    font-size: 18px;
    letter-spacing: -.035em;
}

.object-card-dots {
    color: #667087;
    font-weight: 800;
    letter-spacing: 1px;
}

.object-showcase-details {
    display: grid;
    gap: 8px;
    margin: 0;
}

.object-showcase-details > div {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.object-showcase-details dt,
.object-showcase-details dd {
    margin: 0;
}

.object-showcase-details dt {
    color: var(--muted);
    font-size: 9px;
}

.object-showcase-details dd {
    font-size: 10px;
    font-weight: 650;
}

.object-showcase-manager {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid #eef0f4;
}

.object-showcase-manager > span {
    color: var(--muted);
    font-size: 9px;
}

.object-showcase-manager > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.object-manager-avatar {
    width: 26px;
    height: 26px;
    font-size: 8px;
}

.object-showcase-manager strong {
    font-size: 10px;
}

/* ID объекта на одной строке и тем же шрифтом, что название. */
.project-header-identity h2 .project-id-inline {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
}

.project-public-id {
    display: none !important;
}

/* Документы */
.documents-section {
    padding: 18px;
}

.document-upload-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.document-upload-zone {
    position: relative;
    min-width: 0;
    flex: 1;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px dashed #cfd5e2;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
}

.document-upload-zone > svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.document-upload-zone strong,
.document-upload-zone span {
    display: block;
}

.document-upload-zone strong {
    font-size: 11px;
}

.document-upload-zone span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.document-upload-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.documents-list {
    display: grid;
}

.document-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f4;
}

.document-extension {
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
}

.document-main {
    min-width: 0;
}

.document-main strong,
.document-main span {
    display: block;
}

.document-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.document-main span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
}

.document-download {
    min-height: 38px;
    font-size: 9px;
}

.document-delete-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #ffd6d6;
    border-radius: 9px;
    background: #fff9f9;
    color: #d43c3c;
    cursor: pointer;
}

.document-delete-button svg {
    width: 15px;
    height: 15px;
}

/* Dashboard: no legacy object number */
.dashboard-project-id {
    color: #7f899d;
    font-size: .78em;
    font-weight: 650;
}

/* Более информативные ответственные */
.manager-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.manager-summary-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #edf0f5;
    border-radius: 13px;
    background: #fff;
}

.manager-summary-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.manager-summary-person {
    min-width: 0;
}

.manager-summary-person strong,
.manager-summary-person span {
    display: block;
}

.manager-summary-person strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.manager-summary-person span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.manager-summary-total {
    text-align: right;
}

.manager-summary-total strong,
.manager-summary-total span {
    display: block;
}

.manager-summary-total strong {
    font-size: 20px;
    letter-spacing: -.04em;
}

.manager-summary-total span {
    color: var(--muted);
    font-size: 8px;
}

.manager-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}

.manager-summary-stats > div {
    padding: 8px;
    border-radius: 9px;
    background: #f7f8fb;
}

.manager-summary-stats span,
.manager-summary-stats strong {
    display: block;
}

.manager-summary-stats span {
    color: var(--muted);
    font-size: 7px;
}

.manager-summary-stats strong {
    margin-top: 4px;
    font-size: 13px;
}

.manager-summary-footer {
    margin-top: 11px;
}

.manager-summary-footer > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.manager-summary-footer span {
    color: var(--muted);
    font-size: 8px;
}

.manager-summary-footer strong {
    font-size: 10px;
}

/* Mobile: KPI -> Finance -> Upcoming payments -> rest */
@media (max-width: 920px) {
    .mobile-menu-floating {
        position: fixed;
        left: 12px;
        top: 12px;
        z-index: 80;
        display: flex;
        background: rgba(255,255,255,.94);
        box-shadow: 0 5px 18px rgba(25,35,65,.12);
        backdrop-filter: blur(8px);
    }

    .page-body-no-topbar {
        padding-top: 58px;
    }

    .dashboard-layout-finance {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-layout-finance .dashboard-main-column,
    .dashboard-layout-finance .dashboard-right-column {
        display: contents;
    }

    .dashboard-mobile-order-status { order: 1; }
    .dashboard-mobile-order-finance { order: 2; }
    .dashboard-mobile-order-payments { order: 3; }
    .dashboard-mobile-order-charts { order: 4; }
    .manager-workload-card-v2 { order: 5; }
    .dashboard-mobile-order-recent { order: 6; }

    .dashboard-right-column > .side-widget:not(.dashboard-mobile-order-payments) {
        order: 7;
    }

    .objects-page-header {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .objects-header-search {
        order: 2;
    }

    .objects-add-button {
        order: 3;
        justify-self: start;
    }

    .objects-showcase-grid,
    .manager-summary-grid {
        grid-template-columns: 1fr;
    }

    .profile-avatar-form,
    .document-upload-form {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .objects-showcase-grid {
        gap: 12px;
    }

    .object-showcase-details > div,
    .object-showcase-manager {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .document-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    .document-download span {
        display: none;
    }

    .document-row > form {
        grid-column: 3;
    }

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


/* =========================================================
   v1.2.1
   ========================================================= */

/* Бургер гарантированно виден поверх контента. */
@media (max-width: 920px) {
    .mobile-menu-button.mobile-menu-floating {
        position: fixed !important;
        left: 12px !important;
        top: 12px !important;
        z-index: 9999 !important;
        width: 42px !important;
        height: 42px !important;
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        place-items: center;
        align-content: center;
        gap: 4px;
        border: 1px solid #dfe3eb !important;
        border-radius: 11px !important;
        background: rgba(255,255,255,.98) !important;
        box-shadow: 0 7px 24px rgba(30,40,65,.16) !important;
    }

    .mobile-menu-button.mobile-menu-floating span {
        width: 18px !important;
        height: 2px !important;
        background: #243047 !important;
    }
}

/* Объекты: без отдельной шапки, карточки примерно вдвое компактнее. */
.objects-page-compact {
    gap: 10px;
}

.objects-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.objects-tabs-compact {
    min-width: 0;
    flex: 1;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.objects-inline-add {
    min-height: 34px;
    margin-left: 5px;
    padding: 0 11px;
    font-size: 14px;
    border-radius: 9px;
}

.objects-inline-add svg {
    width: 15px;
    height: 15px;
}

.objects-filter-toggle {
    display: none;
}

.object-filters-collapsible {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(120px, .75fr)) auto auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.objects-filter-search {
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
}

.objects-filter-search svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: #7b8598;
}

.objects-filter-search input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.objects-showcase-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.object-showcase-card {
    border-radius: 12px !important;
}

.object-showcase-cover {
    aspect-ratio: 1.72 / 1 !important;
}

.object-showcase-body {
    padding: 10px 11px 11px !important;
}

.object-showcase-title {
    margin-bottom: 9px !important;
}

.object-showcase-title h2 {
    margin-top: 2px !important;
    font-size: 13px !important;
}

.object-showcase-title > div > span {
    font-size: 7px !important;
}

.object-showcase-details {
    gap: 5px !important;
}

.object-showcase-details > div {
    grid-template-columns: 86px minmax(0, 1fr) !important;
    gap: 7px !important;
}

.object-showcase-details dt {
    font-size: 7px !important;
}

.object-showcase-details dd {
    font-size: 8px !important;
}

.object-showcase-details .status-pill {
    min-height: 22px;
    padding: 0 7px;
    font-size: 7px;
}

.object-showcase-manager {
    grid-template-columns: 86px minmax(0, 1fr) !important;
    margin-top: 7px !important;
    padding-top: 7px !important;
}

.object-showcase-manager > span {
    font-size: 7px !important;
}

.object-manager-avatar {
    width: 22px !important;
    height: 22px !important;
    font-size: 7px !important;
}

.object-showcase-manager strong {
    font-size: 8px !important;
}

@media (max-width: 1400px) {
    .objects-showcase-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .object-filters-collapsible {
        grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(130px, .8fr)) auto auto;
    }

    .object-filters-collapsible select:nth-of-type(3),
    .object-filters-collapsible select:nth-of-type(4) {
        grid-row: 2;
    }
}

@media (max-width: 980px) {
    .objects-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 720px) {
    .page-body.page-body-no-topbar {
        padding: 62px 10px 24px !important;
    }

    .objects-page-compact {
        gap: 7px;
    }

    .objects-topline {
        display: block;
        margin-bottom: 7px;
    }

    .objects-tabs-compact {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 1px;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .objects-tabs-compact::-webkit-scrollbar {
        display: none;
    }

    .objects-tabs-compact .tab-link {
        flex: 0 0 auto;
        min-height: 33px;
        padding: 0 9px;
        white-space: nowrap;
        font-size: 14px;
    }

    .objects-inline-add {
        flex: 0 0 auto;
        min-height: 33px;
        padding: 0 9px;
        white-space: nowrap;
    }

    .objects-filter-toggle {
        width: 100%;
        min-height: 36px;
        display: flex !important;
        justify-content: center;
        margin-top: 6px;
        font-size: 9px;
    }

    .object-filters-collapsible {
        display: none !important;
        grid-template-columns: 1fr !important;
        gap: 7px;
        padding: 10px;
        margin: 0 0 9px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: #fff;
    }

    .object-filters-collapsible.is-mobile-open {
        display: grid !important;
    }

    .object-filters-collapsible select,
    .object-filters-collapsible .secondary-button,
    .objects-filter-search {
        width: 100%;
        grid-row: auto !important;
    }

    .objects-showcase-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .object-showcase-body {
        padding: 8px !important;
    }

    .object-showcase-details > div,
    .object-showcase-manager {
        display: block !important;
    }

    .object-showcase-details dt,
    .object-showcase-manager > span {
        margin-bottom: 2px;
    }
}

@media (max-width: 470px) {
    .objects-showcase-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Дашборд: блок ответственных без наложений, видят все. */
.manager-workload-card-v3 {
    position: static !important;
    z-index: auto !important;
    overflow: hidden;
}

.manager-workload-card-v3 .manager-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.manager-workload-card-v3 .manager-summary-card {
    min-height: 0;
    box-shadow: none;
    background: #fbfcfe;
}

@media (max-width: 1280px) {
    .manager-workload-card-v3 .manager-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .manager-workload-card-v3 .manager-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Карточка объекта: статус после локации, действия в одну строку. */
.project-header-card-v3 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: end !important;
    gap: 18px !important;
}

.project-header-meta-line {
    margin-top: 7px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
}

.project-header-meta-line i {
    font-style: normal;
    color: #b1b7c3;
}

.project-status-inline {
    min-height: 23px !important;
    padding: 0 8px !important;
    font-size: 8px !important;
}

.project-header-actions-inline {
    min-width: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

.project-header-text-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #536079;
    font: inherit;
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.project-header-text-action svg {
    width: 14px;
    height: 14px;
}

.project-header-text-action:hover {
    color: var(--primary);
}

.project-header-archive-action {
    color: #c84646;
}

@media (max-width: 700px) {
    .project-header-card-v3 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .project-header-actions-inline {
        justify-content: flex-start !important;
    }

    .project-header-identity h2 {
        font-size: 20px !important;
    }
}

/* Два типа фотографий. */
.photos-section-v2 {
    padding: 18px;
}

.photo-groups-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.photo-group-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.photo-group-tab {
    min-height: 40px;
    padding: 0 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #778196;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.photo-group-tab b {
    margin-left: 4px;
    color: #a1a8b6;
}

.photo-group-tab.is-active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.photo-delete-all-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #cf4545;
    font-size: 9px;
    cursor: pointer;
}

.photo-group-panel[hidden] {
    display: none !important;
}

.photo-upload-group-form {
    margin-bottom: 14px;
}

.photo-group-upload-zone {
    min-height: 72px;
    flex-direction: row !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

.photo-group-upload-zone > div {
    display: grid;
    gap: 4px;
}

.photo-group-empty {
    min-height: 180px;
}

@media (max-width: 620px) {
    .photos-section-v2 {
        padding: 12px;
    }

    .photo-groups-head {
        align-items: flex-start;
        flex-direction: column;
        padding-bottom: 8px;
    }

    .photo-group-tabs {
        width: 100%;
        overflow-x: auto;
    }

    .photo-group-tab {
        flex: 0 0 auto;
        font-size: 9px;
    }
}

/* Настройки прав ролей. */
.role-permissions-head {
    margin-bottom: 14px;
}

.role-permissions-head h1 {
    margin: 10px 0 0;
    font-size: 26px;
}

.role-permissions-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 10px;
}

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

.role-permission-card {
    padding: 16px;
}

.permission-switch-list {
    display: grid;
    margin: 4px 0 14px;
}

.permission-switch-row {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef0f4;
    font-size: 9px;
}

.toggle-switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 auto;
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch i {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d9dee8;
    transition: .16s ease;
}

.toggle-switch i::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(20,30,50,.18);
    transition: .16s ease;
}

.toggle-switch input:checked + i {
    background: var(--primary);
}

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

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

@media (max-width: 980px) {
    .role-permission-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.2.2 — project header, payment table, avatars, readability
   ========================================================= */

/* ---------------------------------------------------------
   project.php header
   Desktop: "Объекты" + заголовок в одной строке.
   Mobile: "Объекты" + действия в первой строке, заголовок ниже.
   --------------------------------------------------------- */
.project-header-card-v4 {
    display: block !important;
    padding: 18px 20px !important;
}

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

.project-back-link {
    margin: 0 !important;
    white-space: nowrap;
}

.project-header-title {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 24px !important;
    line-height: 1.18;
    letter-spacing: -.04em;
}

.project-header-title .project-id-inline {
    font: inherit !important;
    color: inherit !important;
    letter-spacing: inherit !important;
}

.project-header-card-v4 .project-header-actions-inline {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

.project-header-card-v4 .project-header-meta-v4 {
    margin: 9px 0 0;
    padding-left: 91px;
}

@media (max-width: 700px) {
    .project-header-card-v4 {
        padding: 12px !important;
    }

    .project-header-topline {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 9px 10px;
        align-items: center;
    }

    .project-back-link {
        grid-column: 1;
        grid-row: 1;
        font-size: 9px;
    }

    .project-header-card-v4 .project-header-actions-inline {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end !important;
        gap: 9px !important;
    }

    .project-header-card-v4 .project-header-text-action {
        font-size: 8px !important;
        gap: 3px;
    }

    .project-header-card-v4 .project-header-text-action svg {
        width: 12px;
        height: 12px;
    }

    .project-header-title {
        grid-column: 1 / -1;
        grid-row: 2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        font-size: 19px !important;
        line-height: 1.24;
    }

    .project-header-card-v4 .project-header-meta-v4 {
        margin-top: 7px;
        padding-left: 0;
        gap: 5px;
        font-size: 9px;
    }
}

/* ---------------------------------------------------------
   Оплата: больше не растягиваем таблицу на 880px.
   --------------------------------------------------------- */
.installment-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: visible !important;
}

.payment-schedule-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
}

.payment-schedule-table th,
.payment-schedule-table td {
    padding: 9px 7px !important;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.payment-schedule-table th {
    font-size: 8px !important;
}

.payment-schedule-table td {
    font-size: 9px !important;
}

.payment-schedule-table td strong {
    font-size: 9px;
}

.payment-schedule-table .payment-col-stage {
    width: 21%;
}

.payment-schedule-table .payment-col-date {
    width: 12%;
}

.payment-schedule-table .payment-col-money {
    width: 14%;
}

.payment-schedule-table .payment-col-status {
    width: 12%;
}

.payment-schedule-table .payment-col-action {
    width: 68px;
}

.payment-schedule-table .schedule-status {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    margin-top: 0 !important;
    padding: 0 7px;
    white-space: nowrap;
    font-size: 7px !important;
}

.payment-schedule-table .mini-action {
    min-height: 27px;
    padding: 0 7px;
    font-size: 7px;
}

/* На телефоне каждая строка графика превращается в компактную карточку. */
@media (max-width: 700px) {
    .payment-schedule-table {
        display: block;
    }

    .payment-schedule-table thead {
        display: none;
    }

    .payment-schedule-table tbody,
    .payment-schedule-table tr {
        display: block;
        width: 100%;
    }

    .payment-schedule-table tr {
        margin-bottom: 8px;
        padding: 8px 10px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #fff;
    }

    .payment-schedule-table td {
        width: 100% !important;
        min-height: 28px;
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 8px;
        align-items: center;
        padding: 5px 0 !important;
        border-bottom: 1px solid #f0f2f5;
        text-align: right;
        font-size: 10px !important;
    }

    .payment-schedule-table td:last-child {
        border-bottom: 0;
    }

    .payment-schedule-table td::before {
        content: attr(data-label);
        justify-self: start;
        color: var(--muted);
        text-align: left;
        font-size: 8px;
        font-weight: 650;
    }

    .payment-schedule-table td > * {
        justify-self: end;
    }

    .payment-schedule-table td strong {
        font-size: 10px;
    }
}

/* ---------------------------------------------------------
   Аватар в "Объекты по ответственным": всегда строго круглый.
   --------------------------------------------------------- */
.manager-workload-card-v3 .manager-workload-avatar,
.manager-summary-card .manager-workload-avatar {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    align-self: center !important;
    padding: 0 !important;
}

.manager-workload-card-v3 .manager-workload-avatar img,
.manager-summary-card .manager-workload-avatar img {
    position: static !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
}

/* Читаемость карточки "Объекты по ответственным". */
.manager-workload-card-v3 .manager-summary-head {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
    gap: 12px !important;
}

.manager-workload-card-v3 .manager-summary-card {
    padding: 16px !important;
}

.manager-workload-card-v3 .manager-summary-person strong {
    font-size: 14px !important;
}

.manager-workload-card-v3 .manager-summary-person span {
    margin-top: 4px;
    font-size: 10px !important;
}

.manager-workload-card-v3 .manager-summary-total strong {
    font-size: 25px !important;
}

.manager-workload-card-v3 .manager-summary-total span {
    font-size: 9px !important;
}

.manager-workload-card-v3 .manager-summary-stats span {
    font-size: 9px !important;
}

.manager-workload-card-v3 .manager-summary-stats strong {
    margin-top: 5px;
    font-size: 17px !important;
}

.manager-workload-card-v3 .manager-summary-footer span {
    font-size: 9px !important;
}

.manager-workload-card-v3 .manager-summary-footer strong {
    font-size: 12px !important;
}

/* Немного увеличиваем текст компактных карточек объектов,
   не возвращая их к прежнему большому размеру. */
.object-showcase-title h2 {
    font-size: 14px !important;
}

.object-showcase-title > div > span,
.object-showcase-details dt,
.object-showcase-manager > span {
    font-size: 8px !important;
}

.object-showcase-details dd,
.object-showcase-manager strong {
    font-size: 9px !important;
}


/* =========================================================
   v1.2.3 — dashboard order, activity avatars, typography
   ========================================================= */

/* Фото пользователя в «Последних изменениях». */
.activity-avatar {
    overflow: hidden !important;
    flex: 0 0 auto;
}

.activity-avatar img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
}

/* ---------------------------------------------------------
   Дашборд — более читаемые карточки.
   --------------------------------------------------------- */
.manager-workload-card-v3 .card-heading h2 {
    font-size: 16px !important;
}

.manager-workload-card-v3 .card-heading p {
    font-size: 10.5px !important;
    line-height: 1.45;
}

.manager-workload-card-v3 .manager-summary-card {
    padding: 17px !important;
}

.manager-workload-card-v3 .manager-summary-person strong {
    font-size: 16px !important;
    line-height: 1.25;
}

.manager-workload-card-v3 .manager-summary-person span {
    font-size: 11px !important;
}

.manager-workload-card-v3 .manager-summary-total strong {
    font-size: 28px !important;
}

.manager-workload-card-v3 .manager-summary-total span {
    font-size: 10px !important;
}

.manager-workload-card-v3 .manager-summary-stats {
    gap: 9px !important;
}

.manager-workload-card-v3 .manager-summary-stats > div {
    padding: 10px !important;
}

.manager-workload-card-v3 .manager-summary-stats span {
    font-size: 10px !important;
    line-height: 1.25;
}

.manager-workload-card-v3 .manager-summary-stats strong {
    font-size: 19px !important;
}

.manager-workload-card-v3 .manager-summary-footer span {
    font-size: 14px !important;
}

.manager-workload-card-v3 .manager-summary-footer strong {
    font-size: 14px !important;
}

/* «Последние объекты» — текст больше, сама карточка не увеличивается резко. */
.recent-projects-card .project-card h3 {
    font-size: 16px !important;
    line-height: 1.3;
}

.recent-projects-card .dashboard-project-id {
    font-size: .8em !important;
}

.recent-projects-card .project-location,
.recent-projects-card .project-status-line {
    font-size: 14px !important;
}

.recent-projects-card .project-stats dt,
.recent-projects-card .project-stats dd {
    font-size: 14px !important;
    line-height: 1.35;
}

/* Компактные карточки в разделе «Объекты» остаются маленькими,
   но текст становится заметно легче читать. */
.object-showcase-title h2 {
    font-size: 15px !important;
}

.object-showcase-title > div > span,
.object-showcase-details dt,
.object-showcase-manager > span {
    font-size: 8.5px !important;
}

.object-showcase-details dd,
.object-showcase-manager strong {
    font-size: 10px !important;
    line-height: 1.3;
}

/* ---------------------------------------------------------
   Фото — подпись и кнопка загрузки по центру.
   --------------------------------------------------------- */
.photo-upload-group-form .photo-group-upload-zone {
    min-height: 118px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    text-align: center !important;
}

.photo-upload-group-form .photo-group-upload-zone > div {
    width: 100%;
    display: grid !important;
    justify-items: center;
    gap: 5px !important;
    text-align: center !important;
}

.photo-upload-group-form .photo-group-upload-zone > svg {
    margin: 0 auto;
}

.photo-upload-group-form .photo-group-upload-zone strong,
.photo-upload-group-form .photo-group-upload-zone span {
    text-align: center !important;
}

.photo-upload-group-form .upload-options {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.photo-upload-group-form [data-photo-upload-button] {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------------------------------------------------------
   project.php — клиент, локация и статус крупнее.
   --------------------------------------------------------- */
.project-header-card-v4 .project-header-meta-v4 {
    font-size: 13px !important;
    font-weight: 560;
    line-height: 1.4;
}

.project-header-card-v4 .project-status-inline {
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
}

/* ---------------------------------------------------------
   Мобильный порядок дашборда:
   1. Статусы
   2. Финансы проектов
   3. Ближайшие платежи
   4. Объекты по ответственным
   5. Статистика объектов + По типам проектов
   6. Последние объекты
   7. Последние изменения
   --------------------------------------------------------- */
@media (max-width: 920px) {
    .dashboard-mobile-order-status {
        order: 1 !important;
    }

    .dashboard-mobile-order-finance {
        order: 2 !important;
    }

    .dashboard-mobile-order-payments {
        order: 3 !important;
    }

    .manager-workload-card-v3 {
        order: 4 !important;
    }

    .dashboard-mobile-order-charts {
        order: 5 !important;
    }

    .dashboard-mobile-order-recent {
        order: 6 !important;
    }

    .dashboard-right-column > .side-widget:not(.dashboard-mobile-order-payments) {
        order: 7 !important;
    }

    .manager-workload-card-v3 .manager-summary-person strong {
        font-size: 15px !important;
    }

    .manager-workload-card-v3 .manager-summary-stats span {
        font-size: 10px !important;
    }

    .manager-workload-card-v3 .manager-summary-stats strong {
        font-size: 18px !important;
    }

    .project-header-card-v4 .project-header-meta-v4 {
        font-size: 11px !important;
        line-height: 1.45;
    }

    .project-header-card-v4 .project-status-inline {
        min-height: 26px !important;
        font-size: 10px !important;
    }
}


/* =========================================================
   v1.2.4 — читаемость карточек, вкладок и ответственных
   ========================================================= */

/* Ответственные: больше нет «В обработке», две понятные колонки. */
.manager-workload-card-v3 .manager-summary-stats-two {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.manager-workload-card-v3 .manager-summary-stats-two > div {
    padding: 11px 12px !important;
}

.manager-workload-card-v3 .manager-summary-stats-two span {
    font-size: 11px !important;
}

.manager-workload-card-v3 .manager-summary-stats-two strong {
    font-size: 21px !important;
}

/* ---------------------------------------------------------
   Карточки в разделе «Объекты».
   Карточки остаются компактными, но текст заметно крупнее.
   --------------------------------------------------------- */
.object-showcase-title > div > span {
    font-size: 14px !important;
    line-height: 1.25;
}

.object-showcase-title h2 {
    font-size: 18px !important;
    line-height: 1.25;
}

.object-showcase-details {
    gap: 7px !important;
}

.object-showcase-details > div {
    grid-template-columns: 130px minmax(0, 1fr) !important;
    gap: 8px !important;
}

.object-showcase-details dt {
    font-size: 14px !important;
    line-height: 1.3;
}

.object-showcase-details dd {
    font-size: 14px !important;
    line-height: 1.35;
}

.object-showcase-details .status-pill {
    min-height: 25px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
}

.object-showcase-manager {
    grid-template-columns: 96px minmax(0, 1fr) !important;
}

.object-showcase-manager > span {
    font-size: 12px !important;
}

.object-showcase-manager strong {
    font-size: 12px !important;
    line-height: 1.3;
}

.object-manager-avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: 8px !important;
}

/* ---------------------------------------------------------
   Вкладки карточки объекта: Обзор, Оплата, Фотографии...
   --------------------------------------------------------- */
.project-tabs {
    min-height: 62px !important;
}

.project-tabs a {
    min-height: 62px !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    font-weight: 680 !important;
}

.project-tabs a b {
    min-width: 23px !important;
    height: 23px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
}

@media (max-width: 700px) {
    .object-showcase-title h2 {
        font-size: 18px !important;
    }

    .object-showcase-title > div > span {
        font-size: 14px !important;
    }

    .object-showcase-details dt,
    .object-showcase-manager > span {
        font-size: 14px !important;
    }

    .object-showcase-details dd,
    .object-showcase-manager strong {
        font-size: 14px !important;
    }

    .project-tabs {
        min-height: 52px !important;
        padding: 0 4px !important;
    }

    .project-tabs a {
        min-height: 52px !important;
        padding: 0 11px !important;
        font-size: 12px !important;
    }

    .project-tabs a b {
        min-width: 21px !important;
        height: 21px !important;
        font-size: 9px !important;
    }
}


/* =========================================================
   v1.2.5 — простые оплаты, доп. услуги, крупнее текст вкладок
   ========================================================= */

/* Общая читаемость контента всех вкладок карточки объекта. */
.project-page .content-card {
    font-size: 13px;
}

.project-page .card-heading h2 {
    font-size: 19px !important;
    line-height: 1.25;
}

.project-page .card-heading p,
.project-page .content-card p,
.project-page .empty-compact,
.project-page .compact-empty p {
    font-size: 12px !important;
    line-height: 1.5;
}

.project-page .info-list dt,
.project-page .compact-list span,
.project-page .finance-split span,
.project-page .payment-summary-grid span,
.project-page .document-main span,
.project-page .payments-timeline span,
.project-page .payments-timeline small {
    font-size: 11px !important;
}

.project-page .info-list dd,
.project-page .compact-list b,
.project-page .finance-split strong,
.project-page .payment-summary-grid strong,
.project-page .document-main strong {
    font-size: 13px !important;
    line-height: 1.4;
}

.project-page .project-note > span {
    font-size: 11px !important;
}

.project-page .project-note p {
    font-size: 13px !important;
}

.project-page .photo-group-tab {
    font-size: 13px !important;
}

.project-page .photo-group-upload-zone strong {
    font-size: 14px !important;
}

.project-page .photo-group-upload-zone span {
    font-size: 11px !important;
}

.project-page .comment-item,
.project-page .history-item,
.project-page .document-row {
    font-size: 12px;
}

/* Новый простой раздел оплаты. */
.payment-page-simple {
    align-items: start;
}

.payment-simple-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.payment-summary-grid-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.payment-summary-grid-v2 > div {
    min-height: 82px;
    padding: 13px 14px !important;
}

.payment-summary-grid-v2 span {
    font-size: 11px !important;
}

.payment-summary-grid-v2 strong {
    margin-top: 6px;
    font-size: 18px !important;
}

.payment-progress-wide {
    margin: 12px 0 4px;
}

.extra-services-block {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.subsection-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 11px;
}

.subsection-heading h3 {
    margin: 0;
    font-size: 16px;
}

.subsection-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.subsection-heading > strong {
    font-size: 16px;
    white-space: nowrap;
}

.extra-services-list {
    display: grid;
}

.extra-service-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 13px 0;
    border-bottom: 1px solid #eef0f4;
}

.extra-service-main {
    min-width: 0;
}

.extra-service-main strong,
.extra-service-main span,
.extra-service-main small {
    display: block;
}

.extra-service-main strong {
    font-size: 13px;
}

.extra-service-main span,
.extra-service-main small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.extra-service-amount {
    text-align: right;
}

.extra-service-amount > strong {
    display: block;
    font-size: 14px;
}

.extra-service-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-top: 5px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
}

.extra-service-status.is-paid {
    background: #e9f8ef;
    color: #18884b;
}

.extra-service-status.is-unpaid {
    background: #fff3e8;
    color: #bd651f;
}

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

.extra-service-actions form {
    margin: 0;
}

.extra-service-toggle,
.extra-service-delete {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 9px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}

.extra-service-toggle {
    color: var(--primary);
}

.extra-service-delete {
    color: #cc4444;
}

.finance-total-breakdown {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 7px 0 2px;
    color: var(--muted);
    font-size: 9px;
}

.payment-simple-form-page .payment-entry-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Рассрочка без графика. */
.installment-simple-list {
    display: grid;
}

.installment-simple-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(120px, .8fr)) minmax(120px, .8fr) auto;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid #eef0f4;
    color: inherit;
}

.installment-simple-row > div > span,
.installment-simple-row > div > small {
    display: block;
    color: var(--muted);
    font-size: 9px;
}

.installment-simple-row > div > strong {
    display: block;
    margin-top: 3px;
    font-size: 12px;
}

.installment-simple-row > div:first-child > strong {
    font-size: 14px;
}

.installment-simple-progress .progress {
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .payment-summary-grid-v2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .payment-simple-form-page .payment-entry-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .installment-simple-row {
        grid-template-columns: 1fr 1fr;
        gap: 9px 12px;
        padding: 13px 0;
    }
}

@media (max-width: 700px) {
    .project-page .content-card {
        font-size: 12px;
    }

    .project-page .card-heading h2 {
        font-size: 17px !important;
    }

    .project-page .card-heading p,
    .project-page .content-card p {
        font-size: 11px !important;
    }

    .payment-summary-grid-v2 {
        grid-template-columns: 1fr 1fr !important;
    }

    .payment-summary-grid-v2 strong {
        font-size: 16px !important;
    }

    .extra-service-row {
        grid-template-columns: 1fr auto;
        gap: 9px;
    }

    .extra-service-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .finance-total-breakdown {
        flex-direction: column;
        gap: 2px;
    }

    .installment-simple-row {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.2.6 — вложения доп. услуг, компактная строка оплаты
   ========================================================= */

.payment-heading-block {
    margin-bottom: 14px;
}

.payment-heading-line {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.payment-heading-line h2 {
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 18px !important;
}

.payment-heading-block > p {
    margin: 5px 0 0 !important;
    color: var(--muted);
    font-size: 10px !important;
}

.payment-simple-actions-inline {
    display: flex !important;
    align-items: center;
    gap: 6px !important;
    margin-left: 0;
}

.payment-simple-actions-inline .primary-button,
.payment-simple-actions-inline .secondary-button {
    min-height: 31px !important;
    padding: 0 9px !important;
    border-radius: 8px !important;
    font-size: 8px !important;
    white-space: nowrap;
}

.payment-simple-actions-inline svg {
    width: 13px !important;
    height: 13px !important;
}

/* Поле загрузки файлов в форме дополнительной услуги. */
.extra-service-file-zone {
    position: relative;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px dashed #cfd5e2;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
}

.extra-service-file-zone > svg {
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    color: var(--primary);
}

.extra-service-file-zone > div {
    min-width: 0;
}

.extra-service-file-zone strong,
.extra-service-file-zone span {
    display: block;
}

.extra-service-file-zone strong {
    font-size: 12px;
}

.extra-service-file-zone span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.extra-service-file-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Прикреплённые файлы под дополнительной услугой. */
.extra-service-files {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.extra-service-file {
    max-width: 270px;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border: 1px solid #e3e7ef;
    border-radius: 8px;
    background: #f9fafc;
    color: #46526a;
}

.extra-service-file:hover {
    border-color: #cfd6e6;
    background: #fff;
}

.extra-service-file-ext {
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
}

.extra-service-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 650;
}

.extra-service-file small {
    margin: 0 !important;
    white-space: nowrap;
    font-size: 8px !important;
}

/* Заголовок редактирования без старого OBJ-000... */
.edit-project-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.edit-project-title .project-id-inline {
    font: inherit;
    color: inherit;
}

@media (max-width: 700px) {
    .payment-heading-line {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .payment-simple-actions-inline {
        width: auto;
        flex-wrap: wrap;
    }

    .payment-simple-actions-inline .primary-button,
    .payment-simple-actions-inline .secondary-button {
        min-height: 29px !important;
        padding: 0 8px !important;
        font-size: 7.5px !important;
    }

    .extra-service-file {
        width: 100%;
        max-width: none;
    }
}


/* =========================================================
   v1.3.0 — Смета: план / факт / затраты / графики
   ========================================================= */

.estimate-main-card {
    padding: 22px;
}

.estimate-header-block,
.estimate-card-head,
.estimate-item-head,
.estimate-expense-row,
.estimate-section-row,
.estimate-chart-footer,
.estimate-item-actions,
.estimate-summary-grid,
.estimate-visual-grid,
.estimate-extra-blocks {
    display: flex;
    gap: 16px;
}

.estimate-header-block,
.estimate-card-head,
.estimate-item-head,
.estimate-expense-row,
.estimate-section-row,
.estimate-chart-footer,
.estimate-item-actions {
    align-items: center;
    justify-content: space-between;
}

.estimate-summary-grid,
.estimate-visual-grid,
.estimate-extra-blocks {
    align-items: stretch;
}

.estimate-header-block {
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.estimate-heading h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.estimate-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.estimate-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.estimate-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.estimate-summary-card {
    min-height: 118px;
    padding: 16px 18px;
    border: 1px solid #e8ecf5;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.estimate-summary-card span,
.estimate-summary-card small {
    display: block;
}

.estimate-summary-card span {
    color: var(--muted);
    font-size: 11px;
}

.estimate-summary-card strong {
    display: block;
    margin-top: 10px;
    font-size: 24px;
    line-height: 1.15;
}

.estimate-summary-card small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
}

.estimate-summary-card.is-over {
    background: linear-gradient(180deg, #fff8f8 0%, #fff1f1 100%);
}

.estimate-summary-card.is-save {
    background: linear-gradient(180deg, #f6fff8 0%, #eefbf2 100%);
}

.estimate-summary-card.is-neutral {
    background: linear-gradient(180deg, #fbfcfe 0%, #f3f6fb 100%);
}

.estimate-visual-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    margin-bottom: 18px;
}

.estimate-chart-card,
.estimate-sections-card,
.estimate-table-card,
.estimate-extra-card {
    padding: 18px;
    border: 1px solid #edf0f6;
    border-radius: 18px;
    background: #fff;
}

.estimate-card-head {
    margin-bottom: 14px;
}

.estimate-card-head h3 {
    margin: 0 0 5px;
    font-size: 17px;
}

.estimate-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.estimate-card-head > strong {
    font-size: 20px;
}

.estimate-compare-bars {
    display: grid;
    gap: 12px;
}

.estimate-bar-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.estimate-bar-row > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.estimate-bar-row > strong {
    font-size: 13px;
    white-space: nowrap;
}

.estimate-bar-track,
.estimate-section-track,
.estimate-item-progress {
    position: relative;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: #eef3f7;
}

.estimate-bar,
.estimate-section-progress,
.estimate-item-progress-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
}

.estimate-bar-plan {
    background: linear-gradient(90deg, #698cff 0%, #5375ef 100%);
}

.estimate-bar-fact-ok,
.estimate-section-progress.is-save,
.estimate-item-progress-bar.is-save {
    background: linear-gradient(90deg, #46b67a 0%, #2d9d62 100%);
}

.estimate-bar-fact-over,
.estimate-section-progress.is-over,
.estimate-item-progress-bar.is-over {
    background: linear-gradient(90deg, #f49a4a 0%, #ea6d5c 100%);
}

.estimate-chart-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef0f4;
}

.estimate-chart-footer > div span,
.estimate-help-list span,
.estimate-section-metrics small,
.estimate-item-stats small,
.estimate-expense-copy span,
.estimate-expense-copy small,
.estimate-section-copy span,
.estimate-item-copy span,
.estimate-item-copy small {
    display: block;
    color: var(--muted);
}

.estimate-chart-footer > div span,
.estimate-help-list span,
.estimate-section-metrics small,
.estimate-item-stats small,
.estimate-expense-copy span,
.estimate-expense-copy small,
.estimate-section-copy span,
.estimate-item-copy span {
    font-size: 10px;
}

.estimate-chart-footer > div strong,
.estimate-help-list b {
    font-size: 13px;
}

.estimate-sections-list,
.estimate-items-stack,
.estimate-expense-list {
    display: grid;
    gap: 12px;
}

.estimate-section-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f6;
}

.estimate-section-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.estimate-section-copy strong {
    font-size: 13px;
}

.estimate-section-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.estimate-section-metrics b {
    display: block;
    margin-top: 3px;
    font-size: 12px;
}

.estimate-item-card {
    padding: 16px;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    background: #fbfcfe;
}

.estimate-item-copy {
    min-width: 0;
}

.estimate-item-copy span {
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.estimate-item-copy strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.3;
}

.estimate-item-copy small,
.estimate-expense-copy small {
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.45;
}

.estimate-item-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 420px;
}

.estimate-item-stats b {
    display: block;
    margin-top: 4px;
    font-size: 13px;
}

.estimate-item-progress {
    margin-top: 14px;
}

.estimate-item-actions {
    margin-top: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.estimate-inline-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.estimate-inline-link.is-danger {
    color: #d54d4d;
}

.estimate-expense-row {
    padding: 11px 0;
    border-top: 1px solid #eef1f5;
}

.estimate-expense-copy {
    min-width: 0;
}

.estimate-expense-copy strong {
    display: block;
    font-size: 13px;
}

.estimate-expense-side {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.estimate-expense-side b {
    font-size: 13px;
    white-space: nowrap;
}

.estimate-extra-blocks {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    margin-top: 18px;
}

.estimate-help-list {
    display: grid;
    gap: 10px;
}

.estimate-help-list > div {
    padding: 10px 0;
    border-bottom: 1px solid #eff2f6;
}

.estimate-help-list > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (max-width: 1100px) {
    .estimate-summary-grid,
    .estimate-visual-grid,
    .estimate-extra-blocks {
        grid-template-columns: 1fr 1fr;
    }

    .estimate-extra-blocks {
        grid-template-columns: 1fr;
    }

    .estimate-item-head {
        flex-direction: column;
        align-items: stretch;
    }

    .estimate-item-stats {
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .estimate-main-card {
        padding: 16px;
    }

    .estimate-summary-grid,
    .estimate-visual-grid {
        grid-template-columns: 1fr;
    }

    .estimate-summary-card strong {
        font-size: 21px;
    }

    .estimate-header-actions {
        width: 100%;
    }

    .estimate-header-actions .primary-button,
    .estimate-header-actions .secondary-button {
        flex: 1 1 auto;
    }

    .estimate-item-stats,
    .estimate-section-metrics {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .estimate-bar-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .estimate-bar-row > strong {
        grid-column: 1 / -1;
        justify-self: end;
    }

    .estimate-expense-row,
    .estimate-chart-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .estimate-expense-side {
        margin-left: 0;
        justify-content: space-between;
    }
}


/* =========================================================
   v1.3.1 — импорт Excel, экономика объекта, фильтры затрат
   ========================================================= */

.estimate-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.estimate-profit-card {
    padding: 18px;
    border: 1px solid #edf0f6;
    border-radius: 18px;
    background: #fff;
}

.estimate-sections-card {
    grid-column: 1 / -1;
}

.estimate-card-head > strong.is-save {
    color: #238a58;
}

.estimate-card-head > strong.is-over {
    color: #d85b50;
}

.estimate-profit-donut {
    --spent-pct: 0%;
    position: relative;
    width: min(210px, 66%);
    aspect-ratio: 1 / 1;
    margin: 10px auto 18px;
    border-radius: 50%;
    background:
        conic-gradient(
            #ef7c68 0 var(--spent-pct),
            #49b97f var(--spent-pct) 100%
        );
}

.estimate-profit-donut.is-loss {
    background: conic-gradient(#ef7c68 0 100%);
}

.estimate-profit-donut::after {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf0f5;
}

.estimate-profit-donut-center {
    position: absolute;
    inset: 28%;
    z-index: 1;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
}

.estimate-profit-donut-center span {
    color: var(--muted);
    font-size: 10px;
}

.estimate-profit-donut-center strong {
    margin-top: 5px;
    font-size: 16px;
    line-height: 1.2;
}

.estimate-profit-legend {
    display: grid;
    gap: 8px;
}

.estimate-profit-legend > div {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f6;
}

.estimate-profit-legend > div:last-child {
    border-bottom: 0;
}

.estimate-profit-legend small {
    color: var(--muted);
    font-size: 10px;
}

.estimate-profit-legend strong {
    font-size: 12px;
}

.estimate-profit-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.estimate-profit-dot.is-received {
    background: #6689f4;
}

.estimate-profit-dot.is-spent {
    background: #ef7c68;
}

.estimate-profit-dot.is-profit {
    background: #49b97f;
}

.estimate-profit-dot.is-loss {
    background: #d64f4f;
}

.estimate-journal-card {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #edf0f6;
    border-radius: 18px;
    background: #fff;
}

.estimate-filters {
    display: grid;
    grid-template-columns: minmax(190px, 1.3fr) repeat(2, minmax(145px, .8fr)) auto auto;
    gap: 9px;
    align-items: end;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 13px;
    background: #f7f9fc;
}

.estimate-filters label {
    display: grid;
    gap: 5px;
}

.estimate-filters label > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.estimate-filters select,
.estimate-filters input {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #dfe4ec;
    border-radius: 9px;
    background: #fff;
    font-size: 10px;
}

.estimate-filter-reset {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.estimate-journal-list {
    display: grid;
}

.estimate-journal-row {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef1f5;
}

.estimate-journal-row:last-child {
    border-bottom: none;
}

.estimate-journal-date strong,
.estimate-journal-date span,
.estimate-journal-copy strong,
.estimate-journal-copy span,
.estimate-journal-copy small {
    display: block;
}

.estimate-journal-date strong {
    font-size: 11px;
}

.estimate-journal-date span,
.estimate-journal-copy span,
.estimate-journal-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.estimate-journal-copy strong {
    font-size: 12px;
}

.estimate-journal-copy small {
    line-height: 1.4;
}

.estimate-journal-amount strong {
    font-size: 13px;
    white-space: nowrap;
}

.estimate-import-current {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.estimate-import-current > div {
    padding: 12px;
    border-radius: 12px;
    background: #f7f9fc;
}

.estimate-import-current span,
.estimate-import-current strong {
    display: block;
}

.estimate-import-current span {
    color: var(--muted);
    font-size: 9px;
}

.estimate-import-current strong {
    margin-top: 4px;
    font-size: 18px;
}

.estimate-import-zone {
    margin-bottom: 14px;
}

.estimate-import-mode {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.estimate-import-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    cursor: pointer;
}

.estimate-import-option.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.estimate-import-option input {
    margin-top: 3px;
}

.estimate-import-option strong,
.estimate-import-option small {
    display: block;
}

.estimate-import-option strong {
    font-size: 11px;
}

.estimate-import-option small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.estimate-import-help {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f4f7ff;
}

.estimate-import-help strong {
    font-size: 11px;
}

.estimate-import-help p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .estimate-filters {
        grid-template-columns: 1fr 1fr;
    }

    .estimate-filters label:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .estimate-visual-grid {
        grid-template-columns: 1fr !important;
    }

    .estimate-sections-card {
        grid-column: auto;
    }

    .estimate-profit-donut {
        width: min(190px, 74%);
    }

    .estimate-filters {
        grid-template-columns: 1fr;
    }

    .estimate-filters label:first-child {
        grid-column: auto;
    }

    .estimate-journal-row {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .estimate-journal-date {
        grid-column: 1 / -1;
    }

    .estimate-journal-amount {
        align-self: start;
    }
}


/* =========================================================
   v1.3.2 — естественный порядок и группировка позиций сметы
   ========================================================= */

.estimate-table-card-v2 {
    padding: 18px;
}

.estimate-section-groups {
    display: grid;
    gap: 16px;
}

.estimate-section-group {
    overflow: hidden;
    border: 1px solid #e5eaf2;
    border-radius: 18px;
    background: #fbfcfe;
}

.estimate-section-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e8ecf3;
    background: #f6f8fc;
}

.estimate-section-group-head > div:first-child > span,
.estimate-section-group-head > div:first-child > small {
    display: block;
    color: var(--muted);
}

.estimate-section-group-head > div:first-child > span {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.estimate-section-group-head h4 {
    margin: 4px 0 0;
    font-size: 17px;
    line-height: 1.28;
}

.estimate-section-group-head > div:first-child > small {
    margin-top: 5px;
    font-size: 9px;
}

.estimate-section-group-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    gap: 18px;
    min-width: 400px;
}

.estimate-section-group-totals small,
.estimate-section-group-totals strong {
    display: block;
}

.estimate-section-group-totals small {
    color: var(--muted);
    font-size: 9px;
}

.estimate-section-group-totals strong {
    margin-top: 4px;
    font-size: 13px;
    white-space: nowrap;
}

.estimate-section-items {
    padding: 0 18px;
}

.estimate-item-row-v2 {
    padding: 17px 0;
    border: 0 !important;
    border-bottom: 1px solid #e9edf4 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.estimate-item-row-v2:last-child {
    border-bottom: 0 !important;
}

.estimate-item-row-v2 .estimate-item-copy > span {
    display: none;
}

.estimate-item-row-v2 .estimate-item-copy strong {
    font-size: 15px;
}

.estimate-item-row-v2 .estimate-item-stats {
    min-width: 390px;
}

.estimate-item-empty {
    margin-top: 9px;
    padding: 8px 0 0 !important;
    background: transparent !important;
    color: #8d96a9;
    text-align: center;
    font-size: 10px !important;
}

.estimate-item-stats .is-save b,
.estimate-section-group-totals .is-save strong,
.estimate-section-metrics .is-save b {
    color: #208b56;
}

.estimate-item-stats .is-over b,
.estimate-section-group-totals .is-over strong,
.estimate-section-metrics .is-over b {
    color: #d84f4f;
}

/* Журнал фактических затрат удалён в v1.3.2. */
.estimate-journal-card,
.estimate-filters,
.estimate-journal-list {
    display: none !important;
}

@media (max-width: 980px) {
    .estimate-section-group-head {
        grid-template-columns: 1fr;
    }

    .estimate-section-group-totals {
        min-width: 0;
    }
}

@media (max-width: 700px) {
    .estimate-section-group-head {
        padding: 14px;
    }

    .estimate-section-group-totals {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 9px;
    }

    .estimate-section-group-totals strong {
        font-size: 11px;
    }

    .estimate-section-items {
        padding: 0 14px;
    }

    .estimate-item-row-v2 .estimate-item-stats {
        min-width: 0;
    }
}


/* =========================================================
   v1.3.3 — упрощённая смета и визуальная ветка затрат
   ========================================================= */

/* Знак рубля заметно меньше основной суммы во всей CRM. */
.money-ruble {
    display: inline-block;
    margin-left: .08em;
    font-size: .52em !important;
    line-height: 1;
    vertical-align: .22em;
    font-weight: inherit;
    opacity: .78;
}

/* Теперь в верхней сводке 4 понятных показателя. */
.estimate-summary-received {
    background: linear-gradient(180deg, #f7f9ff 0%, #eef3ff 100%);
}

/* После удаления «По разделам» две визуальные карточки занимают строку. */
.estimate-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.estimate-profit-legend {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.estimate-profit-legend > div {
    border: 1px solid #eef1f5;
    border-radius: 10px;
    padding: 9px 10px;
}

/* Заголовок позиции + компактные иконки. */
.estimate-item-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.estimate-item-title-line > strong {
    min-width: 0;
}

.estimate-item-quick-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.estimate-item-quick-actions form {
    margin: 0;
}

.estimate-quick-button {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    cursor: pointer;
}

.estimate-quick-button.is-add {
    color: var(--primary);
    background: rgba(77, 97, 235, .06);
}

.estimate-quick-button.is-add:hover {
    background: rgba(77, 97, 235, .12);
}

.estimate-quick-button.is-delete {
    color: #d95a5a;
    background: rgba(217, 90, 90, .05);
}

.estimate-quick-button.is-delete:hover {
    background: rgba(217, 90, 90, .12);
}

/* Старые текстовые действия больше не нужны. */
.estimate-item-actions,
.estimate-item-empty {
    display: none !important;
}

/* Фактические затраты — как ответы/ветка в Telegram. */
.estimate-item-row-v2 .estimate-expense-thread {
    position: relative;
    gap: 3px;
    margin: 11px 0 0 12px;
    padding-left: 28px;
}

.estimate-item-row-v2 .estimate-expense-thread::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(180deg, #b9c8dd 0%, #d7e0ec 100%);
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-row {
    position: relative;
    min-height: 38px;
    padding: 7px 9px;
    border: 0 !important;
    border-radius: 9px;
    background: rgba(240, 245, 250, .62);
    opacity: .78;
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-row::before {
    content: "↳";
    position: absolute;
    left: -26px;
    top: 7px;
    color: #7f9bbd;
    font-size: 16px;
    line-height: 1;
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-copy strong {
    font-size: 11px;
    font-weight: 650;
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-copy span,
.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-copy small {
    font-size: 8.5px;
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-side b {
    font-size: 11px;
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-inline-link.is-danger {
    font-size: 8px;
    opacity: .75;
}

/* Блок «По разделам» удалён в v1.3.3. */
.estimate-sections-card {
    display: none !important;
}

/* После удаления памятки блок прочих расходов занимает всю ширину. */
.estimate-extra-blocks {
    grid-template-columns: 1fr !important;
}

@media (max-width: 760px) {
    .estimate-visual-grid {
        grid-template-columns: 1fr !important;
    }

    .estimate-profit-legend {
        grid-template-columns: 1fr 1fr;
    }

    .estimate-item-title-line {
        align-items: flex-start;
    }

    .estimate-item-row-v2 .estimate-expense-thread {
        margin-left: 5px;
        padding-left: 25px;
    }
}


/* =========================================================
   v1.3.4 — без ₽, крестик справа, без progress bar позиции
   ========================================================= */

/* Знак рубля полностью убран. Старый класс оставляем скрытым на случай кеша. */
.money-ruble {
    display: none !important;
}

/* Справа после «Заработано» резервируется компактное место под удаление. */
.estimate-item-row-v2 .estimate-item-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 24px !important;
    min-width: 420px;
    align-items: center;
}

.estimate-item-delete-cell {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: stretch;
}

.estimate-item-delete-cell form {
    margin: 0;
    display: flex;
    align-items: center;
}

.estimate-item-delete-edge {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #d56b6b;
    opacity: .36;
    font-size: 15px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    transition: opacity .15s ease, background .15s ease;
}

.estimate-item-delete-edge:hover {
    opacity: .8;
    background: rgba(210, 80, 80, .07);
}

/* Progress bar внутри позиции сметы полностью удалён. */
.estimate-item-row-v2 .estimate-item-progress,
.estimate-item-row-v2 .estimate-item-progress-bar {
    display: none !important;
}

/* Ветка затрат: линии больше нет — оставляем только Telegram-стрелочку. */
.estimate-item-row-v2 .estimate-expense-thread {
    margin: 9px 0 0 8px !important;
    padding-left: 27px !important;
}

.estimate-item-row-v2 .estimate-expense-thread::before {
    display: none !important;
    content: none !important;
}

.estimate-item-row-v2 .estimate-expense-thread .estimate-expense-row::before {
    content: "↳" !important;
    left: -24px !important;
    top: 8px !important;
    color: #7696ba;
    opacity: .72;
    font-size: 16px !important;
}

@media (max-width: 760px) {
    .estimate-item-row-v2 .estimate-item-stats {
        grid-template-columns: 1fr 1fr 1fr 22px !important;
        min-width: 0;
        gap: 7px;
    }

    .estimate-item-delete-edge {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }

    .estimate-item-row-v2 .estimate-expense-thread {
        margin-left: 2px !important;
        padding-left: 24px !important;
    }
}


/* =========================================================
   v1.3.5 — modal затрат без перезагрузки
   ========================================================= */

body.estimate-modal-open {
    overflow: hidden;
}

.estimate-expense-modal[hidden] {
    display: none !important;
}

.estimate-expense-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.estimate-expense-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 42, .34);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .18s ease;
}

.estimate-expense-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: min(820px, calc(100vh - 36px));
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(220, 226, 236, .95);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(28, 38, 58, .22);
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transition: opacity .18s ease, transform .18s ease;
}

.estimate-expense-modal.is-visible .estimate-expense-modal-backdrop {
    opacity: 1;
}

.estimate-expense-modal.is-visible .estimate-expense-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.estimate-expense-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 15px;
}

.estimate-expense-modal-head span {
    display: block;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.estimate-expense-modal-head h3 {
    margin: 4px 0 0;
    font-size: 20px;
}

.estimate-expense-modal-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #f4f6f9;
    color: #7b8495;
    font-size: 20px;
    cursor: pointer;
}

.estimate-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.estimate-modal-error {
    margin-bottom: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff1f1;
    color: #c74b4b;
    font-size: 10px;
}

.estimate-expense-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px;
}

.estimate-expense-modal-actions .primary-button,
.estimate-expense-modal-actions .secondary-button {
    min-height: 36px;
    font-size: 9px;
}

/* «Позиции сметы» больше не имеют отдельной внешней рамки и отступа. */
.estimate-table-card-flat {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.estimate-table-card-flat > .estimate-card-head {
    margin-bottom: 12px;
}

/* Список внутри раздела немного спокойнее заголовка раздела. */
.estimate-section-group .estimate-section-items {
    opacity: .9;
}

/* Одна карточка сравнения после удаления «Экономики объекта». */
.estimate-visual-grid {
    grid-template-columns: 1fr !important;
}

.estimate-chart-card {
    width: 100%;
}

.estimate-bar-other {
    background: linear-gradient(90deg, #a28bd7 0%, #8067ba 100%);
}

.estimate-other-expenses-row[hidden] {
    display: none !important;
}

/* Анимация новой затраты без изменения позиции прокрутки. */
.estimate-expense-row.is-new {
    animation: estimateExpenseAppear .9s cubic-bezier(.2,.8,.2,1);
}

.estimate-add-flash {
    animation: estimateTargetFlash 1s ease;
}

@keyframes estimateExpenseAppear {
    0% {
        opacity: 0;
        background: rgba(91, 111, 238, .15);
    }
    45% {
        opacity: 1;
        background: rgba(91, 111, 238, .09);
    }
    100% {
        opacity: .78;
        background: rgba(240, 245, 250, .62);
    }
}

@keyframes estimateTargetFlash {
    0% {
        background-color: rgba(81, 103, 234, .08);
    }
    100% {
        background-color: transparent;
    }
}

@media (max-width: 700px) {
    .estimate-expense-modal {
        place-items: end center;
        padding: 8px;
    }

    .estimate-expense-modal-dialog {
        width: 100%;
        max-height: calc(100vh - 16px);
        border-radius: 18px 18px 12px 12px;
    }

    .estimate-modal-grid {
        grid-template-columns: 1fr;
    }

    .estimate-modal-grid .span-2 {
        grid-column: auto;
    }

    .estimate-expense-modal-actions {
        position: sticky;
        bottom: -18px;
        margin: 15px -18px -18px;
        padding: 12px 18px 16px;
        background: rgba(255,255,255,.96);
        border-top: 1px solid #eef1f5;
    }
}


/* =========================================================
   v1.3.6 — вложения к фактическим затратам
   ========================================================= */

.estimate-expense-count-line {
    display: inline-flex !important;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.estimate-expense-count-line > span {
    display: inline !important;
}

.estimate-items-heading {
    align-items: center !important;
}

.estimate-add-position-button {
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 34px;
    font-size: 9px;
}

.estimate-header-actions .js-estimate-expense-open {
    background: #fff !important;
    color: var(--primary) !important;
    border: 1px solid #dfe4ec !important;
}

.estimate-expense-attachment-zone {
    position: relative;
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    overflow: hidden;
    border: 1px dashed #ccd4e2;
    border-radius: 12px;
    background: #fafbfe;
    cursor: pointer;
}

.estimate-expense-attachment-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.estimate-expense-attachment-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--primary);
}

.estimate-expense-attachment-icon svg {
    width: 18px;
    height: 18px;
}

.estimate-expense-attachment-copy strong,
.estimate-expense-attachment-copy small {
    display: block;
}

.estimate-expense-attachment-copy strong {
    font-size: 10px;
}

.estimate-expense-attachment-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8.5px;
    line-height: 1.35;
}

.estimate-expense-selected-files {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.estimate-expense-selected-files[hidden] {
    display: none !important;
}

.estimate-expense-selected-files span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 7px;
    border-radius: 7px;
    background: #f0f3f8;
    color: #657086;
    font-size: 8px;
}

.estimate-expense-files {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.estimate-expense-file-icon {
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid #dfe5ed;
    border-radius: 7px;
    background: rgba(255,255,255,.78);
    color: #728099;
    cursor: pointer;
}

.estimate-expense-file-icon:hover {
    color: var(--primary);
    border-color: #c8d1e1;
    background: #fff;
}

.estimate-expense-file-icon svg {
    width: 13px;
    height: 13px;
}

.estimate-expense-file-icon.is-image {
    color: #4d74d6;
}

.estimate-expense-file-icon.is-document {
    color: #7a6aa8;
}

.estimate-file-preview-modal[hidden] {
    display: none !important;
}

.estimate-file-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.estimate-file-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 23, 34, .72);
    opacity: 0;
    transition: opacity .17s ease;
}

.estimate-file-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 36px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.28);
    opacity: 0;
    transform: scale(.985);
    transition: opacity .17s ease, transform .17s ease;
}

.estimate-file-preview-modal.is-visible .estimate-file-preview-backdrop {
    opacity: 1;
}

.estimate-file-preview-modal.is-visible .estimate-file-preview-dialog {
    opacity: 1;
    transform: scale(1);
}

.estimate-file-preview-head {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    border-bottom: 1px solid #e8ecf2;
}

.estimate-file-preview-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.estimate-file-preview-head button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #f2f4f7;
    color: #697386;
    font-size: 20px;
    cursor: pointer;
}

.estimate-file-preview-stage {
    min-height: 200px;
    max-height: calc(100vh - 90px);
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 14px;
    background: #111722;
}

.estimate-file-preview-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 8px;
}

.estimate-expense-side {
    gap: 8px !important;
}

@media (max-width: 700px) {
    .estimate-items-heading {
        align-items: flex-start !important;
    }

    .estimate-add-position-button {
        white-space: nowrap;
    }

    .estimate-file-preview-modal {
        padding: 8px;
    }

    .estimate-file-preview-dialog {
        max-height: calc(100vh - 16px);
        border-radius: 14px;
    }
}


/* =========================================================
   v1.3.7 — новая верхняя компоновка сметы
   ========================================================= */

.estimate-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 18px;
}

.estimate-overview-grid .estimate-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
    margin: 0 !important;
    align-content: stretch;
}

.estimate-overview-grid .estimate-summary-card {
    min-height: 116px;
}

.estimate-overview-grid .estimate-visual-grid {
    display: block !important;
    margin: 0 !important;
}

.estimate-overview-grid .estimate-chart-card {
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.estimate-overview-grid .estimate-compare-bars {
    margin-top: auto;
    margin-bottom: auto;
}

/* По смете / Факт / Заработано — подпись и сумма на одной линии. */
.estimate-section-group-totals {
    grid-template-columns: repeat(3, auto) !important;
    min-width: 0 !important;
    align-items: center;
    justify-content: end;
    gap: 22px !important;
}

.estimate-section-group-totals > div,
.estimate-item-stats > div:not(.estimate-item-delete-cell) {
    display: inline-flex !important;
    align-items: baseline;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
}

.estimate-section-group-totals small,
.estimate-section-group-totals strong,
.estimate-item-stats small,
.estimate-item-stats b {
    display: inline !important;
    margin: 0 !important;
}

.estimate-section-group-totals strong {
    font-size: 13px !important;
}

.estimate-item-stats {
    grid-template-columns: repeat(3, minmax(max-content, 1fr)) 24px !important;
    min-width: 500px !important;
    gap: 16px !important;
}

/* Кнопка добавления прочего расхода — напротив заголовка. */
.estimate-other-heading {
    align-items: center !important;
}

.estimate-other-heading .js-estimate-expense-open {
    margin-left: auto;
    flex: 0 0 auto;
    min-height: 34px;
    font-size: 9px;
}

/* Удаление строки без скачка страницы. */
.estimate-item-row-v2 {
    transition: opacity .18s ease, transform .18s ease;
}

.estimate-item-row-v2.estimate-item-removing {
    opacity: 0;
    transform: translateX(8px);
}

.estimate-delete-flash {
    animation: estimateDeleteFlash .7s ease;
}

@keyframes estimateDeleteFlash {
    0% { box-shadow: 0 0 0 3px rgba(90, 105, 230, .08); }
    100% { box-shadow: 0 0 0 0 rgba(90, 105, 230, 0); }
}

@media (max-width: 1080px) {
    .estimate-overview-grid {
        grid-template-columns: 1fr;
    }

    .estimate-item-stats {
        min-width: 0 !important;
    }
}

@media (max-width: 760px) {
    .estimate-overview-grid .estimate-summary-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .estimate-section-group-totals {
        grid-template-columns: 1fr !important;
        justify-content: stretch;
        gap: 7px !important;
    }

    .estimate-section-group-totals > div {
        justify-content: space-between;
    }

    .estimate-item-stats {
        grid-template-columns: 1fr 1fr 1fr 22px !important;
        gap: 7px !important;
    }

    .estimate-item-stats > div:not(.estimate-item-delete-cell) {
        flex-direction: column;
        gap: 2px;
        white-space: normal;
    }
}

@media (max-width: 520px) {
    .estimate-overview-grid .estimate-summary-grid {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   v1.3.8 — метрики сметы вертикально: подпись сверху, сумма ниже
   ========================================================= */

/* Заголовок раздела: три показателя остаются в одной горизонтальной линии,
   но внутри каждого показателя подпись идёт сверху, сумма — ниже. */
.estimate-section-group-totals {
    grid-template-columns: repeat(3, minmax(105px, 1fr)) !important;
    min-width: 400px !important;
    align-items: start !important;
    justify-content: end !important;
    gap: 18px !important;
}

.estimate-section-group-totals > div {
    display: block !important;
    min-width: 0;
    white-space: nowrap;
}

.estimate-section-group-totals small,
.estimate-section-group-totals strong {
    display: block !important;
}

.estimate-section-group-totals small {
    margin: 0 !important;
    line-height: 1.2;
}

.estimate-section-group-totals strong {
    margin-top: 5px !important;
    line-height: 1.2;
}

/* Строка позиции: По смете / Факт / Заработано —
   три колонки по горизонтали, подпись сверху, сумма снизу. */
.estimate-item-stats {
    grid-template-columns: repeat(3, minmax(105px, 1fr)) 24px !important;
    min-width: 430px !important;
    gap: 16px !important;
    align-items: start !important;
}

.estimate-item-stats > div:not(.estimate-item-delete-cell) {
    display: block !important;
    min-width: 0;
    white-space: nowrap;
}

.estimate-item-stats small,
.estimate-item-stats b {
    display: block !important;
}

.estimate-item-stats small {
    margin: 0 !important;
    line-height: 1.2;
}

.estimate-item-stats b {
    margin-top: 5px !important;
    line-height: 1.2;
}

/* Крестик остаётся у самого правого края строки. */
.estimate-item-delete-cell {
    align-self: center !important;
}

@media (max-width: 760px) {
    .estimate-section-group-totals {
        min-width: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .estimate-item-stats {
        min-width: 0 !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) 22px !important;
        gap: 7px !important;
    }

    .estimate-item-stats > div:not(.estimate-item-delete-cell) {
        display: block !important;
        white-space: normal;
    }
}


/* =========================================================
   v1.3.9 — доступ к редактированию закреплённых объектов
   ========================================================= */

.permission-switch-copy {
    min-width: 0;
    display: block;
}

.permission-switch-copy strong,
.permission-switch-copy small {
    display: block;
}

.permission-switch-copy strong {
    font-size: 9px;
    font-weight: 650;
}

.permission-switch-copy small {
    max-width: 230px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.35;
}

.permission-switch-row.is-project-access-permission {
    min-height: 58px;
    padding: 7px 0;
}

.permission-switch-row.is-project-access-permission .toggle-switch {
    align-self: center;
}


/* =========================================================
   v1.3.10 — редактирование стоимости из вкладки «Оплата»
   ========================================================= */

.field-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.payment-summary-editable {
    position: relative;
}

.payment-summary-label-line {
    display: flex !important;
    align-items: center;
    gap: 5px;
}

.payment-amount-edit-button {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(78, 96, 232, .06);
    color: var(--primary);
    opacity: .68;
    cursor: pointer;
}

.payment-amount-edit-button:hover {
    opacity: 1;
    background: rgba(78, 96, 232, .12);
}

.payment-amount-edit-button svg {
    width: 12px;
    height: 12px;
}

.payment-overpaid-note {
    display: block;
    margin-top: 5px;
    color: #c46a35;
    font-size: 8px;
    line-height: 1.2;
}

.payment-overpaid-note[hidden] {
    display: none !important;
}

.payment-overpaid-note b {
    font: inherit;
    font-weight: 750;
}

body.payment-amount-modal-open {
    overflow: hidden;
}

.payment-amount-modal[hidden] {
    display: none !important;
}

.payment-amount-modal {
    position: fixed;
    inset: 0;
    z-index: 12500;
    display: grid;
    place-items: center;
    padding: 18px;
}

.payment-amount-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 42, .34);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .17s ease;
}

.payment-amount-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 18px;
    border: 1px solid #dde3ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(28, 38, 58, .22);
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity .17s ease, transform .17s ease;
}

.payment-amount-modal.is-visible .payment-amount-modal-backdrop {
    opacity: 1;
}

.payment-amount-modal.is-visible .payment-amount-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.payment-amount-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.payment-amount-modal-head > div > span {
    display: block;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.payment-amount-modal-head h3 {
    margin: 4px 0 0;
    font-size: 19px;
}

.payment-amount-modal-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f3f5f8;
    color: #737d8f;
    font-size: 19px;
    cursor: pointer;
}

.payment-amount-modal-error {
    margin-bottom: 11px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #fff1f1;
    color: #c64c4c;
    font-size: 9px;
}

.payment-amount-current-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.payment-amount-current-info > div {
    padding: 10px 11px;
    border-radius: 10px;
    background: #f7f9fc;
}

.payment-amount-current-info span,
.payment-amount-current-info strong {
    display: block;
}

.payment-amount-current-info span {
    color: var(--muted);
    font-size: 8px;
}

.payment-amount-current-info strong {
    margin-top: 4px;
    font-size: 12px;
}

.payment-amount-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px;
}

.payment-amount-modal-actions .primary-button,
.payment-amount-modal-actions .secondary-button {
    min-height: 34px;
    font-size: 9px;
}

.payment-amount-updated {
    animation: paymentAmountUpdated .9s ease;
}

@keyframes paymentAmountUpdated {
    0% {
        background: rgba(82, 106, 235, .11);
    }
    100% {
        background: transparent;
    }
}

@media (max-width: 700px) {
    .payment-amount-modal {
        place-items: end center;
        padding: 8px;
    }

    .payment-amount-modal-dialog {
        width: 100%;
        border-radius: 18px 18px 12px 12px;
    }

    .payment-amount-current-info {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================================
   v1.3.11 — права ролей и настройки системы
   ========================================================= */

.settings-company-form label small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.settings-company-form input:not(:disabled) {
    background: #fff;
    border-color: #cfd6e4;
}

.settings-company-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
}

.settings-company-actions .primary-button {
    min-height: 38px;
    font-size: 10px;
}

.permission-switch-row .permission-switch-copy small {
    max-width: 290px;
}


/* =========================================================
   v1.3.12 — гостевой вход и телефон как логин
   ========================================================= */

.guest-login-button {
    width: 100%;
    margin-top: 8px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.guest-login-button:hover {
    text-decoration: underline;
}

.guest-login-modal[hidden] {
    display: none !important;
}

.guest-login-modal {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.guest-login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 25, 38, .42);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .17s ease;
}

.guest-login-dialog {
    position: relative;
    z-index: 1;
    width: min(390px, 100%);
    padding: 18px;
    border: 1px solid #dde3ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(24, 34, 54, .24);
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity .17s ease, transform .17s ease;
}

.guest-login-modal.is-visible .guest-login-backdrop {
    opacity: 1;
}

.guest-login-modal.is-visible .guest-login-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

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

.guest-login-head > div > span {
    display: block;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.guest-login-head h3 {
    margin: 4px 0 0;
    font-size: 19px;
}

.guest-login-head > button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f3f5f8;
    color: #747e90;
    font-size: 19px;
    cursor: pointer;
}

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

.guest-pin-field > span {
    font-size: 9px;
    font-weight: 650;
}

.guest-pin-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid #dce2eb;
    border-radius: 11px;
    background: #fff;
    text-align: center;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: .5em;
}

.guest-login-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 8.5px;
    line-height: 1.45;
}

.guest-login-error {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #fff1f1;
    color: #c64c4c;
    font-size: 9px;
}

.guest-login-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.guest-login-actions .primary-button,
.guest-login-actions .secondary-button {
    min-height: 34px;
    font-size: 9px;
}

.guest-pin-settings {
    margin: 2px 0 14px;
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

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

.guest-pin-settings-head strong,
.guest-pin-settings-head small {
    display: block;
}

.guest-pin-settings-head strong {
    font-size: 10px;
}

.guest-pin-settings-head small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.guest-pin-status {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 7.5px;
    font-weight: 750;
}

.guest-pin-status.is-ready {
    background: #eaf8ef;
    color: #278552;
}

.guest-pin-status.is-empty {
    background: #fff3e7;
    color: #b56e24;
}

.guest-pin-input-row {
    display: grid;
    gap: 5px;
    margin-top: 11px;
}

.guest-pin-input-row > span {
    font-size: 8.5px;
    font-weight: 650;
}

.guest-pin-input-row input {
    width: 150px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #d9e0ea;
    border-radius: 9px;
    background: #fff;
    font-size: 12px;
    letter-spacing: .18em;
}

.guest-pin-input-row small {
    color: var(--muted);
    font-size: 7.8px;
    line-height: 1.4;
}

.sidebar-user-profile-static {
    cursor: default;
}

@media (max-width: 700px) {
    .guest-login-modal {
        place-items: end center;
        padding: 8px;
    }

    .guest-login-dialog {
        width: 100%;
        border-radius: 18px 18px 12px 12px;
    }

    .guest-pin-input-row input {
        width: 100%;
    }
}


/* =========================================================
   v1.3.13 — мобильный вход, PIN security, scroll sidebar
   ========================================================= */

/* Боковое меню на мобильных можно прокручивать до профиля и кнопки выхода. */
@media (max-width: 920px) {
    .sidebar {
        height: 100svh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }

    .sidebar-spacer {
        flex: 1 0 24px;
        min-height: 24px;
    }

    .sidebar-account-footer {
        flex: 0 0 auto;
        margin-bottom: max(4px, env(safe-area-inset-bottom)) !important;
    }
}

/* Мобильная страница входа — без внешнего поля, рамки и верхнего зазора. */
@media (max-width: 920px) {
    .login-page,
    .login-layout,
    .login-form-panel {
        min-height: 100svh;
        min-height: 100dvh;
    }

    .login-form-panel {
        padding: 0 !important;
        place-items: stretch !important;
        background: #fff;
    }

    .login-card {
        width: 100% !important;
        max-width: none !important;
        min-height: 100svh;
        min-height: 100dvh;
        margin: 0 !important;
        padding: 0 20px 24px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
    }

    .login-mobile-logo {
        min-height: 92px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        margin: 0 0 16px !important;
        padding: 0 !important;
        text-align: center;
    }

    .login-mobile-logo img {
        width: 54px !important;
        height: 54px !important;
    }

    .login-mobile-logo strong {
        font-size: 20px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .login-card h2 {
        font-size: 28px;
    }

    .login-subtitle {
        margin-bottom: 22px;
    }

    /*
     * iOS Safari увеличивает страницу при фокусе, если input меньше 16px.
     * Поэтому поля входа принудительно не меньше 16px.
     */
    .login-form input,
    .password-field input,
    .guest-pin-field input {
        font-size: 16px !important;
    }
}

/* Кнопка гостя остаётся отдельной строкой сразу после основной формы. */
.guest-login-button {
    margin-top: 14px !important;
}

/* PIN-модалка всегда открывается по центру, включая телефон. */
.guest-login-modal {
    place-items: center !important;
    padding: 16px !important;
}

.guest-login-dialog {
    width: min(360px, calc(100vw - 32px)) !important;
    padding: 18px !important;
    border-radius: 18px !important;
}

.guest-login-head {
    align-items: center !important;
    margin-bottom: 14px !important;
}

.guest-login-head h3 {
    margin: 0 !important;
    font-size: 18px !important;
}

.guest-login-head > button {
    flex: 0 0 auto;
}

.guest-pin-field input {
    min-height: 54px !important;
    font-size: 20px !important;
    letter-spacing: .46em;
    transition: opacity .15s ease, background .15s ease;
}

.guest-pin-field input.is-checking {
    opacity: .55;
}

.guest-pin-field input.is-locked,
.guest-pin-field input:disabled {
    opacity: .6;
    cursor: not-allowed;
    background: #f2f4f7;
    color: #7b8498;
}

.guest-login-note {
    margin-bottom: 0 !important;
    text-align: center;
}

.guest-login-error.is-lock {
    background: #fff3e7;
    color: #a86420;
    text-align: center;
}

.guest-login-actions {
    display: none !important;
}

@media (max-width: 700px) {
    .guest-login-modal {
        place-items: center !important;
        padding: 16px !important;
    }

    .guest-login-dialog {
        width: min(360px, calc(100vw - 32px)) !important;
        max-height: calc(100dvh - 32px);
        border-radius: 18px !important;
    }
}


/* =========================================================
   v1.3.14 — мобильная шапка, меню и компактные карточки
   ========================================================= */

/* На ПК мобильная шапка полностью скрыта. */
.mobile-app-header {
    display: none;
}

/* ---------------------------------------------------------
   Мобильное боковое меню
   --------------------------------------------------------- */
@media (max-width: 920px) {
    /*
     * Убираем большой растягивающий spacer.
     * Профиль и «Выйти» теперь идут сразу после навигации,
     * а если пунктов станет больше — sidebar нормально скроллится.
     */
    .sidebar {
        z-index: 220 !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .sidebar-spacer {
        flex: 0 0 20px !important;
        min-height: 20px !important;
        height: 20px !important;
    }

    .sidebar-account-footer {
        flex: 0 0 auto !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /*
     * Overlay находится выше основной страницы и мобильной шапки,
     * но ниже открытого sidebar.
     */
    .mobile-overlay {
        z-index: 180 !important;
    }

    /*
     * Новая мобильная шапка:
     * бургер остаётся таким же, справа от него название CRM.
     */
    .mobile-app-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 120;
        min-height: 58px;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        align-items: center;
        gap: 10px;
        padding:
            max(8px, env(safe-area-inset-top))
            12px
            8px;
        border-bottom: 1px solid rgba(222, 227, 235, .92);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 3px 14px rgba(28, 38, 62, .06);
        backdrop-filter: blur(12px);
    }

    .mobile-app-header-title {
        grid-column: 2;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        color: var(--text);
        font-size: 15px;
        font-weight: 760;
        letter-spacing: -.02em;
    }

    /*
     * Перебиваем старый floating-бургер с z-index:9999.
     * Теперь кнопка является частью шапки, а не висит поверх меню.
     */
    .mobile-menu-button.mobile-menu-floating {
        position: static !important;
        left: auto !important;
        top: auto !important;
        z-index: auto !important;
        grid-column: 1;
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
    }

    /*
     * При открытом меню шапка остаётся под затемняющим overlay.
     * Поэтому бургер больше не отображается поверх открытого sidebar.
     */
    .app-shell.menu-open .mobile-app-header {
        z-index: 120 !important;
    }

    .page-body.page-body-no-topbar,
    .page-body-no-topbar {
        padding-top: calc(70px + env(safe-area-inset-top)) !important;
    }
}

/* ---------------------------------------------------------
   Модальное окно добавления затраты на телефоне
   --------------------------------------------------------- */
@media (max-width: 700px) {
    .estimate-expense-modal {
        place-items: center !important;
        padding:
            max(10px, env(safe-area-inset-top))
            8px
            max(10px, env(safe-area-inset-bottom)) !important;
    }

    .estimate-expense-modal-dialog {
        width: 100% !important;
        max-height: calc(
            100dvh
            - max(20px, env(safe-area-inset-top))
            - max(20px, env(safe-area-inset-bottom))
        ) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-radius: 18px !important;
    }

    .estimate-expense-modal-actions {
        bottom: -18px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
}

/* ---------------------------------------------------------
   project.php → Обзор → Информация об объекте
   На телефоне 2 колонки, «Локация» занимает всю строку.
   --------------------------------------------------------- */
@media (max-width: 760px) {
    .project-info-card .details-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0 12px !important;
    }

    .project-info-card .details-grid > div {
        min-width: 0;
        padding: 11px 0 !important;
    }

    .project-info-card .details-grid .span-2 {
        grid-column: 1 / -1 !important;
    }

    .project-info-card .details-grid .span-2 dd {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap !important;
    }

    .project-info-card .details-grid dt {
        font-size: 9px !important;
    }

    .project-info-card .details-grid dd {
        margin-top: 4px !important;
        font-size: 11px !important;
    }
}

/* ---------------------------------------------------------
   objects.php — после названия данные карточки в 2 столбца
   --------------------------------------------------------- */
@media (max-width: 720px) {
    .object-showcase-details {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px 10px !important;
    }

    .object-showcase-details > div {
        display: block !important;
        min-width: 0;
        padding: 0 !important;
    }

    .object-showcase-details dt {
        margin-bottom: 3px !important;
    }

    .object-showcase-details dd {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /*
     * Ответственный остаётся отдельной полной строкой
     * после двухколоночного списка.
     */
    .object-showcase-manager {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }
}

/*
 * Даже на самых узких телефонах карточка объекта одна по ширине,
 * но информация внутри неё остаётся в двух колонках.
 */
@media (max-width: 470px) {
    .object-showcase-details {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* =========================================================
   v1.3.15 — мобильная фотогалерея
   ========================================================= */

@media (max-width: 760px) {
    /*
     * Три компактные миниатюры в строку.
     * Порядок идёт строго слева направо и сверху вниз.
     */
    .photo-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-auto-rows: auto !important;
        grid-auto-flow: row !important;
        gap: 7px !important;
        column-count: initial !important;
        width: 100% !important;
    }

    .photo-gallery-card {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        border-radius: 9px !important;
    }

    .photo-gallery-card .photo-image-link {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1 !important;
        overflow: hidden !important;
        border-radius: 9px !important;
        background: #f2f4f7;
    }

    .photo-gallery-card .photo-image-link img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: cover !important;
        border-radius: 9px !important;
    }

    .photo-gallery-card .photo-cover-badge {
        left: 4px !important;
        top: 4px !important;
        padding: 2px 4px !important;
        font-size: 6px !important;
    }

    .photo-gallery-card .photo-settings-button {
        width: 24px !important;
        height: 24px !important;
    }

    .photo-gallery-card .photo-settings-button svg {
        width: 12px !important;
        height: 12px !important;
    }
}

@media (max-width: 430px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }
}


/* =========================================================
   v1.4.0 — Рабочие, Прораб, пользователи и удаление WORKING
   ========================================================= */

/* Пользователи: Команда слева, Рабочие справа. */
.users-directory-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.users-directory-head h1 {
    margin: 0;
    font-size: 23px;
}

.users-directory-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
}

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

.users-dual-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.users-directory-card {
    min-width: 0;
}

.users-directory-list {
    display: grid;
    gap: 0;
}

.user-directory-row {
    grid-template-columns: 44px minmax(0, 1fr) auto auto !important;
    gap: 10px !important;
}

.worker-role-badge.is-foreman {
    color: #9a5a16;
}

.worker-role-badge.is-carpenter {
    color: #52647c;
}

.users-empty {
    padding: 26px 12px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

.users-empty.is-hidden {
    display: none;
}

/* Modal добавления пользователя. */
.user-create-modal[hidden] {
    display: none !important;
}

.user-create-modal {
    position: fixed;
    inset: 0;
    z-index: 13500;
    display: grid;
    place-items: center;
    padding: 16px;
}

.user-create-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .42);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .17s ease;
}

.user-create-dialog {
    position: relative;
    z-index: 1;
    width: min(570px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #dde3ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(25, 34, 54, .24);
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity .17s ease, transform .17s ease;
}

.user-create-modal.is-visible .user-create-backdrop {
    opacity: 1;
}

.user-create-modal.is-visible .user-create-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.user-create-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.user-create-head > div > span {
    display: block;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.user-create-head h3 {
    margin: 4px 0 0;
    font-size: 20px;
}

.user-create-head > button {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f2f4f7;
    color: #737d8f;
    font-size: 19px;
    cursor: pointer;
}

.user-type-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 11px;
    background: #f3f5f9;
}

.user-type-switch button {
    min-height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #737d90;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.user-type-switch button.is-active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(27, 36, 57, .07);
}

.user-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.user-create-error {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #fff1f1;
    color: #c64c4c;
    font-size: 9px;
}

.user-create-note {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #f7f9fc;
    color: var(--muted);
    font-size: 8.5px;
    line-height: 1.4;
}

.user-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.user-directory-row.is-new-user {
    animation: userAddedPulse 1.25s cubic-bezier(.2,.8,.2,1);
}

@keyframes userAddedPulse {
    0% {
        opacity: 0;
        background: rgba(79, 98, 235, .14);
    }
    45% {
        opacity: 1;
        background: rgba(79, 98, 235, .09);
    }
    100% {
        background: transparent;
    }
}

/* В списке объекта отдельная строка Прораб. */
.object-showcase-foreman {
    margin-top: 6px;
}

/* Фото: на телефоне 3, на очень узком — 2. */
@media (max-width: 760px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }
}

@media (max-width: 340px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    .users-dual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .users-directory-head {
        align-items: stretch;
        flex-direction: column;
    }

    .users-directory-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .user-directory-row {
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
    }

    .user-directory-row .status-pill {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .user-create-modal {
        place-items: center;
        padding: 8px;
    }

    .user-create-dialog {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 16px;
    }

    .user-create-grid {
        grid-template-columns: 1fr;
    }

    .user-create-grid .span-2 {
        grid-column: auto;
    }
}


/* =========================================================
   v1.4.1 — обзор объекта и desktop-only сортировка фото
   ========================================================= */

/* Иконка перемещения больше нигде не показывается. */
.photo-drag-handle {
    display: none !important;
}

/*
 * На ПК для сортировки зажимается сама фотография.
 * Никаких отдельных иконок/ручек нет.
 */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
    .photo-gallery-card[draggable="true"] {
        cursor: grab !important;
        user-select: none;
    }

    .photo-gallery-card[draggable="true"]:active,
    .photo-gallery-card.is-dragging {
        cursor: grabbing !important;
    }
}

/*
 * На телефоне административные кнопки фотографий не показываем:
 * ни шестерёнку, ни «Удалить все фото», ни возможность reorder.
 */
@media (max-width: 900px), (hover: none), (pointer: coarse) {
    .photo-admin-settings,
    .photo-admin-settings-overlay,
    .photo-settings-button,
    .photo-delete-all-link {
        display: none !important;
    }

    .photo-gallery-card[draggable="true"] {
        cursor: default !important;
    }
}

/* Ответственный и Прораб: на ПК вертикально, на мобильном одной строкой. */
.object-showcase-people {
    display: grid;
    gap: 6px;
}

.object-showcase-people .object-showcase-manager,
.object-showcase-people .object-showcase-foreman {
    margin-top: 0 !important;
}

@media (max-width: 720px) {
    .object-showcase-people {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: start;
    }

    .object-showcase-people .object-showcase-manager {
        min-width: 0;
        padding: 8px 0 !important;
    }

    .object-showcase-people .object-showcase-manager > div {
        min-width: 0;
        gap: 6px !important;
    }

    .object-showcase-people .object-showcase-manager strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .object-showcase-people .object-manager-avatar {
        width: 27px !important;
        height: 27px !important;
        flex: 0 0 27px !important;
    }
}


/* =========================================================
   v1.4.2 — этапы строительства и быстрая смена статуса
   ========================================================= */

.status-contract {
    color: #315fc8;
    background: #edf3ff;
}

.status-foundation {
    color: #a76516;
    background: #fff4df;
}

.status-frame {
    color: #c55b16;
    background: #fff0e5;
}

.status-insulation {
    color: #7157bd;
    background: #f1edff;
}

.status-interior {
    color: #257a87;
    background: #e9f7f8;
}

.project-status-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.project-status-edit-button {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: rgba(76, 94, 220, .07);
    color: var(--primary);
    opacity: .72;
    cursor: pointer;
    transition: opacity .15s ease, background .15s ease, transform .15s ease;
}

.project-status-edit-button:hover {
    opacity: 1;
    background: rgba(76, 94, 220, .13);
}

.project-status-edit-button:active {
    transform: scale(.94);
}

.project-status-edit-button svg {
    width: 12px;
    height: 12px;
}

.project-status-inline.is-status-updated {
    animation: projectStatusUpdated .9s ease;
}

@keyframes projectStatusUpdated {
    from { box-shadow: 0 0 0 0 rgba(80, 100, 230, .22); }
    to { box-shadow: 0 0 0 7px rgba(80, 100, 230, 0); }
}

.project-status-modal[hidden] {
    display: none !important;
}

.project-status-modal {
    position: fixed;
    inset: 0;
    z-index: 13600;
    display: grid;
    place-items: center;
    padding: 16px;
}

.project-status-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 25, 38, .42);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .17s ease;
}

.project-status-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #dde3ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(25, 34, 54, .24);
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity .17s ease, transform .17s ease;
}

.project-status-modal.is-visible .project-status-modal-backdrop {
    opacity: 1;
}

.project-status-modal.is-visible .project-status-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-status-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.project-status-modal-head h3 {
    margin: 0;
    font-size: 19px;
}

.project-status-modal-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.project-status-modal-head > button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f2f4f7;
    color: #737d8f;
    font-size: 19px;
    cursor: pointer;
}

.project-status-modal-error {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #fff1f1;
    color: #c64c4c;
    font-size: 9px;
}

.project-status-options {
    display: grid;
    gap: 7px;
}

.project-status-option {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid #e2e7ef;
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.project-status-option:hover {
    border-color: #cbd4e3;
    background: #fafbfe;
}

.project-status-option:active {
    transform: scale(.99);
}

.project-status-option:disabled {
    cursor: default;
}

.project-status-option.is-saving {
    opacity: .58;
}

.project-status-option.is-current {
    border-color: rgba(74, 94, 221, .32);
    background: #f7f8ff;
}

.project-status-option-dot {
    width: 12px;
    height: 12px;
    display: block;
    border-radius: 999px;
    padding: 0 !important;
}

.project-status-option-copy strong,
.project-status-option-copy small {
    display: block;
}

.project-status-option-copy strong {
    font-size: 10.5px;
}

.project-status-option-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.project-status-option-check {
    display: grid;
    place-items: center;
    color: var(--primary);
    opacity: 0;
}

.project-status-option.is-current .project-status-option-check {
    opacity: 1;
}

.project-status-option-check svg {
    width: 15px;
    height: 15px;
}

@media (max-width: 700px) {
    .project-status-modal {
        place-items: center;
        padding: 12px;
    }

    .project-status-modal-dialog {
        width: min(430px, 100%);
        max-height: calc(100dvh - 24px);
        border-radius: 16px;
    }

    .project-status-option {
        min-height: 52px;
    }
}


/* =========================================================
   v1.4.3 — размеры текста в карточке объекта
   ========================================================= */

.project-status-option-copy strong {
    font-size: 16px !important;
}

#projectStatusModalTitle {
    font-size: 22px !important;
}

[data-payment-base-amount] {
    font-size: 20px !important;
}

.details-grid dt {
    font-size: 12px !important;
}

.details-grid dd {
    font-size: 14px !important;
}

.project-tabs a {
    font-size: 14px !important;
}

.project-header-card-v4 .project-header-meta-v4 {
    font-size: 14px !important;
}

.project-header-card-v4 .project-status-inline {
    font-size: 14px !important;
}


/* =========================================================
   v1.5.0 — команда объекта, часы и кабинеты рабочих
   ========================================================= */
.project-crew-strip{margin:2px 0 18px;padding:14px 0 16px;border-bottom:1px solid #edf0f5}.project-crew-strip-head strong,.project-crew-strip-head span{display:block}.project-crew-strip-head strong{font-size:12px}.project-crew-strip-head span{margin-top:3px;color:var(--muted);font-size:9px}.project-crew-rail{display:flex;gap:14px;align-items:flex-start;margin-top:13px;overflow-x:auto;padding:2px 2px 5px;scrollbar-width:thin}.project-crew-person,.project-crew-add{width:66px;flex:0 0 66px;text-align:center}.project-crew-person{display:grid;justify-items:center;gap:4px}.project-crew-avatar,.project-crew-add>span{width:54px;height:54px;display:grid;place-items:center;border-radius:999px}.project-crew-avatar{overflow:hidden;background:#f0f3f8;color:#52647c;font-size:13px;font-weight:800}.project-crew-avatar img{width:100%;height:100%;object-fit:cover}.project-crew-person.is-foreman .project-crew-avatar{box-shadow:0 0 0 3px #eef1ff}.project-crew-person strong{max-width:66px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}.project-crew-person small,.project-crew-add small{color:var(--muted);font-size:7.5px}.project-crew-add{border:0;background:transparent;cursor:pointer;color:var(--primary)}.project-crew-add>span{border:1.5px dashed #7782c9;background:#fff}.project-crew-add svg{width:18px;height:18px}.project-crew-add small{display:block;margin-top:6px;color:var(--primary);font-weight:700}.project-crew-person.is-new-crew{animation:crewAdded 1s ease}@keyframes crewAdded{from{opacity:0}to{opacity:1}}
.project-worker-modal[hidden],.work-hours-modal[hidden]{display:none!important}.project-worker-modal,.work-hours-modal{position:fixed;inset:0;z-index:13800;display:grid;place-items:center;padding:16px}.project-worker-modal-backdrop,.work-hours-modal-backdrop{position:absolute;inset:0;background:rgba(18,25,38,.42);backdrop-filter:blur(3px);opacity:0;transition:.17s}.project-worker-modal-dialog,.work-hours-modal-dialog{position:relative;z-index:1;width:min(520px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;padding:18px;border:1px solid #dde3ec;border-radius:18px;background:#fff;box-shadow:0 30px 90px rgba(25,34,54,.24);opacity:0;transform:translateY(12px) scale(.985);transition:.17s}.project-worker-modal.is-visible .project-worker-modal-backdrop,.work-hours-modal.is-visible .work-hours-modal-backdrop{opacity:1}.project-worker-modal.is-visible .project-worker-modal-dialog,.work-hours-modal.is-visible .work-hours-modal-dialog{opacity:1;transform:none}.project-worker-modal-head,.work-hours-modal-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px}.project-worker-modal-head h3,.work-hours-modal-head h3{margin:0;font-size:20px}.project-worker-modal-head p,.work-hours-modal-head p{margin:4px 0 0;color:var(--muted);font-size:9px}.project-worker-modal-head>button,.work-hours-modal-head>button{width:31px;height:31px;border:0;border-radius:8px;background:#f2f4f7;color:#737d8f;font-size:19px}.project-worker-modal-error,.work-hours-error{margin-bottom:10px;padding:9px 10px;border-radius:9px;background:#fff1f1;color:#c64c4c;font-size:9px}.project-worker-picker-list{display:grid;gap:6px}.project-worker-picker-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px;border:1px solid #e7eaf0;border-radius:11px}.project-worker-picker-row>div strong,.project-worker-picker-row>div small{display:block}.project-worker-picker-row>div strong{font-size:10px}.project-worker-picker-row>div small{margin-top:3px;color:var(--muted);font-size:8px}.project-worker-picker-action{min-height:32px!important;padding:0 11px!important;font-size:8px!important}
.hours-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.hours-page-head h1,.hours-page-head h2{margin:0;font-size:23px}.hours-page-head p{margin:5px 0 0;color:var(--muted);font-size:10px}.hours-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:14px}.hours-kpi-card{padding:15px;border:1px solid #e5e9f0;border-radius:14px;background:#fff}.hours-kpi-card span,.hours-kpi-card strong{display:block}.hours-kpi-card span{color:var(--muted);font-size:14px}.hours-kpi-card strong{margin-top:6px;font-size:20px}.hours-layout-grid,.hours-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr);gap:14px;margin-bottom:14px}.hours-dashboard-grid .hours-ranking-card:nth-child(3){grid-column:2}.hours-chart-card-wide{grid-row:span 2}.hours-bar-chart{height:210px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;align-items:end;padding-top:18px}.hours-bar-chart-14{grid-template-columns:repeat(14,minmax(18px,1fr));overflow-x:auto}.hours-bar-column{height:100%;display:grid;grid-template-rows:20px 1fr 18px;gap:5px;min-width:0;text-align:center}.hours-bar-value{font-size:7px;color:var(--muted);white-space:nowrap}.hours-bar-track{height:100%;display:flex;align-items:flex-end;justify-content:center;border-radius:8px;background:#f3f5f9;overflow:hidden}.hours-bar-track span{display:block;width:58%;min-height:3px;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,#6575f2,#4b5de6)}.hours-bar-column small{font-size:7px;color:var(--muted)}.hours-worker-mini-list{display:grid;gap:8px}.hours-worker-mini-list>div{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:8px;align-items:center}.hours-worker-mini-list>div strong{font-size:9px}.hours-worker-mini-list>div small{grid-column:2;color:var(--muted);font-size:7px}.hours-table-wrap{overflow-x:auto}.hours-table{width:100%;border-collapse:collapse;min-width:760px}.hours-table th,.hours-table td{padding:10px 8px;border-bottom:1px solid #edf0f4;text-align:left;font-size:9px;vertical-align:middle}.hours-table th{color:var(--muted);font-size:8px;font-weight:650}.hours-table-actions{width:32px}.icon-danger-button{width:29px;height:29px;display:grid;place-items:center;border:0;border-radius:8px;background:#fff1f1;color:#c64c4c;cursor:pointer}.icon-danger-button svg{width:13px;height:13px}.work-hours-fields-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.work-hours-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.hours-main-head{margin-bottom:16px}.hours-dashboard-page{max-width:1500px}.hours-ranking-list{display:grid;gap:4px}.hours-ranking-list>a,.hours-ranking-worker{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px;border-radius:10px;text-decoration:none;color:inherit}.hours-ranking-list>a:hover{background:#f7f8fc}.hours-ranking-list strong,.hours-ranking-list small{display:block}.hours-ranking-list strong{font-size:9.5px}.hours-ranking-list small{margin-top:3px;color:var(--muted);font-size:7.5px}.hours-ranking-list b{font-size:10px}.hours-ranking-worker{grid-template-columns:34px minmax(0,1fr) auto}.worker-directory-section+.worker-directory-section{margin-top:18px;padding-top:16px;border-top:1px solid #edf0f4}.worker-directory-subhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.worker-directory-subhead strong{font-size:11px}.worker-directory-subhead span{min-width:25px;padding:4px 7px;border-radius:999px;background:#f1f3f8;text-align:center;color:var(--muted);font-size:8px}.worker-profile-dashboard{margin:18px 0;padding-top:18px;border-top:1px solid #e8ecf2}.worker-profile-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.worker-profile-stats>div{padding:12px;border-radius:12px;background:#f7f9fc}.worker-profile-stats span,.worker-profile-stats strong{display:block}.worker-profile-stats span{color:var(--muted);font-size:12px}.worker-profile-stats strong{margin-top:5px;font-size:18px}.worker-profile-chart{height:125px;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;margin:15px 0}.worker-profile-chart>div{display:grid;grid-template-rows:1fr 16px;gap:4px;text-align:center}.worker-profile-chart>div>span{display:flex;align-items:flex-end;justify-content:center;border-radius:7px;background:#f1f3f8;overflow:hidden}.worker-profile-chart i{display:block;width:58%;min-height:3px;border-radius:6px 6px 2px 2px;background:#5669ed}.worker-profile-chart small{color:var(--muted);font-size:7px}.worker-profile-projects>.card-heading{display:flex;align-items:center;justify-content:space-between}.worker-profile-projects>div:last-child{display:grid;gap:6px}.worker-profile-projects>div:last-child>a{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:9px;background:#fafbfc;text-decoration:none;color:inherit}.worker-profile-projects strong{font-size:14px}
@media(max-width:1000px){.hours-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hours-layout-grid,.hours-dashboard-grid{grid-template-columns:1fr}.hours-dashboard-grid .hours-ranking-card:nth-child(3){grid-column:auto}.hours-chart-card-wide{grid-row:auto}.hours-bar-chart-14{min-width:620px}.hours-chart-card{overflow:hidden}}
@media(max-width:700px){.project-crew-strip{margin-bottom:14px}.project-crew-rail{gap:10px}.project-crew-person,.project-crew-add{width:60px;flex-basis:60px}.project-crew-avatar,.project-crew-add>span{width:48px;height:48px}.project-worker-modal,.work-hours-modal{padding:10px;place-items:center}.project-worker-modal-dialog,.work-hours-modal-dialog{width:100%;max-height:calc(100dvh - 20px)}.hours-page-head{flex-direction:column;align-items:stretch}.hours-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hours-kpi-card:last-child{grid-column:1/-1}.hours-kpi-card strong{font-size:17px}.hours-bar-chart{height:180px;gap:5px}.work-hours-fields-row{grid-template-columns:1fr}.worker-profile-stats{grid-template-columns:repeat(2,1fr)}}


/* =========================================================
   v1.5.1 — накопительные часы, рейтинг и mobile-first
   ========================================================= */

.project-hours-page,
.hours-dashboard-page {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.hours-kpi-grid-total {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.hours-kpi-card-primary {
    border-color: rgba(78, 95, 229, .18);
    background: linear-gradient(145deg, #f7f8ff, #fff);
}

.hours-ranking-grid-v151 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start;
}

.hours-object-ranking-card,
.hours-history-card {
    margin-bottom: 14px;
}

.hours-podium-list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.hours-podium-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 32px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #edf0f4;
    border-radius: 11px;
    background: #fff;
}

.hours-podium-link {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    color: inherit;
    text-decoration: none;
}

.hours-podium-link:hover {
    background: #fafbfe;
}

.hours-podium-row.is-top {
    border-color: rgba(83, 100, 220, .15);
    background: linear-gradient(135deg, rgba(83, 100, 220, .055), #fff);
}

.hours-rank-number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f2f4f8;
    color: #727c8e;
    font-size: 12px;
    font-weight: 800;
}

.hours-podium-row.is-place-1 .hours-rank-number {
    background: #fff4cf;
    color: #a77713;
}

.hours-podium-row.is-place-2 .hours-rank-number {
    background: #f0f3f7;
    color: #647082;
}

.hours-podium-row.is-place-3 .hours-rank-number {
    background: #faeee5;
    color: #9b683e;
}

.hours-rank-avatar {
    width: 36px !important;
    height: 36px !important;
}

.hours-rank-copy {
    min-width: 0;
}

.hours-rank-copy strong,
.hours-rank-copy small {
    display: block;
}

.hours-rank-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.hours-rank-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.hours-podium-row > b {
    white-space: nowrap;
    font-size: 16px;
}

.hours-history-list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.hours-history-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, .8fr);
    align-items: center;
    gap: 12px;
    padding: 10px 11px;
    border: 1px solid #edf0f4;
    border-radius: 11px;
    background: #fff;
}

.hours-history-main,
.hours-history-meta {
    min-width: 0;
}

.hours-history-main strong,
.hours-history-main small,
.hours-history-meta span,
.hours-history-meta time {
    display: block;
}

.hours-history-main strong {
    font-size: 14px;
}

.hours-history-main small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.hours-history-main a {
    color: inherit;
}

.hours-history-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.hours-history-change span {
    color: var(--muted);
    font-size: 14px;
}

.hours-history-change i {
    color: #9aa3b2;
    font-style: normal;
}

.hours-history-change strong {
    font-size: 14px;
}

.hours-history-change em {
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
}

.hours-history-change em.is-positive {
    background: #eaf8ef;
    color: #278552;
}

.hours-history-change em.is-negative {
    background: #fff0f0;
    color: #bd4d4d;
}

.hours-history-meta {
    text-align: right;
}

.hours-history-meta span {
    font-size: 14px;
}

.hours-history-meta time {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.work-hours-batch-dialog {
    width: min(600px, 100%) !important;
}

.work-hours-batch-list {
    display: grid;
    gap: 7px;
}

.work-hours-worker-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 125px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #e6eaf1;
    border-radius: 11px;
    background: #fff;
}

.work-hours-worker-avatar {
    width: 40px !important;
    height: 40px !important;
}

.work-hours-worker-copy {
    min-width: 0;
}

.work-hours-worker-copy strong,
.work-hours-worker-copy small {
    display: block;
}

.work-hours-worker-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.work-hours-worker-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.3;
}

.work-hours-worker-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    align-items: center;
    gap: 4px;
}

.work-hours-worker-input input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 8px;
    border: 1px solid #dce2eb;
    border-radius: 8px;
    background: #fff;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
}

.work-hours-worker-input b {
    color: var(--muted);
    font-size: 9px;
}

.work-hours-batch-note {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
}

.worker-profile-projects > div:last-child > a {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
}

.worker-profile-projects > div:last-child > a > div {
    min-width: 0;
}

.worker-profile-projects > div:last-child > a strong,
.worker-profile-projects > div:last-child > a small {
    display: block;
}

.worker-profile-projects > div:last-child > a small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.worker-profile-projects > div:last-child > a b {
    white-space: nowrap;
    font-size: 16px;
}

/* Старые дневные графики/таблицы больше не используются. */
.hours-bar-chart,
.worker-profile-chart,
.hours-table-wrap {
    max-width: 100%;
}

@media (max-width: 1000px) {
    .hours-ranking-grid-v151 {
        grid-template-columns: 1fr !important;
    }

    .hours-kpi-grid-total {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .project-hours-page,
    .hours-dashboard-page,
    .hours-object-ranking-card,
    .hours-history-card,
    .hours-ranking-card {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .hours-kpi-grid-total {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .hours-kpi-grid-total .hours-kpi-card:last-child {
        grid-column: auto !important;
    }

    .hours-kpi-card {
        min-width: 0;
        padding: 11px !important;
    }

    .hours-kpi-card span {
        font-size: 14px !important;
    }

    .hours-kpi-card strong {
        font-size: 20px !important;
    }

    .hours-podium-row {
        grid-template-columns: 27px 33px minmax(0, 1fr) auto;
        gap: 7px;
        padding: 9px 8px;
    }

    .hours-podium-link {
        grid-template-columns: 27px minmax(0, 1fr) auto;
    }

    .hours-rank-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .hours-rank-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .hours-rank-copy strong {
        font-size: 14px;
    }

    .hours-rank-copy small {
        font-size: 12px;
    }

    .hours-podium-row > b {
        font-size: 16px;
    }

    /*
     * История на телефоне становится карточкой из трёх строк —
     * горизонтальный скролл не нужен.
     */
    .hours-history-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 9px;
    }

    .hours-history-main {
        grid-column: 1;
        grid-row: 1;
    }

    .hours-history-change {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
    }

    .hours-history-meta {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-top: 7px;
        border-top: 1px solid #f0f2f5;
        text-align: left;
    }

    .hours-history-meta time {
        margin-top: 0;
        white-space: nowrap;
    }

    .work-hours-modal {
        padding: 8px !important;
    }

    .work-hours-batch-dialog {
        width: 100% !important;
        max-height: calc(100dvh - 16px) !important;
        padding: 14px !important;
    }

    .work-hours-worker-row {
        grid-template-columns: 36px minmax(0, 1fr) 94px;
        gap: 7px;
        padding: 8px;
    }

    .work-hours-worker-avatar {
        width: 34px !important;
        height: 34px !important;
    }

    .work-hours-worker-copy strong {
        font-size: 9px;
    }

    .work-hours-worker-copy small {
        font-size: 7px;
    }

    /*
     * 16px предотвращает автоматическое увеличение страницы
     * Safari при фокусе на поле часов.
     */
    .work-hours-worker-input input {
        min-height: 40px;
        font-size: 16px !important;
    }

    .work-hours-modal-actions {
        position: sticky;
        bottom: -14px;
        z-index: 2;
        margin: 12px -14px -14px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid #edf0f4;
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(10px);
    }
}

@media (max-width: 390px) {
    .hours-history-row {
        grid-template-columns: 1fr;
    }

    .hours-history-main,
    .hours-history-change,
    .hours-history-meta {
        grid-column: 1;
        grid-row: auto;
    }

    .hours-history-change {
        justify-content: flex-start;
    }

    .work-hours-worker-row {
        grid-template-columns: 32px minmax(0, 1fr) 82px;
    }
}


/* =========================================================
   v1.5.2 — визуальное обновление Dashboard / Команды / Часов
   ========================================================= */

.finance-journey-widget{overflow:visible}
.finance-journey-stage{min-height:250px;display:grid;place-items:center;padding:18px 8px 24px}
.finance-journey-ring{--paid-angle:calc(var(--finance-paid)*3.6deg);position:relative;width:205px;aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:conic-gradient(from -90deg,#84a7df 0deg,#6f97da var(--paid-angle),#ff8a8d var(--paid-angle),#ff9b9d 360deg);box-shadow:inset 0 0 28px rgba(255,255,255,.14),0 20px 44px rgba(52,72,115,.10)}
.finance-journey-ring:before{content:"";position:absolute;inset:22px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px rgba(227,232,240,.65)}
.finance-journey-hole{position:relative;z-index:2;display:grid;justify-items:center;text-align:center}
.finance-journey-hole span,.finance-journey-hole strong,.finance-journey-hole small{display:block}
.finance-journey-hole span{color:#6085ce;font-size:14px;font-weight:700}
.finance-journey-hole strong{margin-top:4px;color:#182033;font-size:24px;line-height:1;letter-spacing:-.05em}
.finance-journey-hole small{margin-top:5px;color:var(--muted);font-size:10px}
.finance-journey-bubble{position:absolute;z-index:4;min-width:92px;padding:8px 9px;border:1px solid rgba(218,224,235,.82);border-radius:12px;background:rgba(255,255,255,.88);box-shadow:0 10px 28px rgba(40,52,80,.10);backdrop-filter:blur(10px)}
.finance-journey-bubble strong,.finance-journey-bubble span{display:block}
.finance-journey-bubble strong{color:#273044;font-size:16px;line-height:1.2}
.finance-journey-bubble span{margin-top:3px;color:var(--muted);font-size:10px}
.finance-journey-bubble-paid{left:-34px;top:18px}
.finance-journey-bubble-balance{right:-39px;bottom:15px}
.finance-journey-widget .finance-donut-wrap,.finance-journey-widget .finance-donut{display:none!important}

.project-team-side-card{overflow:hidden}
.project-team-side-heading{margin-bottom:8px}
.project-team-side-heading p{margin:4px 0 0;color:var(--muted);font-size:8px}
.project-team-edit-button{width:34px;height:34px;display:grid;place-items:center;flex:0 0 auto;padding:0;border:1px solid #e5e9f0;border-radius:999px;background:#f8f9fb;color:#566176;cursor:pointer}
.project-team-edit-button svg{width:14px;height:14px}
.project-team-showcase{display:flex;align-items:flex-start;gap:8px;margin:10px -4px 0;padding:2px 4px 8px;overflow-x:auto;scrollbar-width:thin}
.project-team-person,.project-team-add{width:61px!important;flex:0 0 61px!important}
.project-team-person{position:relative;display:grid;justify-items:center;gap:4px}
.project-team-role-label{width:100%;min-height:22px;display:grid!important;place-items:end center;color:#7d8698!important;font-size:7px!important;line-height:1.15;text-align:center}
.project-team-avatar{width:50px!important;height:50px!important;border:5px solid #f2f4f7;box-sizing:content-box}
.project-team-person.is-manager .project-team-avatar{box-shadow:0 0 0 2px rgba(255,181,76,.32)}
.project-team-person.is-foreman .project-team-avatar{box-shadow:0 0 0 2px rgba(78,102,229,.25)}
.project-team-person strong{max-width:61px!important;font-size:8px!important}
.project-team-add{padding-top:22px}
.project-team-add>span{width:50px!important;height:50px!important;border-color:#b7bfd1!important;color:#67728a}
.project-team-allocation{display:grid;grid-template-columns:1.1fr 1fr 1.45fr .65fr;gap:4px;margin-top:10px}
.project-team-allocation span{height:7px;display:block;border-radius:999px}
.project-team-allocation .is-manager{background:#ffbd61}.project-team-allocation .is-foreman{background:#759be1}.project-team-allocation .is-carpenter{background:#61c99b}.project-team-allocation .is-carpenter-alt{background:#9a82df}
.project-team-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px;overflow:hidden;border:1px solid #e7ebf1;border-radius:11px}
.project-team-stats>div{min-width:0;padding:9px 10px}.project-team-stats>div:nth-child(odd){border-right:1px solid #e7ebf1}.project-team-stats>div:nth-child(-n+2){border-bottom:1px solid #e7ebf1}
.project-team-stats span,.project-team-stats strong{display:block}.project-team-stats span{color:var(--muted);font-size:7px}.project-team-stats strong{margin-top:3px;font-size:12px}

.hours-crew-showcase-card{margin-bottom:14px;padding:16px 18px!important;overflow:hidden}
.hours-crew-showcase-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.hours-crew-showcase-head h2{margin:0;font-size:18px}.hours-crew-showcase-head p{margin:4px 0 0;color:var(--muted);font-size:9px}
.hours-project-crew-rail{display:flex;align-items:flex-start;gap:17px;margin-top:14px;padding:4px 3px 8px;overflow-x:auto;scrollbar-width:thin}
.hours-crew-person,.hours-crew-add{position:relative;width:72px!important;flex:0 0 72px!important}
.hours-crew-person{display:grid!important;justify-items:center;gap:5px!important}
.hours-crew-role{min-height:18px;display:grid!important;place-items:end center;color:#717b8f!important;font-size:7.5px!important}
.hours-crew-avatar{width:58px!important;height:58px!important;border:6px solid #f1f3f6;box-sizing:content-box}
.hours-crew-hours-badge{position:absolute;top:62px;right:2px;z-index:3;min-width:25px;min-height:20px;display:grid;place-items:center;padding:2px 5px;border:2px solid #fff;border-radius:999px;background:#6f94dc;color:#fff;font-size:7px;font-weight:800;box-shadow:0 3px 8px rgba(47,72,120,.16)}
.hours-crew-person.is-foreman .hours-crew-hours-badge{background:#f1a83b}
.hours-crew-person strong{max-width:72px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8.5px!important}
.hours-crew-add{padding-top:18px}.hours-crew-add>span{width:58px!important;height:58px!important;border-color:#b8c0d0!important;color:#6d778b}.hours-crew-add small{margin-top:7px!important;color:#68748a!important}

@media(min-width:1181px){.project-content-grid{grid-template-columns:minmax(0,1fr) 355px!important}}
@media(max-width:1180px){.project-team-side-card{grid-column:1/-1}.project-team-showcase{gap:13px}}
@media(max-width:700px){
.finance-journey-stage{min-height:220px;padding:14px 5px 20px}.finance-journey-ring{width:175px}.finance-journey-bubble{min-width:77px;padding:7px 8px}.finance-journey-bubble-paid{left:-22px;top:14px}.finance-journey-bubble-balance{right:-24px;bottom:10px}.finance-journey-hole strong{font-size:27px}
.project-team-showcase{gap:8px}.project-team-person,.project-team-add{width:58px!important;flex-basis:58px!important}.project-team-avatar,.project-team-add>span{width:46px!important;height:46px!important}
.hours-crew-showcase-card{padding:14px!important}.hours-crew-showcase-head{flex-direction:column;align-items:stretch}.hours-crew-showcase-actions{display:flex}.hours-crew-showcase-actions .primary-button{width:100%;justify-content:center}
.hours-project-crew-rail{gap:10px;margin-left:-4px;margin-right:-4px;padding-left:4px;padding-right:4px}.hours-crew-person,.hours-crew-add{width:64px!important;flex-basis:64px!important}.hours-crew-avatar,.hours-crew-add>span{width:52px!important;height:52px!important}.hours-crew-hours-badge{top:58px;right:0}
}


/* =========================================================
   v1.5.3 — Команда объекта / Прогресс / Часы
   База: v1.5.2. Остальной дизайн CRM не меняем.
   ========================================================= */

/* ---------- Overview: композиция ---------- */

.project-overview-layout-v153 {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(315px, .8fr);
    gap: 14px;
    align-items: start;
}

.project-overview-main-v153,
.project-side-stack-v153 {
    min-width: 0;
    display: grid;
    gap: 14px;
}

/* ---------- Команда объекта ---------- */

.project-team-card-v153 {
    overflow: hidden;
}

.project-team-card-v153 .project-team-side-heading {
    margin-bottom: 5px;
}

.project-team-card-v153 .project-team-side-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.project-team-showcase-v153 {
    gap: 9px !important;
    margin: 10px -3px 0 !important;
    padding: 2px 3px 9px !important;
}

.project-team-person-v153,
.project-team-add-v153 {
    width: 66px !important;
    flex: 0 0 66px !important;
}

.project-team-person-v153 {
    display: grid !important;
    justify-items: center;
}

.project-team-person-v153 .project-team-role-label {
    min-height: 20px !important;
    font-size: 8px !important;
}

.project-team-person-v153 .project-team-avatar,
.project-team-add-v153 > span {
    width: 52px !important;
    height: 52px !important;
}

.project-team-person-v153 .project-team-avatar {
    border: 5px solid #f1f3f6 !important;
    box-sizing: content-box;
}

.project-team-person-v153.is-foreman .project-team-avatar {
    box-shadow: 0 0 0 2px rgba(82, 126, 218, .24) !important;
}

.project-team-person-v153 strong {
    max-width: 66px !important;
    margin-top: 3px;
    overflow: hidden;
    font-size: 8.5px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-team-add-v153 {
    padding-top: 20px !important;
}

.project-team-add-v153 > span {
    border: 1.5px dashed #afb7c5 !important;
}

.project-team-allocation-v153 {
    grid-template-columns: 1fr 3fr !important;
    gap: 5px !important;
    margin-top: 10px !important;
}

.project-team-allocation-v153 span {
    height: 7px !important;
    border-radius: 999px;
}

.project-team-allocation-v153 .is-foreman {
    background: #6d95df !important;
}

.project-team-allocation-v153 .is-carpenter {
    background: #57c898 !important;
}

.project-team-stats-v153 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 13px !important;
    overflow: hidden;
    border: 1px solid #e6e9ef !important;
    border-radius: 11px !important;
}

.project-team-stats-v153 > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 10px 11px !important;
    border: 0 !important;
}

.project-team-stats-v153 > div:first-child {
    border-right: 1px solid #e6e9ef !important;
}

.project-team-stat-icon-v153 {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #7f899b;
}

.project-team-stat-icon-v153 svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-team-stats-v153 > div > div > span,
.project-team-stats-v153 > div > div > strong {
    display: block;
}

.project-team-stats-v153 > div > div > span {
    color: #8d95a2 !important;
    font-size: 8px !important;
}

.project-team-stats-v153 > div > div > strong {
    margin-top: 2px !important;
    color: #242a34;
    font-size: 14px !important;
}

/* ---------- Прогресс проекта ---------- */

.project-progress-card-v153 {
    padding: 16px !important;
}

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

.project-progress-head-v153 h2 {
    margin: 0;
    font-size: 16px;
}

.project-progress-head-v153 > span {
    padding-top: 2px;
    color: #9199a5;
    font-size: 8px;
    white-space: nowrap;
}

.project-progress-body-v153 {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #e6e9ee;
    border-radius: 12px;
    background: #fff;
}

.project-progress-summary-v153 {
    padding: 16px;
    border-right: 1px solid #e6e9ee;
}

.project-progress-summary-v153 > span {
    color: #858e9b;
    font-size: 9px;
}

.project-progress-summary-v153 > strong {
    display: block;
    margin-top: 7px;
    color: #151922;
    font-size: 30px;
    line-height: 1;
}

.project-progress-bar-v153 {
    height: 8px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8ebef;
}

.project-progress-bar-v153 span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #5387df;
}

.project-progress-current-v153 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: #596474;
    font-size: 8px;
}

.project-progress-current-v153 svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-progress-stages-v153 {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(76px, 1fr));
    align-items: start;
    padding: 17px 10px 12px;
    overflow-x: auto;
}

.project-progress-stages-v153::before {
    content: "";
    position: absolute;
    top: 34px;
    left: 7%;
    right: 7%;
    height: 2px;
    background: #e5e8ed;
}

.project-progress-stage-v153 {
    position: relative;
    z-index: 1;
    min-width: 76px;
    display: grid;
    justify-items: center;
    text-align: center;
}

.project-progress-node-v153 {
    height: 34px;
    display: grid;
    place-items: center;
}

.project-progress-node-v153 > span {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 2px solid #e2e6ec;
    border-radius: 50%;
    background: #fff;
    color: #b3bac4;
}

.project-progress-node-v153 svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-progress-stage-v153.is-completed .project-progress-node-v153 > span {
    border-color: #5387df;
    background: #5387df;
    color: #fff;
}

.project-progress-stage-v153.is-current .project-progress-node-v153 > span {
    border-color: #5387df;
    color: #5387df;
    box-shadow: 0 0 0 4px #edf4ff;
}

.project-progress-stage-v153 > strong {
    max-width: 92px;
    margin-top: 6px;
    color: #747d8b;
    font-size: 8px;
    line-height: 1.25;
}

.project-progress-stage-v153.is-completed > strong,
.project-progress-stage-v153.is-current > strong {
    color: #282e38;
}

.project-progress-stage-v153 > small {
    margin-top: 4px;
    color: #a0a7b1;
    font-size: 6.5px;
}

/* ---------- Часы: шапка ---------- */

.hours-crew-showcase-card-v153 {
    padding: 15px 17px !important;
}

.hours-crew-showcase-card-v153 .hours-crew-showcase-head h2 {
    font-size: 17px !important;
}

.hours-crew-showcase-card-v153 .hours-crew-showcase-head p {
    font-size: 8px !important;
}

.hours-project-crew-rail-v153 {
    gap: 14px !important;
    margin-top: 11px !important;
    padding: 11px 15px 13px !important;
    border-radius: 13px;
    background: linear-gradient(180deg, #f7f8fa, #f2f4f7);
}

.hours-crew-person-v153,
.hours-crew-add-v153 {
    width: 70px !important;
    flex: 0 0 70px !important;
}

.hours-crew-person-v153 {
    position: relative;
}

.hours-crew-person-v153 .hours-crew-avatar,
.hours-crew-add-v153 > span {
    width: 55px !important;
    height: 55px !important;
}

.hours-crew-person-v153 .hours-crew-avatar {
    border: 5px solid rgba(255,255,255,.85) !important;
    box-shadow: 0 5px 14px rgba(40,52,74,.06);
}

.hours-crew-person-v153 .hours-crew-hours-badge {
    top: 59px !important;
    right: 0 !important;
    min-width: 27px;
    min-height: 21px;
    border-width: 2px;
    font-size: 7px !important;
}

.hours-crew-person-v153.is-foreman .hours-crew-hours-badge {
    background: #f0aa3e !important;
}

.hours-crew-person-v153 strong {
    max-width: 70px !important;
    font-size: 8px !important;
}

.hours-crew-add-v153 {
    padding-top: 18px !important;
}

/* ---------- Часы: KPI ---------- */

.hours-kpi-grid-v153 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 12px;
}

.hours-kpi-card-v153 {
    min-height: 88px;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 13px 15px !important;
}

.hours-kpi-icon-v153 {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf3ff;
    color: #4f83df;
}

.hours-kpi-icon-v153.is-users {
    background: #ebf8f1;
    color: #35ae70;
}

.hours-kpi-icon-v153.is-average {
    background: #fff4e4;
    color: #e9a42f;
}

.hours-kpi-icon-v153 svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hours-kpi-card-v153 > div > span,
.hours-kpi-card-v153 > div > strong {
    display: block;
}

.hours-kpi-card-v153 > div > span {
    color: #8d95a2;
    font-size: 8px;
}

.hours-kpi-card-v153 > div > strong {
    margin-top: 3px;
    color: #202630;
    font-size: 16px;
}

/* ---------- Часы: рейтинг + история ---------- */

.hours-lower-grid-v153 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.hours-ranking-card-v153,
.hours-history-card-v153 {
    min-width: 0;
    margin-bottom: 0 !important;
}

.hours-ranking-table-v153,
.hours-history-table-v153 {
    min-width: 0;
}

.hours-ranking-head-v153,
.hours-ranking-row-v153 {
    display: grid;
    grid-template-columns: 42px minmax(130px, 1.4fr) 78px minmax(75px, .8fr);
    align-items: center;
    gap: 8px;
}

.hours-ranking-head-v153 {
    padding: 0 5px 7px;
    color: #959da8;
    font-size: 7px;
}

.hours-ranking-row-v153 {
    min-height: 53px;
    padding: 7px 5px;
    border-top: 1px solid #edf0f3;
}

.hours-place-v153 {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #505a68;
    font-size: 8px;
    font-weight: 800;
}

.hours-place-v153.is-top {
    background: #eef1f5;
}

.hours-place-v153.is-place-1 {
    background: #f8bd45;
    color: #fff;
}

.hours-place-v153.is-place-2 {
    background: #aab3c2;
    color: #fff;
}

.hours-place-v153.is-place-3 {
    background: #d98759;
    color: #fff;
}

.hours-ranking-user-v153 {
    min-width: 0;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
}

.hours-ranking-user-v153 .avatar {
    width: 29px !important;
    height: 29px !important;
    font-size: 7px !important;
}

.hours-ranking-user-v153 strong,
.hours-ranking-user-v153 small {
    display: block;
}

.hours-ranking-user-v153 strong {
    overflow: hidden;
    color: #303641;
    font-size: 8.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hours-ranking-user-v153 small {
    margin-top: 2px;
    color: #9aa1ac;
    font-size: 6.5px;
}

.hours-ranking-value-v153 {
    color: #333944;
    font-size: 8.5px;
    white-space: nowrap;
}

.hours-ranking-progress-v153 {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf2;
}

.hours-ranking-progress-v153 span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #5d8dde;
}

.hours-history-head-v153,
.hours-history-row-v153 {
    display: grid;
    grid-template-columns: 94px minmax(100px, 1.15fr) minmax(95px, 1fr) 72px;
    align-items: center;
    gap: 8px;
}

.hours-history-head-v153 {
    padding: 0 5px 7px;
    color: #959da8;
    font-size: 7px;
}

.hours-history-row-v153 {
    min-height: 53px;
    padding: 7px 5px;
    border-top: 1px solid #edf0f3;
}

.hours-history-row-v153 time {
    color: #6f7886;
    font-size: 7px;
}

.hours-history-user-v153 strong,
.hours-history-user-v153 small,
.hours-history-action-v153 strong,
.hours-history-action-v153 small {
    display: block;
}

.hours-history-user-v153 strong,
.hours-history-action-v153 strong {
    overflow: hidden;
    color: #343a45;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hours-history-user-v153 small,
.hours-history-action-v153 small {
    margin-top: 2px;
    color: #9ba2ac;
    font-size: 10px;
}

.hours-history-row-v153 > strong {
    justify-self: end;
    font-size: 8px;
    white-space: nowrap;
}

.hours-history-row-v153 > strong.is-positive {
    color: #39a96c;
}

.hours-history-row-v153 > strong.is-negative {
    color: #c45d5d;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
    .project-overview-layout-v153 {
        grid-template-columns: 1fr;
    }

    .project-side-stack-v153 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-team-card-v153 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .hours-lower-grid-v153 {
        grid-template-columns: 1fr;
    }

    .hours-kpi-grid-v153 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .project-side-stack-v153 {
        grid-template-columns: 1fr;
    }

    .project-progress-body-v153 {
        grid-template-columns: 1fr;
    }

    .project-progress-summary-v153 {
        border-right: 0;
        border-bottom: 1px solid #e6e9ee;
    }

    .project-progress-stages-v153 {
        grid-template-columns: repeat(6, 78px);
    }

    .hours-kpi-grid-v153 {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
    }

    .hours-kpi-card-v153 {
        min-height: 72px;
    }

    .hours-ranking-head-v153 {
        display: none;
    }

    .hours-ranking-row-v153 {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        gap: 7px;
        padding: 8px 2px;
    }

    .hours-ranking-progress-v153 {
        grid-column: 2 / -1;
        width: 100%;
    }

    .hours-history-head-v153 {
        display: none;
    }

    .hours-history-row-v153 {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        padding: 9px 2px;
    }

    .hours-history-row-v153 time {
        grid-column: 1;
        grid-row: 2;
    }

    .hours-history-user-v153 {
        grid-column: 1;
        grid-row: 1;
    }

    .hours-history-action-v153 {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
    }

    .hours-history-row-v153 > strong {
        grid-column: 2;
        grid-row: 1;
    }
}

@media (max-width: 520px) {
    .project-progress-card-v153 {
        padding: 12px !important;
    }

    .project-progress-head-v153 {
        display: block;
    }

    .project-progress-head-v153 > span {
        display: block;
        margin-top: 5px;
    }

    .project-team-showcase-v153,
    .hours-project-crew-rail-v153 {
        overflow-x: auto;
    }

    .project-team-stats-v153 > div {
        grid-template-columns: 27px minmax(0, 1fr);
        padding: 9px !important;
    }

    .hours-crew-showcase-card-v153 {
        padding: 12px !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-head {
        gap: 9px;
    }
}


/* =========================================================
   v1.5.4 — исправления Команды / Прогресса / Часов
   ========================================================= */

.project-team-card-v153 .project-team-side-heading {
    align-items: center;
}

.project-team-card-v153 .project-team-side-heading > div {
    min-height: 34px;
    display: flex;
    align-items: center;
}

/* На случай кеша старой разметки скрываем удалённый блок под progressbar. */
.project-progress-current-v153 {
    display: none !important;
}

/* KPI часов: старые общие правила .hours-kpi-card span больше не перекрывают иконки. */
.hours-kpi-card-v154 {
    min-width: 0;
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 15px !important;
}

.hours-kpi-card-v154 > .hours-kpi-icon-v154 {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 50% !important;
    background: #edf3ff !important;
    color: #4f83df !important;
    line-height: 0 !important;
}

.hours-kpi-card-v154 > .hours-kpi-icon-v154.is-users {
    background: #ebf8f1 !important;
    color: #35ae70 !important;
}

.hours-kpi-card-v154 > .hours-kpi-icon-v154.is-average {
    background: #fff4e4 !important;
    color: #e5a02c !important;
}

.hours-kpi-card-v154 > .hours-kpi-icon-v154 svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.hours-kpi-card-v154 > div {
    min-width: 0;
}

.hours-kpi-card-v154 > div > span {
    display: block !important;
    margin: 0 !important;
    color: #8d95a2 !important;
    font-size: 8px !important;
    line-height: 1.2 !important;
}

.hours-kpi-card-v154 > div > strong {
    display: block !important;
    margin: 5px 0 0 !important;
    color: #202630 !important;
    font-size: 17px !important;
    line-height: 1.05 !important;
}

/* Шапка часов без лишней подписи. */
.hours-crew-showcase-card-v153 .hours-crew-showcase-head {
    align-items: center;
}

.hours-crew-showcase-card-v153 .hours-crew-showcase-head > div:first-child {
    min-height: 36px;
    display: flex;
    align-items: center;
}

.hours-crew-showcase-card-v153 .hours-crew-showcase-head h2 {
    margin: 0 !important;
}

/* SVG команды и этапов всегда видимы. */
.project-team-stat-icon-v153 svg,
.project-progress-node-v153 svg {
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

@media (max-width: 760px) {
    .hours-kpi-card-v154 {
        grid-template-columns: 42px minmax(0, 1fr) !important;
        gap: 10px !important;
        min-height: 70px !important;
        padding: 11px 12px !important;
    }

    .hours-kpi-card-v154 > .hours-kpi-icon-v154 {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    .hours-kpi-card-v154 > .hours-kpi-icon-v154 svg {
        width: 20px !important;
        height: 20px !important;
    }

    .hours-kpi-card-v154 > div > strong {
        font-size: 15px !important;
    }
}


/* =========================================================
   v1.5.5 — Команда / Финансы / мобильный прогресс
   ========================================================= */

/* Команда объекта: без цветных полос. */
.project-team-allocation-v153 {
    display: none !important;
}

/* Прораб и Плотники: иконка, должность и число в одну строку. */
.project-team-stats-v155 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 13px !important;
    overflow: hidden !important;
    border: 1px solid #e6e9ef !important;
    border-radius: 11px !important;
}

.project-team-stats-v155 > div {
    min-width: 0;
    display: grid !important;
    grid-template-columns: 27px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 10px 11px !important;
    border: 0 !important;
}

.project-team-stats-v155 > div:first-child {
    border-right: 1px solid #e6e9ef !important;
}

.project-team-stats-v155 .project-team-stat-icon-v153 {
    width: 27px !important;
    height: 27px !important;
}

.project-team-stats-v155 .project-team-stat-icon-v153 svg {
    width: 19px !important;
    height: 19px !important;
}

.project-team-stat-label-v155 {
    min-width: 0;
    overflow: hidden;
    color: #818a99 !important;
    font-size: 8.5px !important;
    font-weight: 500 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-team-stats-v155 > div > strong {
    margin: 0 !important;
    color: #222832 !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

/* Финансы: способ оплаты располагается рядом с заголовком. */
.finance-heading-v155 {
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
}

.finance-heading-v155 h2 {
    margin: 0 !important;
}

.finance-heading-v155 .payment-method-badge {
    margin: 0 !important;
    white-space: nowrap;
}

/* Мобильный progress-bar скрыт на desktop. */
.mobile-project-progress-v155 {
    display: none !important;
}

/*
 * На телефоне большую карточку «Прогресс проекта» не показываем.
 * Вместо неё — одна строка в «Информация об объекте».
 */
@media (max-width: 760px) {
    .project-progress-card-v153 {
        display: none !important;
    }

    .mobile-project-progress-v155 {
        display: block !important;
        padding-top: 12px !important;
        padding-bottom: 14px !important;
    }

    .mobile-project-progress-v155 dt {
        margin-bottom: 14px !important;
    }

    .mobile-project-progress-v155 dd {
        width: 100%;
        display: block !important;
        overflow: visible !important;
    }

    .mobile-project-progress-track-v155 {
        position: relative;
        width: 100%;
        height: 7px;
        margin: 16px 0 15px;
        overflow: visible;
        border-radius: 999px;
        background: #e4e8ee;
    }

    .mobile-project-progress-fill-v155 {
        position: absolute;
        inset: 0 auto 0 0;
        display: block;
        border-radius: inherit;
        background: #5387df;
    }

    .mobile-project-progress-dot-v155 {
        position: absolute;
        top: 50%;
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        border: 4px solid #fff;
        border-radius: 50%;
        background: #5387df;
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        box-shadow:
            0 0 0 2px #5387df,
            0 5px 14px rgba(55, 93, 155, .18);
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    .project-team-stats-v155 > div {
        grid-template-columns: 24px minmax(0, 1fr) auto !important;
        gap: 6px !important;
        padding: 9px !important;
    }

    .project-team-stats-v155 .project-team-stat-icon-v153 {
        width: 24px !important;
        height: 24px !important;
    }

    .project-team-stats-v155 .project-team-stat-icon-v153 svg {
        width: 17px !important;
        height: 17px !important;
    }

    .project-team-stat-label-v155 {
        font-size: 8px !important;
    }

    .project-team-stats-v155 > div > strong {
        font-size: 14px !important;
    }
}


/* =========================================================
   v1.5.6 — mobile Часы + кнопка Команды + Dashboard
   ========================================================= */

/* На телефоне заголовок «Часы по объекту» и кнопка — одна строка. */
@media (max-width: 760px) {
    .hours-crew-showcase-card-v153 .hours-crew-showcase-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-head > div:first-child {
        min-width: 0;
        min-height: 0 !important;
        display: block !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-head h2 {
        margin: 0 !important;
        overflow: hidden;
        font-size: 15px !important;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions {
        min-width: 0;
        display: block !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions .primary-button {
        width: auto !important;
        min-height: 36px !important;
        justify-content: center;
        padding: 0 10px !important;
        font-size: 9px !important;
        white-space: nowrap;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions .primary-button svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Три KPI всегда располагаются в одну строку. */
    .hours-kpi-grid.hours-kpi-grid-v153 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 {
        min-width: 0 !important;
        min-height: 68px !important;
        grid-template-columns: 32px minmax(0, 1fr) !important;
        gap: 6px !important;
        padding: 9px 8px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-icon-v154 {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-icon-v154 svg {
        width: 16px !important;
        height: 16px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > span {
        min-height: 20px;
        display: flex !important;
        align-items: flex-end;
        font-size: 6.8px !important;
        line-height: 1.15 !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > strong {
        margin-top: 3px !important;
        overflow: hidden;
        font-size: 12px !important;
        line-height: 1.05 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/*
 * На обычной ширине телефона три карточки помещаются лучше без иконок.
 * Оставляем только подпись и значение, всё равно в одну строку.
 */
@media (max-width: 520px) {
    .hours-kpi-grid-v153 .hours-kpi-card-v154 {
        display: block !important;
        padding: 9px 7px !important;
        text-align: left;
    }

    .hours-kpi-grid-v153 .hours-kpi-icon-v154 {
        display: none !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > span {
        min-height: 24px;
        font-size: 7px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > strong {
        margin-top: 4px !important;
        font-size: 13px !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-head h2 {
        font-size: 14px !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions .primary-button {
        min-height: 34px !important;
        padding: 0 8px !important;
        font-size: 8px !important;
    }
}

@media (max-width: 370px) {
    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions .primary-button svg {
        display: none !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions .primary-button {
        padding: 0 7px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > span {
        font-size: 6.5px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > strong {
        font-size: 12px !important;
    }
}


/* =========================================================
   v1.5.7 — mobile KPI часов строго в одну строку
   ========================================================= */

/*
 * Старый mobile-стиль v1.5.0:
 * .hours-kpi-card:last-child { grid-column: 1 / -1; }
 * растягивал третью карточку на всю вторую строку.
 * Явно сбрасываем его только для новой сетки часов.
 */
@media (max-width: 760px) {
    .hours-kpi-grid.hours-kpi-grid-v153 {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .hours-kpi-grid.hours-kpi-grid-v153 > .hours-kpi-card,
    .hours-kpi-grid.hours-kpi-grid-v153 > .hours-kpi-card:last-child {
        grid-column: auto !important;
        grid-row: auto !important;
        min-width: 0 !important;
        width: auto !important;
    }
}

@media (max-width: 520px) {
    .hours-kpi-grid.hours-kpi-grid-v153 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .hours-kpi-grid.hours-kpi-grid-v153 > .hours-kpi-card {
        min-height: 64px !important;
        padding: 9px 6px !important;
    }

    .hours-kpi-grid.hours-kpi-grid-v153 > .hours-kpi-card:last-child {
        grid-column: auto !important;
    }
}


/* =========================================================
   v1.5.8 — компактная Информация об объекте
   ========================================================= */

@media (min-width: 1181px) {
    .project-overview-layout-v153 {
        grid-template-columns:
            minmax(0, .94fr)
            minmax(390px, 1.06fr) !important;
    }
}

.project-info-card-v158 {
    padding: 15px !important;
}

.project-info-heading-v158 {
    margin-bottom: 11px !important;
}

.project-info-heading-v158 h2 {
    font-size: 17px !important;
}

.project-info-grid-v158 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    background: #fff;
}

.project-info-item-v158 {
    min-width: 0;
    min-height: 62px;
    display: grid;
    grid-template-columns: 31px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-bottom: 1px solid #e8ebef;
}

.project-info-item-v158:nth-child(odd) {
    border-right: 1px solid #e8ebef;
}

.project-info-item-v158:nth-last-child(-n+2) {
    border-bottom: 0;
}

.project-info-icon-v158 {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    color: #7d8798;
}

.project-info-icon-v158 svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-info-item-v158 > div {
    min-width: 0;
}

.project-info-item-v158 small,
.project-info-item-v158 strong {
    display: block;
}

.project-info-item-v158 small {
    margin-bottom: 3px;
    color: #9299a5;
    font-size: 8px;
    line-height: 1.15;
}

.project-info-item-v158 strong {
    min-width: 0;
    overflow: hidden;
    color: #2d333d;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.project-info-item-v158 a {
    color: inherit;
    text-decoration: none;
}

.project-contract-download-v158 {
    max-width: 100%;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
}

.project-contract-download-v158 > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-contract-download-v158:hover {
    color: #416fc5;
}

.project-contract-download-v158 svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.project-info-empty-v158 {
    color: #a4aab3;
    font-weight: 500;
}

.project-info-stage-v158 {
    width: fit-content;
    display: inline-flex !important;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 8px !important;
    line-height: 1 !important;
}

.project-info-status-v158 {
    display: flex !important;
    align-items: center;
    gap: 7px;
}

.project-info-status-v158 i {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.project-info-status-v158 i.is-building {
    background: #4fc997;
}

.project-info-status-v158 i.is-completed {
    background: #608ddb;
}

.project-info-manager-v158 {
    display: flex !important;
    align-items: center;
    gap: 7px;
}

.project-info-manager-avatar-v158 {
    width: 25px !important;
    height: 25px !important;
    flex: 0 0 auto;
    font-size: 7px !important;
}

.project-info-manager-v158 > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-info-extra-v158 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.project-info-extra-v158 > div {
    min-width: 0;
    padding: 7px 8px;
    border-radius: 8px;
    background: #f7f8fa;
}

.project-info-extra-v158 > div > span,
.project-info-extra-v158 > div > strong {
    display: block;
}

.project-info-extra-v158 > div > span {
    color: #989faa;
    font-size: 6.8px;
}

.project-info-extra-v158 > div > strong {
    margin-top: 3px;
    overflow: hidden;
    color: #49505c;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-note-v158 {
    margin-top: 8px !important;
    padding: 9px 10px !important;
}

.project-contract-edit-field-v158 input[type="file"] {
    padding: 8px !important;
}

.project-contract-current-v158 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid #e5e8ed;
    border-radius: 10px;
    background: #f8f9fa;
}

.project-contract-current-v158 > a {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    color: #4b6fb4;
    font-size: 9px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-contract-current-v158 > a svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.project-contract-current-v158 > label {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: #7e8795;
    font-size: 8px;
}

@media (max-width: 760px) {
    .project-info-card-v158 {
        padding: 12px !important;
    }

    .project-info-grid-v158 {
        grid-template-columns: 1fr;
    }

    .project-info-item-v158 {
        min-height: 56px;
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 9px;
        border-right: 0 !important;
        border-bottom: 1px solid #e8ebef !important;
    }

    .project-info-item-v158:last-child {
        border-bottom: 0 !important;
    }

    .project-info-icon-v158 {
        width: 25px;
        height: 25px;
    }

    .project-info-icon-v158 svg {
        width: 20px;
        height: 20px;
    }

    .project-info-item-v158 strong {
        font-size: 11px;
    }

    .project-info-extra-v158 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-info-mobile-progress-v158 {
        grid-column: 1 / -1;
        display: block !important;
        padding: 8px 10px 13px !important;
        overflow: visible;
    }

    .project-info-mobile-progress-v158 > span {
        margin-bottom: 14px;
    }

    .project-info-mobile-progress-v158 .mobile-project-progress-track-v155 {
        margin: 16px 0 13px;
    }

    .project-contract-current-v158 {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   v1.5.9 — Overview 70/30 + avatar Ответственного
   ========================================================= */

/* Desktop: Информация/Прогресс = 70%, Команда/Финансы = 30%. */
@media (min-width: 1181px) {
    .project-overview-layout-v153 {
        grid-template-columns:
            minmax(0, 7fr)
            minmax(320px, 3fr) !important;
    }
}

/* В строке «Ответственный» avatar занимает место обычной иконки. */
.project-info-manager-icon-avatar-v159 {
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    align-self: center;
    font-size: 7px !important;
    box-shadow: none !important;
}

.project-info-manager-icon-avatar-v159 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.project-info-manager-item-v159 .project-info-manager-v158 {
    display: block !important;
}

.project-info-manager-item-v159 .project-info-manager-v158 > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .project-info-manager-icon-avatar-v159 {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px !important;
    }
}


/* =========================================================
   v1.5.10 — Progress responsive overflow
   ========================================================= */

/*
 * Если JavaScript определил, что project-progress-stages-v153
 * не помещается и получил горизонтальный скролл, левый блок
 * project-progress-summary-v153 скрывается.
 */
.project-progress-body-v153.is-stages-overflowing {
    grid-template-columns: minmax(0, 1fr) !important;
}

.project-progress-body-v153.is-stages-overflowing .project-progress-summary-v153 {
    display: none !important;
}

.project-progress-body-v153.is-stages-overflowing .project-progress-stages-v153 {
    width: 100%;
    min-width: 0;
}

/* На мобильных summary и так не нужен, если шкала переполняется. */
@media (max-width: 760px) {
    .project-progress-body-v153.is-stages-overflowing {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* =========================================================
   v1.5.11 — стабильный Progress без JS-перерисовок
   ========================================================= */

/*
 * Убираем зависимость от JS/ResizeObserver.
 * Карточка сама определяет свою ширину через container query.
 */
.project-progress-card-v153 {
    container-type: inline-size;
}

/*
 * Старый динамический класс v1.5.10 больше не должен влиять
 * на отображение, даже если остался в кеше старой страницы.
 */
.project-progress-body-v153.is-stages-overflowing {
    grid-template-columns: 185px minmax(0, 1fr) !important;
}

.project-progress-body-v153.is-stages-overflowing .project-progress-summary-v153 {
    display: block !important;
}

/*
 * При недостаточной ширине карточки скрываем summary один раз
 * средствами CSS и отдаём всю ширину шкале этапов.
 */
@container (max-width: 680px) {
    .project-progress-body-v153,
    .project-progress-body-v153.is-stages-overflowing {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .project-progress-summary-v153,
    .project-progress-body-v153.is-stages-overflowing .project-progress-summary-v153 {
        display: none !important;
    }

    .project-progress-stages-v153 {
        width: 100%;
        min-width: 0;
    }
}

/* Fallback для старых браузеров без container queries. */
@supports not (container-type: inline-size) {
    @media (max-width: 900px) {
        .project-progress-body-v153,
        .project-progress-body-v153.is-stages-overflowing {
            grid-template-columns: minmax(0, 1fr) !important;
        }

        .project-progress-summary-v153,
        .project-progress-body-v153.is-stages-overflowing .project-progress-summary-v153 {
            display: none !important;
        }
    }
}


/* =========================================================
   v1.5.12 — Overview 65:25 + пользовательские font-size
   ========================================================= */

/* Overview: левая часть 65, правая 25. */
@media (min-width: 1181px) {
    .project-overview-layout-v153 {
        grid-template-columns:
            minmax(0, 65fr)
            minmax(0, 25fr) !important;
    }
}

/*
 * Ниже перенесены ТОЛЬКО изменения font-size
 * из присланного пользователем app(1).css.
 * Остальные свойства из файла не применяются.
 */

.text-link {
    font-size: 15px;
}

.sidebar-user-copy strong {
    font-size: 14px;
}

.sidebar-user-copy small {
    font-size: 10px;
}

.sidebar-logout-button {
    font-size: 12px;
}

.project-page .info-list dt,
.project-page .compact-list span,
.project-page .finance-split span,
.project-page .payment-summary-grid span,
.project-page .document-main span,
.project-page .payments-timeline span,
.project-page .payments-timeline small {
    font-size: 12px !important;
}

.project-page .info-list dd,
.project-page .compact-list b,
.project-page .finance-split strong,
.project-page .payment-summary-grid strong,
.project-page .document-main strong {
    font-size: 14px !important;
}

.finance-total-breakdown {
    font-size: 12px;
}

.project-team-person-v153 .project-team-role-label {
    font-size: 10px !important;
}

.project-team-person-v153 strong {
    font-size: 10px !important;
}

.project-progress-head-v153 > span {
    font-size: 12px;
}

.project-progress-summary-v153 > span {
    font-size: 11px;
}

.project-progress-stage-v153 > strong {
    font-size: 9px;
}

.project-progress-stage-v153 > small {
    font-size: 8px;
}

.project-team-stat-label-v155 {
    font-size: 12px !important;
}

.project-team-stats-v155 > div > strong {
    font-size: 16px !important;
}

.project-info-item-v158 small {
    font-size: 12px;
}

.project-info-item-v158 strong {
    font-size: 14px;
}

.project-info-extra-v158 > div > span {
    font-size: 10px;
}

.project-info-extra-v158 > div > strong {
    font-size: 14px;
}

@media (max-width: 760px) {
    .project-info-item-v158 strong {
        font-size: 14px;
    }
}


/* =========================================================
   v1.5.13 — Overview 60/40 + порядок информации
   ========================================================= */

@media (min-width: 1181px) {
    .project-overview-layout-v153 {
        grid-template-columns:
            minmax(0, 3fr)
            minmax(0, 2fr) !important;
    }
}

/* Теперь в основной сетке 14 информационных элементов = 7 строк. */
.project-info-grid-v513 > .project-info-item-v158:nth-last-child(-n+2) {
    border-bottom: 0 !important;
}

/*
 * Mobile progress является отдельным элементом внутри grid,
 * но на desktop полностью исключён из раскладки.
 */
.project-info-mobile-progress-v513 {
    display: none !important;
}

.project-info-extra-v513 {
    grid-template-columns: 1fr !important;
}

@media (max-width: 760px) {
    .project-info-grid-v513 {
        grid-template-columns: 1fr !important;
    }

    .project-info-grid-v513 > .project-info-item-v158 {
        border-right: 0 !important;
        border-bottom: 1px solid #e8ebef !important;
    }

    .project-info-grid-v513 > .project-info-item-v158:last-child {
        border-bottom: 0 !important;
    }

    .project-info-mobile-progress-v513 {
        grid-column: 1 / -1;
        display: block !important;
        padding: 8px 10px 13px !important;
        border-bottom: 1px solid #e8ebef !important;
        background: #fff !important;
    }

    .project-info-mobile-progress-v513 > span {
        margin-bottom: 14px;
        color: #989faa;
        font-size: 10px;
    }
}


/* =========================================================
   v1.5.14 — размеры из app(2).css + линии последних ячеек
   ========================================================= */

/*
 * Применены только пользовательские изменения font-size
 * из присланного app(2).css. Остальные свойства файла
 * не копируются.
 */

@media (max-width: 700px) {
    .project-back-link {
        font-size: 12px;
    }

    .project-header-card-v4 .project-header-text-action {
        font-size: 10px !important;
    }

    .project-page .card-heading h2 {
        font-size: 18px !important;
    }
}

.project-crew-person small,
.project-crew-add small {
    font-size: 10px;
}

.hours-crew-role {
    font-size: 12px !important;
}

.hours-crew-showcase-card-v153 .hours-crew-showcase-head h2 {
    font-size: 20px !important;
}

.hours-crew-person-v153 strong {
    font-size: 12px !important;
}

.hours-ranking-head-v153 {
    font-size: 10px;
}

.hours-place-v153 {
    font-size: 10px;
}

.hours-ranking-user-v153 .avatar {
    font-size: 8px !important;
}

.hours-ranking-user-v153 strong {
    font-size: 14px;
}

.hours-ranking-user-v153 small {
    font-size: 10px;
}

.hours-ranking-value-v153 {
    font-size: 14px;
}

.hours-history-head-v153 {
    font-size: 10px;
}

.hours-history-row-v153 time {
    font-size: 10px;
}

.hours-history-action-v153 strong {
    font-size: 12px;
}

.hours-history-action-v153 small {
    font-size: 10px;
}

.hours-history-row-v153 > strong {
    font-size: 12px;
}

.hours-kpi-card-v154 > div > strong {
    font-size: 20px !important;
}

@media (max-width: 520px) {
    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > span {
        font-size: 10px !important;
    }

    .hours-kpi-grid-v153 .hours-kpi-card-v154 > div > strong {
        font-size: 18px !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-head h2 {
        font-size: 16px !important;
    }

    .hours-crew-showcase-card-v153 .hours-crew-showcase-actions .primary-button {
        font-size: 12px !important;
    }
}

/*
 * После добавления mobile progress скрытый элемент учитывался в :nth-child(),
 * поэтому у последних 4 ячеек сместилась логика odd/even и исчезла
 * центральная вертикальная линия.
 * Явно задаём левую и правую сторону для двух последних строк.
 */
.project-info-grid-v513 > .project-info-left-v514 {
    border-right: 1px solid #e8ebef !important;
}

.project-info-grid-v513 > .project-info-right-v514 {
    border-right: 0 !important;
}

@media (max-width: 760px) {
    .project-info-grid-v513 > .project-info-left-v514,
    .project-info-grid-v513 > .project-info-right-v514 {
        border-right: 0 !important;
    }
}


/* =========================================================
   v1.5.16 — Dashboard / меню пользователя
   ========================================================= */

/* KPI статусов стали компактнее по высоте. */
.dashboard-status-kpis .kpi-card {
    min-height: 82px !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}

/* Меню пользователя в нижней части sidebar. */
.sidebar-account-footer {
    position: relative;
}

.sidebar-user-menu-wrap {
    position: relative;
}

.sidebar-user-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.sidebar-user-trigger:hover {
    background: #f7f8fb;
    border-radius: 11px;
}

.sidebar-user-menu-chevron {
    width: 8px;
    height: 8px;
    margin-left: auto;
    flex: 0 0 auto;
    border-right: 1.5px solid #8992a3;
    border-bottom: 1.5px solid #8992a3;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .16s ease;
}

.sidebar-user-menu-wrap.is-open .sidebar-user-menu-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.sidebar-user-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 90;
    overflow: hidden;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(30, 41, 69, .14);
}

.sidebar-user-menu[hidden] {
    display: none !important;
}

.sidebar-user-menu-item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #4f5a70;
    text-align: left;
    cursor: pointer;
}

.sidebar-user-menu-item:hover {
    background: #f5f7fb;
}

.sidebar-user-menu-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.sidebar-user-menu-form {
    margin: 2px 0 0;
    padding-top: 2px;
    border-top: 1px solid #eef0f4;
}

.sidebar-user-menu-logout:hover {
    background: #fff4f4;
    color: #cf3f3f;
}

/* На мобильном поднимаем левый пузырь финансов чуть выше центра. */
@media (max-width: 700px) {
    .finance-journey-bubble.finance-journey-bubble-paid {
        top: -4px !important;
    }

    .dashboard-status-kpis .kpi-card {
        min-height: 74px !important;
        padding-top: 9px !important;
        padding-bottom: 9px !important;
    }
}


/* =========================================================
   v1.5.17 — Объекты: фильтр по кнопке / карточка / сотрудники
   ========================================================= */

/* Шапка: слева действия, рядом статусы. */
.objects-topline-v517 {
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: wrap;
}

.objects-header-actions-v517 {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.objects-status-tabs-v517 {
    flex: 0 1 auto !important;
}

.objects-header-actions-v517 .objects-inline-add {
    margin-left: 0 !important;
}

/* «Открыть фильтр» — отдельная серая кнопка. */
.objects-filter-toggle-v517 {
    width: auto !important;
    min-height: 34px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 !important;
    padding: 0 11px;
    border-color: #e1e5eb !important;
    border-radius: 9px;
    background: #eef1f5 !important;
    color: #555f70 !important;
    box-shadow: none !important;
}

.objects-filter-toggle-v517:hover,
.objects-filter-toggle-v517.is-active {
    background: #e4e8ee !important;
    color: #343c49 !important;
}

.objects-filter-toggle-v517 svg {
    width: 15px;
    height: 15px;
}

/* Теперь фильтр скрыт и на desktop, и на mobile. */
.object-filters-collapsible {
    display: none !important;
}

.object-filters-collapsible.is-open {
    display: grid !important;
}

/* ID располагается сразу после заголовка объекта. */
.object-showcase-heading-line-v517 {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.object-showcase-heading-line-v517 h2 {
    min-width: 0;
    margin: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.object-showcase-title .object-showcase-heading-line-v517 > span {
    display: inline-block !important;
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

/* Ответственный и Прораб — одна строка, без текстовых подписей. */
.object-showcase-people-v517 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #eef0f4;
}

.object-showcase-person-v517 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.object-showcase-person-icon-v517 {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 9px;
}

.object-showcase-person-icon-v517.is-manager {
    background: #eef3ff;
    color: #4c73cd;
}

.object-showcase-person-icon-v517.is-foreman {
    background: #fff3df;
    color: #d48a1f;
}

.object-showcase-person-icon-v517 svg {
    width: 17px;
    height: 17px;
}

.object-showcase-person-v517 strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Старые элементы сотрудника больше не участвуют в новой карточке. */
.object-showcase-people-v517 .object-showcase-manager {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

@media (max-width: 720px) {
    .objects-topline-v517 {
        display: flex !important;
        gap: 6px;
    }

    .objects-header-actions-v517 {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .objects-header-actions-v517::-webkit-scrollbar {
        display: none;
    }

    .objects-header-actions-v517 > * {
        flex: 0 0 auto;
    }

    .objects-status-tabs-v517 {
        width: 100% !important;
        flex: 1 0 100% !important;
    }

    .objects-filter-toggle-v517 {
        width: auto !important;
        min-height: 33px;
        margin: 0 !important;
        padding: 0 9px;
    }

    .object-filters-collapsible.is-open {
        display: grid !important;
    }

    .object-showcase-heading-line-v517 {
        gap: 5px;
    }

    .object-showcase-people-v517 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        padding-top: 8px;
    }

    .object-showcase-person-v517 {
        gap: 5px;
    }

    .object-showcase-person-icon-v517 {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .object-showcase-person-icon-v517 svg {
        width: 16px;
        height: 16px;
    }
}


/* =========================================================
   v1.5.18 — Объекты: действия справа / статус на обложке
   ========================================================= */

/* Desktop: статусы слева, действия справа. */
.objects-topline-v518 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    flex-wrap: wrap;
}

.objects-status-tabs-v518 {
    flex: 0 1 auto !important;
}

.objects-header-actions-v518 {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.objects-header-actions-v518 .objects-inline-add {
    margin-left: 0 !important;
}

/* Статус поверх обложки, справа снизу. */
.object-showcase-cover {
    position: relative;
}

.object-cover-status-v518 {
    position: absolute !important;
    right: 10px;
    bottom: 10px;
    z-index: 4;
    margin: 0 !important;
    box-shadow: 0 5px 16px rgba(23, 31, 52, .14);
}

/* Иконки Ответственного и Прораба квадратные. */
.object-showcase-person-icon-v517 {
    border-radius: 5px !important;
}

/* Mobile: статусы сверху, действия отдельной строкой справа. */
@media (max-width: 720px) {
    .objects-topline-v518 {
        gap: 6px !important;
    }

    .objects-status-tabs-v518 {
        width: 100% !important;
        order: 1;
    }

    .objects-header-actions-v518 {
        width: 100%;
        order: 2;
        margin-left: 0;
        justify-content: flex-end;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .objects-header-actions-v518::-webkit-scrollbar {
        display: none;
    }

    .objects-header-actions-v518 > * {
        flex: 0 0 auto;
    }

    .object-cover-status-v518 {
        right: 8px;
        bottom: 8px;
    }
}


/* =========================================================
   v1.5.19 — круглые иконки Ответственного / Прораба
   ========================================================= */

.object-showcase-person-icon-v517 {
    border-radius: 50% !important;
}


/* =========================================================
   v1.5.20 — mobile фильтр / Dashboard KPI / Users status
   ========================================================= */

/* Кликабельные KPI Dashboard. */
.dashboard-kpi-link-v520 {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}

.dashboard-kpi-link-v520:hover {
    border-color: #dbe0f4;
    box-shadow: 0 10px 30px rgba(31, 43, 86, .07);
    transform: translateY(-1px);
}

.dashboard-kpi-disabled-v520 {
    cursor: default;
}

/*
 * Mobile Users:
 * статус располагается в первой строке на одном уровне с avatar.
 */
@media (max-width: 700px) {
    .user-directory-row {
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
        align-items: center !important;
    }

    .user-directory-row > .avatar {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    .user-directory-row > .user-main {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    .user-directory-row > .status-pill {
        grid-column: 3 !important;
        grid-row: 1 !important;
        align-self: center;
        justify-self: end !important;
    }

    .user-directory-row > .user-role {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: start;
    }
}

/*
 * Mobile «Объекты».
 * Добавление и Архив скрыты — остаётся только кнопка фильтра.
 * Стиль кнопки возвращён к варианту v1.5.3:
 * большая кнопка на всю ширину.
 */
@media (max-width: 720px) {
    .objects-header-actions-v518 {
        width: 100% !important;
        display: block !important;
        overflow: visible !important;
    }

    .objects-header-actions-v518 .objects-inline-add,
    .objects-header-actions-v518 .archive-tab {
        display: none !important;
    }

    .objects-header-actions-v518 .objects-filter-toggle-v517 {
        width: 100% !important;
        min-height: 36px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 6px 0 0 !important;
        padding: 0 16px !important;
        border: 1px solid var(--border) !important;
        border-radius: 11px !important;
        background: #fff !important;
        color: #4f5b70 !important;
        box-shadow: none !important;
        font-size: 9px !important;
    }

    .objects-header-actions-v518 .objects-filter-toggle-v517:hover,
    .objects-header-actions-v518 .objects-filter-toggle-v517.is-active {
        background: #fafbfc !important;
        border-color: #d7dbea !important;
        color: #4f5b70 !important;
    }

    .objects-header-actions-v518 .objects-filter-toggle-v517 svg {
        width: 17px !important;
        height: 17px !important;
    }
}

/* На телефоне блок «Последние объекты» Dashboard не показываем. */
@media (max-width: 700px) {
    .dashboard-mobile-order-recent {
        display: none !important;
    }
}


/* =========================================================
   v1.5.24 — явный прочерк для необязательных дат
   ========================================================= */

.optional-date-control-v524 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.optional-date-control-v524 > input[type="date"]:disabled {
    color: #9aa1ad;
    background: #f5f6f8;
    cursor: not-allowed;
}

.optional-date-empty-v524 {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #f8f9fb;
    color: #667085;
    white-space: nowrap;
    cursor: pointer;
}

.optional-date-empty-v524 input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

@media (max-width: 640px) {
    .optional-date-control-v524 {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .optional-date-empty-v524 {
        min-height: 40px;
        width: fit-content;
    }
}


/* =========================================================
   v1.5.25 — визуальное обновление формы редактирования объекта
   ========================================================= */

.project-form-v125 {
    gap: 18px;
}

.project-form-v125 .form-section {
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid #e1e6f0;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 18px 38px rgba(20, 28, 64, 0.06);
}

.project-form-v125 .card-heading-v125 {
    padding: 22px 24px 14px;
    border-bottom: 1px solid #edf1f7;
}

.project-form-v125 .card-heading-v125 > div {
    min-width: 0;
}

.project-form-v125 .card-heading-v125 h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.project-form-v125 .card-heading-v125 p {
    margin: 8px 0 0;
    color: #8b95a7;
    font-size: 13px;
    line-height: 1.5;
}

.project-form-v125 .form-grid {
    gap: 16px;
    padding: 22px;
}

.project-form-v125 .field {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #e4e9f2;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.project-form-v125 .field-label-with-icon-v125 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.project-form-v125 .field-label-icon-v125 {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #f4f7fb;
    border: 1px solid #e4e9f2;
    color: #8792a7;
}

.project-form-v125 .field-label-icon-v125 svg {
    width: 22px;
    height: 22px;
}

.project-form-v125 .field-label-copy-v125 {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.project-form-v125 .field-label-title-v125 {
    color: #8a94a8;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

.project-form-v125 .field > span:not(.field-label-with-icon-v125) {
    margin-bottom: 0;
}

.project-form-v125 .field input,
.project-form-v125 .field select,
.project-form-v125 .field textarea {
    min-height: 54px;
    padding: 0 16px;
    border-radius: 15px;
    border-color: #dfe5ef;
    background: #f8faff;
    font-size: 16px;
    font-weight: 600;
    color: #1c2740;
}

.project-form-v125 .field input::placeholder,
.project-form-v125 .field textarea::placeholder {
    color: #a2abbc;
    font-weight: 500;
}

.project-form-v125 .field textarea {
    min-height: 144px;
    padding: 14px 16px;
    line-height: 1.55;
}

.project-form-v125 .field input:focus,
.project-form-v125 .field select:focus,
.project-form-v125 .field textarea:focus {
    border-color: #8ea0ff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(70, 97, 255, 0.08);
}

.project-form-v125 .field select {
    cursor: pointer;
}

.project-form-v125 .field-note-v125 {
    background: linear-gradient(135deg, #f7f9fd 0%, #ffffff 100%);
}

.project-form-v125 .field-note-v125 p {
    margin: 0;
    color: #536074;
    font-size: 14px;
    line-height: 1.55;
}

.project-form-v125 .field-note-v125 b {
    color: #3346f5;
}

.project-form-v125 .field-hint {
    margin-top: -2px;
    color: #8b95a7;
    font-size: 12px;
    line-height: 1.5;
}

.project-form-v125 .optional-date-control-v524 {
    gap: 12px;
}

.project-form-v125 .optional-date-empty-v524 {
    min-height: 54px;
    border-radius: 15px;
    background: #f8faff;
    border-color: #dfe5ef;
    color: #66738a;
    font-size: 14px;
    font-weight: 600;
}

.project-form-v125 .optional-date-control-v524 > input[type="date"]:disabled {
    background: #f1f4f9;
    color: #99a4b7;
}

.project-form-v125 .project-contract-current-v158 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border: 1px dashed #d9e1f0;
    border-radius: 16px;
    background: #f9fbff;
}

.project-form-v125 .project-contract-current-v158 a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3346f5;
    font-weight: 700;
}

.project-form-v125 .project-contract-current-v158 label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6e7890;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.project-form-v125 .project-contract-current-v158 input {
    width: 16px;
    height: 16px;
    min-height: 16px;
    padding: 0;
}

.form-actions-v125 {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 8px 0 4px;
    margin-top: 2px;
    background: linear-gradient(180deg, rgba(245,247,251,0) 0%, rgba(245,247,251,0.86) 20%, rgba(245,247,251,0.98) 100%);
    backdrop-filter: blur(10px);
}

.form-actions-v125 .secondary-button,
.form-actions-v125 .primary-button {
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-size: 15px;
}

.edit-project-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.edit-project-title .project-id-inline {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eef3ff;
    color: #3346f5;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .project-form-v125 .form-grid {
        grid-template-columns: 1fr;
    }

    .project-form-v125 .field.span-2 {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .project-form-v125 .card-heading-v125 {
        padding: 18px 18px 12px;
    }

    .project-form-v125 .card-heading-v125 h2 {
        font-size: 21px;
    }

    .project-form-v125 .card-heading-v125 p {
        font-size: 12px;
    }

    .project-form-v125 .form-grid {
        padding: 16px;
        gap: 12px;
    }

    .project-form-v125 .field {
        padding: 14px;
        border-radius: 18px;
    }

    .project-form-v125 .field input,
    .project-form-v125 .field select,
    .project-form-v125 .field textarea,
    .project-form-v125 .optional-date-empty-v524 {
        min-height: 48px;
        font-size: 15px;
    }

    .project-form-v125 .field-label-icon-v125 {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 12px;
    }

    .project-form-v125 .field-label-icon-v125 svg {
        width: 20px;
        height: 20px;
    }

    .form-actions-v125 {
        position: static;
        background: transparent;
        backdrop-filter: none;
    }
}


/* =========================================================
   v1.5.26 — компактное редактирование как «Информация об объекте»
   ========================================================= */

.project-form-v125 {
    gap: 18px !important;
}

.project-form-v125 .form-section {
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e1e6ee !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.project-form-v125 .card-heading-v125 {
    margin: 0 !important;
    padding: 18px 20px 14px !important;
    border-bottom: 1px solid #e7ebf2 !important;
    background: #fff !important;
}

.project-form-v125 .card-heading-v125 h2 {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.12 !important;
    letter-spacing: -.03em !important;
}

.project-form-v125 .card-heading-v125 p {
    margin: 6px 0 0 !important;
    color: #939daf !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* Линии между ячейками строятся через фон grid — как в карточке объекта. */
.project-form-v125 .form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1px !important;
    padding: 0 !important;
    background: #e6eaf1 !important;
}

.project-form-v125 .field {
    position: relative !important;
    min-width: 0 !important;
    min-height: 104px !important;
    display: grid !important;
    align-content: center !important;
    gap: 3px !important;
    padding: 18px 20px 18px 72px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.project-form-v125 .field.span-2 {
    grid-column: 1 / -1 !important;
}

.project-form-v125 .field-label-with-icon-v125 {
    position: static !important;
    display: block !important;
    margin: 0 !important;
}

.project-form-v125 .field-label-icon-v125 {
    position: absolute !important;
    left: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #8691a5 !important;
}

.project-form-v125 .field-label-icon-v125 svg {
    width: 24px !important;
    height: 24px !important;
}

.project-form-v125 .field-label-copy-v125 {
    display: block !important;
}

.project-form-v125 .field-label-title-v125 {
    display: block !important;
    color: #98a2b3 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
}

/* Поле ввода выглядит как значение карточки, а не отдельная большая форма. */
.project-form-v125 .field input:not([type="checkbox"]):not([type="file"]),
.project-form-v125 .field select,
.project-form-v125 .field textarea {
    width: 100% !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 28px 0 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #17233b !important;
    box-shadow: none !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.project-form-v125 .field input:not([type="checkbox"]):not([type="file"]):focus,
.project-form-v125 .field select:focus,
.project-form-v125 .field textarea:focus {
    padding-left: 8px !important;
    border-radius: 8px !important;
    background: #f5f7ff !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(51, 70, 245, .08) !important;
}

.project-form-v125 .field input:disabled {
    color: #a2aaba !important;
    opacity: 1 !important;
}

.project-form-v125 .field textarea {
    min-height: 96px !important;
    padding-top: 7px !important;
    resize: vertical !important;
}

.project-form-v125 .field:has(textarea),
.project-form-v125 .project-contract-edit-field-v125 {
    min-height: 132px !important;
}

.project-form-v125 .field:has(textarea) .field-label-icon-v125,
.project-form-v125 .project-contract-edit-field-v125 .field-label-icon-v125 {
    top: 27px !important;
    transform: none !important;
}

.project-form-v125 .field-hint {
    margin: 1px 0 0 !important;
    color: #a0a8b7 !important;
    font-size: 10px !important;
    line-height: 1.35 !important;
}

/* Текстовые информационные ячейки выглядят как обычное значение карточки. */
.project-form-v125 .field-note-v125 {
    min-height: 104px !important;
    background: #fff !important;
}

.project-form-v125 .field-note-v125 p {
    margin: 0 !important;
    color: #17233b !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.project-form-v125 .field-note-v125 b {
    color: #17233b !important;
}

/* Необязательные даты: дата + компактный переключатель прочерка. */
.project-form-v125 .optional-date-control-v524 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
}

.project-form-v125 .optional-date-empty-v524 {
    min-height: 30px !important;
    padding: 0 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    border: 1px solid #e1e6ee !important;
    border-radius: 8px !important;
    background: #f7f8fb !important;
    color: #7b8496 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.project-form-v125 .optional-date-empty-v524 input {
    width: 13px !important;
    height: 13px !important;
    min-height: 13px !important;
}

/* Договор также встраивается в компактную ячейку. */
.project-form-v125 .project-contract-edit-field-v125 input[type="file"] {
    width: 100% !important;
    min-height: 34px !important;
    padding: 5px 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #17233b !important;
    font-size: 12px !important;
}

.project-form-v125 .project-contract-current-v158 {
    margin-top: 4px !important;
    padding: 8px 10px !important;
    border: 1px solid #e5e9f1 !important;
    border-radius: 9px !important;
    background: #f8f9fc !important;
    box-shadow: none !important;
}

.project-form-v125 .project-contract-current-v158 a,
.project-form-v125 .project-contract-current-v158 label {
    font-size: 11px !important;
}

/* Верх страницы также делаем легче и компактнее. */
.form-page-head {
    align-items: center !important;
    padding: 4px 0 2px !important;
}

.edit-project-title {
    gap: 7px !important;
    font-size: 24px !important;
}

.edit-project-title .project-id-inline {
    min-height: 26px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
}

/* Кнопки остаются заметными, но без лишней высоты. */
.form-actions-v125 {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 5 !important;
    padding: 8px 0 3px !important;
}

.form-actions-v125 .secondary-button,
.form-actions-v125 .primary-button {
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
}

@media (max-width: 980px) {
    .project-form-v125 .form-grid {
        grid-template-columns: 1fr !important;
    }

    .project-form-v125 .field.span-2 {
        grid-column: auto !important;
    }
}

@media (max-width: 640px) {
    .project-form-v125 {
        gap: 13px !important;
    }

    .project-form-v125 .form-section {
        border-radius: 15px !important;
    }

    .project-form-v125 .card-heading-v125 {
        padding: 15px 16px 11px !important;
    }

    .project-form-v125 .card-heading-v125 h2 {
        font-size: 19px !important;
    }

    .project-form-v125 .card-heading-v125 p {
        display: none !important;
    }

    .project-form-v125 .field {
        min-height: 90px !important;
        padding: 14px 14px 14px 58px !important;
    }

    .project-form-v125 .field-label-icon-v125 {
        left: 18px !important;
        width: 26px !important;
        height: 26px !important;
    }

    .project-form-v125 .field-label-icon-v125 svg {
        width: 21px !important;
        height: 21px !important;
    }

    .project-form-v125 .field-label-title-v125 {
        font-size: 12px !important;
    }

    .project-form-v125 .field input:not([type="checkbox"]):not([type="file"]),
    .project-form-v125 .field select,
    .project-form-v125 .field textarea {
        font-size: 15px !important;
    }

    .project-form-v125 .optional-date-control-v524 {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
    }

    .project-form-v125 .optional-date-empty-v524 {
        width: fit-content !important;
    }

    .form-actions-v125 {
        position: static !important;
        background: transparent !important;
        backdrop-filter: none !important;
    }
}


/* =========================================================
   v1.5.27 — ещё компактнее + строго 2 столбца
   ========================================================= */

/* На desktop все поля занимают ровно одну ячейку из двух. */
@media (min-width: 981px) {
    .project-form-v125 .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .project-form-v125 .field.span-2,
    .project-form-v125 .project-contract-edit-field-v125 {
        grid-column: auto !important;
    }
}

/* Уменьшаем высоту секций и ячеек. */
.project-form-v125 {
    gap: 12px !important;
}

.project-form-v125 .card-heading-v125 {
    padding: 13px 18px 10px !important;
}

.project-form-v125 .card-heading-v125 h2 {
    font-size: 19px !important;
}

.project-form-v125 .card-heading-v125 p {
    margin-top: 4px !important;
    font-size: 11px !important;
}

.project-form-v125 .field {
    min-height: 76px !important;
    padding: 11px 16px 11px 58px !important;
    gap: 1px !important;
}

.project-form-v125 .field-label-icon-v125 {
    left: 19px !important;
    width: 26px !important;
    height: 26px !important;
}

.project-form-v125 .field-label-icon-v125 svg {
    width: 20px !important;
    height: 20px !important;
}

.project-form-v125 .field-label-title-v125 {
    font-size: 11px !important;
}

.project-form-v125 .field input:not([type="checkbox"]):not([type="file"]),
.project-form-v125 .field select {
    min-height: 28px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
}

.project-form-v125 .field textarea {
    min-height: 72px !important;
    font-size: 14px !important;
}

.project-form-v125 .field:has(textarea),
.project-form-v125 .project-contract-edit-field-v125 {
    min-height: 102px !important;
}

.project-form-v125 .field:has(textarea) .field-label-icon-v125,
.project-form-v125 .project-contract-edit-field-v125 .field-label-icon-v125 {
    top: 18px !important;
}

.project-form-v125 .field-hint {
    font-size: 9px !important;
    line-height: 1.25 !important;
}

.project-form-v125 .optional-date-control-v524 {
    gap: 5px !important;
}

.project-form-v125 .optional-date-empty-v524 {
    min-height: 25px !important;
    padding: 0 6px !important;
    font-size: 9px !important;
}

.project-form-v125 .project-contract-current-v158 {
    padding: 6px 8px !important;
}

.form-actions-v125 .secondary-button,
.form-actions-v125 .primary-button {
    min-height: 39px !important;
}

/* На телефоне остаётся одна колонка, но тоже компактно. */
@media (max-width: 980px) {
    .project-form-v125 .form-grid {
        grid-template-columns: 1fr !important;
    }

    .project-form-v125 .field,
    .project-form-v125 .field.span-2,
    .project-form-v125 .project-contract-edit-field-v125 {
        grid-column: auto !important;
    }
}

@media (max-width: 640px) {
    .project-form-v125 .card-heading-v125 {
        padding: 12px 14px 9px !important;
    }

    .project-form-v125 .field {
        min-height: 70px !important;
        padding: 10px 12px 10px 52px !important;
    }

    .project-form-v125 .field-label-icon-v125 {
        left: 16px !important;
    }

    .project-form-v125 .field:has(textarea),
    .project-form-v125 .project-contract-edit-field-v125 {
        min-height: 94px !important;
    }
}


/* =========================================================
   v1.5.30 — полноценный раздел «Рассрочка»
   ========================================================= */

.installment-kpis-v1530 {
    grid-template-columns: repeat(5, minmax(140px, 1fr)) !important;
}

.installment-kpis-v1530 .kpi-card,
.installment-detail-kpis-v1530 .kpi-card {
    min-height: 82px !important;
}

.kpi-card.is-danger-v1530 {
    border-color: #ffd6d6;
    background: #fffafa;
}

.kpi-card.is-danger-v1530 strong {
    color: #c83939;
}

.installments-panel-v1530 {
    margin-top: 13px;
    overflow: hidden;
}

.installment-list-v1530 {
    display: grid;
}

.installment-row-v1530 {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(105px, .7fr)) minmax(120px, .8fr) minmax(105px, .7fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 15px 18px;
    border-top: 1px solid #edf0f4;
    transition: .16s ease;
}

.installment-row-v1530:first-child {
    border-top: 0;
}

.installment-row-v1530:hover {
    background: #fbfcff;
}

.installment-row-v1530 > div {
    min-width: 0;
}

.installment-row-v1530 > div > span,
.installment-row-v1530 > div > small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.installment-row-v1530 > div > strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
}

.installment-object-v1530 > strong {
    font-size: 16px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.installment-object-v1530 > small {
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.installment-row-progress-v1530 .progress {
    min-width: 90px;
}

.installment-row-progress-v1530 small {
    margin-top: 5px;
}

.payment-neutral-v1530 {
    color: #667085;
    background: #f1f3f6;
}

.installment-detail-page-v1530 {
    display: grid;
    gap: 13px;
}

.installment-detail-head-v1530 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px 6px;
}

.installment-detail-head-v1530 h1 {
    margin: 8px 0 0;
    font-size: 27px;
    letter-spacing: -.04em;
}

.installment-detail-head-v1530 h1 span {
    color: #8a93a6;
    font-size: .55em;
    font-weight: 650;
}

.installment-detail-head-v1530 p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.installment-detail-actions-v1530 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.installment-detail-kpis-v1530 {
    grid-template-columns: repeat(4, minmax(140px, 1fr)) !important;
}

.installment-empty-setup-v1530 {
    min-height: 150px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.installment-empty-setup-v1530 h2 {
    margin: 0;
    font-size: 19px;
}

.installment-empty-setup-v1530 p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.installment-detail-grid-v1530 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 13px;
    align-items: start;
}

.installment-side-v1530 {
    display: grid;
    gap: 13px;
}

.installment-section-head-v1530 {
    align-items: center;
}

.installment-progress-label-v1530 {
    text-align: right;
}

.installment-progress-label-v1530 strong,
.installment-progress-label-v1530 span {
    display: block;
}

.installment-progress-label-v1530 strong {
    font-size: 20px;
}

.installment-progress-label-v1530 span {
    color: var(--muted);
    font-size: 10px;
}

.installment-progress-v1530 {
    margin: -5px 0 12px;
}

.installment-schedule-list-v1530 {
    display: grid;
}

.installment-schedule-row-v1530 {
    display: grid;
    grid-template-columns: 48px minmax(140px, 1.4fr) repeat(3, minmax(90px, .7fr)) auto 34px;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eef0f4;
}

.installment-schedule-row-v1530:first-child {
    border-top: 0;
}

.installment-schedule-row-v1530.is-overdue-v1530 {
    background: linear-gradient(90deg, rgba(255, 241, 241, .75), transparent 70%);
}

.installment-sequence-v1530 {
    min-height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f4f8;
    color: #6e7890;
    font-size: 12px;
    font-weight: 750;
}

.installment-schedule-main-v1530 strong,
.installment-schedule-main-v1530 span,
.installment-schedule-money-v1530 strong,
.installment-schedule-money-v1530 span {
    display: block;
}

.installment-schedule-main-v1530 span,
.installment-schedule-money-v1530 span {
    color: var(--muted);
    font-size: 12px;
}

.installment-schedule-main-v1530 strong,
.installment-schedule-money-v1530 strong {
    margin-top: 3px;
    font-size: 16px;
}

.installment-date-edit-v1530 {
    position: relative;
}

.installment-date-edit-v1530 summary {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #748096;
    cursor: pointer;
}

.installment-date-edit-v1530 summary::-webkit-details-marker {
    display: none;
}

.installment-date-edit-v1530 summary svg {
    width: 15px;
    height: 15px;
}

.installment-date-edit-v1530 form {
    position: absolute;
    right: 0;
    top: 38px;
    z-index: 20;
    width: 250px;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(30, 41, 69, .14);
}

.installment-date-edit-v1530 input {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
}

.installment-date-edit-v1530 .secondary-button {
    min-height: 36px;
}

.installment-next-card-v1530.is-overdue-v1530 {
    border-color: #ffd4d4;
}

.installment-next-amount-v1530 {
    display: block;
    font-size: 25px;
    letter-spacing: -.04em;
}

.installment-next-card-v1530 > span,
.installment-next-card-v1530 > small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.installment-next-complete-v1530 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #188f48;
}

.installment-next-complete-v1530 svg {
    width: 20px;
    height: 20px;
}

.installment-history-card-v1530 > .card-heading > strong {
    font-size: 17px;
}

.installment-payments-v1530 .payment-history-item {
    grid-template-columns: minmax(0, 1fr) auto;
}

.installment-setup-page-v1530 {
    max-width: 980px;
}

@media (max-width: 1250px) {
    .installment-kpis-v1530 {
        grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
    }

    .installment-row-v1530 {
        grid-template-columns: minmax(210px, 1.3fr) repeat(3, minmax(90px, .6fr)) auto;
    }

    .installment-next-list-v1530,
    .installment-row-progress-v1530 {
        display: none;
    }

    .installment-schedule-row-v1530 {
        grid-template-columns: 44px minmax(140px, 1.3fr) repeat(2, minmax(90px, .7fr)) auto 34px;
    }

    .installment-schedule-row-v1530 .installment-schedule-money-v1530:nth-of-type(5) {
        display: none;
    }
}

@media (max-width: 920px) {
    .installment-detail-head-v1530 {
        align-items: flex-start;
        flex-direction: column;
    }

    .installment-detail-actions-v1530 {
        justify-content: flex-start;
    }

    .installment-detail-grid-v1530 {
        grid-template-columns: 1fr;
    }

    .installment-side-v1530 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .installment-kpis-v1530,
    .installment-detail-kpis-v1530 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .installment-kpis-v1530 .kpi-card,
    .installment-detail-kpis-v1530 .kpi-card {
        min-height: 70px !important;
    }

    .installment-row-v1530 {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 13px 14px;
    }

    .installment-row-v1530 > div:not(.installment-object-v1530) {
        display: none;
    }

    .installment-object-v1530 > strong {
        white-space: normal;
    }

    .installment-detail-actions-v1530 {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .installment-detail-actions-v1530 > * {
        width: 100%;
        justify-content: center;
    }

    .installment-empty-setup-v1530 {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .installment-empty-setup-v1530 .primary-button {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .installment-side-v1530 {
        grid-template-columns: 1fr;
    }

    .installment-schedule-row-v1530 {
        grid-template-columns: 40px minmax(0, 1fr) auto 32px;
        gap: 7px;
        padding: 10px 0;
    }

    .installment-schedule-money-v1530 {
        display: none;
    }

    .installment-date-edit-v1530 form {
        position: fixed;
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 18px;
        width: auto;
    }
}


/* =========================================================
   v1.5.31 — оплата конкретного платежа рассрочки
   ========================================================= */

.installment-row-actions-v1531 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.installment-row-pay-v1531 {
    min-height: 30px !important;
    padding: 0 9px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
}

@media (max-width: 760px) {
    .installment-row-actions-v1531 {
        width: 100%;
        justify-content: flex-start;
    }

    .installment-row-pay-v1531 {
        min-height: 32px !important;
    }
}


/* =========================================================
   v1.5.32 — фото поступлений + обмен блоков
   ========================================================= */

.payment-history-main-v1532 {
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.payment-history-heading-v1532 {
    align-items: center;
}

.payment-history-amount-line-v1532 {
    display: flex;
    align-items: center;
    gap: 7px;
}

.payment-history-amount-line-v1532 > strong {
    display: inline-block !important;
}

.payment-receipt-icon-v1532 {
    flex: 0 0 auto;
    width: 27px !important;
    height: 27px !important;
}

.payment-extra-services-card-v1532 {
    margin-top: 0 !important;
    padding: 16px !important;
    border-top: 1px solid var(--border) !important;
}

.payment-extra-services-card-v1532 .subsection-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.payment-extra-services-card-v1532 .subsection-heading h3 {
    font-size: 15px;
}

.payment-extra-services-card-v1532 .subsection-heading p {
    font-size: 10px !important;
}

.payment-extra-services-card-v1532 .subsection-heading > strong {
    font-size: 13px;
}

.payment-extra-services-card-v1532 .extra-service-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    align-items: start;
}

.payment-extra-services-card-v1532 .extra-service-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.payment-extra-services-card-v1532 .extra-service-main strong {
    font-size: 11px;
}

.payment-extra-services-card-v1532 .extra-service-main span,
.payment-extra-services-card-v1532 .extra-service-main small {
    font-size: 9px;
}

.payment-extra-services-card-v1532 .extra-service-amount > strong {
    font-size: 12px;
}

.payment-add-form input[type="file"] {
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 46px;
}

@media (max-width: 700px) {
    .payment-history-main-v1532 {
        margin-top: 14px;
        padding-top: 14px;
    }

    .payment-history-heading-v1532 {
        align-items: flex-start;
    }

    .payment-receipt-icon-v1532 {
        width: 30px !important;
        height: 30px !important;
    }
}


/* =========================================================
   v1.5.33 — сумма 0 / команда / mobile progress
   ========================================================= */

/* Если прораб не назначен, каска нейтральная серая. */
.object-showcase-person-icon-v517.is-foreman.is-empty {
    background: #f1f3f6 !important;
    color: #9aa3b2 !important;
}

/*
 * «Добавить» в Команда объекта и Часы по объекту:
 * круг кнопки расположен точно на той же горизонтали, что и avatar.
 */
.project-team-showcase-v153,
.hours-project-crew-rail-v153 {
    align-items: flex-start !important;
}

.project-team-add-v153 {
    display: grid !important;
    grid-template-rows: 20px 52px auto !important;
    justify-items: center !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.project-team-add-v153::before {
    content: "";
    display: block;
    width: 1px;
    height: 20px;
}

.project-team-add-v153 > span {
    grid-row: 2 !important;
}

.project-team-add-v153 > small {
    grid-row: 3 !important;
    margin-top: 3px !important;
}

.hours-crew-add-v153 {
    display: grid !important;
    grid-template-rows: 18px 55px auto !important;
    justify-items: center !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hours-crew-add-v153::before {
    content: "";
    display: block;
    width: 1px;
    height: 18px;
}

.hours-crew-add-v153 > span {
    grid-row: 2 !important;
}

.hours-crew-add-v153 > small {
    grid-row: 3 !important;
    margin-top: 4px !important;
}

/*
 * После переноса mobile progress вниз последние информационные
 * ячейки задаём явно, чтобы desktop и mobile линии не зависели
 * от nth-child / скрытого progress.
 */
.project-info-grid-v513 > .project-info-source-v1533,
.project-info-grid-v513 > .project-info-id-v1533 {
    border-bottom: 0 !important;
}

@media (max-width: 760px) {
    .project-info-grid-v513 > .project-info-source-v1533,
    .project-info-grid-v513 > .project-info-id-v1533 {
        border-bottom: 1px solid #e8ebef !important;
    }

    .project-info-mobile-progress-v1533 {
        border-bottom: 0 !important;
    }
}


/* =========================================================
   v1.5.34 — поступления: сумма / meta / аннулирование
   ========================================================= */

.payment-history-item-v1534 {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 54px;
    padding: 10px 0 !important;
}

.payment-history-main-v1534 {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.payment-history-positive-v1534 {
    display: inline-block !important;
    color: #159447 !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    line-height: 1.2 !important;
    letter-spacing: -.02em;
}

.payment-history-note-v1534 {
    margin-top: 1px !important;
    color: #8d96a7 !important;
    font-size: 9px !important;
}

.payment-history-side-v1534 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.payment-history-meta-v1534 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
    text-align: right;
}

.payment-history-meta-v1534 span,
.payment-history-meta-v1534 small {
    display: inline !important;
    margin: 0 !important;
    color: #8a93a4 !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
}

.payment-history-meta-v1534 span::after {
    content: "·";
    margin-left: 7px;
    color: #c0c6d0;
}

.void-payment-details-v1534 {
    flex: 0 0 auto;
}

.void-payment-details-v1534 > summary {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #a0a8b6 !important;
    font-size: 21px;
    font-weight: 400 !important;
    line-height: 1;
    transition: .16s ease;
}

.void-payment-details-v1534 > summary:hover {
    background: var(--red-soft);
    color: #c43f3f !important;
}

.payment-history-item-v1534.is-voided .payment-history-positive-v1534 {
    text-decoration: line-through;
}

@media (max-width: 700px) {
    .payment-history-item-v1534 {
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 8px !important;
    }

    .payment-history-side-v1534 {
        gap: 6px;
    }

    .payment-history-meta-v1534 {
        gap: 4px;
    }

    .payment-history-meta-v1534 span,
    .payment-history-meta-v1534 small {
        font-size: 8px !important;
    }

    .payment-history-meta-v1534 span::after {
        margin-left: 4px;
    }
}


/* =========================================================
   v1.5.35 — неуказанная сумма проекта
   ========================================================= */

.project-amount-unset-v1535 {
    color: #df8585 !important;
    font-weight: 650 !important;
}


/* =========================================================
   v1.5.37 — единая система круглых avatar
   ========================================================= */

/*
 * Все avatar-контейнеры имеют собственный круглый clipping.
 * Размер контейнера по-прежнему задаётся его разделом CRM,
 * поэтому новая система не меняет текущие размеры.
 */
.avatar,
.sidebar-user-avatar,
.profile-avatar,
.object-manager-avatar,
.manager-workload-avatar,
.activity-avatar,
.project-crew-avatar,
.project-team-avatar,
.hours-crew-avatar,
.hours-rank-avatar,
.work-hours-worker-avatar,
.project-info-manager-icon-avatar-v159,
.object-showcase-person-icon-v517.has-avatar-v1537 {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    line-height: 1;
    isolation: isolate;
}

/*
 * Изображение больше не зависит от border-radius: inherit.
 * Оно всегда полностью заполняет avatar, центрируется
 * и принудительно остаётся круглым.
 */
.avatar > img,
.sidebar-user-avatar > img,
.profile-avatar > img,
.object-manager-avatar > img,
.manager-workload-avatar > img,
.activity-avatar > img,
.project-crew-avatar > img,
.project-team-avatar > img,
.hours-crew-avatar > img,
.hours-rank-avatar > img,
.work-hours-worker-avatar > img,
.project-info-manager-icon-avatar-v159 > img,
.object-showcase-person-icon-v517.has-avatar-v1537 > img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: translateZ(0);
}

/* objects.php: фотография занимает место прежней круглой иконки. */
.object-showcase-person-icon-v517.has-avatar-v1537 {
    background: #eef1f5 !important;
    color: transparent !important;
    box-shadow: inset 0 0 0 1px rgba(24, 35, 55, .05);
}

/* Иконки без фотографии остаются прежними. */
.object-showcase-person-icon-v517:not(.has-avatar-v1537) svg {
    display: block;
}

/* Неназначенный прораб по-прежнему серый. */
.object-showcase-person-icon-v517.is-foreman.is-empty:not(.has-avatar-v1537) {
    background: #f1f3f6 !important;
    color: #9aa3b2 !important;
}

/*
 * Декоративные рамки Команды/Часов сохраняем,
 * но сама форма всегда круглая.
 */
.project-team-avatar,
.hours-crew-avatar {
    border-radius: 50% !important;
}

/* Дополнительная защита mobile от старых переопределений. */
@media (max-width: 760px) {
    .avatar,
    .project-crew-avatar,
    .project-team-avatar,
    .hours-crew-avatar,
    .project-info-manager-icon-avatar-v159,
    .object-showcase-person-icon-v517.has-avatar-v1537,
    .avatar > img,
    .project-crew-avatar > img,
    .project-team-avatar > img,
    .hours-crew-avatar > img,
    .project-info-manager-icon-avatar-v159 > img,
    .object-showcase-person-icon-v517.has-avatar-v1537 > img {
        border-radius: 50% !important;
    }
}


/* =========================================================
   v1.5.38 — lazy loading фотографий + spinner
   ========================================================= */

/* Карточка фото не мигает белым до фактической загрузки thumbnail. */
.photo-image-link {
    overflow: hidden;
}

.photo-lazy-image-v1538 {
    opacity: 0;
    transition: opacity .18s ease;
}

.photo-lazy-image-v1538.is-loaded-v1538 {
    opacity: 1;
}

.photo-lazy-image-v1538.is-failed-v1538 {
    opacity: 0;
}

.photo-thumb-loader-v1538 {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid rgba(112, 124, 145, .20);
    border-color: #7e899d;
    border-radius: 50%;
    animation: photo-loader-spin-v1538 .72s linear infinite;
    pointer-events: none;
}

.photo-gallery-card:not(.is-photo-loading-v1538) .photo-thumb-loader-v1538 {
    display: none;
}

/* Полноразмерное фото: пока файл не загрузился, виден spinner. */
.photo-lightbox-stage {
    position: relative;
}

.photo-lightbox-stage img {
    transition: opacity .16s ease;
}

.photo-lightbox-stage img.is-loading-v1538 {
    opacity: 0;
}

.photo-lightbox-loader-v1538 {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.photo-lightbox-loader-v1538[hidden] {
    display: none !important;
}

.photo-lightbox-loader-v1538 > span {
    width: 46px;
    height: 46px;
    border: 3px solid rgba(255, 255, 255, .20);
    border-color: #fff;
    border-radius: 50%;
    animation: photo-loader-spin-v1538 .72s linear infinite;
}

.photo-lightbox-error-v1538 {
    position: absolute;
    z-index: 2;
    max-width: 280px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .84);
    font-size: 11px;
    text-align: center;
    pointer-events: none;
}

.photo-lightbox-error-v1538[hidden] {
    display: none !important;
}

@keyframes photo-loader-spin-v1538 {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-lazy-image-v1538,
    .photo-lightbox-stage img {
        transition: none;
    }

    .photo-thumb-loader-v1538,
    .photo-lightbox-loader-v1538 > span {
        animation-duration: 1.4s;
    }
}


/* =========================================================
   v1.5.40 — ID справа в карточке объекта
   ========================================================= */

.object-showcase-title-v1540 {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.object-showcase-title-v1540 .object-showcase-heading-line-v517 {
    flex: 1 1 auto;
    min-width: 0;
}

.object-showcase-id-v1540 {
    flex: 0 0 auto;
    margin-left: auto !important;
    color: var(--muted) !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-align: right;
}

/* Старое меню ••• больше не используется в карточках objects.php. */
.object-card-dots {
    display: none !important;
}

@media (max-width: 640px) {
    .object-showcase-title-v1540 {
        align-items: center !important;
    }

    .object-showcase-id-v1540 {
        font-size: 14px !important;
    }
}


/* =========================================================
   v1.5.42 — avatar редактируется прямо по клику на фото
   ========================================================= */

.profile-avatar-menu-wrap-v1542 {
    position: relative;
    flex: 0 0 auto;
}

.profile-avatar-trigger-v1542 {
    position: relative;
    display: block;
    width: 78px;
    height: 78px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    outline: none;
}

.profile-avatar-trigger-v1542:focus-visible {
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .14);
}

.profile-avatar-trigger-v1542 .profile-avatar {
    width: 78px;
    height: 78px;
    margin: 0;
    transition: filter .16s ease;
}

.profile-avatar-edit-badge-v1542 {
    position: absolute;
    right: -1px;
    bottom: 2px;
    z-index: 3;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(51, 70, 245, .22);
}

.profile-avatar-edit-badge-v1542 svg {
    width: 12px;
    height: 12px;
}

@media (hover: hover) and (pointer: fine) {
    .profile-avatar-trigger-v1542:hover .profile-avatar {
        filter: brightness(.92);
    }
}

.profile-avatar-menu-v1542 {
    position: absolute;
    left: 0;
    top: calc(100% + 9px);
    z-index: 95;
    width: 205px;
    overflow: hidden;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(30, 41, 69, .14);
}

.profile-avatar-menu-v1542[hidden] {
    display: none !important;
}

.profile-avatar-menu-v1542 .sidebar-user-menu-item {
    min-height: 42px;
}

.profile-avatar-delete-v1542 {
    margin-top: 2px;
    border-top: 1px solid #eef0f4 !important;
    border-radius: 0 0 9px 9px !important;
    color: #c84a4a !important;
}

.profile-avatar-delete-v1542:hover:not(:disabled) {
    background: #fff4f4 !important;
    color: #c93f3f !important;
}

.profile-avatar-menu-v1542 .sidebar-user-menu-item:disabled {
    opacity: .42;
    cursor: default;
    background: transparent !important;
}

.profile-avatar-hidden-form-v1542 {
    display: none !important;
}

.profile-avatar-help-v1542 {
    display: block;
    margin-top: 5px;
    color: #9aa3b2;
    font-size: 10px;
}

.profile-avatar-loading-v1542 {
    position: absolute;
    inset: 0;
    z-index: 5;
    margin: auto;
    width: 31px;
    height: 31px;
    border: 3px solid rgba(255, 255, 255, .48);
    border-color: #fff;
    border-radius: 50%;
    animation: profile-avatar-spin-v1542 .7s linear infinite;
    pointer-events: none;
}

.profile-avatar-loading-v1542[hidden] {
    display: none !important;
}

.profile-avatar-menu-wrap-v1542.is-loading-v1542 .profile-avatar {
    filter: brightness(.58);
}

.profile-avatar-menu-wrap-v1542.is-loading-v1542 .profile-avatar-edit-badge-v1542 {
    opacity: 0;
}

.profile-avatar-feedback-v1542 {
    margin-top: -6px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 11px;
}

.profile-avatar-feedback-v1542[hidden] {
    display: none !important;
}

.profile-avatar-feedback-v1542.is-success-v1542 {
    background: var(--green-soft);
    color: #177c42;
}

.profile-avatar-feedback-v1542.is-error-v1542 {
    background: var(--red-soft);
    color: #b42318;
}

@keyframes profile-avatar-spin-v1542 {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .profile-avatar-menu-v1542 {
        width: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-avatar-loading-v1542 {
        animation-duration: 1.4s;
    }
}


/* =========================================================
   v1.5.43 — Личный кабинет
   ========================================================= */

.profile-page {
    max-width: none !important;
}

.personal-cabinet-v1543 {
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
}

.personal-cabinet-head-v1543 {
    min-width: 0;
    min-height: 98px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 94% 0%, rgba(51, 70, 245, .08), transparent 31%),
        linear-gradient(135deg, #fff, #fbfcff);
    box-shadow: var(--shadow);
}

.personal-cabinet-eyebrow-v1543 {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.personal-cabinet-head-v1543 h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -.035em;
}

.personal-cabinet-head-v1543 p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.personal-cabinet-head-meta-v1543 {
    display: grid;
    justify-items: end;
    gap: 4px;
    color: #929bad;
    font-size: 10px;
    text-align: right;
}

.personal-cabinet-alert-v1543 {
    margin: 0 !important;
}

.personal-cabinet-grid-v1543 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 14px;
    align-items: start;
}

.personal-cabinet-projects-v1543,
.personal-cabinet-settings-v1543 {
    min-width: 0;
}

.personal-cabinet-settings-v1543 {
    position: sticky;
    top: 14px;
}

.personal-projects-card-v1543,
.personal-settings-card-v1543 {
    padding: 18px;
    border-radius: 18px;
}

.personal-section-heading-v1543 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.personal-section-heading-v1543 > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.personal-section-icon-v1543 {
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
}

.personal-section-icon-v1543 svg {
    width: 19px;
    height: 19px;
}

.personal-section-heading-v1543 h2 {
    margin: 0;
    font-size: 19px;
    letter-spacing: -.025em;
}

.personal-section-heading-v1543 p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.personal-section-heading-v1543 > strong {
    flex: 0 0 auto;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #f5f6fb;
    color: #657087;
    font-size: 13px;
}

.personal-project-stats-v1543 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #edf0f5;
    border-radius: 13px;
    background: #fbfcfe;
}

.personal-project-stats-v1543 > div {
    min-width: 0;
    padding: 10px 13px;
    border-right: 1px solid #edf0f5;
}

.personal-project-stats-v1543 > div:last-child {
    border-right: 0;
}

.personal-project-stats-v1543 span,
.personal-project-stats-v1543 strong {
    display: block;
}

.personal-project-stats-v1543 span {
    color: var(--muted);
    font-size: 9px;
}

.personal-project-stats-v1543 strong {
    margin-top: 3px;
    font-size: 17px;
}

.personal-project-grid-v1543 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.personal-project-card-v1543 {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e9edf3;
    border-radius: 15px;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

@media (hover: hover) and (pointer: fine) {
    .personal-project-card-v1543:hover {
        border-color: #d7ddf2;
        box-shadow: 0 10px 30px rgba(31, 43, 86, .07);
        transform: translateY(-1px);
    }
}

.personal-project-cover-v1543 {
    position: relative;
    height: 128px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(23, 57, 66, .96), rgba(42, 89, 77, .88)),
        #173c45;
}

.personal-project-cover-v1543 > img:not(.personal-project-logo-v1543) {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.personal-project-logo-v1543 {
    width: 62px;
    height: 62px;
    object-fit: contain;
    opacity: .92;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .16));
}

.personal-project-cover-v1543 .status-pill {
    position: absolute;
    right: 9px;
    bottom: 9px;
    min-height: 24px;
    backdrop-filter: blur(8px);
}

.personal-project-body-v1543 {
    padding: 12px;
}

.personal-project-title-v1543 {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.personal-project-title-v1543 > div {
    min-width: 0;
}

.personal-project-title-v1543 span {
    display: block;
    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
}

.personal-project-title-v1543 h3 {
    margin: 3px 0 0;
    overflow: hidden;
    color: #17233b;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personal-project-title-v1543 b {
    flex: 0 0 auto;
    color: #9aa2b1;
    font-size: 10px;
    font-weight: 620;
    white-space: nowrap;
}

.personal-project-meta-v1543 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
    margin-top: 10px;
    color: #7d8799;
}

.personal-project-meta-v1543 > div {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.personal-project-meta-v1543 svg {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

.personal-project-meta-v1543 span {
    max-width: 180px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personal-project-empty-v1543 {
    min-height: 290px;
    display: grid;
    justify-items: center;
    align-content: center;
    padding: 28px;
    text-align: center;
}

.personal-project-empty-v1543 > span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
}

.personal-project-empty-v1543 h3 {
    margin: 12px 0 0;
    font-size: 16px;
}

.personal-project-empty-v1543 p {
    max-width: 400px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

/* Правая колонка */
.personal-settings-card-v1543 {
    display: grid;
    gap: 0;
}

.personal-settings-profile-v1543 {
    display: flex;
    align-items: center;
    gap: 14px;
}

.personal-avatar-trigger-v1543,
.personal-avatar-trigger-v1543 .profile-avatar {
    width: 72px !important;
    height: 72px !important;
}

.personal-settings-profile-v1543 > div:last-child {
    min-width: 0;
}

.personal-settings-profile-v1543 h2 {
    margin: 0;
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.personal-settings-profile-v1543 p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.personal-settings-profile-v1543 > div:last-child > span {
    display: block;
    margin-top: 3px;
    color: #7e8899;
    font-size: 10px;
}

.personal-settings-divider-v1543 {
    height: 1px;
    margin: 17px 0;
    background: #edf0f4;
}

.personal-setting-form-v1543 {
    display: grid;
    gap: 10px;
}

.personal-setting-heading-v1543 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 1px;
}

.personal-setting-heading-v1543 > span {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f5f6fb;
    color: #667289;
}

.personal-setting-heading-v1543 > span svg {
    width: 15px;
    height: 15px;
}

.personal-setting-heading-v1543 h3 {
    margin: 0;
    font-size: 14px;
}

.personal-setting-heading-v1543 p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.personal-setting-form-v1543 > label,
.personal-password-grid-v1543 > label {
    display: grid;
    gap: 5px;
}

.personal-setting-form-v1543 label > span {
    color: #667086;
    font-size: 9px;
    font-weight: 650;
}

.personal-setting-form-v1543 input {
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    outline: none;
    font-size: 12px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.personal-setting-form-v1543 input:focus {
    border-color: #9ba6ff;
    box-shadow: 0 0 0 3px rgba(51, 70, 245, .07);
}

.personal-password-grid-v1543 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.personal-security-note-v1543 {
    color: #8b95a6;
    font-size: 9px;
    line-height: 1.45;
}

.personal-settings-submit-v1543 {
    width: 100%;
    min-height: 40px !important;
    margin-top: 1px;
    justify-content: center;
}

.personal-settings-card-v1543 .profile-avatar-feedback-v1542 {
    margin: 12px 0 0;
}

@media (max-width: 1180px) {
    .personal-cabinet-grid-v1543 {
        grid-template-columns: minmax(0, 1fr) 350px;
    }
}

@media (max-width: 980px) {
    .personal-cabinet-grid-v1543 {
        grid-template-columns: 1fr;
    }

    .personal-cabinet-settings-v1543 {
        position: static;
    }

    .personal-cabinet-settings-v1543 {
        grid-row: 1;
    }

    .personal-cabinet-projects-v1543 {
        grid-row: 2;
    }

    .personal-settings-card-v1543 {
        max-width: none;
    }
}

@media (max-width: 700px) {
    .personal-cabinet-head-v1543 {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .personal-cabinet-head-meta-v1543 {
        justify-items: start;
        text-align: left;
    }

    .personal-projects-card-v1543,
    .personal-settings-card-v1543 {
        padding: 14px;
    }

    .personal-project-grid-v1543 {
        grid-template-columns: 1fr;
    }

    .personal-project-cover-v1543 {
        height: 150px;
    }

    .personal-password-grid-v1543 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .personal-project-stats-v1543 > div {
        padding: 9px;
    }

    .personal-settings-profile-v1543 {
        align-items: flex-start;
    }

    .personal-avatar-trigger-v1543,
    .personal-avatar-trigger-v1543 .profile-avatar {
        width: 66px !important;
        height: 66px !important;
    }
}


/* =========================================================
   v1.5.44 — Личный кабинет: без верхней шапки, 3 карточки,
   mobile настройки по кнопке
   ========================================================= */

/* Верхняя personal-cabinet-head-v1543 удалена из markup полностью. */
.personal-cabinet-v1543 {
    gap: 0 !important;
}

/* Desktop: три карточки объекта в одной строке. */
.personal-project-grid-v1543 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* После удаления должности название начинается сразу сверху карточки. */
.personal-project-title-v1543 h3 {
    margin-top: 0 !important;
}

/* Старая строка должности больше не используется. */
.personal-project-title-v1543 > div > span {
    display: none !important;
}

/* В правом профиле должность также удалена. */
.personal-settings-profile-v1543 p {
    display: none !important;
}

/* На desktop настройки email/password всегда открыты, кнопка не нужна. */
.personal-mobile-settings-button-v1544 {
    display: none !important;
}

.personal-account-settings-fields-v1544 {
    display: block;
}

@media (max-width: 1280px) and (min-width: 981px) {
    /*
     * Даже при более узком desktop сохраняем три карточки.
     * Карточки сами сжимаются благодаря minmax(0, 1fr).
     */
    .personal-project-grid-v1543 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .personal-project-meta-v1543 {
        gap: 6px 8px;
    }

    .personal-project-meta-v1543 span {
        max-width: 120px;
    }
}

@media (max-width: 980px) {
    /*
     * На планшете/телефоне настройки аккаунта остаются сверху,
     * но email/password по умолчанию скрыты.
     */
    .personal-mobile-settings-button-v1544 {
        width: 100%;
        min-height: 42px;
        display: inline-flex !important;
        justify-content: center;
        margin-top: 14px;
    }

    .personal-mobile-settings-button-v1544[hidden] {
        display: none !important;
    }

    .personal-mobile-settings-button-v1544 svg {
        width: 16px;
        height: 16px;
    }

    .personal-account-settings-fields-v1544 {
        display: none;
    }

    .personal-account-settings-fields-v1544.is-open-v1544 {
        display: block;
    }

    .personal-project-grid-v1543 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .personal-project-grid-v1543 {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   v1.5.45 — профиль: меню / часы / раскрытие настроек / сетка
   ========================================================= */

/* ID располагается по центру строки заголовка карточки, а не у верхнего края. */
.personal-project-title-v1543 {
    align-items: center !important;
}

.personal-project-title-v1543 b {
    align-self: center !important;
}

/* Тип проекта убран. Для рабочих ролей вместо него показываются личные часы. */
.personal-project-hours-v1545 {
    color: #657087;
}

/*
 * Настройки email/password теперь скрыты по умолчанию на ВСЕХ разрешениях.
 * Кнопка «Настроить» используется и на desktop, и на mobile.
 */
.personal-mobile-settings-button-v1544 {
    width: 100% !important;
    min-height: 42px !important;
    display: inline-flex !important;
    justify-content: center !important;
    margin-top: 14px !important;
}

.personal-mobile-settings-button-v1544[hidden] {
    display: none !important;
}

.personal-mobile-settings-button-v1544 svg {
    width: 16px;
    height: 16px;
}

.personal-account-settings-fields-v1544 {
    display: none !important;
}

.personal-account-settings-fields-v1544.is-open-v1544 {
    display: block !important;
}

/* Desktop >= 1370px: 3 карточки. */
.personal-project-grid-v1543 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Меньше 1370px: 2 карточки в строке. */
@media (max-width: 1369px) {
    .personal-project-grid-v1543 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Меньше 701px: 1 карточка в строке. */
@media (max-width: 700px) {
    .personal-project-grid-v1543 {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   v1.5.46 — вход только по телефону
   ========================================================= */

/* После удаления заголовка и подзаголовка форма начинается сразу после логотипа. */
.login-card .login-mobile-logo + .alert,
.login-card .login-mobile-logo + .login-form {
    margin-top: 0;
}

@media (max-width: 920px) {
    .login-card .login-mobile-logo {
        margin-bottom: 20px;
    }
}


/* =========================================================
   v1.5.49 — направление и курсор маски телефона
   ========================================================= */

input[data-phone-ru] {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: plaintext;
}


/* =========================================================
   v1.5.52 — рассрочка: preview и перенос переплаты в конец
   ========================================================= */

.installment-months-control-v1552 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.installment-preview-toggle-v1552 {
    min-height: 42px !important;
    white-space: nowrap;
}

.installment-preview-v1552 {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #e8ebf2;
    border-radius: 14px;
    background: #fbfcfe;
}

.installment-preview-v1552[hidden] {
    display: none !important;
}

.installment-preview-head-v1552 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-bottom: 1px solid #e8ebf2;
    background: #fff;
}

.installment-preview-head-v1552 h3 {
    margin: 0;
    font-size: 14px;
}

.installment-preview-head-v1552 p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.installment-preview-head-v1552 > strong {
    flex: 0 0 auto;
    font-size: 14px;
}

.installment-preview-list-v1552 {
    max-height: 430px;
    overflow: auto;
}

.installment-preview-row-v1552 {
    min-height: 49px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid #edf0f4;
}

.installment-preview-row-v1552:last-child {
    border-bottom: 0;
}

.installment-preview-sequence-v1552 {
    color: #9aa3b2;
    font-size: 9px;
    font-weight: 700;
}

.installment-preview-copy-v1552 {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.installment-preview-copy-v1552 strong {
    font-size: 11px;
}

.installment-preview-copy-v1552 small {
    color: var(--muted);
    font-size: 9px;
}

.installment-preview-row-v1552 > b {
    font-size: 11px;
    white-space: nowrap;
}

.installment-preview-empty-v1552 {
    padding: 22px 14px;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.installment-overpay-hint-v1552 {
    display: block;
    margin-top: 5px;
    color: #7d8799;
    font-size: 9px;
    line-height: 1.45;
}

.installment-end-credit-v1552 {
    display: block;
    margin-top: 2px;
    color: #4e9b68;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .installment-months-control-v1552 {
        grid-template-columns: 1fr;
    }

    .installment-preview-toggle-v1552 {
        width: 100%;
        justify-content: center;
    }

    .installment-preview-head-v1552 {
        align-items: flex-start;
    }

    .installment-preview-row-v1552 {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        padding-inline: 11px;
    }
}


/* =========================================================
   v1.5.53 — рассрочка: layout / tabs / modal / history
   ========================================================= */

/* Desktop: график 60%, правая колонка 40%. */
.installment-detail-grid-v1553 {
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr) !important;
    gap: 13px;
}

.installment-side-v1553 {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 13px;
    min-width: 0;
}

.installment-side-top-v1553 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    align-items: stretch;
}

.installment-side-top-v1553 > .content-card {
    min-width: 0;
    height: 100%;
}

.installment-history-card-v1553 {
    min-width: 0;
}

/* Оплаченная строка — мягкая прозрачная зелёная заливка. */
.installment-schedule-row-v1530.is-paid-v1553 {
    margin-inline: -8px;
    padding-inline: 8px;
    border-radius: 10px;
    background: rgba(39, 174, 96, .075);
}

.installment-schedule-row-v1530.is-paid-v1553 + .installment-schedule-row-v1530 {
    border-color: transparent;
}

/* История оплат: сумма + выбранная дата/платёж слева, дата внесения + автор справа. */
.installment-history-row-v1553 {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 58px;
}

.installment-history-main-v1553 {
    gap: 4px !important;
}

.installment-history-selected-v1553 {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.installment-history-selected-v1553 span,
.installment-history-selected-v1553 small {
    display: inline !important;
    margin: 0 !important;
    color: #747f92 !important;
    font-size: 12px !important;
    line-height: 1.25;
}

.installment-history-selected-v1553 span::after {
    content: "·";
    margin-left: 6px;
    color: #c0c6d0;
}

.installment-history-created-v1553 {
    white-space: nowrap;
}

.installment-history-created-v1553 span,
.installment-history-created-v1553 small {
    font-size: 11px !important;
}

.installment-void-v1553 > summary {
    border: 0;
}

.installment-void-v1553 > summary svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* Количество рядом с вкладкой. */
.installment-tabs-v1553 .tab-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.installment-tabs-v1553 .tab-link b {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 7px;
    background: #eef1f7;
    color: #6e7890;
    font-size: 9px;
    font-weight: 750;
}

.installment-tabs-v1553 .tab-link.is-active b {
    background: var(--primary-soft);
    color: var(--primary);
}

/* Модальная оплата. */
.installment-payment-modal-v1553 {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 18px;
}

.installment-payment-modal-v1553[hidden] {
    display: none !important;
}

.installment-payment-backdrop-v1553 {
    position: absolute;
    inset: 0;
    background: rgba(20, 28, 45, .42);
    backdrop-filter: blur(2px);
}

.installment-payment-dialog-v1553 {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    border: 1px solid #e5e9ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(20, 28, 45, .24);
}

.installment-payment-modal-head-v1553 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 18px;
    border-bottom: 1px solid #edf0f4;
}

.installment-payment-modal-head-v1553 h3 {
    margin: 0;
    font-size: 17px;
}

.installment-payment-modal-head-v1553 p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.installment-payment-modal-head-v1553 > button {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: #f4f6f9;
    color: #7a8496;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.installment-payment-modal-form-v1553 {
    display: grid;
    gap: 11px;
    padding: 17px 18px 18px;
}

.installment-payment-summary-v1553 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.installment-payment-summary-v1553 > div {
    padding: 10px 11px;
    border-radius: 10px;
    background: #f7f8fb;
}

.installment-payment-summary-v1553 span,
.installment-payment-summary-v1553 strong {
    display: block;
}

.installment-payment-summary-v1553 span {
    color: var(--muted);
    font-size: 9px;
}

.installment-payment-summary-v1553 strong {
    margin-top: 3px;
    font-size: 12px;
}

.installment-payment-modal-form-v1553 .field {
    display: grid;
    gap: 5px;
}

.installment-payment-modal-form-v1553 .field > span {
    color: #667086;
    font-size: 9px;
    font-weight: 650;
}

.installment-payment-modal-form-v1553 input,
.installment-payment-modal-form-v1553 textarea {
    width: 100%;
    border: 1px solid #e3e7ee;
    border-radius: 10px;
    background: #fff;
    outline: none;
}

.installment-payment-modal-form-v1553 input {
    min-height: 42px;
    padding: 0 11px;
}

.installment-payment-modal-form-v1553 textarea {
    min-height: 76px;
    padding: 10px 11px;
    resize: vertical;
}

.installment-payment-modal-error-v1553 {
    padding: 9px 10px;
    border-radius: 9px;
    background: var(--red-soft);
    color: #bf3c3c;
    font-size: 9px;
}

.installment-payment-modal-actions-v1553 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
}

.installment-payment-modal-actions-v1553 > * {
    width: 100%;
    justify-content: center;
}

/* В полном списке на телефоне нулевую KPI «Просрочено» не показываем. */
@media (max-width: 700px) {
    .installment-list-overdue-kpi-v1553.is-zero-v1553 {
        display: none !important;
    }
}

@media (max-width: 1180px) {
    .installment-detail-grid-v1553 {
        grid-template-columns: 1fr !important;
    }

    .installment-side-top-v1553 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .installment-side-top-v1553 {
        grid-template-columns: 1fr;
    }

    .installment-history-row-v1553 {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 6px !important;
    }

    .installment-history-side-v1553 {
        justify-content: space-between !important;
    }

    .installment-history-selected-v1553,
    .installment-history-created-v1553 {
        white-space: normal;
        flex-wrap: wrap;
    }

    .installment-payment-modal-v1553 {
        align-items: end;
        padding: 0;
    }

    .installment-payment-dialog-v1553 {
        width: 100%;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
    }
}


/* =========================================================
   v1.5.54 — рассрочка: ровный график + даты истории
   ========================================================= */

/* Поступления в project.php: какой платёж рассрочки и дата по графику. */
.payment-history-installment-v1554 {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 2px;
    color: #69758a;
    white-space: nowrap;
}

.payment-history-installment-v1554 span,
.payment-history-installment-v1554 small {
    display: inline !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.3;
}

.payment-history-installment-v1554 span {
    font-weight: 680;
}

.payment-history-installment-v1554 span::after {
    content: "·";
    margin-left: 6px;
    color: #c0c6d0;
}

.payment-history-created-v1554 {
    white-space: nowrap;
}

/*
 * График: статус + кнопки находятся в одной последней ячейке.
 * Поэтому «Ожидается», «Частично», «Оплатить» больше не сдвигают
 * финансовые столбцы и строки остаются одинаковыми.
 */
.installment-schedule-row-v1530 {
    grid-template-columns:
        48px
        minmax(140px, 1.35fr)
        repeat(3, minmax(88px, .68fr))
        minmax(150px, auto) !important;
}

.installment-schedule-controls-v1554 {
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.installment-schedule-controls-v1554 > .schedule-status {
    min-width: 88px;
    justify-content: center;
    text-align: center;
}

.installment-schedule-controls-v1554 .installment-row-actions-v1531 {
    flex: 0 0 auto;
}

/* История: выбранная дата/платёж слева и created_at/автор справа в одной линии. */
.installment-history-main-v1554 {
    min-width: 0;
}

.installment-history-info-line-v1554 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.installment-history-created-v1554 {
    justify-content: flex-end;
    text-align: right;
}

.installment-history-side-v1554 {
    align-self: center;
}

/* На более узком desktop сохраняем те же фиксированные ячейки. */
@media (max-width: 1250px) {
    .installment-schedule-row-v1530 {
        grid-template-columns:
            44px
            minmax(140px, 1.3fr)
            repeat(2, minmax(88px, .7fr))
            minmax(150px, auto) !important;
    }
}

@media (max-width: 700px) {
    .payment-history-installment-v1554 {
        white-space: normal;
        flex-wrap: wrap;
    }

    /*
     * Mobile: только номер платежа, название/дата и единая control-ячейка.
     * Иконку изменения даты по просьбе убираем полностью.
     */
    .installment-schedule-row-v1530 {
        grid-template-columns: 40px minmax(0, 1fr) minmax(92px, auto) !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .installment-schedule-controls-v1554 {
        min-width: 92px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 5px;
    }

    .installment-schedule-controls-v1554 > .schedule-status,
    .installment-schedule-controls-v1554 .installment-row-pay-v1531 {
        width: 100%;
        min-width: 92px;
        justify-content: center;
        text-align: center;
    }

    .installment-schedule-controls-v1554 .installment-row-actions-v1531 {
        width: 100%;
        justify-content: stretch;
    }
.installment-history-info-line-v1554 {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .installment-history-created-v1554 {
        justify-content: flex-start;
        text-align: left;
    }
}


/* =========================================================
   v1.5.55 — статус «Оплачен» без сдвигов строки
   ========================================================= */

/*
 * Все статусы графика занимают одинаковую фиксированную ячейку.
 * «Оплачен» больше не расширяет control-колонку и не увеличивает
 * высоту строки при узком доступном пространстве.
 */
.installment-schedule-controls-v1554 {
    min-width: 150px !important;
    max-width: 150px;
    overflow: visible;
}

.installment-schedule-controls-v1554 > .schedule-status {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 32px;
    min-height: 32px !important;
    flex: 0 0 96px;
    padding: 0 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    white-space: nowrap !important;
    word-break: keep-all;
    line-height: 1 !important;
    text-align: center;
}

/* Оплаченная строка имеет ту же высоту control-ячейки, что и строки с кнопкой. */
.installment-schedule-row-v1530.is-paid-v1553 .installment-schedule-controls-v1554 {
    min-height: 32px;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .installment-schedule-controls-v1554 {
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
        overflow: hidden;
    }

    .installment-schedule-controls-v1554 > .schedule-status {
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
        flex-basis: 92px;
        height: 32px;
        min-height: 32px !important;
        white-space: nowrap !important;
    }
}


/* =========================================================
   v1.5.56 — зелёная строка оплаты внутри границ графика
   ========================================================= */

/*
 * Раньше у оплаченной строки был margin-inline:-8px, из-за чего
 * зелёная заливка выходила за границы блока графика.
 * Теперь весь список имеет одинаковый внутренний отступ слева/справа,
 * а оплаченная строка занимает ровно доступную ширину.
 */
.installment-schedule-list-v1530 {
    padding-inline: 8px;
}

.installment-schedule-row-v1530.is-paid-v1553 {
    width: 100%;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    box-sizing: border-box;
}

/* Просроченная заливка тоже не должна визуально выходить за этот отступ. */
.installment-schedule-row-v1530.is-overdue-v1530 {
    border-radius: 10px;
}

@media (max-width: 700px) {
    .installment-schedule-list-v1530 {
        padding-inline: 6px;
    }

    .installment-schedule-row-v1530.is-paid-v1553 {
        margin-inline: 0 !important;
        padding-inline: 0 !important;
    }
}


/* =========================================================
   v1.5.57 — оплаченная строка: фон внутри строки, без сжатия grid
   ========================================================= */

/*
 * v1.5.56 добавлял padding самому списку и тем самым уменьшал
 * доступную ширину grid. На текущей ширине карточки минимальная
 * ширина колонок становилась больше доступной и зелёный фон
 * визуально вылезал справа.
 *
 * Возвращаем графику всю ширину. Зелёный фон рисуем отдельным
 * слоем с одинаковым inset 8px слева и справа.
 */
.installment-schedule-list-v1530 {
    padding-inline: 0 !important;
}

.installment-schedule-row-v1530.is-paid-v1553 {
    position: relative;
    isolation: isolate;
    width: auto !important;
    min-width: 0;
    margin-inline: 0 !important;
    padding: 12px 0 !important;
    background: transparent !important;
    border-radius: 0;
}

.installment-schedule-row-v1530.is-paid-v1553::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 8px;
    right: 8px;
    border-radius: 10px;
    background: rgba(39, 174, 96, .075);
    pointer-events: none;
}

.installment-schedule-row-v1530.is-paid-v1553 > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    .installment-schedule-list-v1530 {
        padding-inline: 0 !important;
    }

    .installment-schedule-row-v1530.is-paid-v1553 {
        width: auto !important;
        margin-inline: 0 !important;
        padding: 12px 0 !important;
    }

    .installment-schedule-row-v1530.is-paid-v1553::before {
        left: 6px;
        right: 6px;
    }
}


/* =========================================================
   v1.5.59 — полный зелёный фон + единая линия статусов
   ========================================================= */

/*
 * Оплаченная строка заливается целиком от левого до правого края
 * своей grid-строки. Никаких внутренних отступов у зелёного фона.
 */
.installment-schedule-row-v1530.is-paid-v1553 {
    position: relative;
    isolation: auto;
    width: auto !important;
    min-width: 0;
    margin-inline: 0 !important;
    padding: 12px 0 !important;
    border-radius: 10px;
    background: rgba(39, 174, 96, .075) !important;
}

/* Отключаем внутренний псевдо-фон из v1.5.57. */
.installment-schedule-row-v1530.is-paid-v1553::before {
    content: none !important;
    display: none !important;
}

.installment-schedule-row-v1530.is-paid-v1553 > * {
    position: static;
    z-index: auto;
}

/*
 * Оплачен / Оплатить / Ожидается / Частично:
 * одна control-ячейка, одна высота, одна вертикальная ось.
 */
.installment-schedule-controls-v1554 {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    min-height: 32px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    overflow: visible;
}

.installment-schedule-controls-v1554 > .schedule-status,
.installment-schedule-controls-v1554 .installment-row-pay-v1531 {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    vertical-align: middle;
}

.installment-schedule-controls-v1554 > .schedule-status {
    padding-left: 9px !important;
    padding-right: 9px !important;
}

.installment-schedule-controls-v1554 .installment-row-actions-v1531 {
    width: auto !important;
    min-width: 0;
    height: 32px;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    gap: 6px !important;
    margin: 0 !important;
}

/* Любая строка графика центрирует control-ячейку по вертикали. */
.installment-schedule-row-v1530 .installment-schedule-controls-v1554 {
    align-self: center !important;
}

/* Если одновременно есть «Частично» и «Оплатить» — держим их в одну линию. */
.installment-schedule-controls-v1554:has(.schedule-status) .installment-row-pay-v1531 {
    padding-left: 7px !important;
    padding-right: 7px !important;
}

.installment-schedule-controls-v1554:has(.schedule-status) > .schedule-status {
    padding-left: 7px !important;
    padding-right: 7px !important;
}

@media (max-width: 700px) {
    .installment-schedule-row-v1530.is-paid-v1553 {
        width: auto !important;
        margin-inline: 0 !important;
        padding: 12px 0 !important;
        border-radius: 10px;
        background: rgba(39, 174, 96, .075) !important;
    }

    .installment-schedule-controls-v1554 {
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
        min-height: 32px;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        overflow: visible;
    }

    .installment-schedule-controls-v1554 > .schedule-status,
    .installment-schedule-controls-v1554 .installment-row-pay-v1531 {
        height: 32px !important;
        min-height: 32px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        line-height: 1 !important;
    }

    .installment-schedule-controls-v1554 .installment-row-actions-v1531 {
        width: auto !important;
        height: 32px;
        align-items: center !important;
        justify-content: center !important;
    }
}


/* =========================================================
   v1.5.60 — оплаченная строка без скругления и без inset
   ========================================================= */

/*
 * Пользователь подтвердил нужную геометрию:
 * зелёная заливка должна идти ровно до краёв строки,
 * без внутренних отступов по краям и без закругления.
 */
.installment-schedule-list-v1530 {
    padding-inline: 0 !important;
}

.installment-schedule-row-v1530.is-paid-v1553 {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    background: rgba(39, 174, 96, .075) !important;
    background-image: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.installment-schedule-row-v1530.is-paid-v1553::before,
.installment-schedule-row-v1530.is-paid-v1553::after {
    content: none !important;
    display: none !important;
}

.installment-schedule-row-v1530.is-paid-v1553 > * {
    position: relative;
    z-index: 1;
}

/*
 * Статусные элементы держим строго по одной линии и по центру строки.
 */
.installment-schedule-controls-v1554,
.installment-schedule-row-v1530 .installment-schedule-controls-v1554,
.installment-schedule-controls-v1554 .installment-row-actions-v1531 {
    min-height: 32px !important;
    height: 32px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.installment-schedule-controls-v1554 {
    justify-content: flex-end !important;
    gap: 6px !important;
}

.installment-schedule-controls-v1554 .installment-row-actions-v1531 {
    justify-content: flex-end !important;
    gap: 6px !important;
    margin: 0 !important;
}

.installment-schedule-controls-v1554 > .schedule-status,
.installment-schedule-controls-v1554 .installment-row-pay-v1531 {
    min-height: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

@media (max-width: 700px) {
    .installment-schedule-row-v1530.is-paid-v1553 {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 0 !important;
        border-radius: 0 !important;
        background: rgba(39, 174, 96, .075) !important;
    }

    .installment-schedule-row-v1530.is-paid-v1553::before,
    .installment-schedule-row-v1530.is-paid-v1553::after {
        content: none !important;
        display: none !important;
    }

    .installment-schedule-controls-v1554,
    .installment-schedule-row-v1530 .installment-schedule-controls-v1554,
    .installment-schedule-controls-v1554 .installment-row-actions-v1531 {
        min-height: 32px !important;
        height: 32px !important;
        align-items: center !important;
    }
}


/* =========================================================
   v1.5.61 — зелёная заливка до боковых краёв графика
   ========================================================= */

/*
 * У карточки графика padding 18px. Содержимое строки остаётся
 * на прежнем месте, а зелёный фон отдельным слоем расширяется
 * на эти 18px влево и вправо — ровно до внутренних краёв карточки.
 * Скругления нет.
 */
.installment-schedule-row-v1530.is-paid-v1553 {
    position: relative !important;
    isolation: isolate;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.installment-schedule-row-v1530.is-paid-v1553::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: -18px;
    right: -18px;
    border-radius: 0 !important;
    background: rgba(39, 174, 96, .075) !important;
    pointer-events: none;
}

.installment-schedule-row-v1530.is-paid-v1553::after {
    content: none !important;
    display: none !important;
}

.installment-schedule-row-v1530.is-paid-v1553 > * {
    position: relative;
    z-index: 1;
}

/* Не даём расширенному фону выйти за саму карточку. */
.installment-schedule-card-v1530 {
    overflow: hidden;
}

@media (max-width: 700px) {
    .installment-schedule-row-v1530.is-paid-v1553 {
        padding: 10px 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    /*
     * На mobile content-card также имеет внутренний padding;
     * фон тянем до боковых краёв карточки тем же способом.
     */
    .installment-schedule-row-v1530.is-paid-v1553::before {
        left: -18px;
        right: -18px;
        border-radius: 0 !important;
    }
}


/* =========================================================
   v1.5.67 — мобильные поля без автоматического увеличения экрана
   ========================================================= */

/*
 * Safari/iOS автоматически приближает страницу при фокусе на input,
 * select или textarea, если размер текста поля меньше 16px.
 * На мобильных держим controls минимум 16px — экран больше не zoom'ится.
 */
@media (max-width: 700px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Поля авторизации и общие формы также фиксируем явно. */
    .login-form input,
    .settings-form-preview input,
    .field input,
    .field select,
    .field textarea {
        font-size: 16px !important;
    }
}


/* =========================================================
   v1.5.68 — изменение дат платежей в настройках рассрочки
   ========================================================= */

.installment-dates-form-v1568 {
    margin-top: 0;
}

.installment-dates-card-v1568 {
    padding-bottom: 14px;
}

.installment-dates-list-v1568 {
    display: grid;
}

.installment-date-row-v1568 {
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(160px, 1fr) 104px minmax(160px, 190px);
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eef0f4;
}

.installment-date-row-v1568:first-child {
    border-top: 0;
}

.installment-date-row-v1568.is-paid-v1568 {
    opacity: .68;
}

.installment-date-sequence-v1568 {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f4f8;
    color: #6e7890;
    font-size: 12px;
    font-weight: 750;
}

.installment-date-main-v1568 {
    min-width: 0;
}

.installment-date-main-v1568 strong,
.installment-date-main-v1568 span {
    display: block;
}

.installment-date-main-v1568 strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.installment-date-main-v1568 span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.installment-date-row-v1568 > .schedule-status {
    width: 104px;
    min-width: 104px;
    height: 32px;
    min-height: 32px;
    justify-content: center;
    margin: 0;
    white-space: nowrap;
}

.installment-date-field-v1568 {
    min-width: 0;
}

.installment-date-field-v1568 > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
}

.installment-date-field-v1568 input {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.installment-date-field-v1568 input:focus {
    border-color: #9ba6ff;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .07);
}

.installment-date-field-v1568 input:disabled {
    background: #f5f6f9;
    color: #8b94a6;
    cursor: not-allowed;
}

.installment-dates-note-v1568 {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #eef0f4;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 700px) {
    .installment-date-row-v1568 {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 8px 10px;
        padding: 12px 0;
    }

    .installment-date-row-v1568 > .schedule-status {
        width: auto;
        min-width: 88px;
    }

    .installment-date-field-v1568 {
        grid-column: 2 / -1;
    }

    .installment-date-main-v1568 strong {
        white-space: normal;
    }

    .installment-date-field-v1568 input {
        min-height: 44px;
        font-size: 16px !important;
    }
}


/* =========================================================
   v1.5.69 — даты до создания + обнуление рассрочки
   ========================================================= */

.installment-preview-row-v1569 {
    grid-template-columns: 34px minmax(110px, 1fr) minmax(150px, 185px) auto;
}

.installment-preview-date-v1569 {
    min-width: 0;
}

.installment-preview-date-v1569 input {
    width: 100%;
    min-height: 38px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.installment-preview-date-v1569 input:focus {
    border-color: #9ba6ff;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .07);
}

.installment-reset-card-v1569 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-color: #f2d8d8;
}

.installment-reset-copy-v1569 {
    min-width: 0;
}

.installment-reset-copy-v1569 h2 {
    margin: 0;
    font-size: 16px;
}

.installment-reset-copy-v1569 p {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.installment-reset-card-v1569 form {
    flex: 0 0 auto;
    margin: 0;
}

.installment-reset-button-v1569 {
    min-height: 42px;
    white-space: nowrap;
}

.installment-reset-button-v1569:disabled {
    opacity: .45;
    cursor: default;
}

@media (max-width: 700px) {
    .installment-preview-row-v1569 {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .installment-preview-date-v1569 {
        grid-column: 2 / -1;
    }

    .installment-preview-date-v1569 input {
        min-height: 44px;
        font-size: 16px !important;
    }

    .installment-reset-card-v1569 {
        align-items: stretch;
        flex-direction: column;
    }

    .installment-reset-card-v1569 form,
    .installment-reset-button-v1569 {
        width: 100%;
    }
}


/* =========================================================
   v1.5.70 — полный reset + дата первого платежа
   ========================================================= */

[data-installment-preview-first-date] {
    min-height: 46px;
}

@media (max-width: 700px) {
    [data-installment-preview-first-date] {
        min-height: 44px;
        font-size: 16px !important;
    }
}


/* =========================================================
   v1.5.72 — Финансы
   ========================================================= */

.finance-page-v1572 {
    display: grid;
    gap: 14px;
}

.finance-hero-v1572 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: 28px;
    align-items: center;
    padding: 26px 28px;
    border: 1px solid #e6e9f5;
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 12%, rgba(51, 70, 245, .10), transparent 35%),
        linear-gradient(135deg, #fff, #f8f9ff);
    box-shadow: var(--shadow);
}

.finance-eyebrow-v1572 {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.finance-hero-v1572 h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.045em;
}

.finance-hero-v1572 p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.finance-hero-progress-v1572 {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid rgba(51, 70, 245, .10);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
}

.finance-hero-progress-head-v1572,
.finance-hero-progress-foot-v1572 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.finance-hero-progress-head-v1572 span,
.finance-hero-progress-foot-v1572 span {
    color: var(--muted);
    font-size: 11px;
}

.finance-hero-progress-head-v1572 strong {
    color: var(--primary);
    font-size: 18px;
}

.finance-hero-track-v1572 {
    height: 9px;
    margin: 12px 0 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #eceffa;
}

.finance-hero-track-v1572 span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3346f5, #6878ff);
}

.finance-hero-progress-foot-v1572 b {
    font-size: 15px;
}

.finance-kpis-v1572 {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
}

.finance-kpi-v1572 {
    min-width: 0;
    min-height: 112px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.finance-kpi-v1572 > span,
.finance-kpi-v1572 > strong,
.finance-kpi-v1572 > small {
    display: block;
}

.finance-kpi-v1572 > span {
    color: var(--muted);
    font-size: 14px;
}

.finance-kpi-v1572 > strong {
    margin-top: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 20px;
    letter-spacing: -.025em;
}

.finance-kpi-v1572 > small {
    margin-top: 8px;
    color: #929aac;
    font-size: 12px;
    line-height: 1.35;
}

.finance-kpi-v1572.is-positive-v1572 {
    background: linear-gradient(145deg, #fff, #f2fbf5);
}

.finance-kpi-v1572.is-positive-v1572 > strong {
    color: #17874a;
}

.finance-kpi-v1572.is-warning-v1572 {
    background: linear-gradient(145deg, #fff, #fff9f2);
}

.finance-kpi-v1572.is-warning-v1572 > strong {
    color: #c96720;
}

.finance-kpi-v1572.is-danger-v1572 {
    border-color: #f4dada;
    background: linear-gradient(145deg, #fff, #fff5f5);
}

.finance-kpi-v1572.is-danger-v1572 > strong {
    color: #cf3f3f;
}

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

.finance-method-card-v1572 {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: #fff;
    box-shadow: var(--shadow);
}

.finance-method-card-v1572.is-cash-v1572 {
    --finance-method: #22a95a;
    --finance-method-soft: #ebf9f0;
}

.finance-method-card-v1572.is-mortgage-v1572 {
    --finance-method: #3f6ff7;
    --finance-method-soft: #edf3ff;
}

.finance-method-card-v1572.is-installment-v1572 {
    --finance-method: #7657e8;
    --finance-method-soft: #f2efff;
}

.finance-method-head-v1572 {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
}

.finance-method-icon-v1572 {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--finance-method);
    background: var(--finance-method-soft);
}

.finance-method-icon-v1572 svg {
    width: 20px;
    height: 20px;
}

.finance-method-head-v1572 div > span,
.finance-method-head-v1572 div > strong {
    display: block;
}

.finance-method-head-v1572 div > span {
    font-size: 16px;
    font-weight: 760;
}

.finance-method-head-v1572 div > strong {
    margin-top: 3px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.finance-method-head-v1572 > b {
    color: var(--finance-method);
    font-size: 20px;
}

.finance-method-main-v1572 {
    margin-top: 18px;
}

.finance-method-main-v1572 span,
.finance-method-main-v1572 strong {
    display: block;
}

.finance-method-main-v1572 span {
    color: var(--muted);
    font-size: 12px;
}

.finance-method-main-v1572 strong {
    margin-top: 5px;
    font-size: 22px;
    letter-spacing: -.035em;
}

.finance-method-progress-v1572 {
    height: 6px;
    margin: 14px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #eff1f5;
}

.finance-method-progress-v1572 span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--finance-method);
}

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

.finance-method-stats-v1572 > div {
    min-width: 0;
    padding: 10px;
    border-radius: 11px;
    background: #f8f9fc;
}

.finance-method-stats-v1572 span,
.finance-method-stats-v1572 strong {
    display: block;
}

.finance-method-stats-v1572 span {
    color: var(--muted);
    font-size: 14px;
}

.finance-method-stats-v1572 strong {
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.finance-visual-grid-v1572 {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .7fr);
    gap: 13px;
}

.finance-section-heading-v1572 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.finance-section-heading-v1572 h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.025em;
}

.finance-section-heading-v1572 p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.finance-section-total-v1572 {
    white-space: nowrap;
    font-size: 17px;
}

.finance-chart-legend-v1572 {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 12px;
}

.finance-chart-legend-v1572 span,
.finance-share-list-v1572 span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.finance-chart-legend-v1572 i,
.finance-share-list-v1572 i {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
}

.is-cash-v1572 {
    --finance-color: #22a95a;
}

.is-mortgage-v1572 {
    --finance-color: #3f6ff7;
}

.is-installment-v1572 {
    --finance-color: #7657e8;
}

.finance-chart-legend-v1572 i.is-cash-v1572,
.finance-share-list-v1572 i.is-cash-v1572 {
    background: #22a95a;
}

.finance-chart-legend-v1572 i.is-mortgage-v1572,
.finance-share-list-v1572 i.is-mortgage-v1572 {
    background: #3f6ff7;
}

.finance-chart-legend-v1572 i.is-installment-v1572,
.finance-share-list-v1572 i.is-installment-v1572 {
    background: #7657e8;
}

.finance-bars-scroll-v1572 {
    overflow-x: auto;
    padding: 4px 0 2px;
}

.finance-bars-v1572 {
    min-width: 720px;
    height: 278px;
    display: grid;
    grid-template-columns: repeat(12, minmax(42px, 1fr));
    gap: 8px;
    align-items: end;
    padding: 0 4px;
    border-bottom: 1px solid #e8ebf2;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 66px,
            #f0f2f6 67px
        );
}

.finance-bar-column-v1572 {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 24px minmax(0, 1fr) 34px;
    align-items: end;
}

.finance-bar-value-v1572 {
    padding-bottom: 5px;
    overflow: hidden;
    color: #687287;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.finance-bar-track-v1572 {
    height: 208px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
}

.finance-bar-segment-v1572 {
    width: min(30px, 72%);
    min-height: 2px;
    display: block;
    align-self: center;
    border-radius: 5px 5px 2px 2px;
    background: var(--finance-color);
}

.finance-bar-label-v1572 {
    padding-top: 7px;
    text-align: center;
}

.finance-bar-label-v1572 strong,
.finance-bar-label-v1572 span {
    display: block;
}

.finance-bar-label-v1572 strong {
    font-size: 12px;
}

.finance-bar-label-v1572 span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.finance-chart-summary-v1572 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.finance-chart-summary-v1572 > div {
    padding: 10px 12px;
    border-radius: 11px;
    background: #f8f9fc;
}

.finance-chart-summary-v1572 span,
.finance-chart-summary-v1572 strong {
    display: block;
}

.finance-chart-summary-v1572 span {
    color: var(--muted);
    font-size: 12px;
}

.finance-chart-summary-v1572 strong {
    margin-top: 5px;
    font-size: 16px;
}

.finance-portfolio-card-v1572 {
    min-width: 0;
}

.finance-donut-wrap-v1572 {
    display: grid;
    place-items: center;
    padding: 7px 0 18px;
}

.finance-donut-v1572 {
    width: 186px;
    height: 186px;
    padding: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(
            #22a95a 0 var(--cash-end),
            #3f6ff7 var(--cash-end) var(--mortgage-end),
            #7657e8 var(--mortgage-end) 360deg
        );
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}

.finance-donut-v1572 > div {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(30, 42, 76, .08);
    text-align: center;
}

.finance-donut-v1572 strong,
.finance-donut-v1572 span {
    display: block;
}

.finance-donut-v1572 strong {
    font-size: 20px;
    letter-spacing: -.035em;
}

.finance-donut-v1572 span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.finance-share-list-v1572 {
    display: grid;
    gap: 8px;
}

.finance-share-list-v1572 > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f8f9fc;
}

.finance-share-list-v1572 span {
    font-size: 14px;
    font-weight: 650;
}

.finance-share-list-v1572 strong {
    font-size: 16px;
}

.finance-share-list-v1572 small {
    grid-column: 1 / -1;
    padding-left: 14px;
    color: var(--muted);
    font-size: 14px;
}

.finance-debt-list-v1572,
.finance-history-list-v1572 {
    display: grid;
}

.finance-debt-row-v1572 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) 100px minmax(150px, .8fr) minmax(125px, auto);
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eef0f4;
    transition: .15s ease;
}

.finance-debt-row-v1572:first-child {
    border-top: 0;
}

.finance-debt-row-v1572:hover {
    background: #fafbfe;
}

.finance-debt-object-v1572 {
    min-width: 0;
}

.finance-debt-object-v1572 span,
.finance-debt-object-v1572 strong {
    display: block;
}

.finance-debt-object-v1572 span {
    color: var(--muted);
    font-size: 14px;
}

.finance-debt-object-v1572 strong {
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

.finance-method-pill-v1572 {
    width: fit-content;
    min-height: 26px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 720;
}

.finance-method-pill-v1572.is-cash-v1572 {
    color: #18884a;
    background: #ebf9f0;
}

.finance-method-pill-v1572.is-mortgage-v1572 {
    color: #315ed2;
    background: #edf3ff;
}

.finance-method-pill-v1572.is-installment-v1572 {
    color: #6545d2;
    background: #f2efff;
}

.finance-debt-progress-v1572 > div {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef0f4;
}

.finance-debt-progress-v1572 > div span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4057ff, #7685ff);
}

.finance-debt-progress-v1572 small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 14px;
}

.finance-debt-money-v1572 {
    text-align: right;
}

.finance-debt-money-v1572 span,
.finance-debt-money-v1572 strong {
    display: block;
}

.finance-debt-money-v1572 span {
    color: var(--muted);
    font-size: 14px;
}

.finance-debt-money-v1572 strong {
    margin-top: 4px;
    font-size: 16px;
}

.finance-history-heading-v1572 {
    align-items: center;
}

.finance-history-heading-v1572 > span {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #667188;
    background: #f1f3f7;
    font-size: 14px;
    font-weight: 700;
}

.finance-history-filters-v1572 {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 10px;
    margin-bottom: 10px;
}

.finance-history-filters-v1572 label > span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 9px;
}

.finance-history-filters-v1572 input,
.finance-history-filters-v1572 select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    outline: none;
    font-size: 11px;
}

.finance-history-filters-v1572 input:focus,
.finance-history-filters-v1572 select:focus {
    border-color: #9ba6ff;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .07);
}

.finance-history-row-v1572 {
    min-width: 0;
    display: grid;
    grid-template-columns: 86px minmax(180px, 1fr) 104px minmax(190px, 1fr) 125px;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eef0f4;
}

.finance-history-row-v1572:first-child {
    border-top: 0;
}

.finance-history-row-v1572.is-voided-v1572 {
    opacity: .55;
}

.finance-history-date-v1572 strong,
.finance-history-date-v1572 span,
.finance-history-object-v1572 > span,
.finance-history-object-v1572 > a,
.finance-history-object-v1572 > small,
.finance-history-kind-v1572 > small,
.finance-history-note-v1572 > span,
.finance-history-note-v1572 > small,
.finance-history-amount-v1572 > strong,
.finance-history-amount-v1572 > a {
    display: block;
}

.finance-history-date-v1572 strong {
    font-size: 12px;
}

.finance-history-date-v1572 span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.finance-history-object-v1572,
.finance-history-note-v1572 {
    min-width: 0;
}

.finance-history-object-v1572 > span {
    color: var(--muted);
    font-size: 12px;
}

.finance-history-object-v1572 > a {
    margin-top: 3px;
    overflow: hidden;
    color: #27324a;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 720;
}

.finance-history-object-v1572 > a:hover {
    color: var(--primary);
}

.finance-history-object-v1572 > small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8px;
}

.finance-history-kind-v1572 > small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.finance-history-note-v1572 > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.finance-history-note-v1572 > span.is-muted-v1572 {
    color: #a1a7b5;
}

.finance-history-note-v1572 > small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.finance-history-amount-v1572 {
    text-align: right;
}

.finance-history-amount-v1572 > strong {
    color: #17874a;
    font-size: 16px;
}

.finance-history-row-v1572.is-voided-v1572 .finance-history-amount-v1572 > strong {
    color: #858da0;
    text-decoration: line-through;
}

.finance-history-amount-v1572 > a {
    margin-top: 4px;
    color: var(--primary);
    font-size: 8px;
    font-weight: 700;
}

.finance-history-filter-empty-v1572 {
    margin-top: 8px;
    border-top: 1px solid #eef0f4;
}

@media (max-width: 1420px) {
    .finance-kpis-v1572 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .finance-history-row-v1572 {
        grid-template-columns: 78px minmax(170px, 1fr) 98px minmax(160px, .9fr) 115px;
        gap: 10px;
    }
}

@media (max-width: 1180px) {
    .finance-hero-v1572 {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .finance-method-grid-v1572 {
        grid-template-columns: 1fr;
    }

    .finance-visual-grid-v1572 {
        grid-template-columns: 1fr;
    }

    .finance-portfolio-card-v1572 {
        display: grid;
        grid-template-columns: minmax(190px, .45fr) minmax(220px, 1fr);
        gap: 12px 24px;
        align-items: center;
    }

    .finance-portfolio-card-v1572 .finance-section-heading-v1572 {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .finance-debt-row-v1572 {
        grid-template-columns: minmax(160px, 1fr) 95px minmax(135px, .7fr) auto;
    }

    .finance-history-row-v1572 {
        grid-template-columns: 72px minmax(160px, 1fr) 96px 120px;
    }

    .finance-history-note-v1572 {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    .finance-history-amount-v1572 {
        grid-column: 4;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 700px) {
    .finance-page-v1572 {
        gap: 10px;
    }

    .finance-hero-v1572 {
        padding: 18px;
        border-radius: 16px;
    }

    .finance-hero-v1572 h1 {
        font-size: 24px;
    }

    .finance-hero-progress-v1572 {
        padding: 14px;
    }

    .finance-kpis-v1572 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .finance-kpi-v1572 {
        min-height: 104px;
        padding: 13px;
    }

    .finance-kpi-v1572 > strong {
        white-space: normal;
        font-size: 16px;
    }

    .finance-method-card-v1572 {
        padding: 15px;
    }

    .finance-method-main-v1572 strong {
        font-size: 19px;
    }

    .finance-method-stats-v1572 {
        grid-template-columns: 1fr;
    }

    .finance-method-stats-v1572 > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .finance-method-stats-v1572 strong {
        margin-top: 0;
        text-align: right;
    }

    .finance-section-heading-v1572 {
        display: block;
    }

    .finance-section-total-v1572 {
        display: block;
        margin-top: 8px;
    }

    .finance-chart-legend-v1572 {
        justify-content: flex-start;
        margin-top: 9px;
    }

    .finance-chart-summary-v1572 {
        grid-template-columns: 1fr;
    }

    .finance-chart-summary-v1572 > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .finance-chart-summary-v1572 strong {
        margin-top: 0;
    }

    .finance-portfolio-card-v1572 {
        display: block;
    }

    .finance-donut-v1572 {
        width: 170px;
        height: 170px;
    }

    .finance-donut-v1572 > div {
        width: 108px;
        height: 108px;
    }

    .finance-debt-row-v1572 {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px;
        padding: 12px 0;
    }

    .finance-debt-object-v1572 {
        grid-column: 1;
    }

    .finance-method-pill-v1572 {
        grid-column: 2;
        justify-self: end;
    }

    .finance-debt-progress-v1572 {
        grid-column: 1;
    }

    .finance-debt-money-v1572 {
        grid-column: 2;
        text-align: right;
    }

    .finance-history-heading-v1572 > span {
        margin-top: 8px;
    }

    .finance-history-filters-v1572 {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .finance-history-filters-v1572 input,
    .finance-history-filters-v1572 select {
        min-height: 44px;
        font-size: 16px !important;
    }

    .finance-history-row-v1572 {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        gap: 8px 10px;
        align-items: start;
        padding: 13px 0;
    }

    .finance-history-date-v1572 {
        grid-column: 1;
        grid-row: 1;
    }

    .finance-history-object-v1572 {
        grid-column: 2;
        grid-row: 1;
    }

    .finance-history-kind-v1572 {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .finance-history-note-v1572 {
        grid-column: 2 / -1;
        grid-row: 2;
    }

    .finance-history-note-v1572 > span {
        white-space: normal;
    }

    .finance-history-amount-v1572 {
        grid-column: 2 / -1;
        grid-row: 3;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        text-align: left;
    }

    .finance-history-amount-v1572 > a {
        margin-top: 0;
    }
}


/* =========================================================
   v1.5.73 — источник финансов рассрочки = активный график
   ========================================================= */

.finance-method-source-v1573 {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.finance-history-row-v1572.is-historical-v1573 {
    opacity: .68;
}

.finance-history-row-v1572.is-historical-v1573 .finance-history-amount-v1572 > strong {
    color: #7d879b;
}

.finance-history-row-v1572.is-historical-v1573 .finance-history-kind-v1572 > small {
    color: #8a6a20;
}


/* =========================================================
   v1.5.74 — прозрачная формула «Осталось получить»
   ========================================================= */

.finance-remaining-breakdown-v1574 {
    line-height: 1.45 !important;
    white-space: normal;
}


/* =========================================================
   v1.5.76 — общие финансы = Dashboard, график рассрочки отдельно
   ========================================================= */

.finance-installment-schedule-v1576 {
    margin-top: 12px;
    padding: 11px;
    border: 1px solid #e8e2ff;
    border-radius: 12px;
    background: #faf8ff;
}

.finance-installment-schedule-head-v1576 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.finance-installment-schedule-head-v1576 span {
    color: #6657a6;
    font-size: 9px;
    font-weight: 700;
}

.finance-installment-schedule-head-v1576 strong {
    color: #7657e8;
    font-size: 10px;
}

.finance-installment-schedule-grid-v1576 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.finance-installment-schedule-grid-v1576 > div {
    min-width: 0;
    padding: 8px;
    border-radius: 9px;
    background: #fff;
}

.finance-installment-schedule-grid-v1576 span,
.finance-installment-schedule-grid-v1576 strong {
    display: block;
}

.finance-installment-schedule-grid-v1576 span {
    color: var(--muted);
    font-size: 8px;
}

.finance-installment-schedule-grid-v1576 strong {
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

@media (max-width: 700px) {
    .finance-installment-schedule-grid-v1576 {
        grid-template-columns: 1fr;
    }

    .finance-installment-schedule-grid-v1576 > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .finance-installment-schedule-grid-v1576 strong {
        margin-top: 0;
        text-align: right;
    }
}


/* =========================================================
   v1.5.77 — контроль версии финансового расчёта
   ========================================================= */

.finance-eyebrow-line-v1577 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.finance-eyebrow-line-v1577 .finance-eyebrow-v1572 {
    margin-bottom: 0;
}

.finance-version-badge-v1577 {
    min-height: 22px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dfe3ff;
    border-radius: 999px;
    color: #5365df;
    background: #f4f6ff;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}


/* =========================================================
   v1.5.79 — карточка «Рассрочка» = текущий активный график
   ========================================================= */

.finance-method-source-v1579 {
    display: block;
    margin-top: 4px;
    color: #7b6cac;
    font-size: 9px;
    font-weight: 650;
}


/* =========================================================
   v1.5.80 — расшифровка «Осталось получить»
   ========================================================= */

.finance-remaining-breakdown-v1580 {
    line-height: 1.45 !important;
    white-space: normal;
}


/* =========================================================
   v1.5.81 — структура оплаты договора в project.php
   ========================================================= */

.payment-installment-contract-v1581 {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #e8e3ff;
    border-radius: 16px;
    background:
        radial-gradient(circle at 96% 4%, rgba(118, 87, 232, .07), transparent 30%),
        #fbfaff;
}

.payment-installment-contract-head-v1581 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.payment-installment-contract-eyebrow-v1581 {
    display: block;
    margin-bottom: 5px;
    color: #7657e8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.payment-installment-contract-head-v1581 h3 {
    margin: 0;
    font-size: 17px;
}

.payment-installment-contract-head-v1581 p {
    max-width: 680px;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.payment-installment-open-v1581 {
    flex: 0 0 auto;
}

.payment-installment-empty-v1581 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed #d9d3f8;
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
}

.payment-installment-empty-v1581 strong,
.payment-installment-empty-v1581 span {
    display: block;
}

.payment-installment-empty-v1581 strong {
    font-size: 12px;
}

.payment-installment-empty-v1581 span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
}

.payment-installment-warning-v1581 {
    margin-top: 12px;
}

.payment-contract-composition-v1581 {
    margin-top: 16px;
}

.payment-contract-composition-labels-v1581 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.payment-contract-composition-labels-v1581 > div {
    min-width: 0;
    display: grid;
    grid-template-columns: 8px auto auto;
    gap: 6px;
    align-items: center;
}

.payment-contract-composition-labels-v1581 i {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 50%;
}

.payment-contract-composition-labels-v1581 i.is-cash-v1581 {
    background: #24a85a;
}

.payment-contract-composition-labels-v1581 i.is-installment-v1581 {
    background: #7657e8;
}

.payment-contract-composition-labels-v1581 span {
    color: var(--muted);
    font-size: 9px;
}

.payment-contract-composition-labels-v1581 strong {
    font-size: 10px;
}

.payment-contract-composition-bar-v1581 {
    height: 10px;
    display: flex;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eceef4;
}

.payment-contract-composition-bar-v1581 > span {
    height: 100%;
    display: block;
}

.payment-contract-composition-bar-v1581 > span.is-cash-v1581 {
    background: #24a85a;
}

.payment-contract-composition-bar-v1581 > span.is-installment-v1581 {
    background: #7657e8;
}

.payment-contract-payment-grid-v1581 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.payment-contract-payment-card-v1581 {
    min-width: 0;
    padding: 14px;
    border: 1px solid #eceef4;
    border-radius: 13px;
    background: #fff;
}

.payment-contract-payment-card-v1581.is-cash-v1581 {
    --payment-split-color: #24a85a;
    --payment-split-soft: #edf9f1;
}

.payment-contract-payment-card-v1581.is-installment-v1581 {
    --payment-split-color: #7657e8;
    --payment-split-soft: #f3f0ff;
}

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

.payment-contract-payment-head-v1581 span,
.payment-contract-payment-head-v1581 strong {
    display: block;
}

.payment-contract-payment-head-v1581 span {
    color: var(--muted);
    font-size: 9px;
}

.payment-contract-payment-head-v1581 strong {
    margin-top: 4px;
    font-size: 16px;
}

.payment-contract-payment-head-v1581 > b {
    color: var(--payment-split-color);
    font-size: 12px;
}

.payment-contract-payment-progress-v1581 {
    height: 6px;
    margin: 12px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #eef0f4;
}

.payment-contract-payment-progress-v1581 > span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--payment-split-color);
}

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

.payment-contract-payment-stats-v1581 > div {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: var(--payment-split-soft);
}

.payment-contract-payment-stats-v1581 span,
.payment-contract-payment-stats-v1581 strong {
    display: block;
}

.payment-contract-payment-stats-v1581 span {
    color: var(--muted);
    font-size: 8px;
}

.payment-contract-payment-stats-v1581 strong {
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.payment-contract-check-v1581 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #f4f5f9;
}

.payment-contract-check-v1581 > div {
    min-width: 0;
}

.payment-contract-check-v1581 span,
.payment-contract-check-v1581 strong {
    display: block;
}

.payment-contract-check-v1581 > span {
    color: #8e96a8;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.payment-contract-check-v1581 > div > span {
    color: var(--muted);
    font-size: 8px;
}

.payment-contract-check-v1581 > div > strong {
    margin-top: 3px;
    font-size: 11px;
}

.payment-history-source-v1581 {
    margin: 5px 0 2px;
}

.payment-history-source-v1581 > span {
    width: fit-content;
    min-height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 750;
}

.payment-history-source-v1581 > span.is-cash-v1581 {
    color: #18884a;
    background: #edf9f1;
}

.payment-history-source-v1581 > span.is-installment-v1581 {
    color: #6545d2;
    background: #f2efff;
}

@media (max-width: 700px) {
    .payment-installment-contract-v1581 {
        padding: 14px;
        border-radius: 14px;
    }

    .payment-installment-contract-head-v1581 {
        display: block;
    }

    .payment-installment-open-v1581 {
        width: 100%;
        margin-top: 10px;
    }

    .payment-installment-empty-v1581 {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-installment-empty-v1581 .primary-button {
        width: 100%;
    }

    .payment-contract-composition-labels-v1581 {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .payment-contract-composition-labels-v1581 > div {
        grid-template-columns: 8px minmax(0, 1fr) auto;
    }

    .payment-contract-payment-grid-v1581 {
        grid-template-columns: 1fr;
    }

    .payment-contract-check-v1581 {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .payment-contract-check-v1581 > span {
        display: none;
    }

    .payment-contract-check-v1581 > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .payment-contract-check-v1581 > div > strong {
        margin-top: 0;
        text-align: right;
    }
}


/* =========================================================
   v1.5.82 — Dashboard: расшифровка остатка
   ========================================================= */

.finance-strip-balance-v1582 {
    align-items: flex-start;
}

.finance-strip-balance-main-v1582 {
    min-width: 0;
}

.finance-strip-balance-breakdown-v1582 {
    margin-top: 5px;
}

.finance-strip-balance-breakdown-v1582 > span {
    display: block;
    margin-bottom: 2px;
    color: #9a7b35;
    font-size: 8px;
    font-weight: 700;
}

.finance-strip-balance-breakdown-v1582 > small {
    display: block;
    color: #8a754c;
    font-size: 8px;
    line-height: 1.35;
}

.finance-strip-balance-breakdown-v1582 > small b {
    color: #735b2d;
    font-weight: 800;
}

@media (max-width: 700px) {
    .finance-strip-balance-breakdown-v1582 > small {
        white-space: normal;
    }
}


/* =========================================================
   v1.5.83 — Наличка: «Без рассрочки»
   ========================================================= */

.finance-method-card-v1572.is-cash-v1572
.finance-method-stats-v1572 > div:nth-child(2) span {
    color: #5d7b67;
}


/* =========================================================
   v1.5.84 — Наличка: «Осталось» + «Без рассрочки»
   ========================================================= */

.finance-cash-remaining-v1584 {
    min-height: 62px;
}

.finance-cash-without-installment-v1584 {
    display: block;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(36, 168, 90, .10);
    color: #6e7f73;
    font-size: 12px;
    line-height: 1.35;
}

.finance-cash-without-installment-v1584 b {
    margin-left: 4px;
    color: #237b45;
    font-size: 14px;
    font-weight: 800;
}

@media (max-width: 700px) {
    .finance-cash-without-installment-v1584 {
        white-space: normal;
    }
}


/* =========================================================
   v1.5.86 — графики на месте бывшей финансовой панели
   ========================================================= */

.finance-page-v1572 > .finance-visual-grid-v1572:first-child {
    margin-top: 0;
}

/*
 * Старый hero «Финансовая панель» больше не используется на странице,
 * но его стили оставлены для обратной совместимости.
 */


/* =========================================================
   v1.5.88 — Финансы: UI, история, строки, доп. услуги
   ========================================================= */

/* «Осталось получить»: каждый способ оплаты — отдельная строка. */
.finance-remaining-breakdown-v1588 {
    display: grid !important;
    gap: 3px;
}

.finance-remaining-breakdown-v1588 > span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.finance-remaining-breakdown-v1588 b {
    color: #737d91;
    font-weight: 800;
    white-space: nowrap;
}

/* Карточки способов оплаты: два основных блока, у налички третий — Без рассрочки. */
.finance-method-stats-v1572.is-two-v1588 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-method-stats-v1572.is-cash-v1588 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-method-extra-line-v1588 {
    display: block;
    margin-top: 6px;
    color: #22a95a;
    line-height: 1.35;
}

.finance-method-extra-line-v1588 b {
    color: #22a95a;
    font-weight: 800;
}

.finance-cash-without-block-v1588 {
    background: #f1f8f3 !important;
}

/* Финансовая история: кнопки действий. */
.finance-history-actions-v1588 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
}

.finance-history-count-v1588 {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 9px;
    color: #667188;
    background: #f1f3f7;
    font-weight: 700;
}

.finance-history-filter-toggle-v1588,
.finance-history-deleted-toggle-v1588 {
    min-height: 34px;
    padding: 0 11px;
    border-color: #e1e5eb !important;
    border-radius: 9px;
    background: #eef1f5 !important;
    color: #555f70 !important;
    box-shadow: none !important;
}

.finance-history-filter-toggle-v1588.is-active,
.finance-history-deleted-toggle-v1588.is-active,
.finance-history-filter-toggle-v1588:hover,
.finance-history-deleted-toggle-v1588:hover {
    background: #e4e8ee !important;
    color: #343c49 !important;
}

/* Как в «Объекты»: фильтр закрыт по умолчанию на desktop и mobile. */
.finance-history-filters-collapsible-v1588 {
    display: none !important;
}

.finance-history-filters-collapsible-v1588.is-open {
    display: grid !important;
}

/* Чередование строк: 1-я серая, 2-я белая. */
.finance-debt-row-v1572 {
    padding-left: 10px;
    padding-right: 10px;
}

.finance-debt-row-v1572:nth-child(odd) {
    background: #f7f8fb;
}

.finance-debt-row-v1572:nth-child(even) {
    background: #fff;
}

.finance-debt-row-v1572:hover {
    background: #f1f4f9;
}

.finance-history-row-v1572 {
    padding-left: 10px;
    padding-right: 10px;
    background: #fff;
}

.finance-history-row-v1572.is-alt-v1588 {
    background: #f7f8fb;
}

/* Мобильная версия: каждый показатель налички отдельной строкой. */
@media (max-width: 700px) {
    .finance-method-stats-v1572.is-two-v1588,
    .finance-method-stats-v1572.is-cash-v1588 {
        grid-template-columns: 1fr !important;
    }

    .finance-method-stats-v1572 > div {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 4px 12px;
    }

    .finance-method-stats-v1572 > div > strong {
        margin-top: 0;
        text-align: right;
    }

    .finance-method-extra-line-v1588 {
        grid-column: 1 / -1;
        margin-top: 2px;
    }

    .finance-cash-without-block-v1588 {
        margin-top: 1px;
    }

    .finance-history-heading-v1572 {
        display: block;
    }

    .finance-history-actions-v1588 {
        justify-content: flex-start;
        margin-top: 9px;
    }

    .finance-history-filter-toggle-v1588,
    .finance-history-deleted-toggle-v1588 {
        flex: 1 1 auto;
        justify-content: center;
    }

    .finance-history-filters-collapsible-v1588.is-open {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   v1.5.89 — надёжное скрытие удалённых в финансовой истории
   ========================================================= */

.finance-history-row-v1572.is-filter-hidden-v1589,
.finance-history-row-v1572[hidden] {
    display: none !important;
}


/* =========================================================
   v1.5.90 — адаптивная верстка Финансов + Dashboard
   ========================================================= */

/*
 * После удаления двух KPI осталось ровно 4 карточки.
 * На широком экране они всегда занимают всю строку без пустого места справа.
 */
.finance-kpis-v1572 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/*
 * Денежные значения не должны превращаться в «...».
 * Размер плавно уменьшается на более узких desktop-экранах/при zoom браузера.
 */
.finance-kpi-v1572 > strong {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: clamp(17px, 1.18vw, 20px);
    font-variant-numeric: tabular-nums;
}

.finance-method-main-v1572 strong {
    font-size: clamp(18px, 1.3vw, 22px);
    font-variant-numeric: tabular-nums;
}

.finance-method-stats-v1572 span {
    font-size: clamp(11px, .82vw, 14px);
    line-height: 1.25;
}

.finance-method-stats-v1572 strong {
    margin-top: 5px;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    font-size: clamp(12px, .9vw, 16px);
    line-height: 1.15;
    letter-spacing: -.015em;
    font-variant-numeric: tabular-nums;
}

.finance-method-extra-line-v1588 {
    font-size: clamp(9px, .68vw, 12px);
}

.finance-method-extra-line-v1588 b {
    white-space: nowrap;
}

/* Dashboard: «Из них» — ипотека и рассрочка каждая отдельной строкой. */
.finance-strip-balance-breakdown-v1590 > small {
    display: grid;
    gap: 2px;
}

.finance-strip-balance-breakdown-v1590 > small > span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    white-space: nowrap;
}

/*
 * Промежуточные desktop-размеры — именно здесь браузерный zoom раньше
 * делал карточки слишком узкими и появлялись троеточия.
 */
@media (max-width: 1700px) {
    .finance-method-card-v1572 {
        padding: 15px;
    }

    .finance-method-head-v1572 {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .finance-method-icon-v1572 {
        width: 40px;
        height: 40px;
    }

    .finance-method-head-v1572 div > span {
        font-size: clamp(14px, .95vw, 16px);
    }

    .finance-method-head-v1572 div > strong {
        font-size: clamp(12px, .86vw, 15px);
    }

    .finance-method-head-v1572 > b {
        font-size: clamp(17px, 1.12vw, 20px);
    }

    .finance-method-stats-v1572 {
        gap: 6px;
    }

    .finance-method-stats-v1572 > div {
        padding: 9px 8px;
    }

    .finance-method-main-v1572 {
        margin-top: 15px;
    }

    .finance-method-progress-v1572 {
        margin: 12px 0;
    }
}

/* Планшет / маленькое окно: KPI по 2 в строке. */
@media (max-width: 1420px) {
    .finance-kpis-v1572 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-kpi-v1572 > strong {
        font-size: clamp(16px, 1.45vw, 20px);
    }

    .finance-method-card-v1572 {
        padding: 14px;
    }

    .finance-method-stats-v1572 > div {
        padding: 8px 7px;
    }

    .finance-method-stats-v1572 strong {
        font-size: clamp(12px, 1vw, 14px);
    }

    .finance-method-stats-v1572 span {
        font-size: clamp(10px, .9vw, 12px);
    }
}

/*
 * До штатного перехода карточек в одну колонку (1180px)
 * немного сжимаем внутренние элементы, но не ломаем 3 колонки.
 */
@media (min-width: 1181px) and (max-width: 1320px) {
    .finance-method-head-v1572 {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 7px;
    }

    .finance-method-icon-v1572 {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .finance-method-icon-v1572 svg {
        width: 18px;
        height: 18px;
    }

    .finance-method-card-v1572 {
        padding: 12px;
    }

    .finance-method-stats-v1572 {
        gap: 5px;
    }

    .finance-method-stats-v1572 > div {
        padding: 7px 6px;
    }

    .finance-method-stats-v1572 strong {
        font-size: 12px;
    }

    .finance-method-stats-v1572 span {
        font-size: 10px;
    }
}

/* Когда карточки способов оплаты уже в одну колонку — возвращаем комфортный размер. */
@media (max-width: 1180px) {
    .finance-method-card-v1572 {
        padding: 16px;
    }

    .finance-method-stats-v1572 strong {
        font-size: 15px;
    }

    .finance-method-stats-v1572 span {
        font-size: 12px;
    }
}

/* Mobile: финансовые KPI идут одной колонкой, чтобы суммы не ужимались. */
@media (max-width: 560px) {
    .finance-kpis-v1572 {
        grid-template-columns: 1fr;
    }

    .finance-kpi-v1572 {
        min-height: 0;
    }

    .finance-kpi-v1572 > strong {
        white-space: nowrap;
        font-size: 18px;
    }

    .finance-strip-balance-breakdown-v1590 > small > span {
        white-space: normal;
    }
}


/* =========================================================
   v1.5.93 — права ролей: Прораб + Наблюдатель PIN-only
   ========================================================= */

.role-permission-card.is-viewer-pin-only-v1593 .guest-pin-settings {
    margin-top: 4px;
}


/* =========================================================
   v1.5.96 — Hours: горизонтальная лента работников + статистика
   ========================================================= */

.hours-workers-rail-card-v1596 {
    padding: 14px 16px 12px;
    overflow: hidden;
}

.hours-workers-rail-head-v1596 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.hours-workers-rail-head-v1596 > div > span {
    display: block;
    margin-bottom: 3px;
    color: #5365df;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
}

.hours-workers-rail-head-v1596 strong,
.hours-workers-rail-head-v1596 small {
    display: block;
}

.hours-workers-rail-head-v1596 strong {
    color: #172036;
    font-size: 15px;
}

.hours-workers-rail-head-v1596 small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.hours-workers-reset-v1596 {
    flex: 0 0 auto;
    color: #5365df;
    font-size: 9px;
    font-weight: 750;
    text-decoration: none;
}

.hours-workers-rail-v1596 {
    display: flex;
    align-items: flex-start;
    gap: 3px;
    padding: 4px 2px 3px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.hours-worker-bubble-v1596 {
    position: relative;
    min-width: 58px;
    padding: 2px 4px 3px;
    display: grid;
    justify-items: center;
    flex: 0 0 58px;
    border-radius: 13px;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}

.hours-worker-bubble-v1596:hover {
    background: #f4f6fb;
    transform: translateY(-1px);
}

.hours-worker-bubble-v1596.is-active {
    background: #eef1ff;
}

.hours-worker-bubble-avatar-v1596 {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #e3e7ef, 0 5px 14px rgba(38, 50, 80, .10);
}

.hours-worker-bubble-v1596.is-active .hours-worker-bubble-avatar-v1596 {
    box-shadow: 0 0 0 2px #5365df, 0 5px 14px rgba(83, 101, 223, .16);
}

.hours-worker-badge-v1596 {
    position: absolute;
    top: 36px;
    right: 5px;
    z-index: 2;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #7396df;
    font-size: 8px;
    line-height: 1;
}

.hours-worker-bubble-v1596:nth-child(3n + 2) .hours-worker-badge-v1596 {
    background: #ef6f6f;
}

.hours-worker-bubble-v1596:nth-child(3n) .hours-worker-badge-v1596 {
    background: #7f74dc;
}

.hours-worker-bubble-v1596 > small {
    width: 54px;
    margin-top: 6px;
    overflow: hidden;
    color: #6e788d;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 7px;
}

.hours-worker-bubble-v1596.is-active > small {
    color: #4153d7;
    font-weight: 800;
}

.hours-worker-stat-v1596 {
    padding: 16px;
    scroll-margin-top: 18px;
}

.hours-worker-stat-head-v1596 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hours-worker-stat-person-v1596 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hours-worker-stat-avatar-v1596 {
    width: 58px !important;
    height: 58px !important;
    flex: 0 0 58px !important;
    box-shadow: 0 0 0 1px #e2e6ed, 0 8px 22px rgba(30, 43, 71, .10);
}

.hours-worker-stat-person-v1596 > div {
    min-width: 0;
}

.hours-worker-stat-person-v1596 span {
    display: block;
    color: #5365df;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
}

.hours-worker-stat-person-v1596 h2 {
    margin: 3px 0 0;
    color: #152037;
    font-size: 20px;
}

.hours-worker-stat-person-v1596 p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 9px;
}

.hours-worker-stat-kpis-v1596 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.hours-worker-stat-kpis-v1596 article {
    min-width: 0;
    min-height: 75px;
    padding: 11px 12px;
    border: 1px solid #eaedf2;
    border-radius: 12px;
    background: #f8f9fb;
}

.hours-worker-stat-kpis-v1596 span,
.hours-worker-stat-kpis-v1596 strong {
    display: block;
}

.hours-worker-stat-kpis-v1596 span {
    color: #8993a6;
    font-size: 8px;
}

.hours-worker-stat-kpis-v1596 strong {
    margin-top: 6px;
    color: #18223a;
    font-size: 17px;
    white-space: nowrap;
}

.hours-worker-stat-grid-v1596 {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 10px;
    margin-top: 10px;
}

.hours-worker-stat-block-v1596 {
    min-width: 0;
    padding: 13px;
    border: 1px solid #eaedf2;
    border-radius: 13px;
    background: #fff;
}

.hours-worker-stat-block-head-v1596 h3 {
    margin: 0;
    color: #1c263c;
    font-size: 13px;
}

.hours-worker-stat-block-head-v1596 p {
    margin: 3px 0 0;
    color: #929bad;
    font-size: 8px;
}

.hours-worker-projects-v1596,
.hours-worker-history-v1596 {
    margin-top: 9px;
    border-top: 1px solid #eef0f4;
}

.hours-worker-project-row-v1596 {
    min-height: 49px;
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(100px, .72fr) 70px;
    gap: 10px;
    align-items: center;
    padding: 7px 2px;
    color: inherit;
    border-bottom: 1px solid #eef0f4;
    text-decoration: none;
}

.hours-worker-project-row-v1596:hover {
    background: #fafbfc;
}

.hours-worker-project-row-v1596 > div:first-child {
    min-width: 0;
}

.hours-worker-project-row-v1596 strong,
.hours-worker-project-row-v1596 small {
    display: block;
}

.hours-worker-project-row-v1596 strong {
    overflow: hidden;
    color: #273149;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
}

.hours-worker-project-row-v1596 small {
    margin-top: 2px;
    overflow: hidden;
    color: #929bad;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 7px;
}

.hours-worker-project-row-v1596 > b {
    color: #1d273e;
    text-align: right;
    font-size: 9px;
    white-space: nowrap;
}

.hours-worker-project-progress-v1596 {
    min-width: 0;
}

.hours-worker-project-progress-v1596 > span {
    height: 5px;
    display: block;
    overflow: hidden;
    border-radius: 999px;
    background: #edf0f4;
}

.hours-worker-project-progress-v1596 i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #6578ef;
}

.hours-worker-project-progress-v1596 small {
    margin-top: 3px;
    text-align: right;
}

.hours-worker-history-row-v1596 {
    min-height: 49px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 7px 2px;
    border-bottom: 1px solid #eef0f4;
}

.hours-worker-history-row-v1596 strong,
.hours-worker-history-row-v1596 small {
    display: block;
}

.hours-worker-history-row-v1596 > div:first-child {
    min-width: 0;
}

.hours-worker-history-row-v1596 > div:first-child strong {
    overflow: hidden;
    color: #273149;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
}

.hours-worker-history-row-v1596 small {
    margin-top: 2px;
    color: #929bad;
    font-size: 7px;
}

.hours-worker-history-row-v1596 > div:last-child {
    text-align: right;
    white-space: nowrap;
}

.hours-worker-history-row-v1596 > div:last-child span {
    display: block;
    color: #6f798d;
    font-size: 8px;
}

.hours-worker-history-row-v1596 > div:last-child b {
    min-height: 19px;
    margin-top: 3px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    font-size: 7px;
}

.hours-worker-history-row-v1596 b.is-positive {
    color: #188c4c;
    background: #ecf8f0;
}

.hours-worker-history-row-v1596 b.is-negative {
    color: #ca5252;
    background: #fff0f0;
}

@media (max-width: 1100px) {
    .hours-worker-stat-grid-v1596 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hours-workers-rail-card-v1596 {
        padding: 12px;
    }

    .hours-workers-rail-head-v1596 {
        display: block;
    }

    .hours-workers-reset-v1596 {
        display: inline-block;
        margin-top: 6px;
    }

    .hours-workers-rail-v1596 {
        margin-right: -12px;
        padding-right: 12px;
    }

    .hours-worker-bubble-v1596 {
        min-width: 54px;
        flex-basis: 54px;
    }

    .hours-worker-bubble-avatar-v1596 {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px !important;
    }

    .hours-worker-badge-v1596 {
        top: 33px;
        right: 4px;
    }

    .hours-worker-stat-head-v1596 {
        align-items: flex-start;
    }

    .hours-worker-stat-head-v1596 .secondary-button {
        min-width: auto;
        padding-left: 9px;
        padding-right: 9px;
    }

    .hours-worker-stat-avatar-v1596 {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
    }

    .hours-worker-stat-person-v1596 h2 {
        font-size: 17px;
    }

    .hours-worker-stat-kpis-v1596 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .hours-worker-project-row-v1596 {
        grid-template-columns: minmax(120px, 1fr) 64px;
    }

    .hours-worker-project-progress-v1596 {
        display: none;
    }

    .hours-worker-stat-kpis-v1596 {
        grid-template-columns: 1fr 1fr;
    }

    .hours-worker-stat-kpis-v1596 article {
        min-height: 66px;
        padding: 9px 10px;
    }

    .hours-worker-stat-kpis-v1596 strong {
        font-size: 15px;
    }
}


/* =========================================================
   v1.5.97 — Hours: работники как в Stratus-референсе
   ========================================================= */

/* Без рамки, фона и заголовка — только аватары, часы и имена. */
.hours-workers-reference-v1597 {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding: 10px 8px 4px;
}

.hours-worker-reference-item-v1597 {
    position: relative;
    width: 88px;
    min-width: 88px;
    display: grid;
    justify-items: center;
    align-content: start;
    color: inherit;
    text-decoration: none;
}

.hours-worker-reference-avatar-v1597 {
    width: 60px !important;
    height: 60px !important;
    flex: 0 0 60px !important;
    border: 4px solid #fff;
    background: #eef1f5;
    box-shadow:
        0 0 0 1px #e0e5ec,
        0 7px 18px rgba(30, 43, 70, .10);
    transition:
        transform .16s ease,
        box-shadow .16s ease;
}

.hours-worker-reference-item-v1597:hover .hours-worker-reference-avatar-v1597 {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 2px #c5ccff,
        0 9px 21px rgba(40, 54, 86, .14);
}

.hours-worker-reference-item-v1597.is-active .hours-worker-reference-avatar-v1597 {
    box-shadow:
        0 0 0 3px #5365df,
        0 9px 22px rgba(83, 101, 223, .20);
}

.hours-worker-reference-hours-v1597 {
    position: relative;
    z-index: 2;
    min-width: 42px;
    min-height: 25px;
    margin-top: -11px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #7396df;
    box-shadow: 0 3px 9px rgba(58, 76, 120, .13);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.hours-worker-reference-item-v1597:nth-child(3n + 2) .hours-worker-reference-hours-v1597 {
    background: #ef6f6f;
}

.hours-worker-reference-item-v1597:nth-child(3n) .hours-worker-reference-hours-v1597 {
    background: #7c71d9;
}

.hours-worker-reference-item-v1597.is-active .hours-worker-reference-hours-v1597 {
    background: #5365df;
}

.hours-worker-reference-name-v1597 {
    width: 100%;
    margin-top: 6px;
    overflow: hidden;
    color: #333d52;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
}

/*
 * Size-анализ: в текущем hours.php основные подписи уже 12–14px,
 * значения 14–20px. Не уменьшаем детальную статистику до 7–9px.
 */
.hours-worker-stat-person-v1596 span {
    font-size: 11px !important;
}

.hours-worker-stat-person-v1596 h2 {
    font-size: 22px !important;
}

.hours-worker-stat-person-v1596 p {
    font-size: 12px !important;
}

.hours-worker-stat-kpis-v1596 span {
    font-size: 12px !important;
}

.hours-worker-stat-kpis-v1596 strong {
    font-size: 20px !important;
}

.hours-worker-stat-block-head-v1596 h3 {
    font-size: 16px !important;
}

.hours-worker-stat-block-head-v1596 p {
    font-size: 12px !important;
}

.hours-worker-project-row-v1596 strong {
    font-size: 13px !important;
}

.hours-worker-project-row-v1596 small {
    font-size: 11px !important;
}

.hours-worker-project-row-v1596 > b {
    font-size: 13px !important;
}

.hours-worker-history-row-v1596 > div:first-child strong {
    font-size: 13px !important;
}

.hours-worker-history-row-v1596 small {
    font-size: 11px !important;
}

.hours-worker-history-row-v1596 > div:last-child span {
    font-size: 12px !important;
}

.hours-worker-history-row-v1596 > div:last-child b {
    font-size: 11px !important;
}

@media (max-width: 760px) {
    .hours-workers-reference-v1597 {
        gap: 12px 10px;
        padding-left: 0;
        padding-right: 0;
    }

    .hours-worker-reference-item-v1597 {
        width: 78px;
        min-width: 78px;
    }

    .hours-worker-reference-avatar-v1597 {
        width: 54px !important;
        height: 54px !important;
        flex-basis: 54px !important;
    }

    .hours-worker-reference-hours-v1597 {
        min-height: 24px;
        margin-top: -10px;
        padding: 0 7px;
        font-size: 11px;
    }

    .hours-worker-reference-name-v1597 {
        font-size: 12px;
    }

    .hours-worker-stat-person-v1596 h2 {
        font-size: 20px !important;
    }

    .hours-worker-stat-kpis-v1596 span {
        font-size: 11px !important;
    }

    .hours-worker-stat-kpis-v1596 strong {
        font-size: 18px !important;
    }

    .hours-worker-stat-block-head-v1596 h3 {
        font-size: 15px !important;
    }

    .hours-worker-stat-block-head-v1596 p {
        font-size: 11px !important;
    }
}

@media (max-width: 420px) {
    .hours-workers-reference-v1597 {
        gap: 11px 7px;
    }

    .hours-worker-reference-item-v1597 {
        width: 70px;
        min-width: 70px;
    }

    .hours-worker-reference-avatar-v1597 {
        width: 50px !important;
        height: 50px !important;
        flex-basis: 50px !important;
    }

    .hours-worker-reference-name-v1597 {
        font-size: 12px;
    }
}


/* =========================================================
   v1.5.98 — Hours: worker strip / foreman badge / ranking fix
   ========================================================= */

/* Один ряд. Если работников больше ширины — горизонтальный scroll. */
.hours-workers-scroll-v1598 {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 7px;
    scrollbar-width: thin;
    scrollbar-color: #d7dce5 transparent;
    -webkit-overflow-scrolling: touch;
}

.hours-workers-scroll-v1598::-webkit-scrollbar {
    height: 5px;
}

.hours-workers-scroll-v1598::-webkit-scrollbar-track {
    background: transparent;
}

.hours-workers-scroll-v1598::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #d7dce5;
}

.hours-workers-scroll-v1598 .hours-workers-reference-v1597 {
    width: max-content;
    min-width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: nowrap !important;
    gap: 18px;
    padding: 3px 12px 5px;
}

/* Контейнер аватара нужен для каски Прораба. */
.hours-worker-avatar-wrap-v1598 {
    position: relative;
    display: block;
    width: 60px;
    height: 60px;
}

.hours-worker-foreman-badge-v1598 {
    position: absolute;
    top: -4px;
    right: -6px;
    z-index: 4;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #555f70;
    background: #f3f5f8;
    box-shadow: 0 3px 9px rgba(34, 45, 69, .12);
}

.hours-worker-foreman-badge-v1598 svg {
    width: 12px;
    height: 12px;
}

/*
 * Рейтинг работников содержит 4 элемента:
 * № / avatar / имя / часы.
 * Старый .hours-podium-link имел 3 колонки, поэтому часы/текст
 * могли переходить на вторую строку.
 */
.hours-worker-rank-row-v1598 {
    grid-template-columns: 36px 42px minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 58px;
}

.hours-worker-rank-row-v1598 .hours-rank-number {
    grid-column: 1;
    grid-row: 1;
}

.hours-worker-rank-row-v1598 .hours-rank-avatar {
    grid-column: 2;
    grid-row: 1;
    width: 38px !important;
    height: 38px !important;
}

.hours-worker-rank-row-v1598 .hours-rank-copy {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
}

.hours-worker-rank-row-v1598 .hours-rank-copy strong,
.hours-worker-rank-row-v1598 .hours-rank-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hours-worker-rank-row-v1598 > b {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

/* На admin/manager страница начинается сразу с ленты работников. */
.hours-dashboard-page > .hours-workers-scroll-v1598:first-child {
    margin-top: 0;
}

@media (max-width: 760px) {
    .hours-workers-scroll-v1598 {
        margin-left: -2px;
        margin-right: -2px;
        width: calc(100% + 4px);
    }

    .hours-workers-scroll-v1598 .hours-workers-reference-v1597 {
        justify-content: flex-start;
        gap: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .hours-worker-avatar-wrap-v1598 {
        width: 54px;
        height: 54px;
    }

    .hours-worker-foreman-badge-v1598 {
        top: -4px;
        right: -5px;
        width: 21px;
        height: 21px;
    }

    .hours-worker-foreman-badge-v1598 svg {
        width: 11px;
        height: 11px;
    }

    .hours-worker-rank-row-v1598 {
        grid-template-columns: 28px 36px minmax(0, 1fr) auto !important;
        gap: 7px !important;
        min-height: 54px;
    }

    .hours-worker-rank-row-v1598 .hours-rank-avatar {
        width: 34px !important;
        height: 34px !important;
    }

    .hours-worker-rank-row-v1598 .hours-rank-copy strong {
        font-size: 14px;
    }

    .hours-worker-rank-row-v1598 .hours-rank-copy small {
        font-size: 12px;
    }

    .hours-worker-rank-row-v1598 > b {
        font-size: 15px;
    }
}

@media (max-width: 430px) {
    .hours-worker-rank-row-v1598 {
        grid-template-columns: 25px 34px minmax(0, 1fr) auto !important;
        gap: 6px !important;
        padding-left: 7px;
        padding-right: 7px;
    }

    .hours-worker-rank-row-v1598 .hours-rank-number {
        width: 24px;
        height: 24px;
    }

    .hours-worker-rank-row-v1598 .hours-rank-avatar {
        width: 32px !important;
        height: 32px !important;
    }

    .hours-worker-rank-row-v1598 .hours-rank-copy strong {
        font-size: 13px;
    }

    .hours-worker-rank-row-v1598 .hours-rank-copy small {
        font-size: 11px;
    }

    .hours-worker-rank-row-v1598 > b {
        font-size: 14px;
    }
}


/* =========================================================
   v1.5.99 — Hours: выбранный работник / mobile / connector
   ========================================================= */

/*
 * Цветные часы у работников — спокойная палитра без красного,
 * чтобы badge не выглядел как предупреждение.
 */
.hours-worker-reference-hours-v1597 {
    background: #6f8fd5 !important;
}

.hours-worker-reference-item-v1597:nth-child(3n + 2) .hours-worker-reference-hours-v1597 {
    background: #6fa58d !important;
}

.hours-worker-reference-item-v1597:nth-child(3n) .hours-worker-reference-hours-v1597 {
    background: #8175c9 !important;
}

.hours-worker-reference-item-v1597.is-active .hours-worker-reference-hours-v1597 {
    background: #5365df !important;
}

/*
 * Пунктирная связь выбранного аватара со статистикой ниже.
 * Линия остаётся внутри strip, поэтому не мешает горизонтальному scroll.
 */
.hours-worker-reference-item-v1597.is-active {
    padding-bottom: 24px;
}

.hours-worker-reference-item-v1597.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 0;
    height: 31px;
    border-left: 2px dashed #aeb7ce;
    transform: translateX(-50%);
    pointer-events: none;
}

.hours-workers-scroll-v1598:has(.hours-worker-reference-item-v1597.is-active) {
    padding-bottom: 0;
}

/* Выбранная статистика ближе к линии, без лишнего разрыва. */
.hours-worker-stat-v1596 {
    margin-top: 0;
}

/* После удаления eyebrow имя не должно иметь лишний верхний отступ. */
.hours-worker-stat-person-v1596 h2 {
    margin-top: 0 !important;
}

@media (max-width: 760px) {
    /*
     * На mobile оставляем только два главных KPI:
     * Всего часов + Объектов.
     */
    .hours-worker-stat-kpis-v1596 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .hours-worker-stat-mobile-hidden-v1599 {
        display: none !important;
    }

    .hours-worker-reference-item-v1597.is-active {
        padding-bottom: 20px;
    }

    .hours-worker-reference-item-v1597.is-active::after {
        bottom: -8px;
        height: 27px;
    }
}


/* =========================================================
   v1.5.100 — Администратор: фото пользователя в user-edit.php
   ========================================================= */

.user-edit-avatar-card-v15100 {
    margin-bottom: 12px;
    padding: 15px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.user-edit-avatar-profile-v15100 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.user-edit-avatar-preview-v15100 {
    width: 78px !important;
    height: 78px !important;
    flex: 0 0 78px !important;
    font-size: 18px;
    box-shadow:
        0 0 0 1px #e1e5ec,
        0 7px 19px rgba(32, 44, 72, .09);
}

.user-edit-avatar-copy-v15100 {
    min-width: 0;
}

.user-edit-avatar-copy-v15100 > span,
.user-edit-avatar-copy-v15100 > strong,
.user-edit-avatar-copy-v15100 > small {
    display: block;
}

.user-edit-avatar-copy-v15100 > span {
    margin-bottom: 4px;
    color: #6975de;
    font-size: 11px;
    font-weight: 800;
}

.user-edit-avatar-copy-v15100 > strong {
    overflow: hidden;
    color: #182138;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-edit-avatar-copy-v15100 > small {
    margin-top: 4px;
    color: #8a94a7;
    font-size: 12px;
}

.user-edit-avatar-actions-v15100 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.user-edit-avatar-actions-v15100 form {
    margin: 0;
}

.user-edit-avatar-file-v15100 {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.user-edit-avatar-file-v15100 input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.is-danger-soft-v15100 {
    color: #b24d4d !important;
    border-color: #f0d9d9 !important;
    background: #fff7f7 !important;
}

.is-danger-soft-v15100:hover {
    background: #fff0f0 !important;
}

@media (max-width: 700px) {
    .user-edit-avatar-card-v15100 {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .user-edit-avatar-preview-v15100 {
        width: 70px !important;
        height: 70px !important;
        flex-basis: 70px !important;
    }

    .user-edit-avatar-copy-v15100 > strong {
        font-size: 17px;
    }

    .user-edit-avatar-actions-v15100 {
        width: 100%;
        justify-content: flex-start;
    }

    .user-edit-avatar-actions-v15100 form,
    .user-edit-avatar-actions-v15100 .secondary-button {
        width: 100%;
    }

    .user-edit-avatar-actions-v15100 .secondary-button {
        justify-content: center;
    }
}


/* =========================================================
   v1.5.101 — Пользователи: блоки Команда / Прорабы / Плотники
   ========================================================= */

.users-flow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) 54px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
}

.users-flow-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #e6ebf3;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    box-shadow: 0 14px 34px rgba(25, 39, 67, .05);
}

.users-flow-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.users-flow-card-title {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.users-flow-card-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #f4f7ff;
    color: #5c6ee6;
    box-shadow: inset 0 0 0 1px rgba(89, 107, 227, .08);
}

.users-flow-card-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.users-flow-card-icon.is-team {
    background: #eef3ff;
    color: #6073ea;
}

.users-flow-card-icon.is-foreman {
    background: #fff5e8;
    color: #c3822a;
}

.users-flow-card-icon.is-carpenter {
    background: #f2f5f8;
    color: #607085;
}

.users-flow-card-title h2 {
    margin: 0;
    font-size: 20px;
}

.users-flow-card-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.users-flow-badge {
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 12px;
    font-size: 11px;
}

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

.users-flow-member {
    min-width: 0;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid #edf1f6;
    border-radius: 20px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.users-flow-member:hover {
    transform: translateY(-1px);
    border-color: #dde5f1;
    background: #fcfdff;
    box-shadow: 0 10px 24px rgba(31, 45, 76, .08);
}

.users-flow-member.is-new-user {
    animation: userFlowAddedPulse 1.25s cubic-bezier(.2,.8,.2,1);
}

@keyframes userFlowAddedPulse {
    0% {
        opacity: 0;
        background: rgba(79, 98, 235, .12);
    }
    45% {
        opacity: 1;
        background: rgba(79, 98, 235, .07);
    }
    100% {
        background: #fff;
    }
}

.users-flow-avatar {
    width: 50px !important;
    height: 50px !important;
    flex-basis: 50px !important;
    box-shadow: 0 8px 16px rgba(29, 40, 68, .08);
}

.users-flow-copy {
    min-width: 0;
}

.users-flow-copy strong,
.users-flow-copy span,
.users-flow-side span {
    display: block;
}

.users-flow-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.users-flow-copy span {
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.users-flow-side {
    min-width: 112px;
    display: grid;
    justify-items: end;
    gap: 7px;
}

.users-flow-role-chip,
.users-flow-status {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.users-flow-role-chip.is-team {
    background: #eef3ff;
    color: #5d71e7;
}

.users-flow-role-chip.is-foreman {
    background: #fff2de;
    color: #ad6e1d;
}

.users-flow-role-chip.is-carpenter {
    background: #eef2f6;
    color: #5f6f84;
}

.users-flow-status.is-active {
    background: #ebf9ef;
    color: #1c8f4f;
}

.users-flow-status.is-disabled {
    background: #f3f5f9;
    color: #7f8998;
}

.users-flow-link {
    position: relative;
    min-height: 100%;
}

.users-flow-link-line {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    border-top: 2px dashed #c9d6ff;
    transform: translateY(-50%);
}

.users-flow-link-dot {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid #8ea4ff;
    box-shadow: 0 0 0 5px #f5f7fb;
}

.users-flow-link-dot.is-start {
    left: 5px;
}

.users-flow-link-dot.is-end {
    right: 5px;
}

@media (max-width: 1330px) {
    .users-flow-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .users-flow-link {
        display: none;
    }
}

@media (max-width: 700px) {
    .users-flow-card {
        padding: 15px;
        border-radius: 22px;
    }

    .users-flow-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .users-flow-badge {
        align-self: flex-start;
    }

    .users-flow-member {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 10px;
    }

    .users-flow-avatar {
        width: 46px !important;
        height: 46px !important;
        flex-basis: 46px !important;
    }

    .users-flow-side {
        grid-column: 2;
        min-width: 0;
        justify-items: start;
        grid-template-columns: repeat(2, max-content);
        gap: 6px;
    }
}

@media (max-width: 540px) {
    .users-directory-actions {
        grid-template-columns: 1fr;
    }

    .users-flow-card-title h2 {
        font-size: 18px;
    }

    .users-flow-member {
        padding: 11px;
        border-radius: 17px;
    }

    .users-flow-copy strong {
        font-size: 13px;
    }

    .users-flow-copy span {
        font-size: 9px;
    }

    .users-flow-side {
        grid-template-columns: 1fr;
    }

    .users-flow-role-chip,
    .users-flow-status {
        width: fit-content;
    }
}


/* =========================================================
   v1.5.104 — Пользователи: ветки слева направо к каждой карточке
   ========================================================= */

/* Возвращена визуальная база v1.5.101. Активный статус не показывается. */
.users-flow-status.is-active {
    display: none !important;
}

/* Колонка между соседними блоками используется как область SVG-ветвления. */
.users-flow-branch-v15104 {
    position: relative;
    min-width: 0;
    min-height: 100%;
    overflow: visible;
    pointer-events: none;
}

.users-flow-branch-svg-v15104 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.users-flow-branch-path-v15104 {
    fill: none;
    stroke: #aebff5;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.users-flow-branch-path-v15104.is-source,
.users-flow-branch-path-v15104.is-trunk {
    stroke: #9fb4f3;
}

.users-flow-branch-path-v15104.is-branch {
    stroke: #b8c7f6;
}

.users-flow-branch-dot-v15104 {
    fill: #ffffff;
    stroke: #88a0ef;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.users-flow-branch-dot-v15104.is-junction {
    fill: #edf2ff;
    stroke: #758ee7;
}

/* На tablet/mobile блоки складываются вертикально — сложную схему скрываем. */
@media (max-width: 1330px) {
    .users-flow-branch-v15104 {
        display: none !important;
    }
}


/* =========================================================
   v1.5.105 — Пользователи: пунктирные ветки без точек
   ========================================================= */

.users-flow-branch-path-v15104 {
    fill: none !important;
    stroke: #aebff5 !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-dasharray: 6 7 !important;
    vector-effect: non-scaling-stroke;
}

.users-flow-branch-path-v15104.is-source,
.users-flow-branch-path-v15104.is-trunk {
    stroke: #9fb4f3 !important;
}

.users-flow-branch-path-v15104.is-branch {
    stroke: #b2c2f4 !important;
}

/* Точки предыдущей версии полностью убраны. */
.users-flow-branch-dot-v15104 {
    display: none !important;
}


/* =========================================================
   v1.5.106 — базовая типографика
   ========================================================= */
html,
body,
button,
input,
select,
textarea {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

strong,
b,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
}


/* =========================================================
   v1.5.107 — Светлая / Тёмная тема в стиле Wikkeo
   ========================================================= */

:root {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0f1115;
    --surface: #171a20;
    --surface-soft: #1d2128;
    --text: #f2f4f7;
    --muted: #949cab;
    --border: #2a2f38;

    --primary: #7888ff;
    --primary-hover: #8795ff;
    --primary-soft: #242a47;

    --green: #43c878;
    --green-soft: #173326;
    --orange: #f3a15e;
    --orange-soft: #382719;
    --blue: #6f91ff;
    --blue-soft: #1c2945;
    --red: #ff7272;
    --red-soft: #3a2023;
    --violet: #9a84ff;

    --shadow: 0 10px 30px rgba(0, 0, 0, .24);
}

/* ---------- Theme switch ---------- */

.app-theme-switch-v15107 {
    width: 100%;
    min-height: 38px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.app-theme-option-v15107 {
    min-width: 0;
    min-height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition:
        color .16s ease,
        background .16s ease,
        box-shadow .16s ease;
}

.app-theme-option-v15107:hover {
    color: var(--text);
}

.app-theme-option-v15107.is-active-v15107 {
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(31, 43, 68, .08);
}

.sidebar > .app-theme-switch-v15107 {
    margin: 0 0 10px;
}

.login-theme-switch-wrap-v15107 {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 30;
}

.app-theme-switch-v15107.is-login-v15107 {
    width: 184px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(12px);
}

html[data-theme="dark"] .app-theme-switch-v15107.is-login-v15107 {
    background: rgba(23, 26, 32, .86);
}

/* ---------- Dark: базовые поверхности ---------- */

html[data-theme="dark"],
html[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .page-body,
html[data-theme="dark"] .page-body-no-topbar {
    background: var(--bg);
}

html[data-theme="dark"] .sidebar {
    background: #14171c;
    border-color: #252a32;
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong {
    color: var(--text);
}

html[data-theme="dark"] .nav-link {
    color: #9da5b4;
}

html[data-theme="dark"] .nav-link:hover {
    color: #f3f5f8;
    background: #1d2128;
}

html[data-theme="dark"] .nav-link.is-active {
    color: #a7b2ff;
    background: #252a47;
}

html[data-theme="dark"] .sidebar-account-footer,
html[data-theme="dark"] .sidebar-user-profile,
html[data-theme="dark"] .sidebar-user-menu {
    border-color: #292e36;
    background: #181b21;
}

html[data-theme="dark"] .sidebar-user-trigger:hover,
html[data-theme="dark"] .sidebar-user-menu-item:hover {
    background: #20242b;
}

html[data-theme="dark"] .mobile-app-header {
    background: rgba(15, 17, 21, .94);
    border-color: #282d35;
}

html[data-theme="dark"] .mobile-menu-button span {
    background: #e9edf4;
}

/* Карточки и основные блоки */
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .object-card,
html[data-theme="dark"] .installment-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .hours-kpi-card,
html[data-theme="dark"] .hours-ranking-card,
html[data-theme="dark"] .finance-kpi-v1572,
html[data-theme="dark"] .finance-method-card-v1572,
html[data-theme="dark"] .finance-chart-card-v1572,
html[data-theme="dark"] .finance-portfolio-card-v1572,
html[data-theme="dark"] .finance-debt-card-v1572,
html[data-theme="dark"] .finance-history-card-v1572 {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

/* Белые / очень светлые вложенные элементы */
html[data-theme="dark"] .global-search,
html[data-theme="dark"] .project-info-item,
html[data-theme="dark"] .project-overview-item,
html[data-theme="dark"] .summary-box,
html[data-theme="dark"] .payment-summary-item,
html[data-theme="dark"] .installment-summary-item,
html[data-theme="dark"] .finance-method-stats-v1572 > div,
html[data-theme="dark"] .finance-debt-row-v1572,
html[data-theme="dark"] .finance-history-row-v1572,
html[data-theme="dark"] .hours-podium-row,
html[data-theme="dark"] .hours-company-history-row,
html[data-theme="dark"] .users-flow-member,
html[data-theme="dark"] .users-flow-card,
html[data-theme="dark"] .source-list > div,
html[data-theme="dark"] .reference-chips span,
html[data-theme="dark"] .feature-checklist li {
    background: #1b1f25 !important;
    border-color: #2b3038 !important;
    color: var(--text);
}

/* Чередование строк в тёмной теме */
html[data-theme="dark"] .finance-debt-row-v1572:nth-child(odd),
html[data-theme="dark"] .finance-history-row-v1572.is-alt-v1588,
html[data-theme="dark"] .hours-podium-row:nth-child(odd),
html[data-theme="dark"] .hours-company-history-row:nth-child(odd) {
    background: #1d2128 !important;
}

html[data-theme="dark"] .finance-debt-row-v1572:nth-child(even),
html[data-theme="dark"] .finance-history-row-v1572:not(.is-alt-v1588) {
    background: #181b21 !important;
}

/* ---------- Формы ---------- */

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    color: #f2f4f7;
    background: #171a20;
    border-color: #323842;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #747d8d;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: #6f7ee8;
    box-shadow: 0 0 0 3px rgba(120, 136, 255, .12);
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled {
    color: #7f8794;
    background: #20242a;
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .filter-button,
html[data-theme="dark"] .status-toggle-button,
html[data-theme="dark"] .objects-filter-toggle-v517 {
    color: #d7dce5;
    background: #20242b;
    border-color: #313741;
}

html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .filter-button:hover,
html[data-theme="dark"] .objects-filter-toggle-v517:hover {
    color: #fff;
    background: #282d35;
}

/* ---------- Модальные окна ---------- */

html[data-theme="dark"] .modal-dialog,
html[data-theme="dark"] .user-create-dialog,
html[data-theme="dark"] .guest-login-dialog,
html[data-theme="dark"] .project-status-dialog,
html[data-theme="dark"] .payment-modal,
html[data-theme="dark"] .installment-modal {
    color: var(--text);
    background: #181b21;
    border-color: #2b3038;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .42);
}

html[data-theme="dark"] .modal-backdrop,
html[data-theme="dark"] .user-create-backdrop,
html[data-theme="dark"] .guest-login-backdrop {
    background: rgba(0, 0, 0, .68);
}

/* ---------- Users ---------- */

html[data-theme="dark"] .users-directory-head p,
html[data-theme="dark"] .users-flow-card-title p,
html[data-theme="dark"] .users-flow-copy span {
    color: #929baa !important;
}

html[data-theme="dark"] .users-flow-card {
    background: linear-gradient(180deg, #181b21 0%, #15181e 100%) !important;
}

html[data-theme="dark"] .users-flow-member:hover {
    background: #20242b !important;
    border-color: #363d48 !important;
}

html[data-theme="dark"] .users-flow-role-chip.is-team {
    color: #aab4ff;
    background: #252b4c;
}

html[data-theme="dark"] .users-flow-role-chip.is-foreman {
    color: #f0b56c;
    background: #37291b;
}

html[data-theme="dark"] .users-flow-role-chip.is-carpenter {
    color: #b4bfcd;
    background: #282e36;
}

html[data-theme="dark"] .users-flow-card-icon.is-team {
    color: #aab4ff;
    background: #252b4c;
}

html[data-theme="dark"] .users-flow-card-icon.is-foreman {
    color: #efb46a;
    background: #37291b;
}

html[data-theme="dark"] .users-flow-card-icon.is-carpenter {
    color: #b4bfcd;
    background: #282e36;
}

/* ---------- Finance ---------- */

html[data-theme="dark"] .finance-visual-grid-v1572,
html[data-theme="dark"] .finance-method-grid-v1572,
html[data-theme="dark"] .finance-kpis-v1572 {
    color: var(--text);
}

html[data-theme="dark"] .finance-bar-track-v1572,
html[data-theme="dark"] .finance-method-progress-v1572,
html[data-theme="dark"] .finance-progress-track-v1572 {
    background: #292e36;
}

html[data-theme="dark"] .finance-cash-without-block-v1588 {
    background: #1b2d24 !important;
}

html[data-theme="dark"] .finance-history-filter-toggle-v1588,
html[data-theme="dark"] .finance-history-deleted-toggle-v1588 {
    color: #d2d8e2 !important;
    background: #20242b !important;
    border-color: #303640 !important;
}

/* ---------- Hours ---------- */

html[data-theme="dark"] .hours-worker-stat-v1596,
html[data-theme="dark"] .hours-worker-stat-block-v1596,
html[data-theme="dark"] .hours-worker-stat-kpis-v1596 article {
    background: #181b21;
    border-color: #2b3038;
}

html[data-theme="dark"] .hours-worker-reference-name-v1597 {
    color: #d9dee7;
}

html[data-theme="dark"] .hours-worker-foreman-badge-v1598 {
    color: #d5dae3;
    background: #252a31;
    border-color: #171a20;
}

/* ---------- Project / Objects ---------- */

html[data-theme="dark"] .project-tabs,
html[data-theme="dark"] .objects-tabs,
html[data-theme="dark"] .status-tabs {
    background: #171a20;
    border-color: #292f38;
}

html[data-theme="dark"] .project-tabs a,
html[data-theme="dark"] .objects-tabs a,
html[data-theme="dark"] .status-tabs a {
    color: #949dac;
}

html[data-theme="dark"] .project-tabs a.is-active,
html[data-theme="dark"] .objects-tabs a.is-active,
html[data-theme="dark"] .status-tabs a.is-active {
    color: #aab4ff;
    background: #252b4c;
}

html[data-theme="dark"] .object-card,
html[data-theme="dark"] .project-list-card {
    background: #181b21;
    border-color: #2b3038;
}

html[data-theme="dark"] .object-card:hover,
html[data-theme="dark"] .project-list-card:hover {
    border-color: #39414d;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
}

/* ---------- Settings / Profile ---------- */

html[data-theme="dark"] .settings-switch-label-v1592 {
    background: #1d2128;
    border-color: #2b3038;
}

html[data-theme="dark"] .settings-switch-v1592 i {
    background: #363c46;
}

html[data-theme="dark"] .settings-switch-v1592 input:checked + i {
    background: var(--primary);
}

html[data-theme="dark"] .profile-avatar-menu,
html[data-theme="dark"] .personal-settings-fields {
    background: #181b21;
    border-color: #2b3038;
}

/* ---------- Login ---------- */

html[data-theme="dark"] body.login-page {
    background:
        radial-gradient(circle at 13% 14%, rgba(67, 200, 120, .055), transparent 27%),
        radial-gradient(circle at 88% 11%, rgba(120, 136, 255, .075), transparent 27%),
        #0f1115;
}

html[data-theme="dark"] .login-form-panel {
    background: rgba(15, 17, 21, .48);
}

html[data-theme="dark"] .login-card {
    color: var(--text);
    background: #181b21;
    border-color: #2b3038;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] .login-feature-grid > div {
    background: rgba(27, 31, 37, .78);
    border-color: rgba(58, 64, 75, .74);
}

html[data-theme="dark"] .login-brand span,
html[data-theme="dark"] .login-hero > p,
html[data-theme="dark"] .login-feature-grid span {
    color: #989fad;
}

/* ---------- Тексты / линии / таблицы ---------- */

html[data-theme="dark"] .muted-note,
html[data-theme="dark"] .card-heading p,
html[data-theme="dark"] small,
html[data-theme="dark"] .project-meta,
html[data-theme="dark"] .object-meta {
    color: #929baa;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .divider {
    border-color: #2c323b;
}

html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-color: #2c323b;
}

html[data-theme="dark"] th {
    color: #9ea6b5;
    background: #1d2128;
}

html[data-theme="dark"] tr:nth-child(even) td {
    background: rgba(255, 255, 255, .012);
}

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
    .login-theme-switch-wrap-v15107 {
        top: 10px;
        right: 10px;
    }

    .app-theme-switch-v15107.is-login-v15107 {
        width: 160px;
    }

    .sidebar > .app-theme-switch-v15107 {
        margin-bottom: 8px;
    }
}



/* =========================================================
   v1.5.108 — Dark theme audit + Open Sans
   Полный проход по legacy-светлым заливкам.
   ========================================================= */

html,
body,
button,
input,
select,
textarea {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Dashboard: белые карточки ответственных ---------- */

html[data-theme="dark"] .manager-summary-card {
    color: var(--text) !important;
    background: #1b1f25 !important;
    border-color: #2b313a !important;
}

html[data-theme="dark"] .manager-summary-stats > div {
    background: #20252c !important;
}

html[data-theme="dark"] .manager-summary-person strong,
html[data-theme="dark"] .manager-summary-total strong,
html[data-theme="dark"] .manager-summary-stats strong,
html[data-theme="dark"] .manager-summary-footer strong {
    color: #f2f4f7 !important;
}

html[data-theme="dark"] .manager-summary-person span,
html[data-theme="dark"] .manager-summary-total span,
html[data-theme="dark"] .manager-summary-stats span,
html[data-theme="dark"] .manager-summary-footer span {
    color: #929baa !important;
}

/* ---------- Dashboard: финансовое кольцо ---------- */

html[data-theme="dark"] .finance-journey-ring {
    box-shadow:
        inset 0 0 28px rgba(255, 255, 255, .04),
        0 20px 44px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] .finance-journey-ring::before {
    background: #171a20 !important;
    box-shadow: inset 0 0 0 1px #2b3038 !important;
}

html[data-theme="dark"] .finance-journey-hole strong {
    color: #f2f4f7 !important;
}

html[data-theme="dark"] .finance-journey-hole span {
    color: #91a8f7 !important;
}

html[data-theme="dark"] .finance-journey-hole small {
    color: #8f98a7 !important;
}

html[data-theme="dark"] .finance-journey-bubble {
    color: var(--text) !important;
    background: rgba(28, 32, 39, .94) !important;
    border-color: #343b46 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .24) !important;
}

html[data-theme="dark"] .finance-journey-bubble strong {
    color: #f2f4f7 !important;
}

html[data-theme="dark"] .finance-journey-bubble span {
    color: #929baa !important;
}

/* ---------- Dashboard: финансовые полосы ---------- */

html[data-theme="dark"] .finance-strip {
    border: 1px solid transparent;
}

html[data-theme="dark"] .finance-strip-total {
    background: #28253c !important;
    border-color: #383353 !important;
}

html[data-theme="dark"] .finance-strip-received {
    background: #1d3025 !important;
    border-color: #284435 !important;
}

html[data-theme="dark"] .finance-strip-balance {
    background: #362b1d !important;
    border-color: #4b3923 !important;
}

html[data-theme="dark"] .finance-strip span,
html[data-theme="dark"] .finance-strip small {
    color: #a1a8b5 !important;
}

html[data-theme="dark"] .finance-strip strong {
    color: #f2f4f7 !important;
}

html[data-theme="dark"] .finance-strip-balance-breakdown-v1582 > small {
    color: #c0a97c !important;
}

html[data-theme="dark"] .finance-strip-balance-breakdown-v1582 > small b {
    color: #e7ca8c !important;
}

/* ---------- Dashboard: графики и progress tracks ---------- */

html[data-theme="dark"] .progress,
html[data-theme="dark"] .mini-chart-bar-track,
html[data-theme="dark"] .finance-bar-track-v1572,
html[data-theme="dark"] .finance-method-progress-v1572,
html[data-theme="dark"] .finance-progress-track-v1572 {
    background: #303640 !important;
}

html[data-theme="dark"] .mini-chart {
    color: #9aa3b2;
}

html[data-theme="dark"] .mini-chart-grid,
html[data-theme="dark"] .chart-grid-line {
    border-color: #363c46 !important;
}

/* KPI icons: не оставляем почти белые кружки. */
html[data-theme="dark"] .kpi-blue {
    background: #1e2a45 !important;
}

html[data-theme="dark"] .kpi-orange {
    background: #38291b !important;
}

html[data-theme="dark"] .kpi-green {
    background: #183426 !important;
}

html[data-theme="dark"] .kpi-violet {
    background: #2a2442 !important;
}

/* ---------- Унификация legacy white surfaces ---------- */

html[data-theme="dark"] .project-card,
html[data-theme="dark"] .object-row-card,
html[data-theme="dark"] .object-showcase-card,
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] .photo-selection-item,
html[data-theme="dark"] .photo-settings-panel,
html[data-theme="dark"] .photo-lightbox-footer,
html[data-theme="dark"] .objects-header-search,
html[data-theme="dark"] .object-filters-collapsible,
html[data-theme="dark"] .estimate-chart-card,
html[data-theme="dark"] .estimate-sections-card,
html[data-theme="dark"] .estimate-table-card,
html[data-theme="dark"] .estimate-extra-card,
html[data-theme="dark"] .estimate-profit-card,
html[data-theme="dark"] .estimate-journal-card,
html[data-theme="dark"] .personal-project-card-v1543,
html[data-theme="dark"] .installment-preview-head-v1552,
html[data-theme="dark"] .payment-contract-payment-card-v1581,
html[data-theme="dark"] .hours-kpi-card,
html[data-theme="dark"] .hours-podium-row,
html[data-theme="dark"] .hours-history-row,
html[data-theme="dark"] .work-hours-worker-row,
html[data-theme="dark"] .project-progress-body-v153,
html[data-theme="dark"] .project-info-grid-v158,
html[data-theme="dark"] .project-info-mobile-progress-v513 {
    color: var(--text) !important;
    background: #1a1e24 !important;
    border-color: #2b313a !important;
}

/* Вложенные светло-серые зоны. */
html[data-theme="dark"] .manager-summary-stats > div,
html[data-theme="dark"] .project-stats > div,
html[data-theme="dark"] .finance-installment-schedule-grid-v1576 > div,
html[data-theme="dark"] .hours-worker-stat-kpis-v1596 article,
html[data-theme="dark"] .project-progress-stage-v153,
html[data-theme="dark"] .project-progress-stage-copy-v153,
html[data-theme="dark"] .work-hours-worker-row:hover {
    background: #20252c !important;
    border-color: #303741 !important;
}

/* ---------- Project create/edit forms ---------- */

html[data-theme="dark"] .project-form-v125 .form-section,
html[data-theme="dark"] .project-form-v125 .card-heading-v125,
html[data-theme="dark"] .project-form-v125 .field,
html[data-theme="dark"] .project-form-v125 .field-note-v125 {
    color: var(--text) !important;
    background: #181c22 !important;
    border-color: #2b313a !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .project-form-v125 .field:nth-child(even) {
    background: #1b2026 !important;
}

html[data-theme="dark"] .project-form-v125 .optional-date-empty-v524 {
    color: #a0a8b6 !important;
    background: #20252c !important;
    border-color: #333a44 !important;
}

/* ---------- Inputs / selects / textarea from legacy blocks ---------- */

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .compact-form input,
html[data-theme="dark"] .compact-form select,
html[data-theme="dark"] .comment-form textarea,
html[data-theme="dark"] .photo-edit-form input,
html[data-theme="dark"] .photo-edit-form select,
html[data-theme="dark"] .inline-create-form input,
html[data-theme="dark"] .void-payment-details input,
html[data-theme="dark"] .object-filters input,
html[data-theme="dark"] .object-filters select,
html[data-theme="dark"] .estimate-filters select,
html[data-theme="dark"] .estimate-filters input,
html[data-theme="dark"] .settings-company-form input:not(:disabled),
html[data-theme="dark"] .guest-pin-field input,
html[data-theme="dark"] .guest-pin-input-row input,
html[data-theme="dark"] .work-hours-worker-input input,
html[data-theme="dark"] .personal-setting-form-v1543 input,
html[data-theme="dark"] .installment-payment-modal-form-v1553 input,
html[data-theme="dark"] .installment-payment-modal-form-v1553 textarea,
html[data-theme="dark"] .installment-date-field-v1568 input,
html[data-theme="dark"] .installment-preview-date-v1569 input,
html[data-theme="dark"] .finance-history-filters-v1572 input,
html[data-theme="dark"] .finance-history-filters-v1572 select {
    color: #eef1f5 !important;
    background: #171b20 !important;
    border-color: #333a44 !important;
}

/* ---------- Popovers / dialogs ---------- */

html[data-theme="dark"] .void-payment-details form,
html[data-theme="dark"] .comment-menu form,
html[data-theme="dark"] .photo-settings-panel,
html[data-theme="dark"] .estimate-expense-modal-dialog,
html[data-theme="dark"] .estimate-file-preview-dialog,
html[data-theme="dark"] .payment-amount-modal-dialog,
html[data-theme="dark"] .guest-login-dialog,
html[data-theme="dark"] .user-create-dialog,
html[data-theme="dark"] .project-status-modal-dialog,
html[data-theme="dark"] .project-worker-modal-dialog,
html[data-theme="dark"] .work-hours-modal-dialog,
html[data-theme="dark"] .installment-date-edit-v1530 form,
html[data-theme="dark"] .profile-avatar-menu-v1542,
html[data-theme="dark"] .installment-payment-dialog-v1553 {
    color: var(--text) !important;
    background: #181c22 !important;
    border-color: #2d343d !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .38) !important;
}

html[data-theme="dark"] .estimate-expense-modal-actions,
html[data-theme="dark"] .work-hours-modal-actions {
    background: #181c22 !important;
    border-color: #2d343d !important;
}

/* ---------- Finance page ---------- */

html[data-theme="dark"] .finance-hero-progress-v1572,
html[data-theme="dark"] .finance-method-card-v1572,
html[data-theme="dark"] .finance-donut-v1572 > div,
html[data-theme="dark"] .finance-installment-schedule-grid-v1576 > div,
html[data-theme="dark"] .payment-installment-empty-v1581,
html[data-theme="dark"] .payment-contract-payment-card-v1581,
html[data-theme="dark"] .finance-debt-row-v1572,
html[data-theme="dark"] .finance-history-row-v1572,
html[data-theme="dark"] .hours-worker-stat-block-v1596 {
    color: var(--text) !important;
    background: #1a1e24 !important;
    border-color: #2d343d !important;
}

html[data-theme="dark"] .finance-kpi-v1572.is-positive-v1572 {
    background: linear-gradient(145deg, #191e23, #193023) !important;
}

html[data-theme="dark"] .finance-kpi-v1572.is-warning-v1572 {
    background: linear-gradient(145deg, #191e23, #33281b) !important;
}

html[data-theme="dark"] .finance-kpi-v1572.is-danger-v1572 {
    background: linear-gradient(145deg, #191e23, #352023) !important;
    border-color: #513035 !important;
}

html[data-theme="dark"] .finance-donut-v1572 > div strong,
html[data-theme="dark"] .finance-donut-v1572 > div span {
    color: #f2f4f7 !important;
}

html[data-theme="dark"] .finance-cash-without-block-v1588 {
    background: #1b2d24 !important;
    border-color: #2b4938 !important;
}

/* ---------- Payment / installment ---------- */

html[data-theme="dark"] .payment-schedule-table tr,
html[data-theme="dark"] .installment-preview-head-v1552,
html[data-theme="dark"] .payment-contract-payment-card-v1581 {
    background: #1a1e24 !important;
    border-color: #2d343d !important;
}

html[data-theme="dark"] .payment-neutral-v1530 {
    color: #b7c0ce !important;
    background: #252a31 !important;
}

html[data-theme="dark"] .kpi-card.is-danger-v1530 {
    background: #2b1d20 !important;
    border-color: #513035 !important;
}

/* ---------- Photo controls ---------- */

html[data-theme="dark"] .photo-settings-button,
html[data-theme="dark"] .photo-lightbox-close,
html[data-theme="dark"] .photo-lightbox-nav,
html[data-theme="dark"] .photo-drag-handle,
html[data-theme="dark"] .photo-selection-more {
    color: #d6dce5 !important;
    background: #242930 !important;
    border-color: #343b46 !important;
}

html[data-theme="dark"] .photo-lightbox-footer {
    background: rgba(18, 21, 26, .94) !important;
}

html[data-theme="dark"] .photo-lightbox-error-v1538 {
    color: #e5e9f0 !important;
    background: #242930 !important;
}

/* ---------- Sidebar/mobile leftovers ---------- */

html[data-theme="dark"] .sidebar-note-icon {
    background: #20252c !important;
}

html[data-theme="dark"] .mobile-menu-floating,
html[data-theme="dark"] .mobile-menu-button.mobile-menu-floating {
    color: #eef1f5 !important;
    background: rgba(26, 30, 36, .94) !important;
    border-color: #343b46 !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .objects-filter-toggle-v517,
html[data-theme="dark"] .objects-header-actions-v518 .objects-filter-toggle-v517 {
    color: #cbd2dd !important;
    background: #242930 !important;
    border-color: #343b46 !important;
}

html[data-theme="dark"] .objects-filter-toggle-v517:hover,
html[data-theme="dark"] .objects-filter-toggle-v517.is-active {
    color: #fff !important;
    background: #2d333c !important;
}

/* ---------- Text colors that were hard-coded for light mode ---------- */

html[data-theme="dark"] .activity-row span,
html[data-theme="dark"] .project-header-text-action,
html[data-theme="dark"] .finance-method-extra-line-v1588,
html[data-theme="dark"] .finance-remaining-breakdown-v1588 b {
    color: #a1a9b7 !important;
}

html[data-theme="dark"] .activity-avatar {
    color: #bdc7d7 !important;
    background: #252b33 !important;
}

/* ---------- Generic borders that were almost white ---------- */

html[data-theme="dark"] .payment-row,
html[data-theme="dark"] .installment-mini,
html[data-theme="dark"] .activity-row,
html[data-theme="dark"] .manager-summary-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .object-row-card {
    border-color: #2b313a !important;
}

/* ---------- Theme control itself ---------- */

html[data-theme="dark"] .app-theme-switch-v15107 {
    background: #171b20;
    border-color: #2e343d;
}

html[data-theme="dark"] .app-theme-option-v15107.is-active-v15107 {
    color: #f2f4f7;
    background: #2a3038;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .24);
}



/* =========================================================
   v1.5.109 — Finance dark polishing in Wikkeo-inspired style
   ========================================================= */

/* Светлая тема: + доп. услуги всегда зелёным. */
.finance-method-extra-line-v1588,
.finance-method-extra-line-v1588 b {
    color: #22a95a;
}

/* На finance-странице делаем карточки более мягкими и "воздушными". */
html[data-theme="dark"] .finance-chart-card-v1572,
html[data-theme="dark"] .finance-portfolio-card-v1572,
html[data-theme="dark"] .finance-debt-card-v1572,
html[data-theme="dark"] .finance-history-card-v1572,
html[data-theme="dark"] .finance-method-card-v1572,
html[data-theme="dark"] .finance-kpi-v1572,
html[data-theme="dark"] .finance-hero-progress-v1572 {
    background: linear-gradient(180deg, rgba(25, 29, 36, .96), rgba(21, 24, 30, .98)) !important;
    border-color: rgba(255, 255, 255, .045) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22) !important;
}

/* Уменьшаем визуальную тяжесть обводки как у Wikkeo. */
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .finance-chart-card-v1572,
html[data-theme="dark"] .finance-portfolio-card-v1572,
html[data-theme="dark"] .finance-debt-card-v1572,
html[data-theme="dark"] .finance-history-card-v1572,
html[data-theme="dark"] .finance-method-card-v1572,
html[data-theme="dark"] .finance-kpi-v1572 {
    border-width: 1px !important;
    border-style: solid !important;
}

/* Внутренние белые блоки/сводки графиков/структуры. */
html[data-theme="dark"] .finance-chart-summary-v1572 > div,
html[data-theme="dark"] .finance-share-list-v1572 > div,
html[data-theme="dark"] .finance-method-stats-v1572 > div,
html[data-theme="dark"] .finance-installment-schedule-grid-v1576 > div,
html[data-theme="dark"] .finance-history-count-v1588 {
    color: var(--text) !important;
    background: #1b2027 !important;
    border: 1px solid rgba(255,255,255,.04) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .finance-chart-summary-v1572 span,
html[data-theme="dark"] .finance-share-list-v1572 small,
html[data-theme="dark"] .finance-share-list-v1572 span,
html[data-theme="dark"] .finance-history-count-v1588 {
    color: #98a2b3 !important;
}

html[data-theme="dark"] .finance-chart-summary-v1572 strong,
html[data-theme="dark"] .finance-share-list-v1572 strong,
html[data-theme="dark"] .finance-method-stats-v1572 strong {
    color: #f3f5f8 !important;
}

/* График поступлений — делаем аккуратнее и ближе к референсу. */
html[data-theme="dark"] .finance-bars-v1572 {
    border-bottom-color: #2a3038 !important;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 66px,
            rgba(255,255,255,.055) 67px
        ) !important;
}

html[data-theme="dark"] .finance-bar-track-v1572 {
    gap: 4px;
    padding: 0 0 2px;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, #323946 0%, #2a313d 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

html[data-theme="dark"] .finance-bar-value-v1572 {
    color: #9ca6b8 !important;
}

html[data-theme="dark"] .finance-bar-segment-v1572 {
    width: min(34px, 76%);
    border-radius: 8px 8px 3px 3px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.12);
}

html[data-theme="dark"] .finance-bar-segment-v1572.is-cash-v1572 {
    background: linear-gradient(180deg, #39c26a, #22a95a) !important;
}

html[data-theme="dark"] .finance-bar-segment-v1572.is-mortgage-v1572 {
    background: linear-gradient(180deg, #6d93ff, #3f6ff7) !important;
}

html[data-theme="dark"] .finance-bar-segment-v1572.is-installment-v1572 {
    background: linear-gradient(180deg, #9275ff, #7657e8) !important;
}

html[data-theme="dark"] .finance-bar-label-v1572 strong {
    color: #f0f3f8 !important;
}

html[data-theme="dark"] .finance-bar-label-v1572 span,
html[data-theme="dark"] .finance-section-heading-v1572 p,
html[data-theme="dark"] .finance-chart-legend-v1572,
html[data-theme="dark"] .finance-section-total-v1572 {
    color: #98a2b3 !important;
}

/* Пончик структуры и список распределения. */
html[data-theme="dark"] .finance-donut-v1572 {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 20px 44px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] .finance-donut-v1572 > div {
    background: linear-gradient(180deg, #171b21, #1b2028) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04) !important;
}

html[data-theme="dark"] .finance-share-list-v1572 span {
    color: #d9e0ea !important;
}

/* Hover — убираем белые заливки и делаем мягкий серо-графитовый hover. */
html[data-theme="dark"] .finance-debt-row-v1572:hover,
html[data-theme="dark"] .finance-history-row-v1572:hover,
html[data-theme="dark"] .finance-share-list-v1572 > div:hover,
html[data-theme="dark"] .finance-chart-summary-v1572 > div:hover,
html[data-theme="dark"] .finance-method-stats-v1572 > div:hover,
html[data-theme="dark"] .finance-history-filter-toggle-v1588:hover,
html[data-theme="dark"] .finance-history-deleted-toggle-v1588:hover {
    background: #232933 !important;
    border-color: rgba(255,255,255,.06) !important;
}

html[data-theme="dark"] .finance-history-filter-toggle-v1588,
html[data-theme="dark"] .finance-history-deleted-toggle-v1588 {
    color: #d3dae5 !important;
    background: #1e232c !important;
    border-color: rgba(255,255,255,.05) !important;
}

html[data-theme="dark"] .finance-history-filter-toggle-v1588.is-active,
html[data-theme="dark"] .finance-history-deleted-toggle-v1588.is-active {
    color: #f2f4f7 !important;
    background: #262c36 !important;
    border-color: rgba(255,255,255,.07) !important;
}

/* Зелёный текст "+ доп. услуги" и в dark. */
html[data-theme="dark"] .finance-method-extra-line-v1588,
html[data-theme="dark"] .finance-method-extra-line-v1588 b {
    color: #43c878 !important;
}

/* Наличка — блок "Без рассрочки" тоже в фирменном зелёном оттенке. */
html[data-theme="dark"] .finance-cash-without-block-v1588 {
    background: linear-gradient(180deg, #1d3125, #1a2a21) !important;
    border-color: rgba(67, 200, 120, .20) !important;
}

/* Финансовая история и остатки по объектам — hover и ссылки без белого свечения. */
html[data-theme="dark"] .finance-history-object-v1572 > a {
    color: #e8ecf4 !important;
}

html[data-theme="dark"] .finance-history-object-v1572 > a:hover,
html[data-theme="dark"] .finance-history-amount-v1572 > a:hover {
    color: #aebcff !important;
}

/* Чуть приятнее строка с остатком на dashboard/finance. */
html[data-theme="dark"] .finance-remaining-breakdown-v1588 b {
    color: #d7deea !important;
}

/* На узких desktop-экранах summary blocks тоже остаются читабельными. */
@media (max-width: 1420px) {
    html[data-theme="dark"] .finance-chart-summary-v1572 > div,
    html[data-theme="dark"] .finance-share-list-v1572 > div {
        padding: 12px 13px;
    }
}


/* =========================================================
   v1.5.110 — Wikkeo-inspired surfaces / hover / typography / hours stepper
   ========================================================= */

/*
 * Референс Wikkeo из присланного скриншота:
 * dark canvas ~ #1f2025, глубокий control ~ #121317,
 * accent blue ~ #316afb. Обводки максимально тихие.
 */
:root {
    --wk-bg: #f5f6f8;
    --wk-sidebar: #ffffff;
    --wk-surface: #ffffff;
    --wk-surface-2: #f8f9fa;
    --wk-control: #f0f1f3;
    --wk-hover: #eef0f2;
    --wk-border: rgba(18, 24, 35, .055);
    --wk-shadow: 0 10px 28px rgba(21, 29, 44, .035);
    --wk-blue: #316afb;
    --wk-blue-hover: #4277ff;
}

html[data-theme="dark"] {
    --bg: #1f2025;
    --surface: #25262c;
    --surface-soft: #202126;
    --border: rgba(255,255,255,.045);
    --primary: #5680ff;
    --primary-hover: #6a90ff;
    --primary-soft: #292d42;
    --shadow: none;

    --wk-bg: #1f2025;
    --wk-sidebar: #1b1c21;
    --wk-surface: #25262c;
    --wk-surface-2: #222329;
    --wk-control: #15161a;
    --wk-hover: #2c2d33;
    --wk-border: rgba(255,255,255,.042);
    --wk-shadow: none;
    --wk-blue: #316afb;
    --wk-blue-hover: #4277ff;
}

/* ---------- общий фон и sidebar ---------- */
body:not(.login-page),
.app-shell,
.main-content,
.page-body,
.page-body-no-topbar {
    background: var(--wk-bg) !important;
}

.sidebar {
    background: var(--wk-sidebar) !important;
    border-color: var(--wk-border) !important;
}

/* ---------- карточки: почти без обводки, без тяжёлых теней ---------- */
:is(
    .content-card,
    .kpi-card,
    .project-card,
    .object-card,
    .object-row-card,
    .object-showcase-card,
    .installment-card,
    .profile-card,
    .settings-card,
    .hours-kpi-card,
    .hours-ranking-card,
    .hours-history-card,
    .hours-worker-stat-v1596,
    .hours-worker-stat-block-v1596,
    .finance-kpi-v1572,
    .finance-method-card-v1572,
    .finance-chart-card-v1572,
    .finance-portfolio-card-v1572,
    .finance-debt-card-v1572,
    .finance-history-card-v1572,
    .estimate-chart-card,
    .estimate-sections-card,
    .estimate-table-card,
    .estimate-extra-card,
    .estimate-profit-card,
    .estimate-journal-card,
    .payment-extra-services-card-v1532,
    .payment-contract-payment-card-v1581,
    .personal-project-card-v1543,
    .users-flow-card
) {
    background: var(--wk-surface) !important;
    border: 1px solid var(--wk-border) !important;
    box-shadow: var(--wk-shadow) !important;
}

html[data-theme="dark"] :is(
    .content-card,
    .kpi-card,
    .project-card,
    .object-card,
    .object-row-card,
    .object-showcase-card,
    .installment-card,
    .profile-card,
    .settings-card,
    .hours-kpi-card,
    .hours-ranking-card,
    .hours-history-card,
    .hours-worker-stat-v1596,
    .hours-worker-stat-block-v1596,
    .finance-kpi-v1572,
    .finance-method-card-v1572,
    .finance-chart-card-v1572,
    .finance-portfolio-card-v1572,
    .finance-debt-card-v1572,
    .finance-history-card-v1572,
    .estimate-chart-card,
    .estimate-sections-card,
    .estimate-table-card,
    .estimate-extra-card,
    .estimate-profit-card,
    .estimate-journal-card,
    .payment-extra-services-card-v1532,
    .payment-contract-payment-card-v1581,
    .personal-project-card-v1543,
    .users-flow-card
) {
    background: linear-gradient(180deg, #25262c 0%, #23242a 100%) !important;
}

/* ---------- вложенные поверхности ---------- */
:is(
    .project-info-item,
    .project-overview-item,
    .summary-box,
    .payment-summary-item,
    .installment-summary-item,
    .manager-summary-stats > div,
    .project-stats > div,
    .finance-method-stats-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-share-list-v1572 > div,
    .finance-installment-schedule-grid-v1576 > div,
    .hours-worker-stat-kpis-v1596 article,
    .worker-profile-stats > div,
    .project-progress-stage-v153,
    .users-flow-member
) {
    background: var(--wk-surface-2) !important;
    border-color: var(--wk-border) !important;
    box-shadow: none !important;
}

/* ---------- hover: Wikkeo-подобный серый, никогда белый ---------- */
:is(
    .nav-link,
    .sidebar-user-trigger,
    .sidebar-user-menu-item,
    .object-card,
    .project-card,
    .object-row-card,
    .project-list-card,
    .users-flow-member,
    .hours-podium-row,
    .hours-ranking-list > a,
    .hours-worker-project-row-v1596,
    .finance-debt-row-v1572,
    .finance-history-row-v1572,
    .finance-share-list-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-method-stats-v1572 > div
) {
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease, color .16s ease !important;
}

:is(
    .nav-link,
    .sidebar-user-trigger,
    .sidebar-user-menu-item,
    .object-card,
    .project-card,
    .object-row-card,
    .project-list-card,
    .users-flow-member,
    .hours-podium-row,
    .hours-ranking-list > a,
    .hours-worker-project-row-v1596,
    .finance-debt-row-v1572,
    .finance-history-row-v1572,
    .finance-share-list-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-method-stats-v1572 > div
):hover {
    background: var(--wk-hover) !important;
    border-color: rgba(110, 122, 142, .12) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] :is(
    .nav-link,
    .sidebar-user-trigger,
    .sidebar-user-menu-item,
    .object-card,
    .project-card,
    .object-row-card,
    .project-list-card,
    .users-flow-member,
    .hours-podium-row,
    .hours-ranking-list > a,
    .hours-worker-project-row-v1596,
    .finance-debt-row-v1572,
    .finance-history-row-v1572,
    .finance-share-list-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-method-stats-v1572 > div
):hover {
    background: #2c2d33 !important;
    border-color: rgba(255,255,255,.055) !important;
}

/* ---------- кнопки / tabs ---------- */
.primary-button,
button.primary-button,
a.primary-button {
    background: var(--wk-blue) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.primary-button:hover,
button.primary-button:hover,
a.primary-button:hover {
    background: var(--wk-blue-hover) !important;
    box-shadow: none !important;
}

.secondary-button,
.filter-button,
.status-toggle-button,
.objects-filter-toggle-v517,
.finance-history-filter-toggle-v1588,
.finance-history-deleted-toggle-v1588 {
    background: var(--wk-control) !important;
    border-color: var(--wk-border) !important;
    box-shadow: none !important;
}

.secondary-button:hover,
.filter-button:hover,
.status-toggle-button:hover,
.objects-filter-toggle-v517:hover,
.finance-history-filter-toggle-v1588:hover,
.finance-history-deleted-toggle-v1588:hover {
    background: var(--wk-hover) !important;
    border-color: var(--wk-border) !important;
}

html[data-theme="dark"] :is(
    .secondary-button,
    .filter-button,
    .status-toggle-button,
    .objects-filter-toggle-v517,
    .finance-history-filter-toggle-v1588,
    .finance-history-deleted-toggle-v1588
):hover {
    background: #2c2d33 !important;
}

/* ---------- формы ---------- */
input,
select,
textarea {
    border-color: var(--wk-border) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #17181d !important;
    border-color: rgba(255,255,255,.055) !important;
}

html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover {
    background: #1b1c21 !important;
    border-color: rgba(255,255,255,.075) !important;
}

/* ---------- модальные окна ---------- */
:is(
    .modal-dialog,
    .user-create-dialog,
    .guest-login-dialog,
    .project-status-modal-dialog,
    .project-worker-modal-dialog,
    .work-hours-modal-dialog,
    .payment-amount-modal-dialog,
    .estimate-expense-modal-dialog,
    .installment-payment-dialog-v1553
) {
    border-color: var(--wk-border) !important;
    box-shadow: 0 28px 80px rgba(0,0,0,.18) !important;
}

html[data-theme="dark"] :is(
    .modal-dialog,
    .user-create-dialog,
    .guest-login-dialog,
    .project-status-modal-dialog,
    .project-worker-modal-dialog,
    .work-hours-modal-dialog,
    .payment-amount-modal-dialog,
    .estimate-expense-modal-dialog,
    .installment-payment-dialog-v1553
) {
    background: #23242a !important;
    border-color: rgba(255,255,255,.045) !important;
    box-shadow: 0 34px 90px rgba(0,0,0,.36) !important;
}

/* =========================================================
   Добавление часов — control как на Wikkeo screenshot
   ========================================================= */

.work-hours-worker-row {
    grid-template-columns: 42px minmax(0, 1fr) 160px !important;
    border-color: var(--wk-border) !important;
    background: var(--wk-surface-2) !important;
}

.work-hours-stepper-v15110 {
    width: 160px;
    height: 50px;
    padding: 4px;
    display: grid;
    grid-template-columns: 42px minmax(44px, 1fr) 42px;
    align-items: center;
    gap: 4px;
    border: 0;
    border-radius: 999px;
    background: #121317;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
}

.work-hours-step-v15110 {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    transition: background .15s ease, transform .15s ease, color .15s ease;
}

.work-hours-step-v15110.is-minus-v15110 {
    color: #676974;
    background: #1f2025;
}

.work-hours-step-v15110.is-minus-v15110:hover {
    color: #a6a9b2;
    background: #292a30;
}

.work-hours-step-v15110.is-plus-v15110 {
    color: #fff;
    background: #316afb;
}

.work-hours-step-v15110.is-plus-v15110:hover {
    background: #4277ff;
}

.work-hours-step-v15110:active {
    transform: scale(.96);
}

.work-hours-stepper-v15110 input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 2px !important;
    border: 0 !important;
    outline: 0;
    color: #fff !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 20px !important;
    font-weight: 700;
    -moz-appearance: textfield;
}

.work-hours-stepper-v15110 input::placeholder {
    color: #fff !important;
    opacity: 1;
}

.work-hours-stepper-v15110 input::-webkit-outer-spin-button,
.work-hours-stepper-v15110 input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* =========================================================
   Size audit — исправляем оставшиеся слишком мелкие 6.5–10px
   ========================================================= */

.project-number,
.project-public-id,
.object-meta-cell span,
.object-money > span,
.project-header-summary span,
.finance-split span,
.payment-summary-grid span,
.payment-entry-summary span,
.project-info-card .details-grid dt,
.project-form-v125 .field-hint,
.project-form-v125 .optional-date-empty-v524 {
    font-size: 11px !important;
}

.project-stats dt,
.payment-history-item span,
.payment-history-meta-v1534 span,
.payment-history-meta-v1534 small,
.personal-project-stats-v1543 span,
.personal-project-title-v1543 span,
.personal-project-meta-v1543 span,
.installment-preview-head-v1552 p,
.installment-preview-copy-v1552 small,
.installment-overpay-hint-v1552,
.installment-payment-summary-v1553 span,
.finance-history-filters-v1572 label > span,
.finance-installment-schedule-head-v1576 span,
.payment-installment-contract-eyebrow-v1581,
.payment-installment-empty-v1581 span,
.payment-contract-composition-labels-v1581 span,
.payment-contract-payment-head-v1581 span,
.payment-contract-payment-stats-v1581 span,
.payment-contract-check-v1581 > div > span,
.payment-history-source-v1581 > span,
.finance-strip-balance-breakdown-v1582 > span,
.finance-strip-balance-breakdown-v1582 > small {
    font-size: 11px !important;
}

.project-stats dd,
.object-showcase-title > div > span,
.object-showcase-details dt,
.object-showcase-details dd,
.object-showcase-manager > span,
.object-showcase-manager strong,
.project-status-inline,
.project-back-link,
.payment-schedule-table th,
.payment-schedule-table td,
.payment-schedule-table td strong,
.payment-schedule-table .schedule-status,
.payment-schedule-table .mini-action,
.user-create-head > div > span,
.user-type-switch button,
.user-create-note,
.project-status-modal-head p,
.project-status-option-copy small,
.project-crew-strip-head span,
.project-crew-person strong,
.project-crew-person small,
.project-crew-add small,
.project-worker-modal-head p,
.work-hours-modal-head p,
.project-worker-modal-error,
.work-hours-error,
.project-worker-picker-row > div small,
.project-worker-picker-action,
.work-hours-batch-note,
.users-flow-copy span {
    font-size: 12px !important;
}

.project-worker-picker-row > div strong,
.work-hours-worker-copy strong,
.hours-ranking-list strong,
.hours-ranking-list b,
.worker-directory-subhead strong,
.project-team-person strong,
.hours-crew-person strong,
.hours-ranking-user-v153 strong,
.hours-ranking-value-v153,
.hours-history-row-v153 > strong,
.finance-history-object-v1572 > a,
.finance-history-note-v1572 > span {
    font-size: 13px !important;
}

.work-hours-worker-copy small,
.hours-ranking-list small,
.hours-worker-mini-list > div small,
.hours-bar-column small,
.worker-profile-chart small,
.project-team-role-label,
.project-team-stats span,
.hours-crew-role,
.hours-crew-hours-badge,
.project-progress-stage-v153 > small,
.hours-ranking-head-v153,
.hours-ranking-user-v153 small,
.hours-history-head-v153,
.hours-history-row-v153 time,
.hours-kpi-card-v153 > div > span,
.hours-kpi-card-v154 > div > span,
.project-team-stat-label-v155,
.project-info-item-v158 small,
.project-info-stage-v158,
.project-info-extra-v158 > div > span,
.finance-history-object-v1572 > small,
.finance-history-amount-v1572 > a,
.finance-installment-schedule-grid-v1576 span,
.hours-worker-stat-person-v1596 span,
.hours-worker-stat-kpis-v1596 span,
.hours-worker-stat-block-head-v1596 p,
.hours-worker-project-row-v1596 small,
.hours-worker-history-row-v1596 small,
.hours-worker-history-row-v1596 > div:last-child span,
.hours-worker-history-row-v1596 > div:last-child b {
    font-size: 11px !important;
}

.hours-bar-value,
.hours-worker-mini-list > div strong,
.hours-table th {
    font-size: 11px !important;
}

.hours-table td,
.hours-worker-project-row-v1596 strong,
.hours-worker-project-row-v1596 > b,
.hours-worker-history-row-v1596 > div:first-child strong {
    font-size: 12px !important;
}

/* Не уменьшаем основные подписи на mobile до нечитаемых значений. */
@media (max-width: 700px) {
    .work-hours-worker-row {
        grid-template-columns: 34px minmax(0, 1fr) 132px !important;
        gap: 8px !important;
    }

    .work-hours-stepper-v15110 {
        width: 132px;
        height: 44px;
        grid-template-columns: 36px minmax(40px, 1fr) 36px;
    }

    .work-hours-step-v15110 {
        width: 36px;
        height: 36px;
        font-size: 26px;
    }

    .work-hours-stepper-v15110 input {
        height: 36px;
        font-size: 18px !important;
    }

    .work-hours-worker-copy strong {
        font-size: 13px !important;
    }

    .work-hours-worker-copy small {
        font-size: 11px !important;
    }

    .work-hours-batch-note {
        font-size: 11px !important;
    }

    .work-hours-modal-actions {
        background: color-mix(in srgb, var(--wk-surface) 94%, transparent) !important;
        border-color: var(--wk-border) !important;
    }
}

@media (max-width: 390px) {
    .work-hours-worker-row {
        grid-template-columns: 32px minmax(0, 1fr) 120px !important;
    }

    .work-hours-stepper-v15110 {
        width: 120px;
        grid-template-columns: 34px minmax(36px, 1fr) 34px;
    }

    .work-hours-step-v15110 {
        width: 34px;
        height: 34px;
    }
}


/* =========================================================
   v1.5.111 — Dark theme: возврат заливки + полный audit
   ========================================================= */

html[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #171a20;
    --surface-soft: #1a1e24;
    --border: #171a20;
    --primary: #5680ff;
    --primary-hover: #6a90ff;
    --primary-soft: #2a3038;
    --shadow: none;

    --wk-bg: #0f1115;
    --wk-sidebar: #14171c;
    --wk-surface: #171a20;
    --wk-surface-2: #1a1e24;
    --wk-control: #121317;
    --wk-hover: #20252c;
    --wk-border: #171a20;
    --wk-shadow: none;
}

html[data-theme="dark"] .sidebar {
    background: #14171c !important;
    border-color: #14171c !important;
}

html[data-theme="dark"] .nav-link:hover {
    color: #ffffff !important;
    background: #20252c !important;
}

html[data-theme="dark"] .nav-link.is-active {
    color: #ffffff !important;
    background: #2a3038 !important;
}

/* Главные карточки: возвращаем прежнюю заливку, обводка совпадает с фоном. */
html[data-theme="dark"] :is(
    .content-card,
    .kpi-card,
    .project-card,
    .object-card,
    .object-row-card,
    .object-showcase-card,
    .installment-card,
    .profile-card,
    .settings-card,
    .hours-kpi-card,
    .hours-ranking-card,
    .hours-history-card,
    .hours-worker-stat-v1596,
    .hours-worker-stat-block-v1596,
    .finance-kpi-v1572,
    .finance-method-card-v1572,
    .finance-chart-card-v1572,
    .finance-portfolio-card-v1572,
    .finance-debt-card-v1572,
    .finance-history-card-v1572,
    .estimate-chart-card,
    .estimate-sections-card,
    .estimate-table-card,
    .estimate-extra-card,
    .estimate-profit-card,
    .estimate-journal-card,
    .payment-extra-services-card-v1532,
    .payment-contract-payment-card-v1581,
    .personal-project-card-v1543,
    .users-flow-card,
    .project-progress-body-v153,
    .project-info-grid-v158,
    .project-info-mobile-progress-v513
) {
    background: #171a20 !important;
    border-color: #171a20 !important;
    box-shadow: none !important;
}

/* Вложенные блоки: отдельная спокойная поверхность без светлой рамки. */
html[data-theme="dark"] :is(
    .project-info-item,
    .project-info-item-v158,
    .project-overview-item,
    .summary-box,
    .payment-summary-item,
    .installment-summary-item,
    .manager-summary-card,
    .manager-summary-stats > div,
    .project-stats > div,
    .finance-method-stats-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-share-list-v1572 > div,
    .finance-installment-schedule-grid-v1576 > div,
    .hours-worker-stat-kpis-v1596 article,
    .worker-profile-stats > div,
    .project-progress-stage-v153,
    .project-progress-stage-copy-v153,
    .users-flow-member,
    .personal-project-stats-v1543,
    .installment-payment-summary-v1553 > div,
    .payment-contract-check-v1581,
    .payment-amount-current-info > div,
    .guest-pin-settings,
    .user-create-note,
    .estimate-filters,
    .estimate-item-card,
    .estimate-section-group,
    .estimate-section-group-head,
    .estimate-import-current > div,
    .reference-chips span
) {
    background: #1a1e24 !important;
    border-color: #1a1e24 !important;
    box-shadow: none !important;
}

/* Разделители оставляем различимыми. */
html[data-theme="dark"] :is(
    .object-showcase-people-v517,
    .source-list > div,
    .payment-row,
    .activity-row,
    .installment-mini,
    .worker-directory-section + .worker-directory-section,
    .finance-debt-row-v1572,
    .finance-history-row-v1572,
    .hours-history-row,
    .hours-company-history-row,
    .hours-podium-row,
    .payment-schedule-table th,
    .payment-schedule-table td
) {
    border-color: #2a3038 !important;
}

.object-showcase-cover,
html[data-theme="dark"] .object-showcase-cover {
    background: #171a20 !important;
}

html[data-theme="dark"] .object-showcase-people-v517 {
    border-top: 1px solid #2a3038 !important;
}

/* Источники заявок: строки не выглядят отдельными белыми карточками. */
html[data-theme="dark"] .source-list,
html[data-theme="dark"] .source-list-actions,
html[data-theme="dark"] .source-list > div,
html[data-theme="dark"] .source-list-actions > div {
    background: #171a20 !important;
}

html[data-theme="dark"] .source-list > div,
html[data-theme="dark"] .source-list-actions > div {
    border-bottom-color: #2a3038 !important;
}

/* Полный проход по оставшимся legacy-светлым заливкам. */
html[data-theme="dark"] :is(
    .history-json pre,
    .object-filters,
    .object-filters-collapsible,
    .objects-header-search,
    .objects-filter-search,
    .mortgage-quick-form,
    .tranche-card,
    .upload-zone,
    .document-upload-zone,
    .extra-service-file-zone,
    .extra-service-file,
    .photo-card,
    .photo-selection-preview,
    .photo-selection-item,
    .photo-image-link,
    .photo-gallery-card .photo-image-link,
    .photo-upload-progress,
    .photo-settings-panel,
    .estimate-import-help,
    .estimate-expense-attachment-zone,
    .estimate-expense-selected-files span,
    .guest-pin-input-row input,
    .project-status-option,
    .project-worker-modal-dialog,
    .work-hours-modal-dialog,
    .worker-profile-projects > div:last-child > a,
    .hours-podium-row,
    .hours-history-row,
    .work-hours-worker-row,
    .project-contract-current-v158,
    .optional-date-empty-v524,
    .profile-avatar-menu-v1542,
    .installment-preview-v1552,
    .installment-preview-head-v1552,
    .installment-payment-dialog-v1553,
    .installment-date-field-v1568 input,
    .installment-preview-date-v1569 input,
    .finance-installment-schedule-v1576,
    .finance-history-heading-v1572 > span,
    .finance-history-count-v1588
) {
    background: #171a20 !important;
    border-color: #171a20 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] :is(
    .photo-actions button,
    .photo-settings-button,
    .photo-selection-more,
    .estimate-expense-modal-close,
    .estimate-file-preview-head button,
    .payment-amount-modal-close,
    .guest-login-head > button,
    .user-create-head > button,
    .project-status-modal-head > button,
    .project-worker-modal-head > button,
    .work-hours-modal-head > button,
    .installment-payment-modal-head-v1553 > button,
    .sidebar-note-icon,
    .project-team-edit-button,
    .project-crew-add > span
) {
    color: #cbd2dd !important;
    background: #1a1e24 !important;
    border-color: #1a1e24 !important;
}

/* Hover: мягкий графитовый, без белого вспыхивания. */
html[data-theme="dark"] :is(
    .clickable-row,
    .user-row-link,
    .object-showcase-card,
    .object-row-card,
    .project-card,
    .project-status-option,
    .extra-service-file,
    .worker-profile-projects > div:last-child > a,
    .hours-ranking-list > a,
    .hours-podium-link,
    .hours-worker-project-row-v1596,
    .finance-debt-row-v1572,
    .finance-history-row-v1572,
    .finance-share-list-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-method-stats-v1572 > div,
    .users-flow-member
):hover {
    background: #20252c !important;
    border-color: #20252c !important;
    box-shadow: none !important;
}

/* Inputs и controls — граница заметна только там, где нужна интерактивность. */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
    background: #171a20 !important;
    border-color: #2a3038 !important;
}

html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover,
html[data-theme="dark"] textarea:hover {
    background: #1a1e24 !important;
    border-color: #2a3038 !important;
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .filter-button,
html[data-theme="dark"] .objects-filter-toggle-v517,
html[data-theme="dark"] .finance-history-filter-toggle-v1588,
html[data-theme="dark"] .finance-history-deleted-toggle-v1588 {
    background: #1a1e24 !important;
    border-color: #1a1e24 !important;
}

html[data-theme="dark"] :is(
    .secondary-button,
    .filter-button,
    .objects-filter-toggle-v517,
    .finance-history-filter-toggle-v1588,
    .finance-history-deleted-toggle-v1588
):hover {
    background: #20252c !important;
    border-color: #20252c !important;
}

/* Семантические статусы не должны становиться белыми. */
html[data-theme="dark"] .status-neutral,
html[data-theme="dark"] .status-toggle-button.is-off,
html[data-theme="dark"] .payment-neutral-v1530,
html[data-theme="dark"] .installment-sequence-v1530,
html[data-theme="dark"] .installment-date-sequence-v1568,
html[data-theme="dark"] .project-public-id,
html[data-theme="dark"] .tab-link b,
html[data-theme="dark"] .project-tabs a b,
html[data-theme="dark"] .installment-tabs-v1553 .tab-link b {
    color: #aeb7c5 !important;
    background: #1a1e24 !important;
    border-color: #1a1e24 !important;
}

/* =========================================================
   Поступления за 12 месяцев
   ========================================================= */

.finance-bar-label-v1572 {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
}

.finance-bar-label-v1572 strong,
.finance-bar-label-v1572 span {
    display: inline !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
}

html[data-theme="dark"] .finance-bars-v1572 {
    border-bottom-color: #2a3038 !important;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 66px,
        rgba(255,255,255,.055) 67px
    ) !important;
}

/* Убираем огромные серые столбцы-фоны: видны только реальные цветные поступления. */
html[data-theme="dark"] .finance-bar-track-v1572 {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}

.finance-bar-segment-v1572 {
    position: relative;
    min-height: 28px !important;
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    overflow: visible;
}

.finance-bar-segment-label-v15111 {
    display: block;
    width: max-content;
    max-width: 58px;
    padding-top: 6px;
    overflow: hidden;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
    pointer-events: none;
}

/* =========================================================
   Добавление часов: работающие +/-
   ========================================================= */

.work-hours-step-v15110 {
    pointer-events: auto !important;
    touch-action: manipulation;
    user-select: none;
}

.work-hours-stepper-v15110 input {
    pointer-events: auto !important;
}

/* =========================================================
   Дополнительный size audit — оставшиеся служебные тексты
   ========================================================= */

.status-toggle-button,
.finance-version-badge-v1577,
.finance-method-source-v1573,
.estimate-expense-modal-head span,
.estimate-expense-modal-actions .primary-button,
.estimate-expense-modal-actions .secondary-button,
.estimate-add-position-button,
.permission-switch-copy strong,
.payment-amount-modal-head > div > span,
.payment-amount-modal-error,
.guest-login-head > div > span,
.guest-pin-field > span,
.guest-login-error,
.guest-login-actions .primary-button,
.guest-login-actions .secondary-button,
.user-create-head > div > span,
.user-type-switch button,
.user-create-error,
.project-status-modal-head p,
.project-status-modal-error,
.project-crew-strip-head span,
.project-worker-modal-head p,
.work-hours-modal-head p,
.project-worker-modal-error,
.work-hours-error,
.project-worker-picker-action,
.objects-header-actions-v518 .objects-filter-toggle-v517,
.payment-history-note-v1534,
.personal-setting-heading-v1543 p,
.personal-setting-form-v1543 label > span,
.personal-security-note-v1543,
.installment-payment-modal-form-v1553 .field > span,
.installment-payment-modal-error-v1553,
.finance-history-filters-v1572 label > span,
.finance-installment-schedule-head-v1576 span,
.payment-installment-contract-eyebrow-v1581,
.payment-installment-empty-v1581 span,
.payment-contract-composition-labels-v1581 span,
.payment-contract-payment-head-v1581 span,
.hours-workers-rail-head-v1596 small,
.hours-workers-reset-v1596 {
    font-size: 11px !important;
}

.permission-switch-copy small,
.guest-pin-settings-head small,
.guest-pin-status,
.guest-pin-input-row > span,
.guest-pin-input-row small,
.project-status-option-copy small,
.project-crew-person small,
.project-crew-add small,
.project-worker-picker-row > div small,
.work-hours-batch-note,
.project-team-role-label,
.project-team-stats span,
.hours-crew-role,
.hours-crew-hours-badge,
.project-progress-current-v153,
.project-progress-stage-v153 > small,
.hours-place-v153,
.project-info-stage-v158,
.project-info-extra-v158 > div > span,
.payment-contract-payment-stats-v1581 span,
.payment-contract-check-v1581 > div > span,
.payment-history-source-v1581 > span,
.finance-strip-balance-breakdown-v1582 > span,
.finance-strip-balance-breakdown-v1582 > small,
.hours-worker-badge-v1596,
.hours-worker-bubble-v1596 > small {
    font-size: 11px !important;
}


/* =========================================================
   v1.5.112 — Dark theme requested refinements
   ========================================================= */

/* Сильный blur под всеми модальными окнами. В CSS blur задаётся
   длиной, поэтому 90% визуальной силы реализовано как 18px. */
html[data-theme="dark"] :is(
    .modal-backdrop,
    .user-create-backdrop,
    .guest-login-backdrop,
    .project-status-modal-backdrop,
    .project-worker-modal-backdrop,
    .work-hours-modal-backdrop,
    .payment-amount-modal-backdrop,
    .estimate-expense-modal-backdrop,
    .estimate-file-preview-backdrop,
    .installment-payment-backdrop-v1553,
    .photo-lightbox-backdrop
) {
    background: rgba(15, 17, 21, .22) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
}

html[data-theme="dark"] .object-showcase-cover {
    background: #1c2026 !important;
}

html[data-theme="dark"] .app-theme-switch-v15107 {
    background: #171b20 !important;
    border-color: #171b20 !important;
}

html[data-theme="dark"] .sidebar-account-footer,
html[data-theme="dark"] .sidebar-user-profile,
html[data-theme="dark"] .sidebar-user-menu {
    border-color: #14171c !important;
    background: #14171c !important;
}

.sidebar-user-menu-form {
    border-top: 0 !important;
}

html[data-theme="dark"] .project-tabs,
html[data-theme="dark"] .objects-tabs,
html[data-theme="dark"] .status-tabs {
    background: #0f1115 !important;
    border-color: #0f1115 !important;
}

/* Последнее указанное значение active-tab имеет приоритет. */
html[data-theme="dark"] .project-tabs a.is-active,
html[data-theme="dark"] .objects-tabs a.is-active,
html[data-theme="dark"] .status-tabs a.is-active {
    color: #f2f4f7 !important;
    background: #171a20 !important;
}

html[data-theme="dark"] .objects-filter-toggle-v517,
html[data-theme="dark"] .objects-header-actions-v518 .objects-filter-toggle-v517 {
    color: #cbd2dd !important;
    background: #242930 !important;
    border-color: #242930 !important;
}

html[data-theme="dark"] :is(
    .project-info-item,
    .project-overview-item,
    .summary-box,
    .payment-summary-item,
    .installment-summary-item,
    .manager-summary-card,
    .manager-summary-stats > div,
    .project-stats > div,
    .finance-method-stats-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-share-list-v1572 > div,
    .finance-installment-schedule-grid-v1576 > div,
    .hours-worker-stat-kpis-v1596 article,
    .worker-profile-stats > div,
    .project-progress-stage-v153,
    .project-progress-stage-copy-v153,
    .users-flow-member,
    .personal-project-stats-v1543,
    .installment-payment-summary-v1553 > div,
    .payment-contract-check-v1581,
    .payment-amount-current-info > div,
    .guest-pin-settings,
    .user-create-note,
    .estimate-filters,
    .estimate-item-card,
    .estimate-section-group,
    .estimate-section-group-head,
    .estimate-import-current > div,
    .reference-chips span
) {
    background: #171a20 !important;
    border-color: #171a20 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .project-team-person-v153 .project-team-avatar {
    border: 5px solid #2a3038 !important;
    box-sizing: content-box;
}

html[data-theme="dark"] .project-crew-avatar {
    overflow: hidden;
    background: #171a20 !important;
    color: #52647c;
    font-weight: 800;
}

/* Все аналогичные внутренние разделители в dark — единый #2a3038. */
html[data-theme="dark"] .project-info-item-v158 {
    border-bottom-color: #2a3038 !important;
}

html[data-theme="dark"] .project-info-item-v158:nth-child(odd),
html[data-theme="dark"] .project-info-grid-v513 > .project-info-left-v514,
html[data-theme="dark"] .project-team-stats > div:nth-child(odd),
html[data-theme="dark"] .project-team-stats-v153 > div:first-child,
html[data-theme="dark"] .personal-project-stats-v1543 > div:not(:last-child) {
    border-right-color: #2a3038 !important;
}

html[data-theme="dark"] :is(
    .project-crew-strip,
    .worker-directory-section + .worker-directory-section,
    .worker-profile-dashboard,
    .payment-history-main-v1532,
    .object-showcase-people-v517,
    .source-list > div,
    .source-list-actions > div,
    .payment-row,
    .activity-row,
    .installment-mini,
    .finance-debt-row-v1572,
    .finance-history-row-v1572,
    .hours-history-row,
    .hours-company-history-row,
    .hours-podium-row,
    .hours-table th,
    .hours-table td,
    .payment-schedule-table th,
    .payment-schedule-table td
) {
    border-color: #2a3038 !important;
}

html[data-theme="dark"] .project-team-stats,
html[data-theme="dark"] .project-team-stats-v153,
html[data-theme="dark"] .project-info-grid-v158,
html[data-theme="dark"] .personal-project-stats-v1543 {
    border-color: #2a3038 !important;
}

html[data-theme="dark"] .project-worker-picker-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid #171a20 !important;
    border-radius: 11px;
}

.project-worker-modal-dialog,
.work-hours-modal-dialog {
    width: min(420px, 100%) !important;
}

html[data-theme="dark"] .hours-project-crew-rail-v153 {
    background: #171a20 !important;
}

html[data-theme="dark"] .hours-kpi-card-v154 > div > strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #159447 !important;
}

html[data-theme="dark"] .progress {
    background: #ffffff !important;
}

html[data-theme="dark"] .project-page .info-list dd,
html[data-theme="dark"] .project-page .compact-list b,
html[data-theme="dark"] .project-page .finance-split strong,
html[data-theme="dark"] .project-page .payment-summary-grid strong,
html[data-theme="dark"] .project-page .document-main strong {
    font-size: 18px !important;
}

/* =========================================================
   v1.5.113 — UI / finance / loader refinements
   ========================================================= */

/* 90% blur для модалок в ОБЕИХ темах. */
:is(
    .modal-backdrop,
    .user-create-backdrop,
    .guest-login-backdrop,
    .project-status-modal-backdrop,
    .project-worker-modal-backdrop,
    .work-hours-modal-backdrop,
    .payment-amount-modal-backdrop,
    .estimate-expense-modal-backdrop,
    .estimate-file-preview-backdrop,
    .installment-payment-backdrop-v1553,
    .photo-lightbox-backdrop
) {
    -webkit-backdrop-filter: blur(18px) !important;
    backdrop-filter: blur(18px) !important;
}

html[data-theme="light"] :is(
    .modal-backdrop,
    .user-create-backdrop,
    .guest-login-backdrop,
    .project-status-modal-backdrop,
    .project-worker-modal-backdrop,
    .work-hours-modal-backdrop,
    .payment-amount-modal-backdrop,
    .estimate-expense-modal-backdrop,
    .estimate-file-preview-backdrop,
    .installment-payment-backdrop-v1553,
    .photo-lightbox-backdrop
) {
    background: rgba(244, 247, 250, .28) !important;
}

/* Dark: последние точные значения пользователя. */
html[data-theme="dark"] .project-tabs a.is-active,
html[data-theme="dark"] .objects-tabs a.is-active,
html[data-theme="dark"] .status-tabs a.is-active {
    color: #f2f4f7 !important;
    background: #0f1115 !important;
}

html[data-theme="dark"] :is(
    .project-info-item,
    .project-info-item-v158,
    .project-overview-item,
    .summary-box,
    .payment-summary-item,
    .installment-summary-item,
    .manager-summary-card,
    .manager-summary-stats > div,
    .project-stats > div,
    .finance-method-stats-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-share-list-v1572 > div,
    .finance-installment-schedule-grid-v1576 > div,
    .hours-worker-stat-kpis-v1596 article,
    .worker-profile-stats > div,
    .project-progress-stage-v153,
    .project-progress-stage-copy-v153,
    .users-flow-member,
    .personal-project-stats-v1543,
    .installment-payment-summary-v1553 > div,
    .payment-contract-check-v1581,
    .payment-amount-current-info > div,
    .guest-pin-settings,
    .user-create-note,
    .estimate-filters,
    .estimate-item-card,
    .estimate-section-group,
    .estimate-section-group-head,
    .estimate-import-current > div,
    .reference-chips span
) {
    background: #2a3038 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .estimate-summary-card {
    min-height: 118px;
    padding: 16px 18px;
    border: 1px solid #2a3038 !important;
    border-radius: 18px;
    background: #2a3038 !important;
}

html[data-theme="dark"] .estimate-summary-received,
html[data-theme="dark"] .estimate-summary-card.is-neutral {
    background: #2a3038 !important;
}

html[data-theme="dark"] .hours-worker-reference-avatar-v1597 {
    width: 60px !important;
    height: 60px !important;
    flex: 0 0 60px !important;
    border: 4px solid #2a3038 !important;
    background: #171a20 !important;
    box-shadow: none !important;
    transition: transform .16s ease, box-shadow .16s ease;
}

/* Финансовые progress-bar — единый зелёный цвет поступлений. */
.finance-progress > span,
.finance-hero-track-v1572 > span,
.finance-method-progress-v1572 > span,
.finance-debt-progress-v1572 > div > span,
.payment-contract-payment-progress-v1581 > span,
.installment-progress-v1530 .progress > span,
.installment-row-progress-v1530 .progress > span {
    background: #159447 !important;
    background-image: none !important;
}

/* Финансовая история: фактические поступления всегда зелёные. */
.finance-history-row-v1572:not(.is-voided-v1572):not(.is-historical-v1573)
.finance-history-amount-v1572 > strong {
    color: #159447 !important;
}

/* Dashboard: оплаченная часть круглого финансового графика зелёная. */
.finance-journey-ring {
    background: conic-gradient(
        from -90deg,
        #159447 0deg,
        #159447 var(--paid-angle),
        #ff8a8d var(--paid-angle),
        #ff9b9d 360deg
    ) !important;
}

.finance-journey-hole span {
    color: #159447 !important;
}

/* Финансовый bar-chart: сумма в сегменте и подпись месяца вертикальные. */
.finance-bar-segment-label-v15111 {
    width: auto !important;
    max-width: none !important;
    max-height: calc(100% - 8px);
    padding: 5px 0 0 !important;
    overflow: hidden;
    writing-mode: vertical-rl !important;
    text-orientation: mixed;
    transform: rotate(180deg);
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 9px !important;
}

.finance-bar-label-v1572 {
    min-height: 46px;
    padding-top: 7px;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap !important;
}

.finance-bar-label-v1572 strong,
.finance-bar-label-v1572 span {
    margin: 0 !important;
}

.finance-bar-column-v1572 {
    grid-template-rows: 24px minmax(0, 1fr) 52px !important;
}

.finance-bars-v1572 {
    height: 296px !important;
}

/* Глобальная загрузка между страницами/обычными submit. */
.app-loading-overlay-v15113 {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(244, 247, 250, .24);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition: opacity .14s ease, visibility .14s ease;
}

html[data-theme="dark"] .app-loading-overlay-v15113 {
    background: rgba(15, 17, 21, .26);
}

.is-app-loading-v15113 .app-loading-overlay-v15113 {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.app-loading-card-v15113 {
    min-width: 132px;
    min-height: 92px;
    padding: 17px 20px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 11px;
    border: 1px solid rgba(215, 221, 231, .78);
    border-radius: 18px;
    background: rgba(255, 255, 255, .84);
    box-shadow: 0 18px 46px rgba(30, 43, 70, .13);
}

html[data-theme="dark"] .app-loading-card-v15113 {
    color: #f2f4f7;
    border-color: #2a3038;
    background: rgba(23, 26, 32, .90);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .32);
}

.app-loading-card-v15113 strong {
    font-size: 13px;
    font-weight: 750;
}

.app-loading-spinner-v15113 {
    width: 34px;
    height: 34px;
    border: 4px solid rgba(21, 148, 71, .18);
    border-color: #159447;
    border-radius: 50%;
    animation: app-loading-spin-v15113 .72s linear infinite;
}

@keyframes app-loading-spin-v15113 {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .app-loading-spinner-v15113 {
        animation-duration: 1.5s;
    }
}



/* =========================================================
   v1.5.114 — installment / progress / chart / theme polish
   ========================================================= */

/* Прогресс объекта без отдельной заливки. */
.project-progress-body-v153,
.project-progress-stage-v153,
.project-progress-stage-copy-v153 {
    background: transparent !important;
}

/* Нулевая просрочка не занимает место ни на одном разрешении. */
.installment-list-overdue-kpi-v1553.is-zero-v1553 {
    display: none !important;
}

/* Рассрочка: компактнее строки и спокойный hover. */
.installment-row-v1530 {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(105px, .7fr)) minmax(120px, .8fr) minmax(105px, .7fr) auto;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 9px 14px;
    border-top: 1px solid #edf0f4;
    transition: .16s ease;
}

.installment-row-v1530:hover {
    background: #f6f7fb !important;
}

html[data-theme="dark"] .installment-row-v1530:hover {
    background: #20252c !important;
}

/* Все существующие верхние разделители в dark theme — единый #2a3038.
   Меняем только цвет: новые линии этим правилом не создаются. */
html[data-theme="dark"] * {
    border-color: #2a3038 !important;
}

.hours-crew-person-v153 .hours-crew-avatar {
    border: 5px solid #2a3038 !important;
    box-shadow: 0 5px 14px rgba(40, 52, 74, .06);
}

html[data-theme="dark"] .estimate-expense-modal-actions,
html[data-theme="dark"] .work-hours-modal-actions {
    background: #171a20 !important;
    border-color: #171a20 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
    background: #121317 !important;
    border-color: #171a20 !important;
}

.project-worker-picker-row > div strong,
.work-hours-worker-copy strong,
.hours-ranking-list strong,
.hours-ranking-list b,
.worker-directory-subhead strong,
.project-team-person strong,
.hours-crew-person strong,
.hours-ranking-user-v153 strong,
.hours-ranking-value-v153,
.hours-history-row-v153 > strong,
.finance-history-object-v1572 > a,
.finance-history-note-v1572 > span {
    font-size: 16px !important;
}

/* График финансов: месяц снизу вверх, год читается обычно. */
.finance-bar-label-v1572 {
    min-height: 58px !important;
    padding-top: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    white-space: normal !important;
}

.finance-bar-label-v1572 strong {
    margin: 0 !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed;
    transform: rotate(180deg) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.finance-bar-label-v1572 span {
    margin: 0 !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    white-space: nowrap !important;
}

.finance-bar-column-v1572 {
    grid-template-rows: 24px minmax(0, 1fr) 64px !important;
}

/* Сумма сегмента строго по центру самого столбика. */
.finance-bar-segment-v1572 {
    position: relative;
    overflow: hidden;
}

.finance-bar-segment-label-v15111 {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100% - 8px) !important;
    padding: 0 !important;
    margin: 0 !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed;
    transform: translate(-50%, -50%) rotate(180deg) !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 9px !important;
    line-height: 1 !important;
}

/* Loader: только blur + spinner + текст. Без карточки, заливки и обводки. */
.app-loading-card-v15113,
html[data-theme="dark"] .app-loading-card-v15113 {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.app-loading-card-v15113 strong {
    text-shadow: 0 1px 8px rgba(255, 255, 255, .35);
}

html[data-theme="dark"] .app-loading-card-v15113 strong {
    color: #f2f4f7 !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
}

/* Dark override с повышенной специфичностью: фон прогресса действительно убран. */
html[data-theme="dark"] .project-progress-body-v153,
html[data-theme="dark"] .project-progress-stage-v153,
html[data-theme="dark"] .project-progress-stage-copy-v153 {
    background: transparent !important;
}


/* Loader без цветной подложки: остаются только blur, spinner и текст. */
.app-loading-overlay-v15113,
html[data-theme="dark"] .app-loading-overlay-v15113 {
    background: transparent !important;
}

@media (min-width: 701px) {
    .installment-kpis-v1530.has-no-overdue-v15114 {
        grid-template-columns: repeat(4, minmax(140px, 1fr)) !important;
    }

    .installment-detail-kpis-v1530.has-no-overdue-v15114 {
        grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
    }
}

/* =========================================================
   v1.5.116 — Finance months horizontal + final hours stepper
   ========================================================= */

/* «Поступления за 12 месяцев»: месяц и год снова горизонтально. */
.finance-bar-label-v1572 {
    min-height: 38px !important;
    padding-top: 7px !important;
    display: block !important;
    writing-mode: horizontal-tb !important;
    transform: none !important;
    white-space: nowrap !important;
    text-align: center !important;
}

.finance-bar-label-v1572 strong,
.finance-bar-label-v1572 span {
    display: block !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    transform: none !important;
    white-space: nowrap !important;
}

.finance-bar-label-v1572 strong {
    margin: 0 !important;
    line-height: normal !important;
}

.finance-bar-label-v1572 span {
    margin-top: 2px !important;
}

.finance-bar-column-v1572 {
    grid-template-rows: 24px minmax(0, 1fr) 40px !important;
}

/* Поле часов теперь text/inputmode=decimal, нативная number-валидация не вмешивается. */
.work-hours-stepper-v15110 [data-hours-input] {
    appearance: none;
    -webkit-appearance: none;
}


/* =========================================================
   v1.5.117 — hours step 1 + top page loading line
   ========================================================= */

/* Часы: кнопки −/+ меняют значение ровно на 1 час. */
.work-hours-stepper-v15110 [data-hours-input] {
    appearance: none;
    -webkit-appearance: none;
}

/* Новый loader: только тонкая линия сверху, без blur/overlay/spinner. */
.app-page-progress-v15117 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: transparent;
}

.app-page-progress-bar-v15117 {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: #159447;
    box-shadow: 0 0 10px rgba(21, 148, 71, .55);
    transform-origin: left center;
}

.is-app-loading-v15113 .app-page-progress-v15117 {
    opacity: 1;
    visibility: visible;
}

.is-app-loading-v15113 .app-page-progress-bar-v15117 {
    animation: app-page-progress-v15117 .30s cubic-bezier(.16, .84, .3, 1) forwards;
}

.app-page-progress-v15117.is-complete-v15117 .app-page-progress-bar-v15117 {
    width: 100% !important;
    animation: none !important;
    transition: width .16s ease-out;
}

@keyframes app-page-progress-v15117 {
    0%   { width: 0; }
    18%  { width: 30%; }
    45%  { width: 58%; }
    72%  { width: 78%; }
    100% { width: 90%; }
}

@media (prefers-reduced-motion: reduce) {
    .is-app-loading-v15113 .app-page-progress-bar-v15117 {
        animation-duration: .18s;
    }
}

/* =========================================================
   v1.5.119 — Движение денег между объектами
   ========================================================= */

.money-flow-page-v15119 {
    display: grid;
    gap: 16px;
}

.money-flow-summary-v15119 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(230px, .92fr);
    gap: 14px;
}

.money-flow-summary-card-v15119,
.money-flow-action-card-v15119 {
    min-width: 0;
    min-height: 132px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.money-flow-summary-card-v15119 {
    padding: 19px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    position: relative;
}

.money-flow-summary-card-v15119::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -55px;
    bottom: -65px;
    border-radius: 50%;
    opacity: .12;
    background: currentColor;
}

.money-flow-summary-card-v15119 > div {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.money-flow-summary-icon-v15119 {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.money-flow-summary-icon-v15119 svg {
    width: 25px;
    height: 25px;
    stroke-width: 2;
}

.money-flow-summary-card-v15119 small,
.money-flow-summary-card-v15119 strong,
.money-flow-summary-card-v15119 p {
    display: block;
}

.money-flow-summary-card-v15119 small {
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
}

.money-flow-summary-card-v15119 strong {
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.1;
    letter-spacing: -.035em;
}

.money-flow-summary-card-v15119 p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.money-flow-summary-card-v15119.is-received-v15119 {
    color: #159447;
    border-color: rgba(21, 148, 71, .28);
    background: linear-gradient(135deg, rgba(21, 148, 71, .10), rgba(21, 148, 71, .02) 62%), var(--surface);
}

.money-flow-summary-card-v15119.is-received-v15119 .money-flow-summary-icon-v15119 {
    color: #159447;
    background: rgba(21, 148, 71, .13);
}

.money-flow-summary-card-v15119.is-distributed-v15119 {
    color: #6f6ee8;
    border-color: rgba(111, 110, 232, .26);
    background: linear-gradient(135deg, rgba(111, 110, 232, .10), rgba(111, 110, 232, .02) 62%), var(--surface);
}

.money-flow-summary-card-v15119.is-distributed-v15119 .money-flow-summary-icon-v15119 {
    color: #6f6ee8;
    background: rgba(111, 110, 232, .13);
}

.money-flow-summary-card-v15119.is-balance-v15119 {
    color: #d09a24;
    border-color: rgba(208, 154, 36, .28);
    background: linear-gradient(135deg, rgba(208, 154, 36, .10), rgba(208, 154, 36, .02) 62%), var(--surface);
}

.money-flow-summary-card-v15119.is-balance-v15119 .money-flow-summary-icon-v15119 {
    color: #d09a24;
    background: rgba(208, 154, 36, .14);
}

.money-flow-action-card-v15119 {
    padding: 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.money-flow-distribute-button-v15119 {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 0;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: #fff;
    background: linear-gradient(135deg, #376df5, #3156e8);
    box-shadow: 0 10px 25px rgba(49, 86, 232, .20);
    cursor: pointer;
    text-align: left;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.money-flow-distribute-button-v15119:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(49, 86, 232, .28);
    filter: brightness(1.03);
}

.money-flow-distribute-button-v15119:disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
}

.money-flow-distribute-button-v15119 > span:first-child {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
}

.money-flow-distribute-button-v15119 > span:last-child {
    min-width: 0;
}

.money-flow-distribute-button-v15119 strong,
.money-flow-distribute-button-v15119 small {
    display: block;
    color: inherit !important;
}

.money-flow-distribute-button-v15119 strong {
    font-size: 16px;
}

.money-flow-distribute-button-v15119 small {
    margin-top: 3px;
    opacity: .76;
    font-size: 11px;
    line-height: 1.35;
}

.money-flow-action-card-v15119 > p {
    margin: 9px 3px 0;
    color: var(--muted);
    font-size: 11px;
}

.money-flow-action-card-v15119 > p strong {
    color: var(--text);
}

.money-flow-layout-v15119 {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .78fr);
    gap: 16px;
    align-items: start;
}

.money-flow-timeline-card-v15119,
.money-flow-chain-card-v15119,
.money-flow-history-card-v15119 {
    padding: 18px;
}

.money-flow-section-head-v15119,
.money-flow-side-head-v15119 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.money-flow-section-head-v15119 > div,
.money-flow-side-head-v15119 {
    min-width: 0;
}

.money-flow-section-head-v15119 > div {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.money-flow-section-icon-v15119,
.money-flow-side-head-v15119 > span {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #6f6ee8;
    background: rgba(111, 110, 232, .10);
}

.money-flow-section-head-v15119 h2,
.money-flow-side-head-v15119 h2 {
    margin: 0;
    font-size: 17px;
}

.money-flow-section-head-v15119 p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.money-flow-head-action-v15119 {
    white-space: nowrap;
}

.money-flow-head-action-v15119 svg {
    width: 16px;
    height: 16px;
}

.money-flow-empty-v15119 {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.money-flow-empty-v15119 > span {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #159447;
    background: rgba(21, 148, 71, .10);
}

.money-flow-empty-v15119 h3 {
    margin: 16px 0 5px;
}

.money-flow-empty-v15119 p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.money-flow-timeline-v15119 {
    margin-top: 20px;
    position: relative;
}

.money-flow-timeline-v15119::before {
    content: "";
    position: absolute;
    top: 23px;
    bottom: 30px;
    left: 20px;
    width: 1px;
    background: var(--border);
}

.money-flow-event-v15119 {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    position: relative;
    padding-bottom: 16px;
}

.money-flow-event-v15119:last-child {
    padding-bottom: 0;
}

.money-flow-event-marker-v15119 {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    border: 5px solid var(--surface);
    box-sizing: border-box;
}

.money-flow-event-marker-v15119 svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.money-flow-event-v15119.is-income-v15119 .money-flow-event-marker-v15119 {
    color: #159447;
    background: rgba(21, 148, 71, .16);
    box-shadow: 0 0 0 1px rgba(21, 148, 71, .22);
}

.money-flow-event-v15119.is-internal-in-v15119 .money-flow-event-marker-v15119,
.money-flow-event-v15119.is-distribution-v15119 .money-flow-event-marker-v15119 {
    color: #7777ef;
    background: rgba(111, 110, 232, .16);
    box-shadow: 0 0 0 1px rgba(111, 110, 232, .22);
}

.money-flow-event-body-v15119 {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.money-flow-event-v15119.is-income-v15119 .money-flow-event-body-v15119 {
    border-color: rgba(21, 148, 71, .28);
    background: linear-gradient(135deg, rgba(21, 148, 71, .065), transparent 48%), var(--surface-soft);
}

.money-flow-event-v15119.is-distribution-v15119 .money-flow-event-body-v15119,
.money-flow-event-v15119.is-internal-in-v15119 .money-flow-event-body-v15119 {
    border-color: rgba(111, 110, 232, .24);
    background: linear-gradient(135deg, rgba(111, 110, 232, .055), transparent 48%), var(--surface-soft);
}

.money-flow-event-head-v15119 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.money-flow-event-head-v15119 time {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
}

.money-flow-event-head-v15119 h3 {
    margin: 0;
    font-size: 15px;
}

.money-flow-event-head-v15119 > strong {
    flex: 0 0 auto;
    font-size: 18px;
    white-space: nowrap;
}

.money-flow-positive-v15119 {
    color: #159447 !important;
}

.money-flow-internal-positive-v15119,
.money-flow-distributed-value-v15119 {
    color: #7777ef !important;
}

.money-flow-event-details-v15119 {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--muted);
    font-size: 11px;
}

.money-flow-event-details-v15119 b {
    color: var(--text);
}

.money-flow-event-note-v15119 {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.money-flow-event-balance-v15119 {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 11px;
}

.money-flow-event-balance-v15119 strong {
    color: #d09a24;
    font-size: 13px;
}

.money-flow-source-link-v15119 {
    margin-top: 11px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color .16s ease, transform .16s ease;
}

.money-flow-source-link-v15119:hover {
    border-color: rgba(111, 110, 232, .45);
    transform: translateY(-1px);
}

.money-flow-source-link-v15119 > span:first-child {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #7777ef;
    background: rgba(111, 110, 232, .11);
}

.money-flow-source-link-v15119 small,
.money-flow-source-link-v15119 strong {
    display: block;
}

.money-flow-source-link-v15119 small {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-source-link-v15119 strong {
    margin-top: 2px;
    font-size: 12px;
}

.money-flow-branch-v15119 {
    margin-top: 14px;
}

.money-flow-branch-source-v15119 {
    width: min(320px, 100%);
    margin: 0 auto;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(111, 110, 232, .34);
    border-radius: 14px;
    background: var(--surface);
    position: relative;
    z-index: 2;
}

.money-flow-branch-source-v15119 > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #7777ef;
    background: rgba(111, 110, 232, .11);
}

.money-flow-branch-source-v15119 small,
.money-flow-branch-source-v15119 strong,
.money-flow-branch-source-v15119 b {
    display: block;
}

.money-flow-branch-source-v15119 small {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-branch-source-v15119 strong {
    font-size: 12px;
}

.money-flow-branch-source-v15119 b {
    margin-top: 2px;
    color: #7777ef;
    font-size: 14px;
}

.money-flow-branch-line-v15119 {
    width: 1px;
    height: 20px;
    margin: 0 auto;
    background: rgba(111, 110, 232, .55);
}

.money-flow-branch-targets-v15119 {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px;
    padding-top: 20px;
}

.money-flow-branch-targets-v15119::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: rgba(111, 110, 232, .48);
}

.money-flow-target-v15119 {
    min-width: 0;
    min-height: 108px;
    padding: 12px;
    border: 1px solid rgba(111, 110, 232, .32);
    border-radius: 13px;
    background: var(--surface);
    position: relative;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.money-flow-target-v15119::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 1px;
    height: 20px;
    background: rgba(111, 110, 232, .48);
}

.money-flow-target-v15119[href]:hover {
    transform: translateY(-2px);
    border-color: rgba(111, 110, 232, .65);
    box-shadow: 0 8px 20px rgba(63, 68, 120, .10);
}

.money-flow-target-icon-v15119 {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #7777ef;
    background: rgba(111, 110, 232, .11);
}

.money-flow-target-icon-v15119 svg {
    width: 15px;
    height: 15px;
}

.money-flow-target-v15119 small,
.money-flow-target-v15119 strong,
.money-flow-target-v15119 b {
    display: block;
}

.money-flow-target-v15119 small {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-target-v15119 strong {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.money-flow-target-v15119 b {
    margin-top: 8px;
    color: #7777ef;
    font-size: 15px;
}

.money-flow-target-v15119.is-remain-v15119 {
    border-color: rgba(208, 154, 36, .34);
}

.money-flow-target-v15119.is-remain-v15119::before {
    background: rgba(208, 154, 36, .48);
}

.money-flow-target-v15119.is-remain-v15119 .money-flow-target-icon-v15119 {
    color: #d09a24;
    background: rgba(208, 154, 36, .12);
}

.money-flow-target-v15119.is-remain-v15119 b {
    color: #d09a24;
}

.money-flow-event-footer-v15119 {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.money-flow-event-footer-v15119 > div > small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.money-flow-event-menu-v15119 {
    position: relative;
    flex: 0 0 auto;
}

.money-flow-event-menu-v15119 summary {
    width: 34px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--muted);
    background: var(--surface);
    cursor: pointer;
    list-style: none;
}

.money-flow-event-menu-v15119 summary::-webkit-details-marker {
    display: none;
}

.money-flow-event-menu-v15119 form {
    position: absolute;
    z-index: 15;
    right: 0;
    top: 36px;
    width: 240px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .15);
}

.money-flow-event-menu-v15119 form p {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.money-flow-event-menu-v15119 form button {
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 9px;
    color: var(--red);
    background: var(--red-soft);
    font-weight: 700;
    cursor: pointer;
}

.money-flow-side-v15119 {
    display: grid;
    gap: 16px;
}

.money-flow-side-head-v15119 {
    justify-content: flex-start;
}

.money-flow-side-head-v15119 > div small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.money-flow-chain-v15119 {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    align-items: center;
}

.money-flow-chain-v15119 > i {
    color: #7777ef;
    font-style: normal;
    font-size: 20px;
}

.money-flow-chain-node-v15119 {
    min-width: 0;
    min-height: 118px;
    padding: 11px 9px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    text-align: center;
}

.money-flow-chain-node-v15119 > span {
    width: 31px;
    height: 31px;
    margin: 0 auto 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--muted);
    background: var(--surface);
}

.money-flow-chain-node-v15119.is-object-v15119 > span,
.money-flow-chain-node-v15119.is-transfer-v15119 > span {
    color: #7777ef;
    background: rgba(111, 110, 232, .11);
}

.money-flow-chain-node-v15119 small,
.money-flow-chain-node-v15119 strong,
.money-flow-chain-node-v15119 b {
    display: block;
}

.money-flow-chain-node-v15119 small {
    color: var(--muted);
    font-size: 9px;
}

.money-flow-chain-node-v15119 strong {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.money-flow-chain-node-v15119 b {
    margin-top: 8px;
    font-size: 11px;
}

.money-flow-chain-node-v15119:first-child b {
    color: #159447;
}

.money-flow-chain-node-v15119.is-transfer-v15119 b {
    color: #7777ef;
}

.money-flow-history-v15119 {
    margin-top: 14px;
}

.money-flow-history-row-v15119 {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.money-flow-history-row-v15119:first-child {
    border-top: 0;
}

.money-flow-history-row-v15119 time {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-history-row-v15119 > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.money-flow-history-row-v15119 > strong {
    font-size: 11px;
    white-space: nowrap;
}

.money-flow-history-row-v15119 > strong.is-plus-v15119 {
    color: #159447 !important;
}

.money-flow-history-row-v15119 > strong.is-minus-v15119 {
    color: #7777ef !important;
}

.money-flow-history-empty-v15119 {
    margin: 18px 0 0;
    color: var(--muted);
}

/* Модальное распределение. */
.money-flow-modal-v15119 {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.money-flow-modal-v15119[hidden] {
    display: none !important;
}

.money-flow-modal-backdrop-v15119 {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.money-flow-modal-dialog-v15119 {
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(16, 24, 40, .24);
}

.money-flow-modal-head-v15119 {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.money-flow-modal-head-v15119 small {
    color: #7777ef;
    font-weight: 700;
}

.money-flow-modal-head-v15119 h3 {
    margin: 3px 0 0;
    font-size: 20px;
}

.money-flow-modal-head-v15119 p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.money-flow-modal-head-v15119 > button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 22px;
    cursor: pointer;
}

.money-flow-modal-v15119 form {
    padding: 16px 20px 20px;
}

.money-flow-form-error-v15119 {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 12px;
}

.money-flow-form-rows-v15119 {
    display: grid;
    gap: 9px;
}

.money-flow-form-row-v15119 {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(150px, .7fr) 34px;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.money-flow-form-row-v15119 label > span {
    display: block;
    margin: 0 0 5px 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.money-flow-form-row-v15119 select,
.money-flow-form-row-v15119 input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 11px;
    color: var(--text);
    background: var(--surface);
    outline: none;
}

.money-flow-form-row-v15119 select:focus,
.money-flow-form-row-v15119 input:focus {
    border-color: rgba(111, 110, 232, .62);
    box-shadow: 0 0 0 3px rgba(111, 110, 232, .10);
}

.money-flow-row-remove-v15119 {
    width: 34px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface);
    font-size: 20px;
    cursor: pointer;
}

.money-flow-form-row-v15119:only-child .money-flow-row-remove-v15119 {
    opacity: .35;
    pointer-events: none;
}

.money-flow-add-row-v15119 {
    margin-top: 10px;
    padding: 0;
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7777ef;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.money-flow-add-row-v15119 svg {
    width: 15px;
    height: 15px;
}

.money-flow-note-v15119 {
    margin-top: 15px;
}

.money-flow-note-v15119 textarea {
    resize: vertical;
}

.money-flow-form-summary-v15119 {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.money-flow-form-summary-v15119 > div {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.money-flow-form-summary-v15119 span,
.money-flow-form-summary-v15119 strong {
    display: block;
}

.money-flow-form-summary-v15119 span {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-form-summary-v15119 strong {
    margin-top: 3px;
    font-size: 13px;
}

.money-flow-form-summary-v15119 > div:nth-child(2) strong {
    color: #7777ef;
}

.money-flow-form-summary-v15119 > div:nth-child(3) strong {
    color: #d09a24;
}

.money-flow-modal-actions-v15119 {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

html[data-theme="dark"] .money-flow-summary-card-v15119,
html[data-theme="dark"] .money-flow-action-card-v15119,
html[data-theme="dark"] .money-flow-event-body-v15119,
html[data-theme="dark"] .money-flow-branch-source-v15119,
html[data-theme="dark"] .money-flow-target-v15119,
html[data-theme="dark"] .money-flow-source-link-v15119,
html[data-theme="dark"] .money-flow-chain-node-v15119,
html[data-theme="dark"] .money-flow-form-row-v15119,
html[data-theme="dark"] .money-flow-form-summary-v15119 > div {
    border-color: #2a3038;
}

html[data-theme="dark"] .money-flow-event-body-v15119,
html[data-theme="dark"] .money-flow-chain-node-v15119,
html[data-theme="dark"] .money-flow-form-row-v15119,
html[data-theme="dark"] .money-flow-form-summary-v15119 > div {
    background-color: #171a20;
}

html[data-theme="dark"] .money-flow-modal-dialog-v15119 {
    background: #171a20;
    border-color: #2a3038;
}

html[data-theme="dark"] .money-flow-modal-head-v15119,
html[data-theme="dark"] .money-flow-modal-actions-v15119,
html[data-theme="dark"] .money-flow-event-footer-v15119,
html[data-theme="dark"] .money-flow-event-balance-v15119,
html[data-theme="dark"] .money-flow-history-row-v15119 {
    border-color: #2a3038;
}

html[data-theme="dark"] .money-flow-modal-head-v15119 > button,
html[data-theme="dark"] .money-flow-row-remove-v15119,
html[data-theme="dark"] .money-flow-source-link-v15119,
html[data-theme="dark"] .money-flow-branch-source-v15119,
html[data-theme="dark"] .money-flow-target-v15119,
html[data-theme="dark"] .money-flow-chain-node-v15119 > span,
html[data-theme="dark"] .money-flow-event-menu-v15119 summary,
html[data-theme="dark"] .money-flow-event-menu-v15119 form {
    background: #20252c;
    border-color: #2a3038;
}

html[data-theme="dark"] .money-flow-form-row-v15119 select,
html[data-theme="dark"] .money-flow-form-row-v15119 input,
html[data-theme="dark"] .money-flow-note-v15119 textarea {
    background: #121317 !important;
    border-color: #2a3038 !important;
}

@media (max-width: 1280px) {
    .money-flow-summary-v15119 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .money-flow-layout-v15119 {
        grid-template-columns: minmax(0, 1fr);
    }

    .money-flow-side-v15119 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .money-flow-summary-v15119,
    .money-flow-side-v15119 {
        grid-template-columns: 1fr;
    }

    .money-flow-summary-card-v15119,
    .money-flow-action-card-v15119 {
        min-height: 112px;
    }

    .money-flow-section-head-v15119 {
        align-items: flex-start;
    }

    .money-flow-head-action-v15119 {
        display: none;
    }

    .money-flow-event-v15119 {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    .money-flow-timeline-v15119::before {
        left: 16px;
    }

    .money-flow-event-marker-v15119 {
        width: 34px;
        height: 34px;
        border-width: 4px;
    }

    .money-flow-event-head-v15119 {
        display: grid;
    }

    .money-flow-event-head-v15119 > strong {
        justify-self: start;
    }

    .money-flow-branch-targets-v15119 {
        grid-template-columns: 1fr 1fr;
    }

    .money-flow-chain-v15119 {
        grid-template-columns: 1fr;
    }

    .money-flow-chain-v15119 > i {
        transform: rotate(90deg);
        justify-self: center;
        line-height: 1;
    }

    .money-flow-form-row-v15119 {
        grid-template-columns: 1fr 38px;
    }

    .money-flow-form-row-v15119 label:first-child {
        grid-column: 1 / -1;
    }

    .money-flow-form-summary-v15119 {
        grid-template-columns: 1fr;
    }

    .money-flow-modal-v15119 {
        padding: 8px;
    }

    .money-flow-modal-dialog-v15119 {
        max-height: calc(100vh - 16px);
        border-radius: 17px;
    }
}

@media (max-width: 520px) {
    .money-flow-summary-card-v15119 {
        padding: 15px;
    }

    .money-flow-summary-icon-v15119 {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .money-flow-timeline-card-v15119,
    .money-flow-chain-card-v15119,
    .money-flow-history-card-v15119 {
        padding: 14px;
    }

    .money-flow-branch-targets-v15119 {
        grid-template-columns: 1fr;
    }

    .money-flow-branch-targets-v15119::before,
    .money-flow-target-v15119::before,
    .money-flow-branch-line-v15119 {
        display: none;
    }

    .money-flow-event-footer-v15119 {
        align-items: flex-start;
    }

    .money-flow-history-row-v15119 {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .money-flow-history-row-v15119 > strong {
        grid-column: 2;
        justify-self: start;
    }
}

/* v1.5.119 — обратные операции остаются в денежной хронологии. */
.money-flow-event-v15119.is-reversal-v15119 .money-flow-event-marker-v15119 {
    color: #d96b6b;
    background: rgba(217, 107, 107, .14);
    box-shadow: 0 0 0 1px rgba(217, 107, 107, .24);
}

.money-flow-event-v15119.is-reversal-v15119 .money-flow-event-body-v15119 {
    border-color: rgba(217, 107, 107, .22);
    background: linear-gradient(135deg, rgba(217, 107, 107, .045), transparent 48%), var(--surface-soft);
}

.money-flow-reversal-negative-v15119 {
    color: #d96b6b !important;
}

.money-flow-reversal-targets-v15119 {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.money-flow-reversal-targets-v15119 > span {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    font-size: 10px;
    font-weight: 700;
}

.money-flow-reversal-author-v15119 {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
}

.money-flow-voided-badge-v15119 {
    display: inline-flex;
    width: fit-content;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #d96b6b;
    background: rgba(217, 107, 107, .10);
    font-size: 9px;
    font-weight: 800;
}

html[data-theme="dark"] .money-flow-event-v15119.is-reversal-v15119 .money-flow-event-body-v15119,
html[data-theme="dark"] .money-flow-reversal-targets-v15119 > span {
    border-color: #2a3038;
    background-color: #171a20;
}

.money-flow-summary-card-v15119.is-received-v15119 > div > strong {
    color: #159447 !important;
}

.money-flow-summary-card-v15119.is-distributed-v15119 > div > strong {
    color: #7777ef !important;
}

.money-flow-summary-card-v15119.is-balance-v15119 > div > strong,
.money-flow-event-balance-v15119 strong {
    color: #d09a24 !important;
}

/* =========================================================
   v1.5.121 — упрощённое «Движение денег» + комментарии/фото
   ========================================================= */
.money-flow-summary-v15119 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.money-flow-summary-card-v15119 {
    min-height: 108px;
    padding: 16px 18px;
    display: block;
    color: var(--text);
    background: var(--surface) !important;
    border-color: var(--border) !important;
    box-shadow: none;
}

.money-flow-summary-card-v15119::after,
.money-flow-summary-icon-v15119 {
    display: none !important;
}

.money-flow-summary-card-v15119.is-received-v15119,
.money-flow-summary-card-v15119.is-distributed-v15119,
.money-flow-summary-card-v15119.is-balance-v15119 {
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

.money-flow-summary-card-v15119 small {
    color: var(--muted);
}

.money-flow-summary-card-v15119.is-received-v15119 strong {
    color: #159447 !important;
}

.money-flow-summary-card-v15119.is-distributed-v15119 strong {
    color: #7777ef !important;
}

.money-flow-summary-card-v15119.is-balance-v15119 strong {
    color: #d09a24 !important;
}

.money-flow-event-v15119.is-income-v15119 .money-flow-event-body-v15119,
.money-flow-event-v15119.is-distribution-v15119 .money-flow-event-body-v15119,
.money-flow-event-v15119.is-internal-in-v15119 .money-flow-event-body-v15119,
.money-flow-event-v15119.is-reversal-v15119 .money-flow-event-body-v15119 {
    background: var(--surface-soft) !important;
    background-image: none !important;
}

.money-flow-branch-source-v15119 {
    min-height: 82px;
    display: flex;
    align-items: center;
}

.money-flow-branch-source-v15119 > div {
    min-width: 0;
    width: 100%;
}

.money-flow-branch-source-v15119 strong {
    white-space: normal;
}

.money-flow-branch-source-v15119 b {
    color: #7777ef !important;
}

.money-flow-target-v15119 {
    min-height: 0;
    padding: 0;
    overflow: visible;
}

.money-flow-target-main-v15121 {
    display: block;
    min-width: 0;
    padding: 12px;
    color: inherit;
    text-decoration: none;
}

.money-flow-target-main-v15121 small,
.money-flow-target-main-v15121 strong,
.money-flow-target-main-v15121 b {
    display: block;
}

.money-flow-target-main-v15121 small {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-target-main-v15121 strong {
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 12px;
}

.money-flow-target-main-v15121 b {
    margin-top: 8px;
    color: #7777ef;
    font-size: 15px;
}

.money-flow-target-v15119.is-self-v15121 {
    border-color: rgba(21, 148, 71, .34);
}

.money-flow-target-v15119.is-self-v15121 .money-flow-target-main-v15121 b {
    color: #159447;
}

.money-flow-target-extra-v15121 {
    min-height: 36px;
    padding: 9px 10px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.money-flow-target-extra-v15121 p {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.money-flow-photo-button-v15121 {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7777ef;
    background: var(--surface);
    cursor: pointer;
}

.money-flow-photo-button-v15121 svg {
    width: 15px;
    height: 15px;
}

.money-flow-event-note-v15119 + .money-flow-photo-button-v15121,
.money-flow-source-link-v15119 + .money-flow-photo-button-v15121 {
    margin-top: 9px;
}

.money-flow-event-footer-v15119 {
    align-items: center;
}

.money-flow-event-meta-line-v15121 {
    min-width: 0;
}

.money-flow-event-meta-line-v15121 small {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.money-flow-event-footer-right-v15121 {
    min-width: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.money-flow-event-remaining-v15121 {
    display: flex;
    align-items: baseline;
    gap: 7px;
    text-align: right;
}

.money-flow-event-remaining-v15121 span {
    color: var(--muted);
    font-size: 10px;
}

.money-flow-event-remaining-v15121 strong {
    color: #d09a24 !important;
    font-size: 13px;
    white-space: nowrap;
}

.money-flow-form-row-v15119 {
    grid-template-columns: minmax(0, 1.45fr) minmax(150px, .7fr) 34px;
    align-items: start;
}

.money-flow-row-comment-v15121 {
    grid-column: 1 / 3;
}

.money-flow-row-photo-v15121 {
    grid-column: 1 / 3;
}

.money-flow-form-row-v15119 textarea {
    width: 100%;
    min-height: 70px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface);
    outline: none;
    resize: vertical;
}

.money-flow-row-photo-v15121 input[type="file"] {
    width: 100%;
    min-height: 42px;
    height: auto;
    padding: 7px 9px;
    cursor: pointer;
}

.money-flow-row-photo-v15121 small {
    display: block;
    margin: 5px 0 0 2px;
    color: var(--muted);
    font-size: 9px;
}

.money-flow-form-row-v15119 textarea:focus {
    border-color: rgba(111, 110, 232, .62);
    box-shadow: 0 0 0 3px rgba(111, 110, 232, .10);
}

html[data-theme="dark"] .money-flow-summary-card-v15119 {
    background: #171a20 !important;
    border-color: #2a3038 !important;
}

html[data-theme="dark"] .money-flow-target-extra-v15121,
html[data-theme="dark"] .money-flow-photo-button-v15121 {
    border-color: #2a3038;
}

html[data-theme="dark"] .money-flow-photo-button-v15121 {
    background: #20252c;
}

html[data-theme="dark"] .money-flow-form-row-v15119 textarea,
html[data-theme="dark"] .money-flow-row-photo-v15121 input[type="file"] {
    background: #121317 !important;
    border-color: #2a3038 !important;
    color: #f2f4f7;
}

@media (max-width: 760px) {
    .money-flow-summary-v15119 {
        grid-template-columns: 1fr;
    }

    .money-flow-row-comment-v15121,
    .money-flow-row-photo-v15121 {
        grid-column: 1 / -1;
    }

    .money-flow-event-footer-v15119,
    .money-flow-event-footer-right-v15121 {
        align-items: flex-start;
    }

    .money-flow-event-footer-v15119 {
        flex-direction: column;
    }

    .money-flow-event-footer-right-v15121 {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .money-flow-event-remaining-v15121 {
        text-align: left;
        flex-wrap: wrap;
    }
}

/* =========================================================
   v1.5.122 — приглушённые отменённые внутренние операции
   ========================================================= */
.money-flow-event-v15119.is-muted-reversal-v15122 {
    opacity: .62;
}

.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-body-v15119 {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-marker-v15119 {
    background: transparent !important;
    box-shadow: none !important;
    color: var(--muted) !important;
}

.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-source-link-v15119,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-reversal-targets-v15119 > span {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-head-v15119 h3,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-head-v15119 time,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-reversal-negative-v15119,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-positive-v15119,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-reversal-author-v15119,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-balance-v15119,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-balance-v15119 strong {
    color: var(--muted) !important;
}

html[data-theme="dark"] .money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-body-v15119,
html[data-theme="dark"] .money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-source-link-v15119,
html[data-theme="dark"] .money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-reversal-targets-v15119 > span {
    background: transparent !important;
    border-color: transparent !important;
}


/* =========================================================
   v1.5.124 — спокойные отмены + рамки в цвет блоков money flow
   ========================================================= */
/* В основных блоках «Движение денег» рамка совпадает с фоном. */
.money-flow-summary-card-v15119,
.money-flow-timeline-card-v15119,
.money-flow-chain-card-v15119,
.money-flow-history-card-v15119 {
    border-color: var(--surface) !important;
}

.money-flow-event-body-v15119,
.money-flow-chain-node-v15119,
.money-flow-form-row-v15119,
.money-flow-form-summary-v15119 > div {
    border-color: var(--surface-soft) !important;
}

.money-flow-source-link-v15119,
.money-flow-branch-source-v15119,
.money-flow-target-v15119 {
    border-color: var(--surface) !important;
}

/* Self/остаток сохраняют цвет суммы, но без отдельной цветной рамки. */
.money-flow-target-v15119.is-self-v15121,
.money-flow-target-v15119.is-remain-v15119 {
    border-color: var(--surface) !important;
}

/* Возвращаем заливку отменённым внутренним операциям, оставляя их приглушёнными. */
.money-flow-event-v15119.is-muted-reversal-v15122 {
    opacity: .72;
}

.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-body-v15119 {
    background: #f5f6f8 !important;
    border-color: #f5f6f8 !important;
    box-shadow: none !important;
}

.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-source-link-v15119,
.money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-reversal-targets-v15119 > span {
    background: #eef0f3 !important;
    border-color: #eef0f3 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .money-flow-summary-card-v15119,
html[data-theme="dark"] .money-flow-timeline-card-v15119,
html[data-theme="dark"] .money-flow-chain-card-v15119,
html[data-theme="dark"] .money-flow-history-card-v15119,
html[data-theme="dark"] .money-flow-event-body-v15119,
html[data-theme="dark"] .money-flow-chain-node-v15119,
html[data-theme="dark"] .money-flow-form-row-v15119,
html[data-theme="dark"] .money-flow-form-summary-v15119 > div {
    border-color: #171a20 !important;
}

html[data-theme="dark"] .money-flow-source-link-v15119,
html[data-theme="dark"] .money-flow-branch-source-v15119,
html[data-theme="dark"] .money-flow-target-v15119,
html[data-theme="dark"] .money-flow-target-v15119.is-self-v15121,
html[data-theme="dark"] .money-flow-target-v15119.is-remain-v15119 {
    border-color: #20252c !important;
}

html[data-theme="dark"] .money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-event-body-v15119 {
    background: #171a20 !important;
    border-color: #171a20 !important;
}

html[data-theme="dark"] .money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-source-link-v15119,
html[data-theme="dark"] .money-flow-event-v15119.is-muted-reversal-v15122 .money-flow-reversal-targets-v15119 > span {
    background: #20252c !important;
    border-color: #20252c !important;
}

/* =========================================================
   v1.5.127 — вкладки поступлений в «Движении денег»
   Остальное оформление раздела не меняем.
   ========================================================= */
.money-flow-tabs-v15127 {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.money-flow-tab-v15127 {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.money-flow-tab-v15127 strong {
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

.money-flow-tab-v15127 span {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.money-flow-tab-v15127:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.money-flow-tab-v15127.is-active-v15127 {
    background: var(--surface-soft);
    border-color: var(--surface-soft);
    color: var(--text);
}

html[data-theme="dark"] .money-flow-tab-v15127 {
    background: #171a20;
    border-color: #171a20;
    color: #aeb6c4;
}

html[data-theme="dark"] .money-flow-tab-v15127 span {
    color: #f2f4f7;
}

html[data-theme="dark"] .money-flow-tab-v15127:hover,
html[data-theme="dark"] .money-flow-tab-v15127.is-active-v15127 {
    background: #20252c;
    border-color: #20252c;
    color: #f2f4f7;
}

@media (max-width: 760px) {
    .money-flow-tabs-v15127 {
        margin-bottom: 12px;
    }

    .money-flow-tab-v15127 {
        min-height: 40px;
        padding: 8px 11px;
    }
}


/* =========================================================
   v1.5.128 — компактная хронология распределения
   Только внутри вкладки конкретного транша.
   Общий режим «Все движения» не меняется.
   ========================================================= */
.money-flow-event-v15119.is-tranche-distribution-v15128 {
    padding: 0;
    overflow: visible;
}

.money-flow-event-v15119.is-tranche-distribution-v15128 .money-flow-event-body-v15119 {
    min-width: 0;
    width: 100%;
    padding: 0;
}

.money-flow-tranche-status-v15128 {
    padding: 12px 14px 0;
}

.money-flow-tranche-history-v15128 {
    position: relative;
    padding: 2px 14px 0;
}

.money-flow-tranche-history-v15128::before {
    content: "";
    position: absolute;
    top: 25px;
    bottom: 27px;
    left: 23px;
    width: 2px;
    border-radius: 2px;
    background: rgba(61, 207, 145, .58);
}

.money-flow-tranche-row-v15128 {
    position: relative;
    display: grid;
    grid-template-columns: 20px 150px 32px minmax(180px, 1fr) auto 58px;
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.money-flow-tranche-dot-v15128 {
    position: relative;
    z-index: 2;
    width: 14px;
    height: 14px;
    justify-self: center;
    border-radius: 50%;
    background: #54dda2;
    box-shadow: 0 0 0 3px var(--surface);
}

.money-flow-tranche-row-v15128 time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.money-flow-tranche-arrow-v15128 {
    color: var(--muted);
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    text-align: center;
}

.money-flow-tranche-target-v15128 {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.money-flow-tranche-target-v15128 strong,
.money-flow-tranche-target-v15128 small {
    display: block;
}

.money-flow-tranche-target-v15128 strong {
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.money-flow-tranche-target-v15128 small {
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.money-flow-tranche-target-v15128:hover strong {
    text-decoration: underline;
}

.money-flow-tranche-amount-v15128 {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.money-flow-tranche-photo-v15128 {
    width: 52px;
    height: 52px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: var(--surface-soft);
    cursor: pointer;
}

.money-flow-tranche-photo-v15128 img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.money-flow-tranche-photo-placeholder-v15128 {
    width: 52px;
    height: 1px;
}

.money-flow-tranche-remain-v15128 {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 9px 0 11px;
}

.money-flow-tranche-dot-v15128.is-remain-v15128 {
    background: #f3c53d;
}

.money-flow-tranche-remain-v15128 > strong {
    color: var(--text);
    font-size: 14px;
}

.money-flow-tranche-remain-v15128 > b {
    color: #e8bd2f;
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}

.money-flow-tranche-footer-v15128 {
    margin-top: 0;
    padding: 11px 14px 12px;
}

html[data-theme="dark"] .money-flow-tranche-dot-v15128 {
    box-shadow: 0 0 0 3px #171a20;
}

html[data-theme="dark"] .money-flow-tranche-row-v15128 {
    border-color: #2a3038;
}

html[data-theme="dark"] .money-flow-tranche-photo-v15128 {
    background: #20252c;
}

@media (max-width: 900px) {
    .money-flow-tranche-row-v15128 {
        grid-template-columns: 20px 112px 24px minmax(140px, 1fr) auto 50px;
        gap: 8px;
    }

    .money-flow-tranche-photo-v15128,
    .money-flow-tranche-photo-placeholder-v15128 {
        width: 46px;
    }

    .money-flow-tranche-photo-v15128 {
        height: 46px;
    }
}

@media (max-width: 680px) {
    .money-flow-tranche-history-v15128 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .money-flow-tranche-history-v15128::before {
        left: 19px;
    }

    .money-flow-tranche-row-v15128 {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        gap: 8px 10px;
        min-height: 0;
        padding: 13px 0;
    }

    .money-flow-tranche-row-v15128 time {
        grid-column: 2;
        grid-row: 1;
    }

    .money-flow-tranche-arrow-v15128 {
        display: none;
    }

    .money-flow-tranche-target-v15128 {
        grid-column: 2;
        grid-row: 2;
    }

    .money-flow-tranche-amount-v15128 {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
        font-size: 14px;
    }

    .money-flow-tranche-photo-v15128,
    .money-flow-tranche-photo-placeholder-v15128 {
        grid-column: 2;
        grid-row: 3;
        width: 44px;
    }

    .money-flow-tranche-photo-v15128 {
        height: 44px;
    }

    .money-flow-tranche-remain-v15128 {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .money-flow-tranche-remain-v15128 > b {
        font-size: 16px;
    }

    .money-flow-tranche-footer-v15128 {
        align-items: flex-start;
    }
}


/* =========================================================
   v1.5.130 — исправление вкладки транша в движении денег
   ========================================================= */
.money-flow-timeline-v15119.is-source-filtered-v15130 {
    display: grid;
    gap: 16px;
}

.money-flow-timeline-v15119.is-source-filtered-v15130::before {
    display: none;
}

.money-flow-timeline-v15119.is-source-filtered-v15130 > .money-flow-event-v15119 {
    padding-bottom: 0;
}

.money-flow-event-v15119.is-tranche-distribution-v15128 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    z-index: 1;
}

.money-flow-event-v15119.is-tranche-distribution-v15128 + .money-flow-event-v15119 {
    margin-top: 2px;
}

.money-flow-event-v15119.is-tranche-distribution-v15128 .money-flow-event-body-v15119 {
    position: relative;
    overflow: hidden;
}

.money-flow-tranche-history-v15128 {
    position: relative;
    z-index: 1;
}

.money-flow-tranche-row-v15128,
.money-flow-tranche-remain-v15128 {
    position: relative;
    z-index: 1;
}

.money-flow-tranche-footer-v15128 {
    position: relative;
    z-index: 2;
    align-items: flex-start;
}

.money-flow-timeline-v15119.is-source-filtered-v15130 .money-flow-event-v15119.is-income-v15119 .money-flow-event-marker-v15119,
.money-flow-timeline-v15119.is-source-filtered-v15130 .money-flow-event-v15119.is-reversal-v15119 .money-flow-event-marker-v15119,
.money-flow-timeline-v15119.is-source-filtered-v15130 .money-flow-event-v15119.is-internal-in-v15119 .money-flow-event-marker-v15119,
.money-flow-timeline-v15119.is-source-filtered-v15130 .money-flow-event-v15119.is-distribution-v15119:not(.is-tranche-distribution-v15128) .money-flow-event-marker-v15119 {
    border-width: 5px;
}

@media (max-width: 760px) {
    .money-flow-tranche-footer-v15128 {
        gap: 8px;
    }
}


/* =========================================================
   v1.5.131 — единая цепочка распределений выбранного транша
   ========================================================= */
.money-flow-event-v15119.is-tranche-chain-v15131 {
    margin: 0;
}

.money-flow-event-v15119.is-tranche-chain-v15131 .money-flow-event-body-v15119 {
    overflow: visible;
}

.money-flow-tranche-history-unified-v15131 {
    padding-top: 2px;
    padding-bottom: 0;
}

.money-flow-tranche-history-unified-v15131::before {
    top: 25px;
    bottom: 31px;
}

.money-flow-tranche-batch-meta-v15131 {
    position: relative;
    z-index: 3;
    min-height: 30px;
    margin: 0 0 0 32px;
    padding: 5px 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.money-flow-tranche-batch-meta-v15131 small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.money-flow-tranche-batch-meta-v15131 .money-flow-event-menu-v15119 {
    z-index: 8;
}

.money-flow-tranche-row-v15128.is-voided-v15131 {
    opacity: .58;
}

.money-flow-tranche-voided-text-v15131 {
    color: var(--muted) !important;
    font-size: 10px !important;
}

.money-flow-tranche-remain-final-v15131 {
    margin-top: 0;
}

@media (max-width: 680px) {
    .money-flow-tranche-batch-meta-v15131 {
        margin-left: 28px;
        align-items: flex-start;
    }
}


/* =========================================================
   v1.5.132 — отмена отдельных строк распределения
   ========================================================= */
.money-flow-tranche-row-v15128 {
    grid-template-columns: 20px 178px 32px minmax(180px, 1fr) auto 58px;
    overflow: visible;
}

.money-flow-tranche-action-v15132 {
    position: relative;
    z-index: 12;
    width: 20px;
    min-width: 20px;
    justify-self: center;
    align-self: center;
}

.money-flow-tranche-void-v15132 {
    position: relative;
    width: 20px;
    height: 20px;
}

.money-flow-tranche-void-v15132 > summary {
    list-style: none;
    cursor: pointer;
}

.money-flow-tranche-void-v15132 > summary::-webkit-details-marker {
    display: none;
}

.money-flow-tranche-void-v15132 > summary.money-flow-tranche-dot-v15128 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin: 3px auto;
    padding: 0;
    border: 0;
    outline: 0;
    cursor: pointer;
    color: transparent;
    transition: background .16s ease, transform .16s ease, color .16s ease;
}

.money-flow-tranche-void-v15132 > summary.money-flow-tranche-dot-v15128::after {
    content: "×";
    display: block;
    color: transparent;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-.5px);
}

.money-flow-tranche-void-v15132 > summary.money-flow-tranche-dot-v15128:hover,
.money-flow-tranche-void-v15132[open] > summary.money-flow-tranche-dot-v15128 {
    background: #7f8792;
    transform: scale(1.12);
}

.money-flow-tranche-void-v15132 > summary.money-flow-tranche-dot-v15128:hover::after,
.money-flow-tranche-void-v15132[open] > summary.money-flow-tranche-dot-v15128::after {
    color: #fff;
}

.money-flow-tranche-void-v15132 form {
    position: absolute;
    z-index: 30;
    top: 25px;
    left: 0;
    width: 220px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .20);
}

.money-flow-tranche-void-v15132 form p {
    margin: 0 0 9px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
}

.money-flow-tranche-void-v15132 form button {
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #7b4247;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.money-flow-tranche-date-v15132 {
    min-width: 0;
    align-self: center;
}

.money-flow-tranche-date-v15132 time,
.money-flow-tranche-date-v15132 small {
    display: block;
}

.money-flow-tranche-date-v15132 small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
    white-space: normal;
}

.money-flow-tranche-void-meta-v15132 {
    margin-top: 3px !important;
    color: #8a9099 !important;
}

.money-flow-tranche-dot-v15128.is-voided-v15132 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #f2f4f7;
    background: #777f89;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 3px var(--surface);
}

.money-flow-tranche-row-v15128.is-voided-v15132::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 9px;
    width: 2px;
    background: #6f7781;
}

.money-flow-tranche-row-v15128.is-voided-v15132 time,
.money-flow-tranche-row-v15128.is-voided-v15132 .money-flow-tranche-target-v15128 strong,
.money-flow-tranche-row-v15128.is-voided-v15132 .money-flow-tranche-target-v15128 > small,
.money-flow-tranche-row-v15128.is-voided-v15132 .money-flow-tranche-amount-v15128,
.money-flow-tranche-row-v15128.is-voided-v15132 .money-flow-tranche-arrow-v15128 {
    color: var(--muted) !important;
    text-decoration: line-through;
    opacity: .68;
}

.money-flow-tranche-row-v15128.is-voided-v15132 .money-flow-tranche-photo-v15128 {
    filter: grayscale(1);
    opacity: .55;
}

html[data-theme="dark"] .money-flow-tranche-dot-v15128.is-voided-v15132 {
    box-shadow: 0 0 0 3px #171a20;
}

html[data-theme="dark"] .money-flow-tranche-void-v15132 form {
    border-color: #2a3038;
    background: #171a20;
}

/* В общем режиме отменённая отдельная строка тоже остаётся видимой, но приглушённой. */
.money-flow-target-v15119.is-voided-v15132 {
    opacity: .58;
}

.money-flow-target-v15119.is-voided-v15132 .money-flow-target-main-v15121,
.money-flow-target-v15119.is-voided-v15132 .money-flow-target-extra-v15121 p {
    text-decoration: line-through;
}

.money-flow-target-voided-v15132 {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

/* Комментарий + фото одной строкой в форме распределения. */
.money-flow-row-comment-v15121 {
    grid-column: 1 / 2;
}

.money-flow-row-photo-v15121 {
    grid-column: 2 / 3;
}

.money-flow-row-photo-v15121 input[type="file"] {
    min-width: 0;
}

@media (max-width: 900px) {
    .money-flow-tranche-row-v15128 {
        grid-template-columns: 20px 150px 28px minmax(140px, 1fr) auto 50px;
    }
}

@media (max-width: 760px) {
    .money-flow-row-comment-v15121,
    .money-flow-row-photo-v15121 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .money-flow-tranche-row-v15128 {
        grid-template-columns: 18px minmax(0, 1fr) auto;
    }

    .money-flow-tranche-action-v15132 {
        grid-column: 1;
        grid-row: 1 / span 3;
        align-self: start;
        margin-top: 2px;
    }

    .money-flow-tranche-date-v15132 {
        grid-column: 2;
        grid-row: 1;
    }

    .money-flow-tranche-target-v15128 {
        grid-column: 2;
        grid-row: 2;
    }

    .money-flow-tranche-amount-v15128 {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .money-flow-tranche-photo-v15128,
    .money-flow-tranche-photo-placeholder-v15128 {
        grid-column: 2;
        grid-row: 3;
    }

    .money-flow-tranche-row-v15128.is-voided-v15132::before {
        left: 8px;
    }

    .money-flow-tranche-void-v15132 form {
        left: 20px;
        top: 0;
    }
}


/* =========================================================
   v1.5.133 — единая цепочка транша + исправление аннулирования
   ========================================================= */
.money-flow-event-v15119.is-tranche-complete-v15133 .money-flow-event-body-v15119,
.money-flow-event-v15119.is-tranche-distribution-v15128 .money-flow-event-body-v15119 {
    overflow: visible !important;
}

.money-flow-event-v15119.is-tranche-complete-v15133,
.money-flow-event-v15119.is-tranche-complete-v15133 .money-flow-tranche-history-v15128,
.money-flow-event-v15119.is-tranche-complete-v15133 .money-flow-tranche-row-v15128 {
    overflow: visible !important;
}

.money-flow-tranche-history-unified-v15131::before {
    top: 29px;
    bottom: 41px;
}

.money-flow-tranche-income-v15133 {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--border);
}

.money-flow-tranche-income-dot-v15133 {
    position: relative;
    z-index: 3;
    width: 16px;
    height: 16px;
    justify-self: center;
    border-radius: 50%;
    background: #29b765;
    box-shadow: 0 0 0 3px var(--surface);
}

.money-flow-tranche-income-copy-v15133 {
    min-width: 0;
}

.money-flow-tranche-income-title-v15133 {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-width: 0;
    flex-wrap: wrap;
}

.money-flow-tranche-income-title-v15133 strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.money-flow-tranche-income-title-v15133 time {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.money-flow-tranche-income-copy-v15133 > small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.money-flow-tranche-income-amount-v15133 {
    color: #159447;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
}

/* Открытая строка должна лежать выше соседних строк — иначе окно подтверждения перекрывается. */
.money-flow-tranche-row-v15128:has(.money-flow-tranche-void-v15132[open]) {
    z-index: 120 !important;
}

.money-flow-tranche-void-v15132[open] {
    z-index: 140;
}

.money-flow-tranche-void-v15132 form {
    z-index: 160 !important;
    pointer-events: auto !important;
}

.money-flow-tranche-void-v15132 form button {
    position: relative;
    z-index: 1;
    pointer-events: auto !important;
}

html[data-theme="dark"] .money-flow-tranche-income-dot-v15133 {
    box-shadow: 0 0 0 3px #171a20;
}

html[data-theme="dark"] .money-flow-tranche-income-v15133 {
    border-color: #2a3038;
}

/* После удаления карточки «Цепочка денег» правая колонка начинается сразу с истории операций. */
.money-flow-side-v15119 > .money-flow-history-card-v15119:first-child {
    margin-top: 0;
}

@media (max-width: 680px) {
    .money-flow-tranche-income-v15133 {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .money-flow-tranche-income-title-v15133 {
        gap: 5px 8px;
    }

    .money-flow-tranche-income-amount-v15133 {
        font-size: 15px;
    }
}


/* =========================================================
   v1.5.134 — вкладки траншей / с других объектов + «Другое»
   ========================================================= */
.money-flow-self-total-v15134 {
    margin-top: 5px !important;
}

.money-flow-self-total-v15134 b {
    color: var(--text);
    font-weight: 700;
}

.money-flow-tranche-income-note-v15134 {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.money-flow-tranche-target-v15128.is-other-v15134 {
    cursor: default;
}

.money-flow-target-v15119.is-other-v15134 .money-flow-target-main-v15121 {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Цепочка читается снизу вверх: поступление находится внизу, новые расходы — сверху. */
.money-flow-tranche-history-unified-v15131 {
    display: flex;
    flex-direction: column;
}

.money-flow-tranche-income-v15133 {
    order: 9999;
}

.money-flow-tranche-income-amount-v15133 {
    color: #159447 !important;
}

/* «С других объектов» использует обычную хронологию, но без внешней общей линии поверх карточек. */
.money-flow-timeline-v15119.is-source-filtered-v15130 > .money-flow-event-v15119 {
    width: 100%;
}


/* =========================================================
   v1.5.135 — вкладки суммой + детализация распределения + даты оплаты
   ========================================================= */
.money-flow-tab-v15127 .money-flow-tab-amount-v15135 {
    color: #159447 !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.01em;
}

html[data-theme="dark"] .money-flow-tab-v15127 .money-flow-tab-amount-v15135,
html[data-theme="dark"] .money-flow-tab-v15127.is-active-v15127 .money-flow-tab-amount-v15135 {
    color: #34c979 !important;
}

.money-flow-breakdown-title-v15135 {
    margin-top: 6px !important;
    margin-bottom: 2px !important;
    color: var(--muted) !important;
    font-size: 10px !important;
    font-weight: 650;
}

.money-flow-breakdown-row-v15135 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 3px !important;
}

.money-flow-breakdown-row-v15135 span {
    color: var(--muted);
}

.money-flow-breakdown-row-v15135 b {
    flex: 0 0 auto;
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.payment-history-paid-date-v15135 {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
    color: #8a93a4;
    font-size: 9px;
    line-height: 1.2;
}

.payment-history-paid-date-v15135 span,
.payment-history-paid-date-v15135 b {
    display: inline !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: 500;
}

.payment-history-paid-date-v15135 b {
    color: var(--text) !important;
    font-weight: 650;
}

.payment-history-voided-meta-v15135 {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.payment-history-voided-meta-v15135 > small {
    display: block !important;
    margin: 0 !important;
    color: #8a93a4 !important;
    font-size: 8px !important;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
}

/* Аннулированная оплата: вся запись серая и зачеркнутая,
   но сам бейдж «Аннулирован» и дата аннулирования остаются обычными. */
.payment-history-item.payment-history-item-v1534.is-voided {
    opacity: 1 !important;
    border-radius: 10px;
    background: rgba(128, 136, 150, .08);
}

.payment-history-item-v1534.is-voided .payment-history-main-v1534,
.payment-history-item-v1534.is-voided .payment-history-paid-date-v15135,
.payment-history-item-v1534.is-voided .payment-history-meta-v1534 {
    color: #8a93a4 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.payment-history-item-v1534.is-voided .payment-history-main-v1534 *,
.payment-history-item-v1534.is-voided .payment-history-paid-date-v15135 *,
.payment-history-item-v1534.is-voided .payment-history-meta-v1534 * {
    color: #8a93a4 !important;
}

.payment-history-item-v1534.is-voided .payment-receipt-icon-v1532 {
    opacity: .45;
    filter: grayscale(1);
}

.payment-history-item-v1534.is-voided .voided-label,
.payment-history-item-v1534.is-voided .payment-history-voided-meta-v15135,
.payment-history-item-v1534.is-voided .payment-history-voided-meta-v15135 * {
    text-decoration: none !important;
}

html[data-theme="dark"] .payment-history-item.payment-history-item-v1534.is-voided {
    background: #171a20;
}

@media (max-width: 760px) {
    .money-flow-breakdown-row-v15135 {
        gap: 6px;
    }

    .payment-history-side-v1534 {
        flex-wrap: wrap;
    }

    .payment-history-paid-date-v15135 {
        font-size: 8px;
    }
}


/* =========================================================
   v1.5.136 — дата оплаты и аннулирование внутренних поступлений
   ========================================================= */
.payment-history-primary-meta-v15136 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    color: #8a93a4;
    font-size: 10px;
    line-height: 1.25;
}

.payment-history-primary-meta-v15136 span {
    color: inherit;
}

.payment-history-primary-meta-separator-v15136 {
    opacity: .7;
}

.payment-history-main-v1534 .payment-history-note-v1534 {
    display: block;
    margin-top: 2px !important;
}

.payment-history-item-v1534.is-voided .payment-history-primary-meta-v15136,
.payment-history-item-v1534.is-voided .payment-history-primary-meta-v15136 * {
    color: #8a93a4 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-event-marker-v15119 {
    color: #8a93a4 !important;
    background: rgba(128, 136, 150, .14) !important;
    box-shadow: 0 0 0 1px rgba(128, 136, 150, .30) !important;
    font-size: 17px;
    font-weight: 700;
}

.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-event-body-v15119 {
    border-color: rgba(128, 136, 150, .24) !important;
    background: rgba(128, 136, 150, .08) !important;
}

.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-internal-active-content-v15136 {
    color: #8a93a4 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-internal-active-content-v15136 *,
.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-internal-positive-v15119 {
    color: #8a93a4 !important;
}

.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-source-link-v15119,
.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-photo-button-v15121 {
    opacity: .55;
    filter: grayscale(1);
}

.money-flow-internal-void-meta-v15136 {
    display: block;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
    color: #8a93a4;
    font-size: 10px;
    line-height: 1.35;
    text-decoration: none !important;
}

html[data-theme="dark"] .money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-event-body-v15119 {
    background: #171a20 !important;
    border-color: #2a3038 !important;
}

@media (max-width: 700px) {
    .payment-history-primary-meta-v15136 {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 9px;
    }
}


/* =========================================================
   v1.5.137 — внутренние поступления + визуальная связь вкладки
   ========================================================= */
.money-flow-page-v15119 {
    position: relative;
}

.money-flow-active-tab-connector-v15137 {
    position: absolute;
    z-index: 0;
    display: block;
    width: 0;
    border-left: 1px dashed rgba(61, 207, 145, .58);
    pointer-events: none;
}

.money-flow-tabs-v15127,
.money-flow-summary-v15119,
.money-flow-layout-v15119 {
    position: relative;
    z-index: 1;
}

.money-flow-internal-count-v15137 {
    margin-left: auto;
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    color: var(--muted);
    white-space: nowrap;
}

.money-flow-internal-count-v15137 span {
    font-size: 11px;
}

.money-flow-internal-count-v15137 strong {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.money-flow-internal-headline-v15137 {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.money-flow-internal-headline-v15137 h3 {
    margin: 0;
    font-size: 15px;
}

.money-flow-event-head-v15119 .money-flow-internal-headline-v15137 time {
    display: inline;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.money-flow-source-row-v15137 {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 10px;
}

.money-flow-source-row-v15137 .money-flow-source-link-v15119 {
    min-width: 0;
    flex: 1 1 auto;
    margin-top: 0;
}

.money-flow-source-photo-v15137 {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    cursor: pointer;
}

.money-flow-source-photo-v15137 img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.money-flow-event-v15119.is-internal-in-v15119.is-voided-v15136 .money-flow-source-photo-v15137 {
    opacity: .5;
    filter: grayscale(1);
}

.money-flow-history-row-v15119.is-internal-voided-v15137 > time,
.money-flow-history-row-v15119.is-internal-voided-v15137 .money-flow-history-main-v15137,
.money-flow-history-row-v15119.is-internal-voided-v15137 > strong {
    color: #8a93a4 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.money-flow-history-main-v15137 {
    display: block;
}

.money-flow-history-void-meta-v15137 {
    display: block;
    margin-top: 3px;
    color: #8a93a4;
    font-size: 9px;
    line-height: 1.3;
    text-decoration: none !important;
}

html[data-theme="dark"] .money-flow-source-photo-v15137 {
    border-color: #2a3038;
    background: #20252c;
}

@media (max-width: 760px) {
    .money-flow-internal-count-v15137 span {
        display: none;
    }

    .money-flow-internal-count-v15137 strong {
        font-size: 16px;
    }

    .money-flow-source-photo-v15137 {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
    }

    .money-flow-internal-headline-v15137 {
        gap: 5px 7px;
    }
}


/* v1.5.138 — сумма поступлений с других объектов вместо количества */
.money-flow-internal-count-v15137.is-amount-v15138 strong {
    color: #159447;
}

html[data-theme="dark"] .money-flow-internal-count-v15137.is-amount-v15138 strong {
    color: #54dda2;
}


/* =========================================================
   v1.5.140 — прогресс объекта: нижние статусы без заливки
   ========================================================= */
.project-progress-stages-v153 .project-progress-stage-v153,
.project-progress-stages-v153 .project-progress-stage-copy-v153,
html[data-theme="dark"] .project-progress-stages-v153 .project-progress-stage-v153,
html[data-theme="dark"] .project-progress-stages-v153 .project-progress-stage-copy-v153 {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}


/* =========================================================
   v1.5.141 — единый фон тёмной темы для информационных блоков
   ========================================================= */
html[data-theme="dark"] :is(
    .project-info-item,
    .project-info-item-v158,
    .project-overview-item,
    .summary-box,
    .payment-summary-item,
    .installment-summary-item,
    .manager-summary-card,
    .manager-summary-stats > div,
    .project-stats > div,
    .finance-method-stats-v1572 > div,
    .finance-chart-summary-v1572 > div,
    .finance-share-list-v1572 > div,
    .finance-installment-schedule-grid-v1576 > div,
    .hours-worker-stat-kpis-v1596 article,
    .worker-profile-stats > div,
    .project-progress-stage-v153,
    .project-progress-stage-copy-v153,
    .users-flow-member,
    .personal-project-stats-v1543,
    .installment-payment-summary-v1553 > div,
    .payment-contract-check-v1581,
    .payment-amount-current-info > div,
    .guest-pin-settings,
    .user-create-note,
    .estimate-filters,
    .estimate-item-card,
    .estimate-section-group,
    .estimate-section-group-head,
    .estimate-import-current > div,
    .reference-chips span
) {
    background: #171b20 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}


/* =========================================================
   v1.5.144 — Лиды
   ========================================================= */
.leads-page-v15144{display:grid;gap:18px}.leads-page-head-v15144{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.leads-title-line-v15144{display:flex;align-items:center;gap:10px}.leads-title-line-v15144 h1{margin:0;font-size:27px}.leads-title-line-v15144>span{display:inline-flex;min-width:28px;height:28px;padding:0 8px;align-items:center;justify-content:center;border-radius:999px;background:var(--surface-soft);border:1px solid var(--border);font-weight:800}.leads-page-head-v15144 p{margin:6px 0 0;color:var(--muted)}.leads-head-actions-v15144{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.leads-head-actions-v15144 form{margin:0}.leads-head-actions-v15144 button:disabled{opacity:.45;cursor:not-allowed}.leads-mail-warning-v15144 code{padding:2px 6px;border-radius:5px;background:rgba(0,0,0,.12)}
.leads-summary-v15144{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr));gap:10px}.leads-summary-v15144 article{padding:14px 15px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.leads-summary-v15144 small{display:block;margin-bottom:7px;color:var(--muted);font-size:11px}.leads-summary-v15144 strong{font-size:22px}.leads-filters-v15144{display:grid;grid-template-columns:minmax(240px,1fr) 220px auto auto;gap:10px;align-items:center}.leads-search-v15144{display:flex;align-items:center;gap:8px;padding:0 11px;border:1px solid var(--border);border-radius:11px;background:var(--surface-soft)}.leads-search-v15144 svg{width:17px;height:17px;color:var(--muted)}.leads-search-v15144 input{width:100%;height:42px;border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important}.leads-filters-v15144 select{height:44px}
.leads-board-v15144{display:grid;grid-template-columns:repeat(6,minmax(225px,1fr));gap:11px;overflow-x:auto;padding-bottom:8px}.leads-column-v15144{min-width:225px;align-self:start;border:1px solid var(--border);border-radius:15px;background:var(--surface-soft);overflow:hidden}.leads-column-v15144>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 13px;border-bottom:1px solid var(--border)}.leads-column-v15144>header strong{font-size:13px}.leads-column-v15144>header span{display:inline-flex;min-width:23px;height:23px;padding:0 7px;align-items:center;justify-content:center;border-radius:999px;background:var(--surface);font-size:11px;font-weight:800}.leads-column-body-v15144{display:grid;gap:8px;padding:8px}.leads-column-empty-v15144{padding:20px 8px;text-align:center;color:var(--muted);font-size:11px}.lead-card-v15144{display:block;padding:11px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:inherit;text-decoration:none;transition:border-color .15s ease,transform .15s ease}.lead-card-v15144:hover{border-color:#4b8262;transform:translateY(-1px)}.lead-card-head-v15144{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.lead-card-head-v15144 strong{font-size:13px}.lead-card-head-v15144 time{color:var(--muted);font-size:9px;white-space:nowrap}.lead-card-tags-v15144{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.lead-card-tags-v15144 span{padding:3px 6px;border-radius:6px;background:var(--surface-soft);color:var(--muted);font-size:9px}.lead-card-v15144 p{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.45}.lead-card-v15144 footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid var(--border);font-size:9px}.lead-card-v15144 footer span{color:#39b86a}.lead-card-v15144 footer b{overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.leads-column-v15144.is-contract-v15144>header{border-bottom-color:rgba(49,173,94,.4)}.leads-column-v15144.is-lost-v15144{opacity:.72}
.lead-detail-page-v15144{display:grid;gap:17px}.lead-detail-head-v15144{display:flex;justify-content:space-between;align-items:flex-end;gap:20px}.lead-detail-head-v15144 h1{margin:9px 0 4px;font-size:27px}.lead-detail-head-v15144 p{margin:0;color:var(--muted)}.lead-detail-actions-v15144{display:flex;gap:8px}.lead-detail-grid-v15144{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.lead-detail-main-v15144,.lead-detail-side-v15144{display:grid;gap:14px;align-content:start}.lead-fields-grid-v15144{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.lead-fields-grid-v15144>div{padding:11px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}.lead-fields-grid-v15144 small{display:block;margin-bottom:5px;color:var(--muted);font-size:10px}.lead-fields-grid-v15144 strong{font-size:12px;line-height:1.45}.lead-state-form-v15144{display:grid;gap:11px}.lead-state-form-v15144 label{display:grid;gap:5px}.lead-state-form-v15144 label>span{color:var(--muted);font-size:10px}.lead-contact-card-v15144{display:grid;gap:8px}.lead-contact-card-v15144>a{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--border);border-radius:10px;color:inherit;text-decoration:none}.lead-contact-card-v15144>a svg{width:17px;height:17px}.lead-contact-card-v15144>div{display:flex;justify-content:space-between;gap:10px;padding:8px 2px}.lead-contact-card-v15144>div span{color:var(--muted)}.lead-source-card-v15144 p{margin:8px 0}.lead-comment-form-v15144{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:end}.lead-comment-form-v15144 textarea{min-height:72px}.lead-comments-list-v15144{display:grid;gap:8px;margin-top:14px}.lead-comments-list-v15144 article{padding:11px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}.lead-comments-list-v15144 article>div{display:flex;justify-content:space-between;gap:10px}.lead-comments-list-v15144 time{color:var(--muted);font-size:10px}.lead-comments-list-v15144 p{margin:7px 0 0;font-size:12px;line-height:1.5}.lead-raw-mail-v15144 summary{cursor:pointer;font-weight:800}.lead-raw-mail-v15144 pre{max-height:420px;overflow:auto;margin:15px 0 0;padding:13px;border-radius:11px;background:var(--surface);white-space:pre-wrap;font:11px/1.55 inherit;color:var(--muted)}.leads-manual-form-v15144{padding:18px}.leads-manual-form-v15144 textarea{min-height:90px}.leads-manual-form-v15144 .field-wide{grid-column:1/-1}
html[data-theme="dark"] :is(.leads-summary-v15144 article,.leads-column-v15144,.lead-fields-grid-v15144>div,.lead-comments-list-v15144 article,.lead-raw-mail-v15144 pre){background:#171b20!important;border-color:#2a3038!important;box-shadow:none!important}
@media(max-width:1200px){.leads-summary-v15144{grid-template-columns:repeat(3,1fr)}}@media(max-width:900px){.lead-detail-grid-v15144{grid-template-columns:1fr}.leads-page-head-v15144,.lead-detail-head-v15144{align-items:flex-start;flex-direction:column}.leads-filters-v15144{grid-template-columns:1fr}.lead-fields-grid-v15144{grid-template-columns:1fr}}@media(max-width:650px){.leads-summary-v15144{grid-template-columns:repeat(2,1fr)}.lead-comment-form-v15144{grid-template-columns:1fr}}


/* =========================================================
   v1.5.145 — лиды: счётчик, название, Я.Директ
   ========================================================= */
.nav-lead-count-v15145 {
    min-width: 22px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(55, 190, 103, .16);
    color: #44c978;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.nav-link.is-active .nav-lead-count-v15145 {
    background: rgba(55, 190, 103, .22);
    color: #62d58d;
}

.lead-card-client-v15145 {
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* v1.5.146 — счётчик новых лидов в боковом меню */
.nav-link .nav-lead-count-v15145 {
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    visibility: visible;
    opacity: 1;
}


/* v1.5.147 — компактные карточки лидов */
.leads-summary-v15144.leads-summary-v15147{grid-template-columns:repeat(5,minmax(125px,1fr))}
.lead-card-head-v15147{align-items:center}
.lead-card-head-v15147 strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lead-card-phone-v15147{margin-left:auto;color:var(--text);font-size:11px;font-weight:700;white-space:nowrap}
.lead-card-footer-v15147{align-items:center}
.lead-card-footer-v15147 time{margin-left:auto;color:var(--muted);font-size:9px;white-space:nowrap}
@media(max-width:1200px){.leads-summary-v15144.leads-summary-v15147{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.leads-summary-v15144.leads-summary-v15147{grid-template-columns:repeat(2,1fr)}.lead-card-head-v15147{align-items:flex-start;flex-wrap:wrap}.lead-card-phone-v15147{margin-left:0}}


/* =========================================================
   v1.5.148 — MAX: поиск группы и уведомления о лидах
   ========================================================= */
.max-settings-card-v15148{display:grid;gap:16px}.max-connection-badge-v15148{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border:1px solid var(--border);border-radius:999px;color:var(--muted);font-size:10px;font-weight:800;background:var(--surface)}.max-connection-badge-v15148.is-connected-v15148{color:#31bd6c;border-color:rgba(49,189,108,.3);background:rgba(49,189,108,.08)}
.max-setup-steps-v15148{display:grid;gap:7px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.max-setup-steps-v15148 span{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.max-setup-steps-v15148 b{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;border-radius:50%;color:#fff;background:#31a95e;font-size:10px}
.max-token-form-v15148 label{display:grid;gap:6px}.max-token-form-v15148 label>span{color:var(--muted);font-size:10px}.max-token-form-v15148 label>small{color:var(--muted);font-size:9px}.max-token-row-v15148{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}.max-token-row-v15148 input{min-width:0}
.max-groups-found-v15148{display:grid;gap:8px}.max-groups-found-v15148>strong{font-size:12px}.max-group-choice-v15148{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}.max-group-choice-v15148>div{display:grid;gap:3px;min-width:0}.max-group-choice-v15148 b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.max-group-choice-v15148 small{color:var(--muted);font-size:9px}
.max-selected-group-v15148{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid rgba(49,189,108,.28);border-radius:12px;background:rgba(49,189,108,.055)}.max-selected-group-v15148>div{display:grid;gap:3px}.max-selected-group-v15148 small,.max-selected-group-v15148 span{color:var(--muted);font-size:9px}.max-selected-group-v15148 strong{font-size:13px}
.max-notification-toggle-v15148{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.max-notification-toggle-v15148>label{display:flex;align-items:flex-start;gap:10px;cursor:pointer}.max-notification-toggle-v15148 input[type="checkbox"]{margin-top:3px}.max-notification-toggle-v15148 label span{display:grid;gap:3px}.max-notification-toggle-v15148 label b{font-size:12px}.max-notification-toggle-v15148 label small{color:var(--muted);font-size:9px;line-height:1.45}.max-disconnect-form-v15148{display:flex;justify-content:flex-end}.max-help-v15148{margin:0!important;line-height:1.5}
html[data-theme="dark"] :is(.max-setup-steps-v15148,.max-group-choice-v15148,.max-notification-toggle-v15148){background:#171b20!important;border-color:#2a3038!important;box-shadow:none!important}
@media(max-width:680px){.max-token-row-v15148{grid-template-columns:1fr}.max-selected-group-v15148,.max-notification-toggle-v15148{align-items:stretch;flex-direction:column}.max-selected-group-v15148 form,.max-selected-group-v15148 button,.max-notification-toggle-v15148 button{width:100%}}


/* =========================================================
   v1.5.154 — компактная современная карточка лида
   ========================================================= */

.lead-page-v15154 {
    display: grid;
    gap: 14px;
}

.lead-hero-v15154 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
}

.lead-hero-main-v15154 {
    min-width: 0;
}

.lead-back-v15154 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.lead-back-v15154 svg {
    width: 14px;
    height: 14px;
}

.lead-title-row-v15154 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.lead-title-row-v15154 h1 {
    margin: 0 0 6px;
    font-size: 23px;
    line-height: 1.15;
}

.lead-quick-meta-v15154 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}

.lead-quick-meta-v15154 > * {
    display: inline-flex;
    align-items: center;
}

.lead-quick-meta-v15154 > * + *::before {
    content: "·";
    margin-right: 6px;
    color: var(--muted);
}

.lead-quick-meta-v15154 a {
    color: inherit;
    text-decoration: none;
}

.lead-quick-meta-v15154 a:hover {
    color: var(--text);
}

.lead-status-pill-v15154 {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.lead-status-pill-v15154.status-new {
    color: #6ca8ff;
    background: rgba(70, 137, 230, .10);
    border-color: rgba(70, 137, 230, .22);
}

.lead-status-pill-v15154.status-in_work {
    color: #e3ae4f;
    background: rgba(212, 153, 45, .10);
    border-color: rgba(212, 153, 45, .22);
}

.lead-status-pill-v15154.status-interested {
    color: #b889ff;
    background: rgba(151, 89, 224, .10);
    border-color: rgba(151, 89, 224, .22);
}

.lead-status-pill-v15154.status-proposal {
    color: #72a9ff;
    background: rgba(58, 122, 215, .10);
    border-color: rgba(58, 122, 215, .22);
}

.lead-status-pill-v15154.status-contract {
    color: #63d58c;
    background: rgba(37, 171, 88, .10);
    border-color: rgba(37, 171, 88, .22);
}

.lead-status-pill-v15154.status-lost {
    color: var(--muted);
    background: rgba(128, 128, 128, .08);
}

.lead-hero-actions-v15154 {
    flex: 0 0 auto;
}

.lead-layout-v15154 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 14px;
    align-items: start;
}

.lead-main-v15154,
.lead-side-v15154 {
    display: grid;
    gap: 12px;
    align-content: start;
}

.lead-info-v15154,
.lead-comments-v15154,
.lead-control-v15154,
.lead-contact-v15154,
.lead-source-v15154 {
    padding: 15px 16px;
}

.lead-section-title-v15154 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.lead-section-title-v15154 h2 {
    margin: 0;
    font-size: 15px;
}

.lead-section-title-v15154 > span {
    color: var(--muted);
    font-size: 10px;
}

.lead-info-grid-v15154 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
}

.lead-info-row-v15154 {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    min-height: 34px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

.lead-info-row-v15154.is-wide-v15154 {
    grid-column: 1 / -1;
}

.lead-info-row-v15154 small {
    color: var(--muted);
    font-size: 10px;
}

.lead-info-row-v15154 strong {
    min-width: 0;
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.lead-control-form-v15154 {
    display: grid;
    gap: 10px;
}

.lead-control-form-v15154 label {
    display: grid;
    gap: 5px;
}

.lead-control-form-v15154 label > span {
    color: var(--muted);
    font-size: 10px;
}

.lead-control-two-v15154 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.lead-control-form-v15154 input,
.lead-control-form-v15154 select {
    min-height: 38px;
}

.lead-control-form-v15154 .primary-button {
    width: 100%;
    justify-content: center;
}

.lead-contact-list-v15154 {
    display: grid;
}

.lead-contact-list-v15154 > a,
.lead-contact-list-v15154 > div {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.lead-contact-list-v15154 > :last-child {
    border-bottom: 0;
}

.lead-contact-list-v15154 span {
    color: var(--muted);
    font-size: 10px;
}

.lead-contact-list-v15154 strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
}

.lead-contact-list-v15154 a:hover strong {
    text-decoration: underline;
}

.lead-source-row-v15154 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
}

.lead-source-row-v15154 span {
    font-weight: 800;
}

.lead-source-row-v15154 time {
    color: var(--muted);
    font-size: 10px;
}

.lead-source-link-v15154 {
    display: inline-flex;
    margin-top: 10px;
    color: var(--link, #6da8ff);
    font-size: 11px;
    text-decoration: none;
}

.lead-comment-form-v15154 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.lead-comment-form-v15154 textarea {
    min-height: 42px;
    height: 42px;
    padding: 10px 11px;
    resize: vertical;
}

.lead-comment-form-v15154 button {
    min-width: 96px;
}

.lead-comments-list-v15154 {
    display: grid;
    gap: 0;
    margin-top: 10px;
}

.lead-comments-list-v15154 article {
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.lead-comment-head-v15154 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lead-comment-head-v15154 strong {
    font-size: 11px;
}

.lead-comment-head-v15154 time {
    color: var(--muted);
    font-size: 9px;
}

.lead-comments-list-v15154 p {
    margin: 5px 0 0;
    font-size: 11px;
    line-height: 1.45;
}

.lead-empty-note-v15154 {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.lead-mail-v15154 {
    padding: 0;
    overflow: hidden;
}

.lead-mail-v15154 summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    list-style: none;
}

.lead-mail-v15154 summary::-webkit-details-marker {
    display: none;
}

.lead-mail-v15154 summary span {
    font-size: 13px;
    font-weight: 800;
}

.lead-mail-v15154 summary small {
    color: var(--muted);
    font-size: 9px;
}

.lead-mail-v15154 pre {
    max-height: 420px;
    overflow: auto;
    margin: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    white-space: pre-wrap;
    color: var(--muted);
    font: 10px/1.5 inherit;
}

html[data-theme="dark"] :is(
    .lead-hero-v15154,
    .lead-info-v15154,
    .lead-comments-v15154,
    .lead-control-v15154,
    .lead-contact-v15154,
    .lead-source-v15154,
    .lead-mail-v15154
) {
    background: #171b20 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] :is(
    .lead-info-row-v15154,
    .lead-contact-list-v15154 > a,
    .lead-contact-list-v15154 > div,
    .lead-comments-list-v15154 article,
    .lead-mail-v15154 pre
) {
    border-color: #2a3038 !important;
}

@media (max-width: 1050px) {
    .lead-layout-v15154 {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .lead-info-grid-v15154 {
        grid-template-columns: 1fr;
    }

    .lead-info-row-v15154.is-wide-v15154 {
        grid-column: auto;
    }
}

@media (max-width: 820px) {
    .lead-layout-v15154 {
        grid-template-columns: 1fr;
    }

    .lead-hero-v15154 {
        align-items: flex-start;
        flex-direction: column;
    }

    .lead-hero-actions-v15154 {
        width: 100%;
    }

    .lead-hero-actions-v15154 .primary-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 620px) {
    .lead-title-row-v15154 {
        flex-direction: column;
    }

    .lead-info-row-v15154 {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .lead-comment-form-v15154 {
        grid-template-columns: 1fr;
    }

    .lead-comment-form-v15154 textarea {
        height: 62px;
    }
}


/* =========================================================
   v1.5.155 — карточка лида в стиле карточки объекта
   ========================================================= */
.lead-status-control-v15155 {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lead-status-edit-v15155 {
    flex: 0 0 auto;
}

.lead-status-options-v15155 .project-status-option-dot.is-new-v15144 {
    background: #5f9df1;
}
.lead-status-options-v15155 .project-status-option-dot.is-work-v15144 {
    background: #d6a13e;
}
.lead-status-options-v15155 .project-status-option-dot.is-interested-v15144 {
    background: #9661db;
}
.lead-status-options-v15155 .project-status-option-dot.is-proposal-v15144 {
    background: #4e86da;
}
.lead-status-options-v15155 .project-status-option-dot.is-contract-v15144 {
    background: #35ad66;
}
.lead-status-options-v15155 .project-status-option-dot.is-lost-v15144 {
    background: #767d86;
}

.lead-status-pill-v15154.is-status-updated {
    animation: lead-status-pulse-v15155 .8s ease;
}

@keyframes lead-status-pulse-v15155 {
    from { opacity:.72; }
    to { opacity:1; }
}

.lead-application-v15155 {
    padding: 0;
    overflow: hidden;
}

.lead-application-heading-v15155 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lead-application-heading-v15155 > span {
    color: var(--muted);
    font-size: 10px;
}

.lead-application-grid-v15155 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.lead-application-item-v15155 {
    min-width: 0;
}

.lead-application-item-v15155 strong {
    white-space: normal;
    overflow-wrap: anywhere;
}

.lead-application-empty-v15155 {
    margin: 0;
    padding: 16px;
}

/* Комментарии — как вертикальная хронология движения денег. */
.lead-comments-v15155 {
    overflow: visible;
}

.lead-comments-timeline-v15155 {
    position: relative;
    display: grid;
    margin-top: 14px;
}

.lead-comments-timeline-v15155::before {
    content: "";
    position: absolute;
    top: 21px;
    bottom: 21px;
    left: 20px;
    width: 1px;
    background: var(--border);
}

.lead-comment-event-v15155 {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 12px;
}

.lead-comment-event-v15155:last-child {
    padding-bottom: 0;
}

.lead-comment-marker-v15155 {
    position: relative;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 5px solid var(--surface);
    border-radius: 50%;
    color: #7777ef;
    background: rgba(111, 110, 232, .16);
    box-shadow: 0 0 0 1px rgba(111, 110, 232, .22);
}

.lead-comment-marker-v15155 svg {
    width: 15px;
    height: 15px;
}

.lead-comment-body-v15155 {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.lead-comment-meta-v15155 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lead-comment-meta-v15155 strong {
    font-size: 11px;
}

.lead-comment-meta-v15155 time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 9px;
}

.lead-comment-body-v15155 p {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.5;
}

html[data-theme="dark"] .lead-comment-marker-v15155 {
    border-color: #171b20;
}

html[data-theme="dark"] .lead-comment-body-v15155 {
    background: #171b20;
    border-color: #2a3038;
    box-shadow: none;
}

/* Мобильная карточка заявки остаётся в два столбца. */
@media (max-width: 620px) {
    .lead-application-grid-v15155,
    .lead-application-grid-v15155.project-info-grid-v158,
    .lead-application-grid-v15155.project-info-grid-v513 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .lead-application-grid-v15155 > .project-info-item-v158 {
        min-width: 0;
        width: auto;
        padding: 10px 8px;
        gap: 7px;
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .lead-application-grid-v15155 .project-info-icon-v158 {
        width: 28px;
        height: 28px;
    }

    .lead-application-grid-v15155 .project-info-icon-v158 svg {
        width: 14px;
        height: 14px;
    }

    .lead-application-grid-v15155 .project-info-item-v158 small {
        font-size: 8px;
    }

    .lead-application-grid-v15155 .project-info-item-v158 strong {
        font-size: 10px;
        line-height: 1.3;
    }

    .lead-comment-event-v15155 {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    .lead-comments-timeline-v15155::before {
        left: 16px;
    }

    .lead-comment-marker-v15155 {
        width: 34px;
        height: 34px;
        border-width: 4px;
    }

    .lead-comment-body-v15155 {
        padding: 10px 11px;
    }
}


/* =========================================================
   v1.5.156 — ещё компактнее: без верхней шапки лида
   ========================================================= */

.lead-back-standalone-v15156 {
    width: max-content;
    margin: 0 0 -2px 2px;
}

.lead-application-heading-v15156 {
    align-items: center;
}

.lead-title-control-v15156 {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lead-title-control-v15156 h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-title-edit-v15156 {
    flex: 0 0 auto;
}

.lead-application-value-link-v15156 {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.lead-application-value-link-v15156:hover strong {
    text-decoration: underline;
}

.lead-control-v15156 {
    padding: 15px 16px;
}

.lead-management-actions-v15156 {
    display: grid;
}

.lead-management-actions-v15156 .primary-button,
.lead-management-actions-v15156 .secondary-button {
    width: 100%;
    justify-content: center;
}

.lead-title-modal-dialog-v15156 {
    max-width: 470px;
}

.lead-title-modal-field-v15156 {
    display: grid;
    gap: 6px;
    padding: 16px 18px 4px;
}

.lead-title-modal-field-v15156 > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.lead-title-modal-field-v15156 input {
    width: 100%;
    min-height: 42px;
}

.lead-title-modal-actions-v15156 {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 18px;
}

@media (max-width: 620px) {
    .lead-application-heading-v15156 {
        gap: 8px;
    }

    .lead-title-control-v15156 {
        max-width: calc(100% - 112px);
    }

    .lead-title-control-v15156 h2 {
        font-size: 14px;
    }

    .lead-status-control-v15155 {
        margin-left: auto;
    }

    .lead-status-pill-v15154 {
        max-width: 86px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lead-title-modal-actions-v15156 {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================================
   v1.5.157 — карточка лида: правый комментарий + вложения
   ========================================================= */

.lead-layout-v15154 {
    grid-template-columns: minmax(0, .92fr) minmax(470px, 1.08fr);
    gap: 14px;
}

.lead-side-v15157 {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

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

.lead-side-top-v15157 > .content-card {
    min-width: 0;
    height: 100%;
}

.lead-comments-v15157 {
    min-width: 0;
}

.lead-comment-form-v15157 {
    grid-template-columns: 1fr;
    gap: 8px;
}

.lead-comment-form-v15157 textarea {
    width: 100%;
    min-height: 72px;
    height: 72px;
    resize: vertical;
}

.lead-comment-attachments-v15157 {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.lead-comment-file-v15157 {
    position: relative;
    min-width: 0;
    height: 34px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.lead-comment-file-v15157:hover {
    color: var(--text);
    border-color: rgba(84, 221, 162, .4);
}

.lead-comment-file-v15157 svg {
    width: 15px;
    height: 15px;
}

.lead-comment-file-v15157 input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lead-comment-attachments-v15157 .secondary-button {
    min-width: 86px;
    height: 34px;
    margin-left: auto;
}

.lead-comment-upload-preview-v15157 {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 9px;
}

.lead-comment-upload-preview-v15157 img {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.lead-comment-upload-preview-v15157 span {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-comments-timeline-v15157 {
    margin-top: 13px;
}

.lead-comment-event-v15157 {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
}

.lead-comment-body-v15157 {
    min-width: 0;
}

.lead-comment-files-v15157 {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 9px;
    min-width: 0;
}

.lead-comment-photo-v15157 {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    cursor: pointer;
}

.lead-comment-photo-v15157 img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lead-comment-document-v15157 {
    min-width: 0;
    flex: 1 1 auto;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
}

.lead-comment-document-v15157 > span:first-child {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(93, 151, 240, .10);
    color: #6ea9ff;
}

.lead-comment-document-v15157 svg {
    width: 16px;
    height: 16px;
}

.lead-comment-document-v15157 > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.lead-comment-document-v15157 small {
    color: var(--muted);
    font-size: 8px;
}

.lead-comment-document-v15157 strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-comment-document-v15157:hover strong {
    text-decoration: underline;
}

html[data-theme="dark"] :is(
    .lead-comment-file-v15157,
    .lead-comment-photo-v15157,
    .lead-comment-document-v15157
) {
    background: #171b20 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}

@media (max-width: 1180px) {
    .lead-layout-v15154 {
        grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr);
    }
}

@media (max-width: 980px) {
    .lead-layout-v15154 {
        grid-template-columns: 1fr;
    }

    .lead-side-top-v15157 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .lead-side-top-v15157 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .lead-side-top-v15157 .content-card {
        padding: 11px;
    }

    .lead-side-top-v15157 .lead-section-title-v15154 {
        margin-bottom: 8px;
    }

    .lead-side-top-v15157 .lead-section-title-v15154 h2 {
        font-size: 12px;
    }

    .lead-source-row-v15154 {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .lead-source-link-v15154 {
        font-size: 9px;
    }

    .lead-comment-attachments-v15157 {
        flex-wrap: wrap;
    }

    .lead-comment-attachments-v15157 .secondary-button {
        margin-left: 0;
    }

    .lead-comment-upload-preview-v15157 {
        order: 4;
        width: 100%;
    }

    .lead-comment-files-v15157 {
        flex-wrap: wrap;
    }

    .lead-comment-document-v15157 {
        flex-basis: calc(100% - 68px);
    }
}


/* =========================================================
   v1.5.158 — карточка лида 65% / 35%
   ========================================================= */
@media (min-width: 981px) {
    .lead-layout-v15154 {
        grid-template-columns: minmax(0, 65fr) minmax(0, 35fr) !important;
    }
}


/* =========================================================
   v1.5.159 — лиды и комментарии
   ========================================================= */

/* Карточка лида: 60 / 40. */
@media (min-width: 981px) {
    .lead-layout-v15154 {
        grid-template-columns: minmax(0, 60fr) minmax(0, 40fr) !important;
    }
}

/* Комментарии используют геометрию хронологии движения денег. */
.lead-comments-money-timeline-v15159 {
    margin-top: 15px;
}

.lead-comment-money-event-v15159 {
    overflow: visible;
}

.lead-comment-marker-cell-v15159 {
    position: relative;
    z-index: 12;
    width: 42px;
    height: 42px;
}

.lead-comment-delete-v15159 {
    position: relative;
    width: 42px;
    height: 42px;
}

.lead-comment-delete-v15159 > summary {
    list-style: none;
    cursor: pointer;
}

.lead-comment-delete-v15159 > summary::-webkit-details-marker {
    display: none;
}

.lead-comment-money-marker-v15159 {
    color: #7777ef;
    background: rgba(111,110,232,.16);
    box-shadow: 0 0 0 1px rgba(111,110,232,.22);
    transition: background .16s ease, color .16s ease, transform .16s ease;
    cursor: pointer;
}

.lead-comment-marker-icon-v15159 {
    display: inline-flex;
    transition: opacity .12s ease;
}

.lead-comment-marker-icon-v15159 svg {
    width: 16px;
    height: 16px;
}

.lead-comment-money-marker-v15159::after {
    content: "×";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.lead-comment-delete-v15159 > summary:hover,
.lead-comment-delete-v15159[open] > summary {
    color: #fff;
    background: #7f8792;
    transform: scale(1.04);
}

.lead-comment-delete-v15159 > summary:hover .lead-comment-marker-icon-v15159,
.lead-comment-delete-v15159[open] > summary .lead-comment-marker-icon-v15159 {
    opacity: 0;
}

.lead-comment-delete-v15159 > summary:hover::after,
.lead-comment-delete-v15159[open] > summary::after {
    color: #fff;
}

.lead-comment-delete-v15159 > form {
    position: absolute;
    z-index: 40;
    top: 48px;
    left: 6px;
    width: 220px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(0,0,0,.20);
}

.lead-comment-delete-v15159 > form p {
    margin: 0 0 9px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
}

.lead-comment-delete-v15159 > form button {
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #7b4247;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.lead-comment-money-body-v15159 {
    padding: 13px 14px;
}

.lead-comment-money-head-v15159 h3 {
    font-size: 13px;
}

.lead-comment-money-head-v15159 time {
    font-size: 10px;
}

.lead-comment-money-text-v15159 {
    color: var(--text);
    white-space: normal;
}

.lead-comment-form-v15159 {
    display: grid;
    gap: 8px;
}

.lead-comment-form-v15159 textarea {
    width: 100%;
    min-height: 70px;
    height: 70px;
    resize: vertical;
}

.lead-comment-compose-row-v15159 {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.lead-comment-compose-row-v15159 > .secondary-button {
    margin-left: auto;
    min-height: 34px;
}

.lead-comment-file-v15159 {
    position: relative;
    height: 34px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.lead-comment-file-v15159:hover {
    color: var(--text);
    border-color: rgba(111,110,232,.45);
}

.lead-comment-file-v15159 svg {
    width: 15px;
    height: 15px;
}

.lead-comment-file-v15159 input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lead-comment-selected-v15159 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
}

.lead-comment-selected-photo-v15159 {
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.lead-comment-selected-photo-v15159 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lead-comment-selected-doc-v15159 {
    max-width: 180px;
    height: 42px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: 9px;
}

.lead-comment-selected-doc-v15159 svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.lead-comment-selected-doc-v15159 span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-comment-files-v15159 {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.lead-comment-photo-grid-v15159 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lead-comment-photo-v15159 {
    width: 58px;
    height: 58px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    cursor: pointer;
}

.lead-comment-photo-v15159 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lead-comment-documents-v15159 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lead-comment-document-v15159 {
    min-width: 0;
    max-width: 100%;
    padding: 7px 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
}

.lead-comment-document-v15159 > span {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #7777ef;
    background: rgba(111,110,232,.11);
}

.lead-comment-document-v15159 svg {
    width: 14px;
    height: 14px;
}

.lead-comment-document-v15159 strong {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-comment-document-v15159:hover strong {
    text-decoration: underline;
}

/* leads.php: одна компактная панель вместо заголовка и KPI. */
.leads-page-v15144 {
    gap: 12px;
}

.leads-toolbar-v15159 {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.leads-filters-v15159 {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leads-search-v15159 {
    min-width: 220px;
    flex: 1 1 420px;
}

.leads-mail-sync-v15159 {
    margin: 0;
    flex: 0 0 auto;
}

.leads-mail-sync-v15159 button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.leads-create-v15159 {
    flex: 0 0 auto;
}

/* Разные заливки заголовков этапов. */
.leads-column-v15144 > header {
    border-bottom-color: transparent;
}
.leads-column-v15144.is-new-v15144 > header {
    background: rgba(68,130,238,.16);
}
.leads-column-v15144.is-work-v15144 > header {
    background: rgba(223,158,48,.17);
}
.leads-column-v15144.is-interested-v15144 > header {
    background: rgba(145,88,221,.17);
}
.leads-column-v15144.is-proposal-v15144 > header {
    background: rgba(42,169,195,.16);
}
.leads-column-v15144.is-contract-v15144 > header {
    background: rgba(49,173,94,.17);
    border-bottom-color: transparent;
}
.leads-column-v15144.is-lost-v15144 > header {
    background: rgba(139,145,155,.15);
}

.leads-column-v15144 > header span {
    background: rgba(255,255,255,.48);
    border: 1px solid rgba(255,255,255,.30);
}

html[data-theme="dark"] .leads-column-v15144 > header span {
    background: rgba(18,21,25,.48);
    border-color: rgba(255,255,255,.07);
}

html[data-theme="dark"] :is(
    .lead-comment-file-v15159,
    .lead-comment-selected-photo-v15159,
    .lead-comment-selected-doc-v15159,
    .lead-comment-photo-v15159,
    .lead-comment-document-v15159,
    .lead-comment-delete-v15159 > form
) {
    background: #171b20 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    .leads-toolbar-v15159 {
        flex-wrap: wrap;
    }
    .leads-filters-v15159 {
        flex: 1 1 100%;
    }
}

@media (max-width: 620px) {
    .leads-filters-v15159 {
        display: grid;
        grid-template-columns: minmax(0,1fr) auto;
    }
    .leads-search-v15159 {
        min-width: 0;
    }
    .leads-filters-v15159 .text-button {
        grid-column: 1 / -1;
    }
    .leads-mail-sync-v15159,
    .leads-create-v15159 {
        flex: 1 1 calc(50% - 5px);
    }
    .leads-mail-sync-v15159 button,
    .leads-create-v15159 {
        width: 100%;
        justify-content: center;
    }

    .lead-comment-compose-row-v15159 {
        flex-wrap: wrap;
    }
    .lead-comment-compose-row-v15159 > .secondary-button {
        margin-left: 0;
    }
    .lead-comment-delete-v15159 > form {
        left: 0;
        width: min(220px, calc(100vw - 38px));
    }
}


/* =========================================================
   v1.5.160 — лиды / комментарии / Dashboard
   ========================================================= */

/* Точные размеры, запрошенные для заголовка и статуса. */
.project-info-heading-v158 h2 {
    font-size: 22px !important;
}

.lead-status-pill-v15154 {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.2;
    appearance: none;
    cursor: pointer;
}

.lead-status-pill-v15154:hover {
    filter: brightness(1.05);
}

.lead-status-pill-v15154:focus-visible {
    outline: 2px solid rgba(111, 110, 232, .45);
    outline-offset: 2px;
}

/* Комментарий: пользователь слева, дата/время справа. */
.lead-comment-money-head-v15160 {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-bottom: 7px;
}

.lead-comment-money-head-v15160 strong {
    min-width: 0;
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
}

.lead-comment-money-head-v15160 time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

/* Удалённый комментарий остаётся в хронологии — как аннулированная операция. */
.lead-comment-is-deleted-v15160 .lead-comment-active-content-v15160 {
    color: #8a93a4 !important;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.lead-comment-is-deleted-v15160 .lead-comment-active-content-v15160 * {
    color: #8a93a4 !important;
}

.lead-comment-is-deleted-v15160 .lead-comment-photo-v15159,
.lead-comment-is-deleted-v15160 .lead-comment-document-v15159 {
    opacity: .55;
    filter: grayscale(1);
}

.lead-comment-deleted-marker-v15160 {
    color: #8a93a4 !important;
    background: rgba(128, 136, 150, .14) !important;
    box-shadow: 0 0 0 1px rgba(128, 136, 150, .30) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: default;
}

.lead-comment-deleted-meta-v15160 {
    text-decoration: none !important;
}

/* Поиск слева компактный; действия справа. */
@media (min-width: 901px) {
    .leads-toolbar-v15159 {
        width: 100%;
        flex-wrap: nowrap;
    }

    .leads-filters-v15159 {
        flex: 0 1 500px;
        width: min(500px, 100%);
        max-width: 500px;
    }

    .leads-search-v15159 {
        min-width: 220px;
        width: 330px;
        max-width: 330px;
        flex: 0 1 330px;
    }

    .leads-mail-sync-v15159 {
        margin-left: auto;
    }
}


/* =========================================================
   v1.5.161 — leads.php: CRM/Bitrix-style kanban reference
   ========================================================= */

.leads-page-v15144 {
    display: grid;
    gap: 13px;
    min-width: 0;
}

/* Верхняя строка: компактный поиск слева, действия справа. */
.leads-toolbar-v15161 {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.leads-filters-v15161 {
    position: relative;
    flex: 0 1 360px !important;
    width: 360px !important;
    max-width: 360px !important;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.leads-search-v15161 {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 9px;
    background: var(--surface-soft);
}

.leads-search-v15161 input {
    height: 38px;
    font-size: 12px;
}

.leads-search-submit-v15161 {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
}

.leads-search-reset-v15161 {
    position: absolute;
    z-index: 2;
    right: 68px;
    top: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border-radius: 50%;
    color: var(--muted);
    text-decoration: none;
    font-size: 17px;
    line-height: 1;
}

.leads-search-reset-v15161:hover {
    background: rgba(128, 136, 150, .13);
    color: var(--text);
}

.leads-toolbar-actions-v15161 {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leads-mail-sync-v15161 {
    margin-left: 0 !important;
}

.leads-toolbar-v15161 :is(.secondary-button, .primary-button) {
    min-height: 40px;
    border-radius: 9px;
    padding-inline: 14px;
    font-size: 11px;
}

.leads-create-v15161 {
    background: #24b874 !important;
    border-color: #24b874 !important;
}

.leads-create-v15161:hover {
    background: #2bc67f !important;
    border-color: #2bc67f !important;
}

/* Канбан — без внешних карточек колонок, с тонкими разделителями. */
.leads-board-v15161 {
    --lead-stage-blue: #48ade3;
    --lead-stage-work: #cce99d;
    --lead-stage-interest: #a6e600;
    --lead-stage-proposal: #ffae99;
    --lead-stage-contract: #8ed65b;
    --lead-stage-lost: #adb3bd;

    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(245px, 260px));
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-snap-type: x proximity;
}

.leads-board-v15161::-webkit-scrollbar {
    height: 8px;
}

.leads-board-v15161::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(128, 136, 150, .34);
}

.leads-column-v15161 {
    position: relative;
    min-width: 245px;
    align-self: stretch;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    scroll-snap-align: start;
}

.leads-column-v15161::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 43px;
    right: -4px;
    bottom: 0;
    border-right: 1px dashed rgba(128, 136, 150, .31);
    pointer-events: none;
}

.leads-column-v15161:last-child::after {
    display: none;
}

/* Цветная "лента" этапа с наконечником справа. */
.leads-stage-head-v15161 {
    position: relative;
    z-index: 3;
    height: 35px;
    min-height: 35px;
    margin: 0 -5px 7px 0;
    padding: 0 19px 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow: visible;
    border: 0 !important;
    border-radius: 7px 0 0 7px !important;
    color: #17202a;
    background: var(--lead-stage-blue) !important;
    clip-path: polygon(
        0 0,
        calc(100% - 12px) 0,
        100% 50%,
        calc(100% - 12px) 100%,
        0 100%
    );
}

.leads-column-v15161 + .leads-column-v15161 .leads-stage-head-v15161 {
    padding-left: 20px !important;
    clip-path: polygon(
        0 0,
        calc(100% - 12px) 0,
        100% 50%,
        calc(100% - 12px) 100%,
        0 100%,
        10px 50%
    );
}

.leads-stage-head-v15161 strong {
    min-width: 0;
    overflow: hidden;
    color: inherit !important;
    font-size: 12px !important;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leads-stage-head-v15161 span {
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(23, 32, 42, .55) !important;
    font-size: 11px !important;
    font-weight: 800;
}

.leads-column-v15161.is-new-v15144 .leads-stage-head-v15161 {
    background: var(--lead-stage-blue) !important;
}

.leads-column-v15161.is-work-v15144 .leads-stage-head-v15161 {
    background: var(--lead-stage-work) !important;
}

.leads-column-v15161.is-interested-v15144 .leads-stage-head-v15161 {
    background: var(--lead-stage-interest) !important;
}

.leads-column-v15161.is-proposal-v15144 .leads-stage-head-v15161 {
    background: var(--lead-stage-proposal) !important;
}

.leads-column-v15161.is-contract-v15144 .leads-stage-head-v15161 {
    background: var(--lead-stage-contract) !important;
}

.leads-column-v15161.is-lost-v15144 .leads-stage-head-v15161 {
    background: var(--lead-stage-lost) !important;
}

/* Независимая вертикальная прокрутка, как в референсе. */
.leads-column-body-v15161 {
    position: relative;
    z-index: 1;
    min-height: 180px;
    max-height: calc(100vh - 225px);
    display: grid;
    align-content: start;
    gap: 7px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 7px 8px 2px !important;
    scrollbar-width: thin;
}

.leads-column-body-v15161::-webkit-scrollbar {
    width: 5px;
}

.leads-column-body-v15161::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(128, 136, 150, .32);
}

.leads-column-empty-v15144 {
    margin: 3px 1px;
    padding: 15px 8px;
    border: 1px dashed rgba(128,136,150,.26);
    border-radius: 8px;
    color: var(--muted);
    font-size: 10px;
}

/* Карточка: светлая, плотная, с цветной линией этапа. */
.lead-card-v15161 {
    position: relative;
    display: block;
    min-height: 145px;
    padding: 11px 12px 10px 13px !important;
    overflow: hidden;
    border: 1px solid #d8dde3 !important;
    border-left-width: 3px !important;
    border-radius: 9px !important;
    background: #f7f8fa !important;
    color: #3c4652 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .10);
    transform: none !important;
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}

.lead-card-v15161:hover {
    border-color: #cbd1d8 !important;
    box-shadow: 0 4px 13px rgba(0, 0, 0, .15);
    transform: translateY(-1px) !important;
}

.is-new-v15144 .lead-card-v15161 {
    border-left-color: var(--lead-stage-blue) !important;
}

.is-work-v15144 .lead-card-v15161 {
    border-left-color: #a9cf67 !important;
}

.is-interested-v15144 .lead-card-v15161 {
    border-left-color: #93cc00 !important;
}

.is-proposal-v15144 .lead-card-v15161 {
    border-left-color: #ee9b86 !important;
}

.is-contract-v15144 .lead-card-v15161 {
    border-left-color: #73be45 !important;
}

.is-lost-v15144 .lead-card-v15161 {
    border-left-color: #969da8 !important;
}

.lead-card-head-v15161 {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.lead-card-head-v15161 strong {
    min-width: 0;
    overflow: hidden;
    color: #3e4650 !important;
    font-size: 12px !important;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-card-counter-v15161 {
    flex: 0 0 auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #d3d7dc;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.lead-card-phone-row-v15161 {
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    color: #438bd4;
    font-size: 11px;
    font-weight: 650;
}

.lead-card-phone-row-v15161 svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #4c9aec;
}

.lead-card-client-v15161 {
    margin-top: 5px !important;
    color: #5291cf !important;
    font-size: 10px !important;
}

.lead-card-location-v15161,
.lead-card-detail-line-v15161 {
    margin-top: 5px;
    overflow: hidden;
    color: #808995;
    font-size: 9px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-card-date-v15161 {
    margin-top: 9px;
    display: grid;
    gap: 2px;
}

.lead-card-date-v15161 span {
    color: #a0a7b0;
    font-size: 8px;
}

.lead-card-date-v15161 strong {
    color: #59636e;
    font-size: 9px;
    font-weight: 700;
}

.lead-card-footer-v15161 {
    margin-top: 8px !important;
    padding-top: 7px !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #e4e7ea !important;
    font-size: 8px !important;
}

.lead-card-footer-v15161 span {
    color: #8f969f !important;
}

.lead-card-footer-v15161 time {
    color: #9aa1aa !important;
}

/* Dark theme keeps the Bitrix-like pale kanban cards from the reference. */
html[data-theme="dark"] .leads-board-v15161 {
    color-scheme: dark;
}

html[data-theme="dark"] .lead-card-v15161 {
    background: #f7f8fa !important;
    border-color: #d8dde3 !important;
    color: #3c4652 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18) !important;
}

html[data-theme="dark"] .lead-card-v15161:hover {
    background: #ffffff !important;
    border-color: #cbd1d8 !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .26) !important;
}

html[data-theme="dark"] .leads-stage-head-v15161 span {
    background: transparent !important;
    border: 0 !important;
    color: rgba(23, 32, 42, .55) !important;
}

/* Toolbar in dark theme follows the surrounding CRM shell. */
html[data-theme="dark"] :is(
    .leads-search-v15161,
    .leads-search-submit-v15161
) {
    background: #171b20 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}

@media (max-width: 900px) {
    .leads-toolbar-v15161 {
        flex-wrap: wrap;
    }

    .leads-filters-v15161 {
        flex: 1 1 100% !important;
        width: min(420px, 100%) !important;
        max-width: 420px !important;
    }

    .leads-toolbar-actions-v15161 {
        margin-left: 0;
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .leads-column-body-v15161 {
        max-height: none;
    }
}

@media (max-width: 620px) {
    .leads-toolbar-v15161 {
        display: grid;
        grid-template-columns: 1fr;
    }

    .leads-filters-v15161 {
        width: 100% !important;
        max-width: none !important;
    }

    .leads-toolbar-actions-v15161 {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .leads-toolbar-actions-v15161 :is(form, button, a) {
        width: 100%;
    }

    .leads-toolbar-actions-v15161 :is(button, a) {
        justify-content: center;
    }

    .leads-board-v15161 {
        grid-template-columns: repeat(6, 238px);
        gap: 6px;
    }

    .leads-column-v15161 {
        min-width: 238px;
    }
}


/* =========================================================
   v1.5.162 — leads.php: компактность и канбан до низа экрана
   ========================================================= */

/* Канбан всегда занимает оставшуюся высоту окна, без большого отступа снизу. */
.leads-page-v15144 {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
    height: calc(100dvh - 24px);
    margin-bottom: -34px;
    gap: 8px !important;
    overflow: hidden;
}

.leads-toolbar-v15161,
.leads-mail-warning-v15144,
.leads-page-v15144 > .alert {
    flex: 0 0 auto;
}

.leads-board-v15161 {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding-bottom: 0 !important;
    align-items: stretch;
}

.leads-column-v15161 {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch !important;
}

.leads-stage-head-v15161 {
    flex: 0 0 35px;
}

.leads-column-body-v15161 {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 5px 4px 1px !important;
    gap: 6px !important;
}

/* Возвращены прежние размеры шрифтов и убрана лишняя жирность. */
.leads-stage-head-v15161 strong {
    font-size: 13px !important;
    font-weight: 500 !important;
}

.leads-stage-head-v15161 span {
    font-size: 11px !important;
    font-weight: 400 !important;
}

.lead-card-v15161 {
    min-height: 0 !important;
    padding: 9px 10px !important;
}

.lead-card-head-v15161 strong {
    font-size: 13px !important;
    font-weight: 500 !important;
}

.lead-card-phone-row-v15161 {
    margin-top: 4px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}

.lead-card-client-v15161 {
    margin-top: 4px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}

.lead-card-location-v15161 {
    margin-top: 4px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
}

.lead-card-detail-line-v15161 {
    margin-top: 4px !important;
    font-size: 9px !important;
    font-weight: 400 !important;
}

/* Footer — без линии, меньше отступ, дата+время справа. */
.lead-card-v15144 footer,
.lead-card-footer-v15161 {
    margin-top: 5px !important;
    padding-top: 2px !important;
    border-top: 0 !important;
    font-size: 9px !important;
    font-weight: 400 !important;
}

.lead-card-footer-v15161 span,
.lead-card-footer-v15161 time {
    font-size: 9px !important;
    font-weight: 400 !important;
}

.lead-card-footer-v15161 time {
    margin-left: auto;
    white-space: nowrap;
}

/*
 * В v1.5.161 dark-theme border-color перезаписывал цвет левой полосы.
 * Явно задаём border-left после всех общих border-color.
 */
.leads-column-v15161.is-new-v15144 .lead-card-v15161 {
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: var(--lead-stage-blue) !important;
}

.leads-column-v15161.is-work-v15144 .lead-card-v15161 {
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: #a9cf67 !important;
}

.leads-column-v15161.is-interested-v15144 .lead-card-v15161 {
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: #93cc00 !important;
}

.leads-column-v15161.is-proposal-v15144 .lead-card-v15161 {
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: #ee9b86 !important;
}

.leads-column-v15161.is-contract-v15144 .lead-card-v15161 {
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: #73be45 !important;
}

.leads-column-v15161.is-lost-v15144 .lead-card-v15161 {
    border-left-width: 3px !important;
    border-left-style: solid !important;
    border-left-color: #969da8 !important;
}

@media (max-width: 920px) {
    .leads-page-v15144 {
        height: calc(100dvh - 58px);
        margin-bottom: -24px;
    }
}

@media (max-width: 720px) {
    .leads-page-v15144 {
        height: calc(100dvh - 70px - env(safe-area-inset-top));
        margin-bottom: -24px;
    }

    .leads-column-v15161 {
        height: 100%;
    }

    .leads-column-body-v15161 {
        max-height: none !important;
    }
}


/* =========================================================
   v1.5.163 — fix kanban height/cards + mobile stage tabs
   ========================================================= */

/*
 * Исправление v1.5.162:
 * страница лидов занимает ровно доступную высоту page-body,
 * без отрицательных margin и без сжатия карточек.
 */
.page-body-no-topbar:has(.leads-page-v15144) {
    height: 100dvh;
    min-height: 0;
    padding-bottom: 8px !important;
    overflow: hidden;
}

.leads-page-v15144 {
    width: 100%;
    height: 100% !important;
    min-height: 0;
    margin-bottom: 0 !important;
    overflow: hidden;
}

/* Канбан занимает всё оставшееся место. */
.leads-board-v15161 {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0 !important;
}

/*
 * Главный фикс: вместо grid используем flex-column.
 * Из-за grid внутри ограниченной по высоте колонки карточки в v1.5.162
 * могли ужиматься до одной строки.
 */
.leads-column-body-v15161 {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    align-content: initial !important;
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 6px !important;
    padding: 0 5px 4px 1px !important;
}

.lead-card-v15161 {
    flex: 0 0 auto;
    width: 100%;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
}

.leads-column-empty-v15144 {
    flex: 0 0 auto;
}

/* Мобильные вкладки скрыты на desktop. */
.leads-mobile-stages-v15163 {
    display: none;
}

/* ---------------------------------------------------------
   Mobile: один статус на экране + горизонтальный список вкладок
   --------------------------------------------------------- */
@media (max-width: 720px) {
    .page-body.page-body-no-topbar:has(.leads-page-v15144) {
        height: 100dvh;
        min-height: 0;
        padding-bottom: 6px !important;
        overflow: hidden;
    }

    .leads-page-v15144 {
        height: 100% !important;
        min-height: 0;
        gap: 7px !important;
    }

    .leads-mobile-stages-v15163 {
        flex: 0 0 auto;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 3px;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .leads-mobile-stages-v15163::-webkit-scrollbar {
        display: none;
    }

    /*
     * Используем тот же визуальный язык leads-stage-head-v15161,
     * но в мобильной версии это уже обычные вкладки-список.
     */
    .leads-mobile-stages-v15163 .leads-stage-head-v15161 {
        position: relative;
        flex: 0 0 auto !important;
        width: auto;
        min-width: max-content;
        height: 36px;
        min-height: 36px;
        margin: 0 !important;
        padding: 0 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 7px !important;
        border: 1px solid transparent !important;
        border-radius: 9px !important;
        clip-path: none !important;
        cursor: pointer;
        scroll-snap-align: start;
        opacity: .66;
        transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease;
    }

    .leads-mobile-stages-v15163 .leads-stage-head-v15161 strong {
        overflow: visible;
        font-size: 12px !important;
        font-weight: 500 !important;
        text-overflow: clip;
    }

    .leads-mobile-stages-v15163 .leads-stage-head-v15161 span {
        font-size: 10px !important;
        font-weight: 400 !important;
    }

    .leads-mobile-stages-v15163 .leads-stage-head-v15161[aria-selected="true"] {
        opacity: 1;
        box-shadow: 0 2px 8px rgba(0,0,0,.16);
    }

    .leads-mobile-stages-v15163 .leads-stage-head-v15161:active {
        transform: scale(.98);
    }

    .leads-mobile-stages-v15163 .is-new-v15144 {
        background: var(--lead-stage-blue) !important;
    }

    .leads-mobile-stages-v15163 .is-work-v15144 {
        background: var(--lead-stage-work) !important;
    }

    .leads-mobile-stages-v15163 .is-interested-v15144 {
        background: var(--lead-stage-interest) !important;
    }

    .leads-mobile-stages-v15163 .is-proposal-v15144 {
        background: var(--lead-stage-proposal) !important;
    }

    .leads-mobile-stages-v15163 .is-contract-v15144 {
        background: var(--lead-stage-contract) !important;
    }

    .leads-mobile-stages-v15163 .is-lost-v15144 {
        background: var(--lead-stage-lost) !important;
    }

    /* На телефоне показываем одну выбранную колонку. */
    .leads-board-v15161 {
        width: 100%;
        min-height: 0;
        display: block !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .leads-column-v15161 {
        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        display: none !important;
    }

    .leads-column-v15161.is-mobile-active-v15163 {
        display: flex !important;
    }

    /* Заголовок внутри колонки на mobile больше не дублируем. */
    .leads-column-v15161 > .leads-stage-head-v15161 {
        display: none !important;
    }

    .leads-column-v15161::after {
        display: none !important;
    }

    .leads-column-body-v15161 {
        width: 100%;
        height: 100% !important;
        min-height: 0 !important;
        padding: 0 2px 4px !important;
        gap: 7px !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    .lead-card-v15161 {
        flex: 0 0 auto;
        width: 100%;
        overflow: visible !important;
    }
}


/* =========================================================
   v1.5.164 — mobile tabs contrast + create inside NEW stage
   ========================================================= */

/* Переменные этапов должны быть доступны и мобильным вкладкам,
   которые находятся ВНЕ .leads-board-v15161. */
.leads-page-v15144 {
    --lead-stage-blue: #48ade3;
    --lead-stage-work: #cce99d;
    --lead-stage-interest: #a6e600;
    --lead-stage-proposal: #ffae99;
    --lead-stage-contract: #8ed65b;
    --lead-stage-lost: #adb3bd;
}

/* Кнопка создания лида теперь внутри колонки "Новый лид", как в референсе. */
.leads-stage-create-v15164 {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0 6px 7px 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 9px;
    background: #25282d;
    color: #f4f6f8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background .15s ease, transform .15s ease;
}

.leads-stage-create-v15164:hover {
    background: #2d3137;
    color: #fff;
}

.leads-stage-create-v15164:active {
    transform: scale(.99);
}

.leads-stage-create-plus-v15164 {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

/* Телефон теперь справа в одной строке с названием лида. */
.lead-card-head-v15164 {
    align-items: baseline !important;
}

.lead-card-head-v15164 strong {
    flex: 1 1 auto;
    min-width: 0;
}

.lead-card-phone-inline-v15164 {
    flex: 0 0 auto;
    max-width: 48%;
    overflow: hidden;
    color: #438bd4;
    font-size: 11px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Старую телефонную строку не показываем даже при кэше старой разметки. */
.lead-card-phone-row-v15161 {
    display: none !important;
}

/* У поиска убираем сильную обводку при hover/focus. */
.leads-search-v15161,
.leads-search-v15161:hover,
.leads-search-v15161:focus,
.leads-search-v15161:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

.leads-search-v15161 input,
.leads-search-v15161 input:hover,
.leads-search-v15161 input:focus,
.leads-search-v15161 input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .leads-search-v15161:hover,
html[data-theme="dark"] .leads-search-v15161:focus-within {
    border-color: #343a43 !important;
    background: #171b20 !important;
}

/* Mobile */
@media (max-width: 720px) {
    /* Верхняя глобальная кнопка создания больше не нужна. */
    .leads-create-v15161 {
        display: none !important;
    }

    .leads-toolbar-actions-v15161 {
        display: flex !important;
        justify-content: flex-end !important;
    }

    .leads-toolbar-actions-v15161 .leads-mail-sync-v15161 {
        width: auto !important;
        margin-left: auto !important;
    }

    .leads-toolbar-actions-v15161 .leads-mail-sync-v15161 button {
        width: auto !important;
        min-width: 150px;
    }

    /* Вкладки всегда яркие и читаемые в тёмной теме. */
    .leads-mobile-stages-v15163 .leads-stage-head-v15161 {
        opacity: 1 !important;
        color: #17202a !important;
        box-shadow: none !important;
    }

    .leads-mobile-stages-v15163 .leads-stage-head-v15161 strong,
    .leads-mobile-stages-v15163 .leads-stage-head-v15161 span {
        color: #17202a !important;
    }

    .leads-mobile-stages-v15163 .is-new-v15144 {
        background: #48ade3 !important;
    }

    .leads-mobile-stages-v15163 .is-work-v15144 {
        background: #cce99d !important;
    }

    .leads-mobile-stages-v15163 .is-interested-v15144 {
        background: #a6e600 !important;
    }

    .leads-mobile-stages-v15163 .is-proposal-v15144 {
        background: #ffae99 !important;
    }

    .leads-mobile-stages-v15163 .is-contract-v15144 {
        background: #8ed65b !important;
    }

    .leads-mobile-stages-v15163 .is-lost-v15144 {
        background: #adb3bd !important;
    }

    .leads-mobile-stages-v15163 .leads-stage-head-v15161[aria-selected="true"] {
        box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), 0 2px 8px rgba(0,0,0,.20) !important;
    }

    /* На мобильном кнопка создания — внутри NEW-колонки сразу под вкладками. */
    .leads-stage-create-v15164 {
        width: calc(100% - 4px);
        min-height: 54px;
        margin: 0 2px 8px;
        border-radius: 12px;
        background: #292929;
        font-size: 15px;
    }

    .leads-stage-create-plus-v15164 {
        font-size: 29px;
    }

    /* Номер остаётся напротив названия и не переносится отдельной строкой. */
    .lead-card-head-v15164 {
        gap: 8px !important;
    }

    .lead-card-head-v15164 strong {
        font-size: 13px !important;
    }

    .lead-card-phone-inline-v15164 {
        max-width: 52%;
        font-size: 11px;
    }
}


/* =========================================================
   v1.5.165 — Leads 12px + Dashboard lead statistics
   ========================================================= */

/* Весь текст внутри карточек канбана лидов — 12px. */
.lead-card-v15161,
.lead-card-v15161 :is(
    strong,
    span,
    p,
    small,
    time,
    div,
    footer
) {
    font-size: 12px !important;
}

.lead-card-v15161 {
    line-height: 1.35;
}

.lead-card-footer-v15161 {
    font-size: 12px !important;
}

.lead-card-footer-v15161 span,
.lead-card-footer-v15161 time {
    font-size: 12px !important;
}

/* Dashboard — график лидов за неделю. */
.dashboard-leads-stats-v15165 {
    margin-top: 14px;
    min-width: 0;
}

.dashboard-leads-week-total-v15165 {
    min-width: 42px;
    min-height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(72, 173, 227, .12);
    color: #4aa9df;
    font-size: 15px;
    font-weight: 700;
}

.dashboard-leads-week-chart-v15165 {
    grid-template-columns: repeat(7, minmax(34px, 1fr)) !important;
    gap: 12px;
}

.dashboard-lead-day-v15165 {
    min-width: 0;
}

.dashboard-lead-bar-v15165 {
    width: min(42px, 72%);
}

.dashboard-lead-bar-v15165.is-zero-v15165 {
    min-height: 4px;
    opacity: .28;
}

.dashboard-lead-label-v15165 {
    min-width: 0;
    display: grid;
    gap: 1px;
    padding-bottom: 7px;
    text-align: center;
}

.dashboard-lead-label-v15165 strong {
    color: var(--text);
    font-size: 10px;
    font-weight: 650;
}

.dashboard-lead-label-v15165 small {
    color: var(--muted);
    font-size: 8px;
}

html[data-theme="dark"] .dashboard-leads-week-total-v15165 {
    background: rgba(72, 173, 227, .13);
    color: #65b8e7;
}

@media (max-width: 920px) {
    .dashboard-leads-stats-v15165 {
        order: 6 !important;
    }

    .dashboard-mobile-order-recent {
        order: 7 !important;
    }

    .dashboard-right-column > .side-widget:not(.dashboard-mobile-order-payments) {
        order: 8 !important;
    }
}

@media (max-width: 620px) {
    .dashboard-leads-week-chart-v15165 {
        min-height: 180px;
        gap: 5px;
        padding-inline: 2px;
    }

    .dashboard-leads-week-chart-v15165 .chart-column {
        height: 160px;
        gap: 5px;
    }

    .dashboard-lead-bar-v15165 {
        width: min(30px, 70%);
    }

    .dashboard-lead-label-v15165 strong {
        font-size: 9px;
    }

    .dashboard-lead-label-v15165 small {
        font-size: 7px;
    }
}


/* =========================================================
   v1.5.167 — заголовок лида в канбане 16px
   ========================================================= */

.lead-card-head-v15161 strong {
    font-size: 16px !important;
}


/* =========================================================
   v1.5.168 — лиды: drag&drop, modal, timeline, documents
   ========================================================= */

/* --- Kanban drag & drop --- */
.lead-card-v15161[draggable="true"] {
    cursor: grab;
}

.lead-card-v15161[draggable="true"]:active {
    cursor: grabbing;
}

.lead-card-v15161.is-dragging-v15168 {
    opacity: .42 !important;
    transform: scale(.985) !important;
}

.leads-column-v15161 {
    transition: background .15s ease, box-shadow .15s ease;
}

.leads-column-v15161.is-drop-target-v15168 {
    background: rgba(72, 173, 227, .055) !important;
    box-shadow: inset 0 0 0 1px rgba(72, 173, 227, .32);
}

.leads-column-v15161.is-drop-target-v15168 .leads-column-body-v15161 {
    background: rgba(72, 173, 227, .035);
}

.lead-card-v15161.is-drop-saved-v15168 {
    animation: leadDropSavedV15168 .6s ease;
}

@keyframes leadDropSavedV15168 {
    0% { box-shadow: 0 0 0 0 rgba(72,173,227,.38); }
    50% { box-shadow: 0 0 0 4px rgba(72,173,227,.15); }
    100% { box-shadow: 0 1px 2px rgba(0,0,0,.10); }
}

/* --- Bitrix-like lead side modal --- */
.lead-kanban-modal-v15168[hidden] {
    display: none !important;
}

.lead-kanban-modal-v15168 {
    position: fixed;
    z-index: 1400;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.lead-kanban-modal-v15168.is-open-v15168 {
    opacity: 1;
    pointer-events: auto;
}

.lead-kanban-modal-backdrop-v15168 {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 10, .58);
    backdrop-filter: blur(2px);
}

.lead-kanban-modal-panel-v15168 {
    position: relative;
    z-index: 2;
    width: min(1180px, 92vw);
    height: 100dvh;
    display: grid;
    grid-template-rows: 50px minmax(0, 1fr);
    overflow: hidden;
    border-left: 1px solid var(--border);
    background: var(--bg);
    box-shadow: -20px 0 55px rgba(0,0,0,.34);
    transform: translateX(26px);
    transition: transform .18s ease;
}

.lead-kanban-modal-v15168.is-open-v15168 .lead-kanban-modal-panel-v15168 {
    transform: translateX(0);
}

.lead-kanban-modal-head-v15168 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 13px 0 17px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.lead-kanban-modal-head-v15168 > strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-kanban-modal-head-v15168 > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lead-kanban-modal-open-v15168 {
    color: var(--muted);
    font-size: 10px;
    text-decoration: none;
}

.lead-kanban-modal-open-v15168:hover {
    color: var(--text);
}

.lead-kanban-modal-head-v15168 button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.lead-kanban-modal-head-v15168 button:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.lead-kanban-modal-frame-v15168 {
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--bg);
}

html.has-lead-modal-v15168,
html.has-lead-modal-v15168 body {
    overflow: hidden !important;
}

/* lead.php inside the side modal iframe */
html.lead-embedded-v15168 .sidebar,
html.lead-embedded-v15168 .mobile-app-header,
html.lead-embedded-v15168 .lead-back-standalone-v15156 {
    display: none !important;
}

html.lead-embedded-v15168 .app-shell,
html.lead-embedded-v15168 .main-content {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

html.lead-embedded-v15168 .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
}

html.lead-embedded-v15168 .main-content {
    min-height: 100dvh;
}

html.lead-embedded-v15168 .page-body.page-body-no-topbar {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh;
    padding: 14px !important;
}

html.lead-embedded-v15168 .lead-page-v15154 {
    gap: 10px;
}

/* --- Right workspace tabs --- */
.lead-workspace-v15168 {
    padding: 0 !important;
    overflow: visible;
}

.lead-workspace-tabs-v15168 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 5px;
    border-bottom: 1px solid var(--border);
}

.lead-workspace-tab-v15168 {
    min-height: 37px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
}

.lead-workspace-tab-v15168:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.lead-workspace-tab-v15168.is-active-v15168 {
    color: var(--text);
    background: var(--surface-soft);
    box-shadow: inset 0 0 0 1px var(--border);
}

.lead-workspace-panel-v15168 {
    padding: 14px 15px 16px;
}

.lead-workspace-panel-v15168[hidden] {
    display: none !important;
}

/* system actions inside chronology */
.lead-system-marker-v15168 {
    color: #49a7dc;
    background: rgba(72,173,227,.14);
    box-shadow: 0 0 0 1px rgba(72,173,227,.24);
    cursor: default;
}

.lead-system-marker-v15168 svg {
    width: 16px;
    height: 16px;
}

.lead-system-body-v15168 {
    background: rgba(72,173,227,.035);
}

.lead-system-text-v15168 {
    margin: 7px 0 0;
    color: var(--text);
    font-size: 11px;
    line-height: 1.45;
}

.lead-system-text-v15168 > strong {
    font-weight: 650;
}

.lead-system-arrow-v15168 {
    display: inline-block;
    margin: 0 4px;
    color: var(--muted);
}

/* --- Lead documents tab --- */
.lead-doc-upload-v15168 {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
}

.lead-doc-upload-picker-v15168 {
    position: relative;
    min-height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.lead-doc-upload-picker-v15168:hover {
    color: var(--text);
}

.lead-doc-upload-picker-v15168 svg {
    width: 15px;
    height: 15px;
}

.lead-doc-upload-picker-v15168 input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.lead-doc-upload-selected-v15168 {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-doc-upload-v15168 > .secondary-button {
    min-height: 36px;
}

.lead-doc-section-v15168 {
    padding-top: 14px;
}

.lead-doc-section-v15168 + .lead-doc-section-v15168 {
    margin-top: 14px;
    border-top: 1px solid var(--border);
}

.lead-doc-section-head-v15168 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.lead-doc-section-head-v15168 h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 650;
}

.lead-doc-section-head-v15168 > span {
    color: var(--muted);
    font-size: 9px;
}

.lead-doc-list-v15168,
.lead-history-files-v15168 {
    display: grid;
    gap: 7px;
}

.lead-doc-item-v15168,
.lead-history-file-v15168 {
    min-width: 0;
    min-height: 48px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
}

.lead-doc-item-v15168:hover,
a.lead-history-file-v15168:hover {
    border-color: rgba(72,173,227,.34);
}

.lead-doc-icon-v15168 {
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #49a7dc;
    background: rgba(72,173,227,.10);
}

.lead-doc-icon-v15168 svg,
.lead-doc-download-v15168 svg {
    width: 15px;
    height: 15px;
}

.lead-doc-copy-v15168,
.lead-history-file-v15168 > div {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
}

.lead-doc-copy-v15168 strong,
.lead-history-file-v15168 > div strong {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-doc-copy-v15168 small,
.lead-history-file-v15168 > div small {
    color: var(--muted);
    font-size: 8px;
}

.lead-doc-download-v15168 {
    flex: 0 0 auto;
    color: var(--muted);
}

.lead-history-photo-v15168 {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    cursor: pointer;
}

.lead-history-photo-v15168 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lead-history-file-v15168.is-deleted-v15168 {
    opacity: .55;
}

html[data-theme="dark"] :is(
    .lead-workspace-tab-v15168.is-active-v15168,
    .lead-doc-upload-picker-v15168,
    .lead-doc-item-v15168,
    .lead-history-file-v15168,
    .lead-history-photo-v15168
) {
    background: #171b20 !important;
    border-color: #2a3038 !important;
    box-shadow: none !important;
}

/* Modal responsive */
@media (max-width: 980px) {
    .lead-kanban-modal-panel-v15168 {
        width: 96vw;
    }
}

@media (max-width: 720px) {
    .lead-card-v15161[draggable="true"] {
        cursor: pointer;
    }

    .lead-kanban-modal-panel-v15168 {
        width: 100vw;
        border-left: 0;
        grid-template-rows: 48px minmax(0,1fr);
    }

    .lead-kanban-modal-open-v15168 {
        display: none;
    }

    html.lead-embedded-v15168 .page-body.page-body-no-topbar {
        padding: 9px !important;
    }

    .lead-doc-upload-v15168 {
        grid-template-columns: 1fr auto;
    }

    .lead-doc-upload-picker-v15168 {
        min-width: 0;
    }

    .lead-doc-upload-selected-v15168 {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}


/* =========================================================
   v1.5.169 — Leads: custom drag, history UX, archive, side rail
   ========================================================= */

/* --- custom drag: рука остаётся зажатой, карточка не бледнеет --- */
@media (min-width: 721px) {
    .lead-card-v15161[data-lead-card] {
        cursor: grab !important;
    }

    .lead-card-v15161[data-lead-card]:active {
        cursor: grabbing !important;
    }
}

html.is-lead-pointer-dragging-v15169,
html.is-lead-pointer-dragging-v15169 body,
html.is-lead-pointer-dragging-v15169 * {
    cursor: grabbing !important;
    user-select: none !important;
}

.lead-card-v15161.is-pointer-dragging-v15169 {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    background: #f7f8fa !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
    border-radius: 9px !important;
}

html[data-theme="dark"] .lead-card-v15161.is-pointer-dragging-v15169 {
    opacity: 1 !important;
    filter: none !important;
    background: #f7f8fa !important;
}

/* Старый native-drag visual больше не применяется. */
.lead-card-v15161.is-dragging-v15168 {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

.lead-drop-placeholder-v15169 {
    flex: 0 0 auto;
    width: 100%;
    min-height: 48px;
    margin: 0;
    border: 1px dashed rgba(72,173,227,.72);
    border-radius: 9px;
    background: rgba(72,173,227,.09);
    box-shadow: inset 0 0 0 1px rgba(72,173,227,.05);
}

/* --- Архив в toolbar --- */
.leads-archive-button-v15169 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.leads-archive-button-v15169 svg {
    width: 15px;
    height: 15px;
}

/* --- Источник внутри основного блока лида --- */
.lead-application-source-v15169 {
    margin-top: 13px;
    padding-top: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--border);
}

.lead-application-source-main-v15169,
.lead-application-source-date-v15169 {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.lead-application-source-v15169 small {
    color: var(--muted);
    font-size: 9px;
}

.lead-application-source-v15169 strong {
    font-size: 11px;
    font-weight: 600;
}

.lead-application-source-main-v15169 a {
    margin-top: 2px;
    color: var(--link, #6ea9ff);
    font-size: 9px;
    text-decoration: none;
}

.lead-application-source-main-v15169 a:hover {
    text-decoration: underline;
}

.lead-application-source-date-v15169 {
    flex: 0 0 auto;
    text-align: right;
}

/* --- Статус + настройки --- */
.lead-status-actions-v15169 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.lead-actions-menu-v15169 {
    position: relative;
    z-index: 35;
}

.lead-actions-menu-v15169 > summary {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.lead-actions-menu-v15169 > summary::-webkit-details-marker {
    display: none;
}

.lead-actions-menu-v15169 > summary:hover,
.lead-actions-menu-v15169[open] > summary {
    color: var(--text);
    background: var(--surface-soft);
}

.lead-actions-menu-v15169 > summary svg {
    width: 16px;
    height: 16px;
}

.lead-actions-popover-v15169 {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 190px;
    padding: 6px;
    display: grid;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 14px 35px rgba(0,0,0,.24);
}

.lead-actions-popover-v15169 :is(a, button) {
    width: 100%;
    min-height: 35px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    text-align: left;
    text-decoration: none;
}

.lead-actions-popover-v15169 :is(a, button):hover {
    background: var(--surface-soft);
}

.lead-actions-popover-v15169 svg {
    width: 15px;
    height: 15px;
}

/* --- Более заметные вкладки справа, особенно в тёмной теме --- */
.lead-workspace-tab-v15168.is-active-v15168 {
    color: #2f87bb !important;
    background: rgba(72,173,227,.16) !important;
    box-shadow: inset 0 0 0 1px rgba(72,173,227,.34) !important;
}

html[data-theme="dark"] .lead-workspace-tab-v15168 {
    background: transparent !important;
    border-color: transparent !important;
    color: #8f98a6 !important;
}

html[data-theme="dark"] .lead-workspace-tab-v15168:hover {
    color: #d9dee6 !important;
    background: #20262d !important;
}

html[data-theme="dark"] .lead-workspace-tab-v15168.is-active-v15168 {
    color: #8fd0f4 !important;
    background: #173347 !important;
    box-shadow: inset 0 0 0 1px #285a78 !important;
}

/* Линия хронологии должна быть видимой в dark theme. */
.lead-activity-timeline-v15168::before {
    width: 2px !important;
    background: #cbd1d8 !important;
    opacity: .42;
}

html[data-theme="dark"] .lead-activity-timeline-v15168::before {
    background: #59626f !important;
    opacity: .9;
}

/* --- Системное действие в хронологии --- */
.lead-system-body-v15169 {
    min-width: 0;
}

.lead-system-action-title-v15169 {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
}

.lead-status-transition-v15169,
.lead-title-transition-v15169 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.lead-title-transition-v15169 {
    color: var(--muted);
    font-size: 10px;
}

.lead-title-transition-v15169 strong {
    color: var(--text);
    font-weight: 600;
}

.lead-activity-status-v15169 {
    min-height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #17202a;
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.lead-activity-status-v15169.is-new-v15144 {
    background: #48ade3;
}

.lead-activity-status-v15169.is-work-v15144 {
    background: #cce99d;
}

.lead-activity-status-v15169.is-interested-v15144 {
    background: #a6e600;
}

.lead-activity-status-v15169.is-proposal-v15144 {
    background: #ffae99;
}

.lead-activity-status-v15169.is-contract-v15144 {
    background: #8ed65b;
}

.lead-activity-status-v15169.is-lost-v15144 {
    background: #adb3bd;
}

.lead-system-meta-v15169 {
    margin-top: 10px;
    color: var(--muted);
    font-size: 8px;
    text-align: right;
}

.lead-activity-documents-v15169 {
    display: grid;
    gap: 6px;
}

.lead-activity-document-v15169 {
    min-height: 44px;
    background: var(--surface) !important;
}

/* --- Side rail вместо верхней шапки модального окна --- */
.lead-kanban-modal-side-v15169 {
    position: relative;
    z-index: 2;
    width: min(1180px, 92vw);
    height: 100dvh;
}

.lead-kanban-modal-side-v15169 .lead-kanban-modal-panel-v15168 {
    width: 100%;
    height: 100%;
    grid-template-rows: minmax(0, 1fr) !important;
    transform: translateX(26px);
}

.lead-kanban-modal-v15168.is-open-v15168 .lead-kanban-modal-side-v15169 .lead-kanban-modal-panel-v15168 {
    transform: translateX(0);
}

.lead-kanban-modal-rail-v15169 {
    position: absolute;
    z-index: 4;
    top: 14px;
    left: -49px;
    display: grid;
    gap: 6px;
}

.lead-kanban-modal-rail-v15169 :is(button, a) {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: #20242a;
    color: #d6dbe2;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(0,0,0,.22);
}

.lead-kanban-modal-rail-v15169 :is(button, a):hover {
    background: #2a3037;
    color: #fff;
}

.lead-kanban-modal-rail-v15169 :is(button, a).is-success-v15169 {
    color: #78d69b;
}

.lead-kanban-modal-rail-v15169 svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Старую верхнюю шапку больше не показываем. */
.lead-kanban-modal-head-v15168 {
    display: none !important;
}

/* --- Архив лидов --- */
.leads-archive-page-v15169 {
    display: grid;
    gap: 13px;
}

.leads-archive-toolbar-v15169 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.leads-archive-search-v15169 {
    width: min(420px, 100%);
    min-height: 40px;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 18px minmax(0,1fr) auto;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
}

.leads-archive-search-v15169 svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.leads-archive-search-v15169 input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
}

.leads-archive-search-v15169 button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.leads-archive-list-v15169 {
    display: grid;
    gap: 7px;
}

.leads-archive-item-v15169 {
    min-width: 0;
    padding: 10px 11px;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.leads-archive-copy-v15169 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(120px,1fr) auto;
    gap: 4px 14px;
    color: inherit;
    text-decoration: none;
}

.leads-archive-copy-v15169 strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leads-archive-copy-v15169 span {
    color: var(--link, #6ea9ff);
}

.leads-archive-copy-v15169 small {
    grid-column: 1 / -1;
    color: var(--muted);
}

@media (max-width: 720px) {
    .lead-kanban-modal-side-v15169 {
        width: 100vw;
    }

    .lead-kanban-modal-rail-v15169 {
        top: 8px;
        left: 8px;
        grid-auto-flow: column;
        grid-template-columns: repeat(4, 38px);
    }

    .lead-kanban-modal-rail-v15169 :is(button, a) {
        width: 38px;
        height: 38px;
        background: rgba(32,36,42,.94);
    }

    .lead-application-source-v15169 {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .lead-application-source-date-v15169 {
        text-align: left;
    }

    .lead-status-actions-v15169 {
        gap: 5px;
    }

    .lead-actions-popover-v15169 {
        right: 0;
        width: 175px;
    }

    .leads-archive-toolbar-v15169 {
        align-items: stretch;
        flex-direction: column;
    }

    .leads-archive-search-v15169 {
        width: 100%;
    }

    .leads-archive-item-v15169 {
        grid-template-columns: 1fr;
    }

    .leads-archive-copy-v15169 {
        grid-template-columns: 1fr;
    }

    .leads-archive-copy-v15169 small {
        grid-column: auto;
    }
}


/* =========================================================
   v1.5.170 — drag только по статусам + цветная хронология
   ========================================================= */

/* Полностью отключаем браузерное "призрачное" перетаскивание ссылки. */
.lead-card-v15161[data-lead-card] {
    -webkit-user-drag: none !important;
    user-drag: none !important;
}

html.is-lead-pointer-pressed-v15170,
html.is-lead-pointer-pressed-v15170 body,
html.is-lead-pointer-pressed-v15170 * {
    cursor: grabbing !important;
}

/* Placeholder означает только верх целевой колонки. */
.lead-drop-placeholder-v15169 {
    flex: 0 0 auto;
    margin: 0 0 6px !important;
    border-width: 1px !important;
}

/* Хронология: линия находится под маркерами и не просвечивает через кружки. */
.lead-activity-timeline-v15168::before {
    z-index: 0 !important;
}

.lead-activity-timeline-v15168 > .lead-comment-money-event-v15159 {
    position: relative;
    z-index: 1;
}

.lead-comment-marker-cell-v15159 {
    z-index: 3 !important;
}

.lead-comment-money-marker-v15159,
.lead-system-marker-v15168,
.lead-comment-deleted-marker-v15160 {
    position: relative;
    z-index: 5 !important;
    border: 5px solid var(--surface) !important;
    box-shadow: none !important;
}

/* Комментарий — синий фон, белая иконка. */
.lead-comment-money-marker-v15159.lead-activity-marker-comment-v15170 {
    color: #fff !important;
    background: #3987e8 !important;
}

/* На hover удаления комментария остаётся белый крест на красной заливке. */
.lead-comment-delete-v15159 > summary.lead-activity-marker-comment-v15170:hover,
.lead-comment-delete-v15159[open] > summary.lead-activity-marker-comment-v15170 {
    color: #fff !important;
    background: #d95858 !important;
}

/* Удалённый комментарий — серый. */
.lead-comment-deleted-marker-v15160 {
    color: #fff !important;
    background: #7f8792 !important;
}

/* Создание лида — зелёный плюс. */
.lead-system-marker-v15168.lead-activity-marker-created-v15224 {
    color: #fff !important;
    background: #33a765 !important;
}

/* Смена статуса — зелёный. */
.lead-system-marker-v15168.lead-activity-marker-status-v15170 {
    color: #fff !important;
    background: #33a765 !important;
}

/* Изменение названия — фиолетовый. */
.lead-system-marker-v15168.lead-activity-marker-title-v15170 {
    color: #fff !important;
    background: #7759d8 !important;
}

/* Документы — оранжевый. */
.lead-system-marker-v15168.lead-activity-marker-document-v15170 {
    color: #fff !important;
    background: #dc9630 !important;
}

/* Архив — красный. */
.lead-system-marker-v15168.lead-activity-marker-archive-v15170 {
    color: #fff !important;
    background: #d85b62 !important;
}

/* Восстановление — бирюзовый. */
.lead-system-marker-v15168.lead-activity-marker-restore-v15170 {
    color: #fff !important;
    background: #2e9f9a !important;
}

/* Прочее системное действие — графитовый. */
.lead-system-marker-v15168.lead-activity-marker-default-v15170 {
    color: #fff !important;
    background: #697383 !important;
}

.lead-system-marker-v15168 svg,
.lead-comment-money-marker-v15159 svg {
    color: #fff !important;
    stroke: currentColor !important;
}

/* Заголовок действия слева, пользователь + дата/время справа, одна строка. */
.lead-system-head-v15170 {
    min-width: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lead-system-head-v15170 .lead-system-action-title-v15169 {
    min-width: 0;
    margin-bottom: 0 !important;
}

.lead-system-meta-v15170 {
    flex: 0 0 auto;
    margin-top: 0 !important;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 620px) {
    .lead-system-head-v15170 {
        align-items: flex-start;
        gap: 8px;
    }

    .lead-system-meta-v15170 {
        max-width: 48%;
        white-space: normal;
        line-height: 1.35;
    }
}


/* =========================================================
   v1.5.172 — единый тонкий шрифт во всей CRM
   ========================================================= */

/*
 * Полностью убираем визуальную жирность во всём интерфейсе.
 * Используем настоящий Open Sans Light 300, а не искусственное
 * уменьшение насыщенности отдельных компонентов.
 */
body {
    font-weight: 300 !important;
    font-synthesis: none;
}

body *,
body *::before,
body *::after {
    font-weight: 300 !important;
}

/* Нативные элементы формы иногда берут собственный системный вес. */
button,
input,
select,
textarea,
option {
    font-weight: 300 !important;
}

/* strong/b больше не должны становиться жирными по браузерному умолчанию. */
strong,
b,
th,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 300 !important;
}


/* =========================================================
   v1.5.173 — Dashboard: объекты + лиды рядом
   ========================================================= */

.dashboard-stats-row-v15173 {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.dashboard-object-stats-v15173,
.dashboard-leads-stats-v15173 {
    min-width: 0;
    height: 100%;
    margin-top: 0 !important;
}

.dashboard-types-full-v15173 {
    width: 100%;
}

@media (max-width: 920px) {
    .dashboard-stats-row-v15173 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}


/* =========================================================
   v1.5.174 — Dashboard: 2 блока слева + высокий блок справа
   ========================================================= */

.dashboard-stats-composition-v15174 {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.dashboard-stats-left-v15174 {
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.dashboard-stats-left-v15174 > .content-card {
    min-width: 0;
    height: 100%;
    margin-top: 0 !important;
}

.dashboard-types-tall-v15174 {
    min-width: 0;
    height: 100%;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
}

.dashboard-types-tall-v15174 .type-list {
    flex: 1 1 auto;
}

/* Сброс старой компоновки v1.5.173 */
.dashboard-stats-row-v15173 {
    display: contents;
}

@media (max-width: 920px) {
    .dashboard-stats-composition-v15174 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-stats-left-v15174 {
        grid-template-rows: auto;
        gap: 12px;
    }

    .dashboard-types-tall-v15174 {
        height: auto;
    }
}


/* =========================================================
   v1.5.176 — Dashboard: 2 блока сверху + лиды на всю ширину
   ========================================================= */

.dashboard-stats-layout-v15176 {
    width: 100%;
    display: grid;
    gap: 14px;
}

.dashboard-stats-top-v15176 {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.dashboard-object-stats-v15176,
.dashboard-types-v15176 {
    min-width: 0;
    height: 100%;
    margin-top: 0 !important;
}

.dashboard-types-v15176 {
    display: flex;
    flex-direction: column;
}

.dashboard-types-v15176 .type-list {
    flex: 1 1 auto;
}

.dashboard-leads-stats-v15176 {
    width: 100%;
    min-width: 0;
    margin-top: 0 !important;
}

/* 14 календарных дней вместо 7. */
.dashboard-leads-stats-v15176 .dashboard-leads-week-chart-v15165 {
    grid-template-columns: repeat(14, minmax(28px, 1fr)) !important;
    gap: 8px;
}

.dashboard-leads-stats-v15176 .dashboard-lead-bar-v15165 {
    width: min(34px, 72%);
}

/* Старую сетку v1.5.174 больше не используем. */
.dashboard-stats-composition-v15174,
.dashboard-stats-left-v15174 {
    display: contents;
}

@media (max-width: 920px) {
    .dashboard-stats-top-v15176 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-stats-layout-v15176 {
        gap: 12px;
    }
}

@media (max-width: 620px) {
    .dashboard-leads-stats-v15176 .dashboard-leads-week-chart-v15165 {
        grid-template-columns: repeat(14, minmax(20px, 1fr)) !important;
        gap: 4px;
        padding-inline: 0;
    }

    .dashboard-leads-stats-v15176 .dashboard-lead-bar-v15165 {
        width: min(24px, 72%);
    }

    .dashboard-leads-stats-v15176 .dashboard-lead-label-v15165 strong {
        font-size: 8px !important;
    }

    .dashboard-leads-stats-v15176 .dashboard-lead-label-v15165 small {
        font-size: 6px !important;
    }
}


/* =========================================================
   v1.5.178 — компактная верхняя строка Dashboard
   ========================================================= */

/* Оба верхних блока делаем компактнее по внутренним отступам. */
.dashboard-object-stats-v15176,
.dashboard-types-v15176 {
    padding: 13px 14px !important;
}

.dashboard-object-stats-v15176 .card-heading,
.dashboard-types-v15176 .card-heading {
    margin-bottom: 9px !important;
}

/* Уменьшаем общую высоту графика «Объекты за 6 месяцев». */
.dashboard-object-stats-v15176 .mini-chart {
    min-height: 145px !important;
    padding: 8px 6px 0 !important;
    gap: 10px !important;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 34px,
            #eef0f5 35px
        ) !important;
}

.dashboard-object-stats-v15176 .chart-column {
    height: 128px !important;
    gap: 5px !important;
}

.dashboard-object-stats-v15176 .chart-label {
    padding-bottom: 5px !important;
}

/* «По типам объектов»: меньше воздуха между строками. */
.dashboard-types-v15176 .type-list {
    gap: 7px !important;
    align-content: start;
}

.dashboard-types-v15176 .type-row {
    padding: 0 !important;
}

.dashboard-types-v15176 .type-row-head {
    margin-bottom: 0 !important;
    gap: 8px !important;
    min-height: 30px;
}

.dashboard-types-v15176 .type-row-head strong {
    font-size: 14px !important;
    line-height: 1.2;
}

.dashboard-types-v15176 .type-row-head span {
    margin-top: 1px !important;
    font-size: 12px !important;
    line-height: 1.2;
}

.dashboard-types-v15176 .type-row-head > b {
    font-size: 14px !important;
}

/* Тёмная тема: сохраняем более частую сетку компактного графика. */
html[data-theme="dark"] .dashboard-object-stats-v15176 .mini-chart {
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 34px,
            rgba(255,255,255,.055) 35px
        ) !important;
}

@media (max-width: 920px) {
    .dashboard-object-stats-v15176,
    .dashboard-types-v15176 {
        padding: 13px !important;
    }
}


/* =========================================================
   v1.5.181 — CSS-правки пользователя без изменений v1.5.179
   ========================================================= */

html[data-theme="dark"] .lead-workspace-tab-v15168.is-active-v15168 {
    color: #ffffff !important;
    background: #2a3038 !important;
    box-shadow: none !important;
}

.leads-stage-create-v15164 {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0 6px 7px 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 9px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background .15s ease, transform .15s ease;
    border-color: #000000;
}

.lead-card-head-v15161 strong {
    font-size: 14px !important;
}

.nav-link.is-active .nav-lead-count-v15145 {
    background: rgba(55, 190, 103, .22);
    color: #000000;
}


/* =========================================================
   v1.5.182 — источники лидов внутри графика за 14 дней
   ========================================================= */

.dashboard-lead-sources-v15182 {
    margin-top: 12px;
    padding-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-top: 1px solid var(--border);
}

.dashboard-lead-source-v15182 {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.dashboard-lead-source-v15182 span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 12px !important;
}

.dashboard-lead-source-v15182 strong {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 14px !important;
}

@media (max-width: 620px) {
    .dashboard-lead-sources-v15182 {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .dashboard-lead-source-v15182 {
        min-height: 32px;
        padding: 6px 9px;
    }
}


/* =========================================================
   v1.5.183 — подробная статистика лидов
   ========================================================= */

/* Убираем разделительную линию над источниками на Dashboard. */
.dashboard-lead-sources-v15182 {
    border-top: 0 !important;
    padding-top: 0 !important;
}

.dashboard-lead-stats-footer-v15183 {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.dashboard-lead-stats-link-v15183 {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashboard-lead-stats-link-v15183 span {
    font-size: 16px !important;
    line-height: 1;
}

/* --- Страница статистики --- */

.lead-stats-page-v15183 {
    display: grid;
    gap: 14px;
}

.lead-stats-page-head-v15183 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.lead-stats-page-head-v15183 > div {
    min-width: 0;
}

.lead-stats-page-head-v15183 h1 {
    margin: 9px 0 2px;
    font-size: 25px;
    line-height: 1.15;
}

.lead-stats-page-head-v15183 p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.lead-stats-filter-card-v15183 {
    padding: 12px 14px !important;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.lead-stats-filter-v15183 {
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.lead-stats-filter-v15183 label {
    display: grid;
    gap: 5px;
}

.lead-stats-filter-v15183 label span {
    color: var(--muted);
    font-size: 10px;
}

.lead-stats-filter-v15183 input[type="date"] {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}

.lead-stats-presets-v15183 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.lead-stats-presets-v15183 a {
    min-height: 32px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--muted);
    text-decoration: none;
    font-size: 10px;
}

.lead-stats-presets-v15183 a:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.lead-stats-presets-v15183 a.is-active-v15183 {
    color: var(--text);
    background: var(--surface-soft);
    border-color: rgba(72,173,227,.55);
}

.lead-stats-kpis-v15183 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.lead-stats-kpi-v15183 {
    min-width: 0;
    padding: 13px 14px !important;
    display: grid;
    gap: 5px;
}

.lead-stats-kpi-v15183 > span {
    color: var(--muted);
    font-size: 11px;
}

.lead-stats-kpi-v15183 > strong {
    font-size: 27px !important;
    line-height: 1;
}

.lead-stats-kpi-v15183 > small {
    color: var(--muted);
    font-size: 9px;
}

.lead-stats-chart-card-v15183 {
    min-width: 0;
}

.lead-stats-chart-scroll-v15183 {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 4px;
}

.lead-stats-chart-v15183 {
    min-width: max(100%, calc(var(--lead-stats-columns) * 42px));
    min-height: 205px;
    padding: 14px 8px 0;
    display: grid;
    grid-template-columns: repeat(var(--lead-stats-columns), minmax(32px, 1fr));
    gap: 7px;
    align-items: end;
    border-radius: 9px;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 44px,
            rgba(127,135,146,.14) 45px
        );
}

.lead-stats-chart-v15183.is-monthly-v15183 {
    min-width: max(100%, calc(var(--lead-stats-columns) * 54px));
}

.lead-stats-chart-column-v15183 {
    min-width: 0;
    height: 186px;
    display: grid;
    grid-template-rows: 18px minmax(0, 1fr) 24px;
    justify-items: center;
    align-items: end;
    gap: 4px;
}

.lead-stats-chart-column-v15183 > span {
    font-size: 10px;
}

.lead-stats-chart-column-v15183 > i {
    width: min(30px, 72%);
    min-height: 3px;
    display: block;
    border-radius: 6px 6px 2px 2px;
    background: #48ade3;
}

.lead-stats-chart-column-v15183 > small {
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-stats-two-columns-v15183 {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 14px;
    align-items: stretch;
}

.lead-stats-source-card-v15183,
.lead-stats-status-card-v15183 {
    min-width: 0;
}

.lead-stats-source-list-v15183 {
    display: grid;
    gap: 7px;
}

.lead-stats-source-row-v15183 {
    min-width: 0;
    min-height: 57px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(280px, 1.4fr);
    align-items: center;
    gap: 12px;
    border-radius: 9px;
    background: var(--surface-soft);
}

.lead-stats-source-name-v15183 {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.lead-stats-source-name-v15183 strong {
    font-size: 13px !important;
}

.lead-stats-source-name-v15183 small {
    color: var(--muted);
    font-size: 9px;
}

.lead-stats-source-metrics-v15183 {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.lead-stats-source-metrics-v15183 > span {
    min-width: 0;
    display: grid;
    gap: 2px;
    text-align: right;
}

.lead-stats-source-metrics-v15183 b {
    font-size: 14px !important;
}

.lead-stats-source-metrics-v15183 small {
    color: var(--muted);
    font-size: 8px;
}

.lead-stats-status-list-v15183 {
    display: grid;
    gap: 6px;
}

.lead-stats-status-row-v15183 {
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px 48px;
    align-items: center;
    gap: 8px;
}

.lead-stats-status-row-v15183 > span:nth-child(2) {
    text-align: right;
    font-size: 12px;
}

.lead-stats-status-row-v15183 > small {
    color: var(--muted);
    font-size: 9px;
    text-align: right;
}

.lead-stats-status-pill-v15183 {
    width: fit-content;
    min-height: 26px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #17202a;
    font-size: 10px;
    white-space: nowrap;
}

.lead-stats-status-pill-v15183.is-new-v15144 { background: #48ade3; }
.lead-stats-status-pill-v15183.is-work-v15144 { background: #cce99d; }
.lead-stats-status-pill-v15183.is-interested-v15144 { background: #a6e600; }
.lead-stats-status-pill-v15183.is-proposal-v15144 { background: #ffae99; }
.lead-stats-status-pill-v15183.is-contract-v15144 { background: #8ed65b; }
.lead-stats-status-pill-v15183.is-lost-v15144 { background: #adb3bd; }

.lead-stats-status-summary-v15183 {
    margin-top: 9px;
    padding-top: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
}

.lead-stats-status-summary-v15183 strong {
    color: var(--text);
    font-size: 13px !important;
}

.lead-stats-list-card-v15183 {
    min-width: 0;
}

.lead-stats-table-wrap-v15183 {
    width: 100%;
    overflow-x: auto;
}

.lead-stats-table-v15183 {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.lead-stats-table-v15183 th,
.lead-stats-table-v15183 td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    font-size: 10px;
}

.lead-stats-table-v15183 th {
    color: var(--muted);
}

.lead-stats-table-v15183 tbody tr:last-child td {
    border-bottom: 0;
}

.lead-stats-table-v15183 td:nth-child(2) {
    min-width: 175px;
}

.lead-stats-table-v15183 td:nth-child(2) > a {
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
}

.lead-stats-table-v15183 td:nth-child(2) > a:hover {
    text-decoration: underline;
}

.lead-stats-table-v15183 td small {
    margin-top: 2px;
    display: block;
    color: var(--muted);
    font-size: 8px;
}

.lead-stats-table-v15183 td > a {
    color: var(--link, #6ea9ff);
    text-decoration: none;
}

@media (max-width: 980px) {
    .lead-stats-kpis-v15183 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lead-stats-two-columns-v15183 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .lead-stats-page-head-v15183 {
        align-items: stretch;
        flex-direction: column;
    }

    .lead-stats-page-head-v15183 h1 {
        font-size: 22px;
    }

    .lead-stats-filter-card-v15183 {
        align-items: stretch;
        flex-direction: column;
    }

    .lead-stats-filter-v15183 {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .lead-stats-filter-v15183 .primary-button {
        grid-column: 1 / -1;
    }

    .lead-stats-presets-v15183 {
        width: 100%;
    }

    .lead-stats-presets-v15183 a {
        flex: 1 1 auto;
    }

    .lead-stats-source-row-v15183 {
        grid-template-columns: 1fr;
    }

    .lead-stats-source-metrics-v15183 > span {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .lead-stats-kpis-v15183 {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .lead-stats-kpi-v15183 {
        padding: 11px !important;
    }

    .lead-stats-kpi-v15183 > strong {
        font-size: 22px !important;
    }

    .lead-stats-source-metrics-v15183 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   v1.5.184 — статистика лидов: кнопки + города
   ========================================================= */

/* Dashboard: заголовок, кнопка и количество в одну строку. */
.dashboard-leads-heading-v15184 {
    gap: 12px;
}

.dashboard-leads-heading-actions-v15184 {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.dashboard-leads-heading-actions-v15184 .dashboard-lead-stats-link-v15183 {
    min-height: 30px;
    padding: 0 10px;
    white-space: nowrap;
}

.dashboard-lead-stats-footer-v15183 {
    display: none !important;
}

/* Leads toolbar. */
.leads-statistics-button-v15184 {
    white-space: nowrap;
}

/* География лидов. */
.lead-stats-city-card-v15184 {
    min-width: 0;
}

.lead-stats-city-list-v15184 {
    display: grid;
    gap: 8px;
}

.lead-stats-city-row-v15184 {
    min-width: 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.lead-stats-city-rank-v15184 {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 10px !important;
}

.lead-stats-city-main-v15184 {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.lead-stats-city-head-v15184 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lead-stats-city-head-v15184 strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px !important;
}

.lead-stats-city-head-v15184 span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 9px !important;
}

.lead-stats-city-track-v15184 {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}

.lead-stats-city-track-v15184 i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #48ade3;
}

.lead-stats-city-summary-v15184 {
    margin-top: 11px;
    padding-top: 9px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 9px;
}

.lead-stats-city-summary-v15184 strong {
    color: var(--text);
    font-size: 10px !important;
}

@media (max-width: 720px) {
    .dashboard-leads-heading-v15184 {
        align-items: flex-start;
    }

    .dashboard-leads-heading-actions-v15184 {
        gap: 6px;
    }

    .dashboard-leads-heading-actions-v15184 .dashboard-lead-stats-link-v15183 {
        min-height: 28px;
        padding: 0 8px;
        font-size: 9px !important;
    }

    .leads-statistics-button-v15184 {
        width: auto;
    }
}

@media (max-width: 520px) {
    .dashboard-leads-heading-v15184 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .dashboard-leads-heading-actions-v15184 {
        flex-wrap: nowrap;
    }

    .dashboard-leads-heading-actions-v15184 .dashboard-lead-stats-link-v15183 {
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lead-stats-city-row-v15184 {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .lead-stats-city-rank-v15184 {
        width: 24px;
        height: 24px;
    }
}


/* =========================================================
   v1.5.185 — статистика лидов: весь период + 3 блока в строку
   ========================================================= */

.lead-stats-insights-row-v15185 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.lead-stats-insights-row-v15185 > .content-card {
    min-width: 0;
    height: 100%;
    margin: 0 !important;
}

/* Источники в компактном формате внутри одной трети экрана. */
.lead-stats-insights-row-v15185 .lead-stats-source-row-v15183 {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    min-height: 0;
    padding: 9px !important;
}

.lead-stats-insights-row-v15185 .lead-stats-source-metrics-v15183 > span {
    text-align: left;
}

/* Города в среднем столбце. */
.lead-stats-insights-row-v15185 .lead-stats-city-list-v15184 {
    gap: 7px;
}

.lead-stats-insights-row-v15185 .lead-stats-city-row-v15184 {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
}

.lead-stats-insights-row-v15185 .lead-stats-city-rank-v15184 {
    width: 24px;
    height: 24px;
}

/* Статусы в правом столбце. */
.lead-stats-insights-row-v15185 .lead-stats-status-row-v15183 {
    min-height: 32px;
}

/* Старый layout больше не используется. */
.lead-stats-two-columns-v15183 {
    display: contents !important;
}

/* Удалённый нижний список больше не занимает место. */
.lead-stats-list-card-v15183,
.lead-stats-table-wrap-v15183 {
    display: none !important;
}

@media (max-width: 1100px) {
    .lead-stats-insights-row-v15185 {
        grid-template-columns: 1fr 1fr;
    }

    .lead-stats-insights-row-v15185 .lead-stats-status-card-v15183 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .lead-stats-insights-row-v15185 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lead-stats-insights-row-v15185 .lead-stats-status-card-v15183 {
        grid-column: auto;
    }
}


/* =========================================================
   v1.5.186 — фильтр по кнопке + периоды внутри графика
   ========================================================= */

.lead-stats-page-actions-v15186 {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.lead-stats-filter-card-v15186[hidden] {
    display: none !important;
}

.lead-stats-filter-card-v15186 {
    animation: leadStatsFilterOpenV15186 .16s ease-out;
}

@keyframes leadStatsFilterOpenV15186 {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Быстрые периоды теперь находятся непосредственно в блоке графика. */
.lead-stats-chart-presets-v15186 {
    margin: -2px 0 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.lead-stats-chart-presets-v15186 a {
    min-height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    font-size: 10px !important;
}

.lead-stats-chart-presets-v15186 a:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.lead-stats-chart-presets-v15186 a.is-active-v15186 {
    color: #ffffff;
    border-color: #3188bd;
    background: #3188bd;
}

html[data-theme="dark"] .lead-stats-chart-presets-v15186 a.is-active-v15186 {
    color: #ffffff;
    border-color: #2a3038;
    background: #2a3038;
}

/* Пустое значение не показывает 0 над столбцом. */
.lead-stats-chart-column-v15183 > span.is-empty-v15186 {
    visibility: hidden;
}

/* Сегодня визуально отмечено только текстом, без лишней тяжести. */
.lead-stats-chart-column-v15183.is-today-v15186 > small {
    color: var(--text);
    white-space: nowrap;
}

/* Источник + процент на одной строке. */
.lead-stats-source-title-v15186 {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.lead-stats-source-title-v15186 strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-stats-source-title-v15186 > span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px !important;
}

/* В городах слева теперь количество лидов, а не порядковый номер. */
.lead-stats-city-count-v15186 {
    color: var(--text) !important;
    font-size: 11px !important;
}

@media (max-width: 720px) {
    .lead-stats-page-actions-v15186 {
        width: 100%;
        justify-content: flex-start;
    }

    .lead-stats-page-actions-v15186 > * {
        flex: 1 1 0;
    }

    .lead-stats-chart-presets-v15186 {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .lead-stats-chart-presets-v15186 a {
        flex: 0 0 auto;
    }
}


/* =========================================================
   v1.5.187 — шапка «Поступление лидов» в одну строку
   ========================================================= */

.lead-stats-chart-heading-v15187 {
    width: 100%;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px;
}

.lead-stats-chart-title-v15187 {
    flex: 0 0 auto;
    min-width: 0;
}

.lead-stats-chart-title-v15187 h2 {
    margin: 0;
    white-space: nowrap;
}

.lead-stats-chart-controls-v15187 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.lead-stats-chart-presets-v15187 {
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: nowrap !important;
}

.lead-stats-chart-total-v15187 {
    min-width: 34px;
    min-height: 30px;
    padding: 0 9px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px !important;
}

@media (max-width: 900px) {
    .lead-stats-chart-heading-v15187 {
        align-items: flex-start !important;
    }

    .lead-stats-chart-controls-v15187 {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 2px;
    }
}

@media (max-width: 720px) {
    .lead-stats-chart-heading-v15187 {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .lead-stats-chart-controls-v15187 {
        width: 100%;
        justify-content: flex-start;
    }

    .lead-stats-chart-presets-v15187 {
        overflow-x: auto;
    }
}


/* =========================================================
   v1.5.188 — Инвесторы
   ========================================================= */
.investors-page-v15188{display:grid;gap:14px}.investors-page-head-v15188{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}.investors-page-head-v15188 h1{margin:0 0 3px;font-size:25px}.investors-page-head-v15188 p{margin:0;color:var(--muted);font-size:11px}.investor-summary-grid-v15188{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.investor-summary-v15188{padding:13px 14px!important;display:grid;gap:5px}.investor-summary-v15188>span{color:var(--muted);font-size:10px}.investor-summary-v15188>strong{font-size:22px!important;line-height:1}.investor-summary-v15188>small{color:var(--muted);font-size:9px}.investor-summary-v15188.is-danger-v15188{box-shadow:inset 0 0 0 1px rgba(224,89,89,.35)}.investor-summary-v15188.is-danger-v15188>strong{color:#d75c5c}.investor-empty-v15188{min-height:220px;display:grid;place-items:center;text-align:center;align-content:center;gap:8px}.investor-empty-v15188>span{width:52px;height:52px;display:grid;place-items:center;border-radius:50%;background:var(--surface-soft)}.investor-empty-v15188 svg{width:25px;height:25px}.investor-empty-v15188 h2,.investor-empty-v15188 p{margin:0}.investor-empty-v15188 p{max-width:550px;color:var(--muted);font-size:11px}.investor-reference-scroll-v15188{overflow-x:auto;padding:2px 1px 18px}.investor-reference-list-v15188{min-width:max-content;display:flex;align-items:flex-start;gap:17px}.investor-reference-v15188{position:relative;width:138px;display:grid;justify-items:center;gap:5px;color:var(--text);text-decoration:none;text-align:center}.investor-money-circle-v15188{width:104px;height:104px;padding:12px;display:grid;place-items:center;align-content:center;border:1px solid var(--border);border-radius:50%;background:var(--surface);box-shadow:0 5px 20px rgba(0,0,0,.06);transition:.15s ease}.investor-reference-v15188:hover .investor-money-circle-v15188,.investor-reference-v15188.is-active-v15188 .investor-money-circle-v15188{transform:translateY(-2px);border-color:#48ade3;box-shadow:0 7px 24px rgba(72,173,227,.14)}.investor-money-circle-v15188 small{color:var(--muted);font-size:8px}.investor-money-circle-v15188 strong{font-size:17px!important;line-height:1.1}.investor-money-circle-v15188 em{font-style:normal;color:var(--muted);font-size:9px}.investor-reference-name-v15188{max-width:138px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.investor-reference-v15188>small{max-width:138px;color:var(--muted);font-size:8px;line-height:1.35}.investor-reference-v15188.is-active-v15188:after{content:"";position:absolute;top:132px;left:50%;height:24px;border-left:1px dashed rgba(72,173,227,.6)}.investor-detail-v15188{display:grid;grid-template-columns:minmax(245px,.75fr) minmax(0,2fr);gap:20px}.investor-person-v15188{position:relative;min-width:0;padding-right:18px;border-right:1px dashed var(--border)}.investor-person-head-v15188{display:flex;align-items:center;gap:10px}.investor-person-avatar-v15188{width:50px;height:50px;font-size:14px}.investor-person-head-v15188 small,.investor-investments-head-v15188 small{color:var(--muted);font-size:9px}.investor-person-head-v15188 h2,.investor-investments-head-v15188 h2{margin:2px 0 0;font-size:18px}.investor-person-line-v15188{height:16px;margin-left:25px;border-left:1px dashed var(--border)}.investor-person-info-v15188{margin:0;display:grid;gap:7px}.investor-person-info-v15188>div{display:flex;justify-content:space-between;gap:10px}.investor-person-info-v15188 dt{color:var(--muted);font-size:9px}.investor-person-info-v15188 dd{margin:0;text-align:right;font-size:10px}.investor-person-note-v15188{margin:11px 0 0;padding:9px;border-radius:8px;background:var(--surface-soft);font-size:9px;line-height:1.45}.investor-investments-v15188{min-width:0}.investor-investments-head-v15188{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.investor-investment-grid-v15188{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.investor-investment-card-v15188{min-width:0;padding:11px;display:grid;gap:6px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);color:var(--text);text-decoration:none;transition:.15s ease}.investor-investment-card-v15188:hover,.investor-investment-card-v15188.is-active-v15188{border-color:#48ade3;transform:translateY(-1px)}.investor-investment-card-v15188.is-closed-v15188{opacity:.58}.investor-investment-card-v15188.is-overdue-v15188{box-shadow:inset 3px 0 0 #d75c5c}.investor-investment-card-head-v15188,.investor-investment-card-foot-v15188{display:flex;align-items:center;justify-content:space-between;gap:8px}.investor-investment-card-head-v15188 span,.investor-investment-card-head-v15188 em,.investor-investment-card-foot-v15188{font-size:8px}.investor-investment-card-head-v15188 em{font-style:normal;color:var(--muted)}.investor-investment-card-v15188>strong{font-size:18px!important}.investor-investment-card-v15188>small{color:var(--muted);font-size:8px}.investor-investment-progress-v15188{height:6px;overflow:hidden;border-radius:999px;background:var(--surface)}.investor-investment-progress-v15188 i{height:100%;display:block;border-radius:inherit;background:#48ade3}.investor-investment-detail-v15188{display:grid;gap:14px}.investor-investment-detail-head-v15188{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.investor-investment-detail-head-v15188 small{color:var(--muted);font-size:9px}.investor-investment-detail-head-v15188 h2{margin:2px 0 3px;font-size:20px}.investor-investment-detail-head-v15188 p{margin:0;color:var(--muted);font-size:9px}.investor-detail-metrics-v15188{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.investor-detail-metrics-v15188>div{padding:9px;border-radius:8px;background:var(--surface-soft);display:grid;gap:3px}.investor-detail-metrics-v15188 span{color:var(--muted);font-size:8px}.investor-detail-metrics-v15188 strong{font-size:13px!important}.investor-chronology-v15188{position:relative;display:grid;gap:0;padding-left:16px}.investor-chronology-v15188:before{content:"";position:absolute;left:27px;top:17px;bottom:18px;border-left:1px dashed var(--border)}.investor-chronology-item-v15188{position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;padding:9px 0}.investor-chronology-dot-v15188{position:relative;z-index:1;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#48ade3;color:#fff}.investor-chronology-dot-v15188 svg{width:12px;height:12px}.investor-chronology-item-v15188.is-repayment-v15188 .investor-chronology-dot-v15188{background:#55b878}.investor-chronology-item-v15188.is-voided-v15188{opacity:.55;text-decoration:line-through}.investor-chronology-item-v15188.is-voided-v15188 .investor-chronology-dot-v15188{background:#8d949e}.investor-chronology-head-v15188{display:flex;align-items:center;justify-content:space-between;gap:10px}.investor-chronology-head-v15188 strong{font-size:11px!important}.investor-chronology-head-v15188 time,.investor-chronology-item-v15188 small{color:var(--muted);font-size:8px}.investor-chronology-item-v15188 p{margin:3px 0;font-size:9px}.investor-chronology-item-v15188 a{color:var(--link,#6ea9ff);text-decoration:none}.investor-modal-v15188{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:18px}.investor-modal-v15188[hidden]{display:none}.investor-modal-backdrop-v15188{position:absolute;inset:0;background:rgba(0,0,0,.58)}.investor-modal-dialog-v15188{position:relative;width:min(580px,100%);max-height:min(760px,calc(100vh - 36px));overflow:auto;padding:16px;border:1px solid var(--border);border-radius:13px;background:var(--surface);box-shadow:0 25px 80px rgba(0,0,0,.28)}.investor-modal-head-v15188{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:13px}.investor-modal-head-v15188 small{color:var(--muted);font-size:8px}.investor-modal-head-v15188 h3{margin:2px 0;font-size:18px}.investor-modal-head-v15188 p{margin:3px 0 0;color:var(--muted);font-size:9px}.investor-modal-head-v15188>button{width:32px;height:32px;border:0;border-radius:8px;background:var(--surface-soft);color:var(--text);font-size:18px}.investor-modal-dialog-v15188 form{display:grid;gap:10px}.investor-modal-dialog-v15188 label{display:grid;gap:5px}.investor-modal-dialog-v15188 label>span{color:var(--muted);font-size:9px}.investor-modal-dialog-v15188 input,.investor-modal-dialog-v15188 select,.investor-modal-dialog-v15188 textarea{width:100%;min-height:39px;padding:8px 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft);color:var(--text)}.investor-modal-grid-v15188,.investor-profit-grid-v15188{display:grid;grid-template-columns:1fr 1fr;gap:9px}.investor-modal-actions-v15188{display:flex;justify-content:flex-end;gap:8px;margin-top:3px}.money-flow-row-investor-v15188,.money-flow-row-investment-v15188{min-width:0}.money-flow-form-row-v15119:has(.money-flow-row-investor-v15188:not([hidden])){grid-template-columns:minmax(155px,1fr) minmax(150px,.8fr) minmax(180px,1fr) minmax(120px,.55fr) auto}.money-flow-target-v15119.is-investor-v15188,.money-flow-tranche-target-v15128.is-investor-v15188{box-shadow:inset 3px 0 0 #a879df}.money-flow-target-v15119.is-investor-v15188 small,.money-flow-tranche-target-v15128.is-investor-v15188 small{color:#9a75c8}
@media(max-width:980px){.investor-summary-grid-v15188{grid-template-columns:1fr 1fr}.investor-detail-v15188{grid-template-columns:1fr}.investor-person-v15188{padding-right:0;padding-bottom:14px;border-right:0;border-bottom:1px dashed var(--border)}.investor-detail-metrics-v15188{grid-template-columns:1fr 1fr}.money-flow-form-row-v15119:has(.money-flow-row-investor-v15188:not([hidden])){grid-template-columns:1fr 1fr}}
@media(max-width:650px){.investors-page-head-v15188{align-items:stretch;flex-direction:column}.investor-summary-grid-v15188{grid-template-columns:1fr 1fr;gap:7px}.investor-summary-v15188>strong{font-size:17px!important}.investor-investment-grid-v15188{grid-template-columns:1fr}.investor-detail-metrics-v15188{grid-template-columns:1fr 1fr}.investor-modal-grid-v15188,.investor-profit-grid-v15188{grid-template-columns:1fr}.investor-investment-detail-head-v15188{flex-direction:column}.money-flow-form-row-v15119:has(.money-flow-row-investor-v15188:not([hidden])){grid-template-columns:1fr}.investor-reference-v15188{width:120px}.investor-money-circle-v15188{width:92px;height:92px}.investor-reference-v15188.is-active-v15188:after{top:120px}}


/* =========================================================
   v1.5.189 — временное удаление инвесторов/инвестиций
   ========================================================= */

.investor-delete-form-v15189 {
    margin: 0;
}

.investor-person-v15188 > .investor-delete-form-v15189 {
    margin-top: 12px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
}

.investor-investment-detail-actions-v15189 {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.investor-investment-detail-actions-v15189 .ghost-danger-button {
    min-height: 38px;
    padding: 0 8px;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .investor-investment-detail-actions-v15189 {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* =========================================================
   v1.5.190 — инвестиция → объекты / объекты → инвестор
   ========================================================= */

.investor-detail-metrics-v15190 {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.investor-detail-metrics-v15190 > div.is-overpaid-v15190 strong {
    color: #37be67;
}

.investor-chronology-item-v15188.is-allocation-v15190 .investor-chronology-dot-v15188 {
    background: #48ade3;
}

.investor-modal-error-v15190 {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(216, 103, 103, .12);
    color: #d86767;
    font-size: 10px !important;
}

.money-flow-tab-investor-v15190 {
    min-width: 94px;
    display: grid !important;
    justify-items: center;
    gap: 1px;
}

.money-flow-tab-investor-v15190 > small {
    color: var(--muted);
    font-size: 7px !important;
    line-height: 1;
}

.money-flow-tab-investor-v15190.is-active-v15127 > small {
    color: inherit;
}

.money-flow-investor-source-v15190 {
    margin-top: 4px;
    display: inline-flex;
    color: var(--text);
    text-decoration: none;
    font-size: 9px !important;
}

.money-flow-investor-source-v15190:hover {
    text-decoration: underline;
}

.is-investor-income-v15190 .money-flow-event-marker-v15119 > span {
    background: rgba(72, 173, 227, .16);
}

@media (max-width: 1180px) {
    .investor-detail-metrics-v15190 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 620px) {
    .investor-detail-metrics-v15190 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   v1.5.191 — Investors minimalist master/detail UI
   ========================================================= */

.investors-page-v15191 {
    display: grid;
    gap: 12px;
}

.investor-summary-grid-v15191 {
    margin: 0 !important;
}

.investor-workspace-v15191 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(290px, 330px) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.investor-sidebar-v15191 {
    min-width: 0;
    padding: 10px !important;
    position: sticky;
    top: 10px;
}

.investor-sidebar-actions-v15191 {
    display: grid;
    gap: 8px;
}

.investor-add-button-v15191 {
    width: 100%;
    min-height: 38px;
}

.investor-search-v15191 {
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--muted);
}

.investor-search-v15191 > span {
    font-size: 17px !important;
    line-height: 1;
}

.investor-search-v15191 input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--text);
    box-shadow: none !important;
}

.investor-sidebar-meta-v15191 {
    padding: 10px 2px 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 9px !important;
}

.investor-sidebar-meta-v15191 b {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 9px !important;
}

.investor-list-v15191 {
    display: grid;
    gap: 5px;
}

.investor-list-item-v15191 {
    min-width: 0;
    min-height: 58px;
    padding: 7px 8px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    transition: background .14s ease, border-color .14s ease;
}

.investor-list-item-v15191:hover {
    background: var(--surface-soft);
}

.investor-list-item-v15191.is-active-v15191 {
    border-color: rgba(72, 173, 227, .62);
    background: rgba(72, 173, 227, .08);
}

.investor-list-avatar-v15191 {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 10px !important;
}

.investor-list-main-v15191,
.investor-list-money-v15191 {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.investor-list-main-v15191 strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px !important;
}

.investor-list-main-v15191 small,
.investor-list-money-v15191 small {
    color: var(--muted);
    font-size: 8px !important;
}

.investor-list-money-v15191 {
    justify-items: end;
    text-align: right;
}

.investor-list-money-v15191 strong {
    white-space: nowrap;
    font-size: 10px !important;
}

.investor-sidebar-empty-v15191 {
    padding: 18px 8px;
    color: var(--muted);
    text-align: center;
    font-size: 9px !important;
}

.investor-main-v15191 {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.investor-main-empty-v15191 {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: var(--muted);
    text-align: center;
}

.investor-main-empty-v15191 > span {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-soft);
}

.investor-profile-v15191,
.investor-investments-panel-v15191,
.investor-investment-detail-v15191 {
    padding: 12px !important;
}

.investor-profile-head-v15191,
.investor-investment-detail-head-v15191,
.investor-section-head-v15191 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.investor-profile-title-v15191 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.investor-profile-avatar-v15191 {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(72, 173, 227, .13);
    border: 1px solid rgba(72, 173, 227, .28);
    font-size: 13px !important;
}

.investor-profile-title-v15191 h2,
.investor-profile-title-v15191 p,
.investor-section-head-v15191 h2,
.investor-investment-detail-head-v15191 h2,
.investor-investment-detail-head-v15191 p {
    margin: 0;
}

.investor-profile-title-v15191 h2 {
    font-size: 18px !important;
}

.investor-profile-title-v15191 p,
.investor-investment-detail-head-v15191 p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px !important;
}

.investor-delete-compact-v15191 {
    min-height: 32px;
    padding: 0 8px;
}

.investor-profile-columns-v15191 {
    margin-top: 11px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.investor-profile-block-v15191 {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
}

.investor-profile-block-v15191 h3 {
    margin: 0 0 7px;
    font-size: 11px !important;
}

.investor-profile-block-v15191 dl {
    margin: 0;
    display: grid;
    gap: 6px;
}

.investor-profile-block-v15191 dl > div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 9px;
}

.investor-profile-block-v15191 dt {
    color: var(--muted);
    font-size: 8px !important;
}

.investor-profile-block-v15191 dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: 9px !important;
}

.investor-section-head-v15191 {
    margin-bottom: 9px;
}

.investor-section-head-v15191 > div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.investor-section-head-v15191 h2 {
    font-size: 14px !important;
}

.investor-section-head-v15191 > div > span {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 8px !important;
}

.investor-investment-table-v15191 {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.investor-investment-row-v15191 {
    min-width: 0;
    min-height: 48px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: minmax(170px, 1.45fr) repeat(3, minmax(92px, .75fr)) minmax(78px, .6fr);
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 9px !important;
}

.investor-investment-row-v15191:last-child {
    border-bottom: 0;
}

.investor-investment-row-v15191:not(.is-head-v15191):hover,
.investor-investment-row-v15191.is-active-v15191 {
    background: var(--surface-soft);
}

.investor-investment-row-v15191.is-active-v15191 {
    box-shadow: inset 2px 0 0 #48ade3;
}

.investor-investment-row-v15191.is-head-v15191 {
    min-height: 34px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 8px !important;
}

.investor-investment-main-v15191 {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.investor-investment-main-v15191 strong {
    font-size: 11px !important;
}

.investor-investment-main-v15191 small {
    overflow: hidden;
    color: var(--muted);
    font-size: 8px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.investor-status-v15191 {
    width: fit-content;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(55, 190, 103, .13);
    font-size: 8px !important;
    white-space: nowrap;
}

.investor-status-v15191.is-closed-v15191 {
    color: var(--muted);
    background: rgba(127, 135, 146, .13);
}

.investor-status-v15191.is-overdue-v15191 {
    color: #d86767;
    background: rgba(216, 103, 103, .12);
}

.investor-investment-detail-head-v15191 {
    align-items: flex-start;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.investor-investment-detail-head-v15191 > div:first-child > small {
    color: var(--muted);
    font-size: 8px !important;
}

.investor-investment-detail-head-v15191 h2 {
    margin-top: 2px;
    font-size: 20px !important;
}

.investor-investment-actions-v15191 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.investor-detail-metrics-v15191 {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.investor-detail-metrics-v15191 > div {
    min-width: 0;
    padding: 9px;
    display: grid;
    gap: 3px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.investor-detail-metrics-v15191 span,
.investor-detail-metrics-v15191 small {
    color: var(--muted);
    font-size: 8px !important;
}

.investor-detail-metrics-v15191 strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px !important;
}

.investor-detail-metrics-v15191 .is-overpaid-v15191 strong {
    color: #37be67;
}

.investor-chronology-panel-v15191 {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.investor-section-head-v15191.is-chronology-v15191 {
    margin-bottom: 3px;
}

.investor-chronology-v15191 {
    min-width: 0;
    position: relative;
    display: grid;
    padding-left: 1px;
}

.investor-chronology-v15191::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 11px;
    bottom: 11px;
    width: 0;
    border-left: 1px dashed rgba(96, 120, 150, .50);
    pointer-events: none;
}

.investor-chronology-item-v15191 {
    min-width: 0;
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 0;
}

.investor-chronology-dot-v15191 {
    width: 17px;
    height: 17px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: #48ade3;
    color: #fff;
    font-size: 7px !important;
}

.investor-chronology-item-v15191.is-repayment-v15191 .investor-chronology-dot-v15191 {
    background: #37be67;
}

.investor-chronology-item-v15191.is-created-v15191 .investor-chronology-dot-v15191 {
    background: #8d949e;
}

.investor-chronology-item-v15191.is-voided-v15191 {
    opacity: .55;
    text-decoration: line-through;
}

.investor-chronology-item-v15191.is-voided-v15191 .investor-chronology-dot-v15191 {
    background: #8d949e;
}

.investor-chronology-body-v15191 {
    min-width: 0;
    padding-bottom: 2px;
}

.investor-chronology-head-v15191 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.investor-chronology-head-v15191 strong {
    font-size: 10px !important;
}

.investor-chronology-head-v15191 time,
.investor-chronology-body-v15191 small {
    color: var(--muted);
    font-size: 8px !important;
}

.investor-chronology-body-v15191 p {
    margin: 3px 0 0;
    font-size: 9px !important;
}

.investor-chronology-body-v15191 a {
    color: var(--link, #6ea9ff);
    text-decoration: none;
}

/* Dark theme: timeline line must stay readable. */
html[data-theme="dark"] .investor-chronology-v15191::before {
    border-left-color: rgba(126, 163, 207, .62) !important;
}

html[data-theme="dark"] .investor-chronology-dot-v15191 {
    border-color: #171c23 !important;
    box-shadow: 0 0 0 1px rgba(126, 163, 207, .24);
}

@media (max-width: 1080px) {
    .investor-workspace-v15191 {
        grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    }

    .investor-profile-columns-v15191,
    .investor-detail-metrics-v15191 {
        grid-template-columns: 1fr 1fr;
    }

    .investor-investment-row-v15191 {
        grid-template-columns: minmax(150px, 1.4fr) repeat(2, minmax(80px, .7fr)) minmax(72px, .6fr);
    }

    .investor-investment-row-v15191 > span:nth-child(2) {
        display: none;
    }
}

@media (max-width: 820px) {
    .investor-workspace-v15191 {
        grid-template-columns: 1fr;
    }

    .investor-sidebar-v15191 {
        position: static;
    }

    .investor-list-v15191 {
        max-height: 320px;
        overflow-y: auto;
    }
}

@media (max-width: 620px) {
    .investor-profile-columns-v15191,
    .investor-detail-metrics-v15191 {
        grid-template-columns: 1fr 1fr;
    }

    .investor-profile-head-v15191,
    .investor-investment-detail-head-v15191 {
        align-items: stretch;
        flex-direction: column;
    }

    .investor-investment-actions-v15191 {
        width: 100%;
    }

    .investor-investment-table-v15191 {
        overflow-x: auto;
    }

    .investor-investment-row-v15191 {
        min-width: 620px;
    }
}


/* =========================================================
   v1.5.192 — Инвесторы: минимальный UI + аватары
   ========================================================= */

/* Общий принцип как у переключателя темы: мягкая заливка, без обводок. */
.investors-page-v15191,
.investors-page-v15192 {
    font-size: 14px;
}

.investors-page-v15191 :where(p, span, small, dt, dd, label, input, select, textarea, a, th, td),
.investor-modal-v15188 :where(p, span, small, label, input, select, textarea) {
    font-size: 14px !important;
}

.investors-page-v15191 :where(h2) { font-size: 21px !important; }
.investors-page-v15191 :where(h3) { font-size: 17px !important; }

.investors-page-v15191 :where(button, button *, .primary-button, .primary-button *, .secondary-button, .secondary-button *, .ghost-danger-button, .ghost-danger-button *),
.investor-modal-v15188 :where(button, button *, .primary-button, .primary-button *, .secondary-button, .secondary-button *) {
    font-size: 12px !important;
}

.investor-summary-grid-v15192 .investor-summary-v15188,
.investor-sidebar-v15191,
.investor-profile-v15192,
.investor-investment-detail-v15192 {
    border: 0 !important;
    box-shadow: none !important;
    background: var(--surface-soft) !important;
}

.investor-summary-grid-v15192 .investor-summary-v15188 {
    min-height: 82px;
    padding: 14px !important;
}
.investor-summary-grid-v15192 .investor-summary-v15188 > span { color: var(--muted); }
.investor-summary-grid-v15192 .investor-summary-v15188 > strong { font-size: 22px !important; }

.investor-workspace-v15191 {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr) !important;
    gap: 12px !important;
}

.investor-sidebar-v15191 {
    padding: 7px !important;
}

.investor-sidebar-head-v15192 {
    min-height: 52px;
    padding: 4px 4px 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.investor-sidebar-head-v15192 h2 {
    margin: 0;
    font-size: 22px !important;
}

.investor-add-button-v15192,
.investors-page-v15191 .primary-button,
.investors-page-v15191 .secondary-button,
.investors-page-v15191 .ghost-danger-button {
    border: 0 !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: none !important;
}
.investors-page-v15191 .primary-button:hover,
.investors-page-v15191 .secondary-button:hover,
.investors-page-v15191 .ghost-danger-button:hover {
    background: color-mix(in srgb, var(--surface) 84%, var(--text) 8%) !important;
}

.investor-list-v15191 {
    gap: 4px !important;
}
.investor-list-item-v15191 {
    min-height: 64px !important;
    padding: 8px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
}
.investor-list-item-v15191:hover,
.investor-list-item-v15191.is-active-v15191 {
    background: var(--surface) !important;
    box-shadow: none !important;
}
.investor-list-avatar-v15192,
.investor-profile-avatar-v15192 {
    overflow: hidden;
}
.investor-list-avatar-v15192 img,
.investor-profile-avatar-v15192 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.investor-list-main-v15191 strong,
.investor-list-money-v15191 strong {
    font-size: 14px !important;
}

.investor-profile-v15192 {
    padding: 12px !important;
}
.investor-profile-head-v15192 {
    min-height: 58px;
    padding-bottom: 10px;
    border-bottom: 0 !important;
}
.investor-profile-title-v15192 {
    gap: 10px !important;
}
.investor-profile-title-v15192 h2 {
    margin: 0 !important;
    font-size: 21px !important;
}
.investor-profile-avatar-button-v15192 {
    position: relative;
    width: 50px;
    height: 50px;
    padding: 0;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.investor-profile-avatar-button-v15192 > i {
    width: 18px;
    height: 18px;
    position: absolute;
    right: -2px;
    bottom: -1px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,.16);
}
.investor-profile-avatar-button-v15192 > i svg { width: 10px; height: 10px; }
.investor-profile-avatar-v15192 { width: 50px !important; height: 50px !important; }
.investor-profile-actions-v15192 {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.investor-profile-summary-grid-v15192 {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}
.investor-profile-summary-grid-v15192 > div {
    min-width: 0;
    min-height: 72px;
    padding: 11px;
    display: grid;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 9px;
    background: var(--surface);
}
.investor-profile-summary-grid-v15192 > div > span { color: var(--muted); }
.investor-profile-summary-grid-v15192 > div > strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px !important;
}

/* В списке инвестиций оставляем только таблицу. */
.investor-investments-panel-v15192 {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.investor-investment-table-v15191 {
    display: grid;
    gap: 4px;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.investor-investment-row-v15191 {
    min-height: 52px !important;
    border: 0 !important;
    border-radius: 9px;
    background: var(--surface-soft) !important;
    box-shadow: none !important;
    font-size: 14px !important;
}
.investor-investment-row-v15191.is-head-v15191 {
    min-height: 34px !important;
    padding-top: 4px;
    padding-bottom: 4px;
    background: transparent !important;
    color: var(--muted);
}
.investor-investment-row-v15191:not(.is-head-v15191):hover,
.investor-investment-row-v15191.is-active-v15191 {
    background: var(--surface) !important;
    box-shadow: none !important;
}
.investor-investment-main-v15191 strong,
.investor-investment-main-v15191 small,
.investor-status-v15191 {
    font-size: 14px !important;
}
.investor-status-v15191 {
    border: 0 !important;
}

.investor-investment-detail-v15192 {
    padding: 12px !important;
}
.investor-investment-detail-head-v15191 {
    border-bottom: 0 !important;
}
.investor-detail-metrics-v15191 > div {
    border: 0 !important;
    background: var(--surface) !important;
}
.investor-detail-metrics-v15191 span,
.investor-detail-metrics-v15191 small,
.investor-detail-metrics-v15191 strong {
    font-size: 14px !important;
}
.investor-chronology-panel-v15191 {
    border-top: 0 !important;
}
.investor-chronology-head-v15191 strong,
.investor-chronology-head-v15191 time,
.investor-chronology-body-v15191 p,
.investor-chronology-body-v15191 small,
.investor-chronology-body-v15191 a {
    font-size: 14px !important;
}

/* Хронология должна быть заметна в dark theme. */
.investor-chronology-v15191::before {
    border-left-width: 2px !important;
    border-left-color: rgba(96, 120, 150, .62) !important;
}
html[data-theme="dark"] .investor-chronology-v15191::before {
    border-left-color: rgba(151, 180, 216, .82) !important;
}
html[data-theme="dark"] .investor-chronology-dot-v15191 {
    border-color: #2a3038 !important;
    box-shadow: 0 0 0 1px rgba(151, 180, 216, .42) !important;
}

/* Аватары: 9 быстрых вариантов. */
.avatar-preset-grid-v15192 {
    display: grid;
    grid-template-columns: repeat(9, 34px);
    gap: 6px;
}
.avatar-preset-choice-v15192 input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.avatar-preset-choice-v15192 > span,
.avatar-preset-apply-v15192 {
    width: 34px;
    height: 34px;
    padding: 0;
    display: block;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    box-shadow: none;
}
.avatar-preset-choice-v15192 img,
.avatar-preset-apply-v15192 img {
    width: 100%;
    height: 100%;
    display: block;
}
.avatar-preset-choice-v15192 input:checked + span,
.avatar-preset-apply-v15192.is-active-v15192 {
    box-shadow: 0 0 0 3px rgba(72,173,227,.30);
}
.investor-avatar-picker-v15192 {
    display: grid;
    gap: 7px;
}
.investor-avatar-picker-v15192 > span { color: var(--muted); }
.investor-avatar-upload-v15192 input { min-height: 38px !important; }
.investor-avatar-modal-v15192 { width: min(520px, 100%) !important; }
.avatar-preset-grid-v15192.is-editor-v15192 { grid-template-columns: repeat(9, 38px); }
.avatar-preset-grid-v15192.is-editor-v15192 .avatar-preset-apply-v15192 { width: 38px; height: 38px; }
.investor-avatar-file-form-v15192 { margin-top: 12px; }
.investor-avatar-file-form-v15192 label { position: relative; overflow: hidden; cursor: pointer; }
.investor-avatar-file-form-v15192 input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Готовые аватары в личном кабинете. */
.profile-avatar-menu-v1542 { width: 250px !important; }
.profile-avatar-presets-v15192 {
    padding: 7px 8px 9px;
    display: grid;
    gap: 6px;
}
.profile-avatar-presets-v15192 > small { color: var(--muted); font-size: 10px !important; }
.profile-avatar-presets-v15192 > div {
    display: grid;
    grid-template-columns: repeat(9, 20px);
    gap: 4px;
}
.profile-avatar-presets-v15192 button {
    width: 20px;
    height: 20px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.profile-avatar-presets-v15192 img { width: 100%; height: 100%; display: block; }

.user-edit-avatar-presets-v15192 {
    margin-top: 12px;
    display: grid;
    gap: 7px;
}
.user-edit-avatar-presets-v15192 > span { color: var(--muted); font-size: 11px !important; }
.avatar-preset-grid-v15192.is-user-edit-v15192 { grid-template-columns: repeat(9, 38px); }
.avatar-preset-grid-v15192.is-user-edit-v15192 .avatar-preset-apply-v15192 { width: 38px; height: 38px; }

html[data-theme="dark"] .investor-summary-grid-v15192 .investor-summary-v15188,
html[data-theme="dark"] .investor-sidebar-v15191,
html[data-theme="dark"] .investor-profile-v15192,
html[data-theme="dark"] .investor-investment-detail-v15192,
html[data-theme="dark"] .investor-investment-row-v15191 {
    background: #171b20 !important;
}
html[data-theme="dark"] .investor-list-item-v15191:hover,
html[data-theme="dark"] .investor-list-item-v15191.is-active-v15191,
html[data-theme="dark"] .investor-profile-summary-grid-v15192 > div,
html[data-theme="dark"] .investor-detail-metrics-v15191 > div,
html[data-theme="dark"] .investor-investment-row-v15191:not(.is-head-v15191):hover,
html[data-theme="dark"] .investor-investment-row-v15191.is-active-v15191,
html[data-theme="dark"] .investors-page-v15191 .primary-button,
html[data-theme="dark"] .investors-page-v15191 .secondary-button,
html[data-theme="dark"] .investors-page-v15191 .ghost-danger-button {
    background: #2a3038 !important;
    border: 0 !important;
}

@media (max-width: 1080px) {
    .investor-profile-summary-grid-v15192 { grid-template-columns: 1fr 1fr; }
    .avatar-preset-grid-v15192 { grid-template-columns: repeat(5, 34px); }
}
@media (max-width: 620px) {
    .investor-sidebar-head-v15192 { align-items: stretch; flex-direction: column; }
    .investor-add-button-v15192 { width: 100%; }
    .investor-profile-head-v15192 { align-items: stretch !important; }
    .investor-profile-actions-v15192 { width: 100%; justify-content: flex-start; }
    .investor-profile-summary-grid-v15192 { grid-template-columns: 1fr 1fr; }
}


/* =========================================================
   v1.5.193 — investor allocations inside «С других объектов»
   + temporary delete/void control
   ========================================================= */

.investor-chronology-head-actions-v15193 {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.investor-chronology-head-actions-v15193 form {
    margin: 0;
}

.investor-chronology-head-actions-v15193 button {
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--muted);
    cursor: pointer;
    font-size: 15px !important;
    line-height: 1;
    transition: background .15s ease, color .15s ease;
}

.investor-chronology-head-actions-v15193 button:hover {
    background: rgba(216, 103, 103, .14);
    color: #d86767;
}

.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191
.investor-chronology-body-v15191 {
    opacity: .58;
    text-decoration: line-through;
}

.investor-allocation-void-meta-v15193 {
    margin-top: 4px;
    display: block;
    color: var(--muted);
}

html[data-theme="dark"] .investor-chronology-head-actions-v15193 button {
    background: rgba(255, 255, 255, .06);
}

/* =========================================================
   v1.5.194 — Investors compact table / actions / timeline
   + Money Flow distribution modal UX
   ========================================================= */

/* Чуть уже левая колонка инвесторов. */
.investor-workspace-v15191 {
    grid-template-columns: minmax(235px, 285px) minmax(0, 1fr) !important;
}

.investor-sidebar-head-v15192 {
    gap: 8px !important;
}

.investor-add-button-v15192 {
    min-width: 88px;
    white-space: nowrap;
}

/* Таблица инвестиций — единая заливка без промежутков между шапкой и строками. */
.investor-investment-table-v15191 {
    position: relative;
    display: grid !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: var(--surface-soft) !important;
}

.investor-investment-row-v15191 {
    min-height: 49px !important;
    border: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.investor-investment-row-v15191:last-child {
    border-bottom: 0 !important;
}

.investor-investment-row-v15191.is-head-v15191 {
    min-height: 38px !important;
    background: transparent !important;
    font-weight: 650;
}

.investor-investment-row-v15191:not(.is-head-v15191):hover {
    background: color-mix(in srgb, var(--surface) 74%, transparent) !important;
}

.investor-investment-row-v15191.is-active-v15191 {
    background: var(--surface) !important;
    box-shadow: inset 3px 0 0 #48ade3 !important;
}

/* Первая ячейка в одну строку: «100 000 ₽ от 21.07.2026». */
.investor-investment-main-v15191 {
    display: block !important;
}

.investor-investment-main-v15191 strong {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
    font-size: 14px !important;
}

.investor-investment-main-v15191 strong small {
    display: inline !important;
    color: var(--muted);
    font-size: 14px !important;
    font-weight: 400;
}

/* Цветные статусы. */
.investor-status-v15191 {
    min-height: 28px;
    padding: 0 10px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px !important;
    color: #286d9c !important;
    background: rgba(72, 173, 227, .18) !important;
    font-weight: 650;
}

.investor-status-v15191.is-closed-v15191 {
    color: #187b43 !important;
    background: rgba(51, 167, 101, .20) !important;
}

.investor-status-v15191.is-overdue-v15191 {
    color: #bd4545 !important;
    background: rgba(217, 88, 88, .18) !important;
}

/* Пунктирная связка от списка инвестиций к выбранной карточке. */
.investor-investments-panel-v15192.has-selection-v15194 {
    position: relative;
    margin-bottom: 8px;
}

.investor-investments-panel-v15192.has-selection-v15194::after {
    content: "";
    position: absolute;
    left: 28px;
    bottom: -20px;
    height: 20px;
    border-left: 2px dashed rgba(72, 173, 227, .48);
    pointer-events: none;
}

/* Меню действий инвестиции: три точки -> редактировать / удалить. */
.investor-investment-menu-v15194 {
    position: relative;
    flex: 0 0 auto;
}

.investor-investment-menu-v15194 > summary {
    width: 36px;
    height: 36px;
    padding: 0;
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 17px !important;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
}

.investor-investment-menu-v15194 > summary::-webkit-details-marker {
    display: none;
}

.investor-investment-menu-v15194 > summary:hover,
.investor-investment-menu-v15194[open] > summary {
    background: color-mix(in srgb, var(--surface) 82%, var(--text) 8%);
}

.investor-investment-menu-popover-v15194 {
    position: absolute;
    z-index: 80;
    top: 42px;
    right: 0;
    width: 176px;
    padding: 6px;
    display: grid;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .20);
}

.investor-investment-menu-popover-v15194 > button,
.investor-investment-menu-popover-v15194 form button {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 600;
    text-align: left;
}

.investor-investment-menu-popover-v15194 > button:hover,
.investor-investment-menu-popover-v15194 form button:hover {
    background: var(--surface-soft);
}

.investor-investment-menu-popover-v15194 form {
    margin: 0;
}

.investor-investment-menu-popover-v15194 form button.is-danger-v15194 {
    color: #cf4d4d;
}

/* Хронология как у лида: действие удаления находится в самом кружке. */
.investor-chronology-v15191::before {
    left: 13px !important;
    top: 16px !important;
    bottom: 16px !important;
}

.investor-chronology-item-v15191 {
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 8px 0 !important;
}

.investor-chronology-marker-cell-v15194 {
    position: relative;
    z-index: 5;
    width: 28px;
    height: 28px;
}

.investor-chronology-dot-v15191 {
    position: relative;
    width: 28px !important;
    height: 28px !important;
    border-width: 4px !important;
    font-size: 10px !important;
}

.investor-chronology-delete-v15194 {
    position: relative;
    width: 28px;
    height: 28px;
}

.investor-chronology-delete-v15194 > summary {
    list-style: none;
    cursor: pointer;
}

.investor-chronology-delete-v15194 > summary::-webkit-details-marker {
    display: none;
}

.investor-chronology-dot-icon-v15194 {
    display: inline-flex;
    transition: opacity .12s ease;
}

.investor-chronology-dot-icon-v15194 svg {
    width: 11px;
    height: 11px;
}

.investor-chronology-dot-action-v15194::after {
    content: "×";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 17px !important;
    font-weight: 800;
    line-height: 1;
}

.investor-chronology-delete-v15194 > summary:hover,
.investor-chronology-delete-v15194[open] > summary {
    color: #fff !important;
    background: #d95858 !important;
    transform: scale(1.04);
}

.investor-chronology-delete-v15194 > summary:hover .investor-chronology-dot-icon-v15194,
.investor-chronology-delete-v15194[open] > summary .investor-chronology-dot-icon-v15194 {
    opacity: 0;
}

.investor-chronology-delete-v15194 > summary:hover::after,
.investor-chronology-delete-v15194[open] > summary::after {
    color: #fff;
}

.investor-chronology-delete-v15194 > form {
    position: absolute;
    z-index: 90;
    top: 35px;
    left: 6px;
    width: 235px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .20);
}

.investor-chronology-delete-v15194 > form p {
    margin: 0 0 9px;
    color: var(--text);
    font-size: 12px !important;
    line-height: 1.45;
}

.investor-chronology-delete-v15194 > form button {
    width: 100%;
    min-height: 35px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #7b4247;
    cursor: pointer;
    font-size: 12px !important;
    font-weight: 700;
}

/* Money Flow: аккуратная ссылка «Возврат инвестору» в хронологии. */
.money-flow-tranche-target-v15128.is-investor-v15188 {
    min-height: 52px;
    padding: 8px 10px;
    display: grid;
    align-content: center;
    gap: 2px;
    border-radius: 10px;
    background: rgba(168, 121, 223, .08);
    box-shadow: inset 3px 0 0 #a879df;
}

.money-flow-tranche-target-v15128.is-investor-v15188 small,
.money-flow-tranche-target-v15128.is-investor-v15188 strong {
    margin-top: 0 !important;
    line-height: 1.3;
}

.money-flow-tranche-target-v15128.is-investor-v15188 strong {
    white-space: normal;
}

.money-flow-target-v15119.is-investor-v15188 {
    overflow: hidden;
    border-color: rgba(168, 121, 223, .22) !important;
    background: rgba(168, 121, 223, .06) !important;
    box-shadow: inset 3px 0 0 #a879df !important;
}

.money-flow-target-v15119.is-investor-v15188 .money-flow-target-main-v15121 {
    display: grid;
    gap: 3px;
}

.money-flow-target-v15119.is-investor-v15188 .money-flow-target-main-v15121 :is(small, strong, b) {
    margin-top: 0 !important;
}

.money-flow-target-v15119.is-investor-v15188 .money-flow-target-main-v15121 b {
    margin-top: 6px !important;
}

/* Money Flow modal: больше воздуха, понятная иерархия и карточки распределения. */
.money-flow-modal-dialog-v15194 {
    width: min(820px, 100%) !important;
    max-height: min(820px, calc(100dvh - 32px)) !important;
    border-radius: 18px !important;
    overflow-x: hidden;
}

.money-flow-modal-head-v15194 {
    padding: 20px 22px 16px !important;
    border-bottom: 0 !important;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-soft) 74%, transparent), transparent);
}

.money-flow-modal-head-v15194 h3 {
    font-size: 23px !important;
    letter-spacing: -.025em;
}

.money-flow-modal-head-v15194 p {
    max-width: 620px;
    font-size: 12px !important;
    line-height: 1.5;
}

.money-flow-modal-balance-v15194 {
    margin: 0 22px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.money-flow-modal-balance-v15194 > div {
    display: grid;
    gap: 2px;
}

.money-flow-modal-balance-v15194 span,
.money-flow-modal-balance-v15194 small {
    color: var(--muted);
    font-size: 11px;
}

.money-flow-modal-balance-v15194 strong {
    font-size: 20px;
    line-height: 1.1;
}

.money-flow-modal-balance-v15194 small {
    max-width: 430px;
    line-height: 1.45;
    text-align: right;
}

.money-flow-modal-dialog-v15194 > form {
    padding: 14px 22px 20px !important;
}

.money-flow-modal-dialog-v15194 .money-flow-form-rows-v15119 {
    counter-reset: money-flow-row;
    gap: 12px !important;
}

.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119 {
    counter-increment: money-flow-row;
    position: relative;
    padding: 14px 12px 12px 48px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: var(--surface-soft) !important;
}

.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119::before {
    content: counter(money-flow-row);
    position: absolute;
    top: 14px;
    left: 12px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(111, 110, 232, .14);
    color: #6868d9;
    font-size: 11px;
    font-weight: 800;
}

.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119 label > span {
    margin-left: 0;
    font-size: 11px;
}

.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119 :is(select, input:not([type="file"]), textarea) {
    border-color: transparent !important;
    background: var(--surface) !important;
}

.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119 :is(select, input:not([type="file"])) {
    height: 44px;
}

.money-flow-modal-dialog-v15194 .money-flow-row-remove-v15119 {
    width: 34px;
    height: 44px;
    background: var(--surface) !important;
}

.money-flow-modal-dialog-v15194 .money-flow-add-row-v15119 {
    min-height: 38px;
    margin-top: 10px;
    padding: 0 11px;
    border-radius: 9px;
    background: var(--surface-soft);
}

.money-flow-modal-dialog-v15194 .money-flow-form-summary-v15119 {
    gap: 7px;
}

.money-flow-modal-dialog-v15194 .money-flow-form-summary-v15119 > div {
    min-height: 62px;
    padding: 11px 12px;
    border: 0;
    background: var(--surface-soft);
}

.money-flow-modal-dialog-v15194 .money-flow-form-summary-v15119 strong {
    margin-top: 5px;
    font-size: 15px;
}

.money-flow-modal-dialog-v15194 .money-flow-modal-actions-v15119 {
    margin-top: 14px;
    padding-top: 0;
    border-top: 0;
}

.money-flow-modal-dialog-v15194 .money-flow-modal-actions-v15119 :is(.primary-button, .secondary-button) {
    min-height: 42px;
    padding-inline: 16px;
    border-radius: 10px;
}

html[data-theme="dark"] .investor-investment-table-v15191,
html[data-theme="dark"] .money-flow-modal-balance-v15194,
html[data-theme="dark"] .money-flow-modal-dialog-v15194 .money-flow-form-row-v15119,
html[data-theme="dark"] .money-flow-modal-dialog-v15194 .money-flow-form-summary-v15119 > div {
    background: #20252c !important;
}

html[data-theme="dark"] .investor-status-v15191 {
    color: #8fd0f4 !important;
    background: rgba(72, 173, 227, .20) !important;
}

html[data-theme="dark"] .investor-status-v15191.is-closed-v15191 {
    color: #84daa4 !important;
    background: rgba(51, 167, 101, .22) !important;
}

html[data-theme="dark"] .investor-status-v15191.is-overdue-v15191 {
    color: #ef9898 !important;
    background: rgba(217, 88, 88, .22) !important;
}

html[data-theme="dark"] .money-flow-tranche-target-v15128.is-investor-v15188,
html[data-theme="dark"] .money-flow-target-v15119.is-investor-v15188 {
    background: rgba(168, 121, 223, .10) !important;
}

@media (max-width: 980px) {
    .investor-workspace-v15191 {
        grid-template-columns: 1fr !important;
    }

    .money-flow-modal-balance-v15194 {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .money-flow-modal-balance-v15194 small {
        text-align: left;
    }
}

@media (max-width: 700px) {
    .money-flow-modal-v15119 {
        padding: 8px;
    }

    .money-flow-modal-dialog-v15194 {
        max-height: calc(100dvh - 16px) !important;
        border-radius: 14px !important;
    }

    .money-flow-modal-head-v15194,
    .money-flow-modal-dialog-v15194 > form {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .money-flow-modal-balance-v15194 {
        margin-inline: 14px;
    }

    .money-flow-modal-dialog-v15194 .money-flow-form-row-v15119,
    .money-flow-form-row-v15119:has(.money-flow-row-investor-v15188:not([hidden])) {
        grid-template-columns: 1fr !important;
        padding-left: 44px !important;
    }

    .money-flow-modal-dialog-v15194 .money-flow-row-comment-v15121,
    .money-flow-modal-dialog-v15194 .money-flow-row-photo-v15121 {
        grid-column: auto !important;
    }

    .money-flow-modal-dialog-v15194 .money-flow-row-remove-v15119 {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
    }

    .money-flow-modal-dialog-v15194 .money-flow-form-summary-v15119 {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.5.195 — deleted meta stays readable + internal timeline
   ========================================================= */

/* У удалённого распределения зачёркиваем саму операцию, но не служебную
   подпись «Удалил: ...». Text-decoration нельзя надёжно отменить на потомке,
   поэтому снимаем его с контейнера и задаём только нужным строкам. */
.investor-chronology-item-v15191.is-voided-v15191,
.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191 .investor-chronology-body-v15191 {
    text-decoration: none !important;
}

.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191 {
    opacity: 1 !important;
}

.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191 .investor-chronology-head-v15191,
.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191 .investor-chronology-body-v15191 > p,
.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191 .investor-chronology-body-v15191 > small:not(.investor-allocation-void-meta-v15193) {
    opacity: .55;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.investor-chronology-item-v15191.is-allocation-v15191.is-voided-v15191 .investor-allocation-void-meta-v15193 {
    opacity: 1 !important;
    text-decoration: none !important;
    color: var(--muted) !important;
}

/* «С других объектов» — компактная вертикальная хронология по образцу
   хронологии инвестиции: пунктирная линия, круглые маркеры и лёгкие строки. */
.money-flow-timeline-v15119.is-internal-chronology-v15195 {
    position: relative;
    display: grid !important;
    gap: 0 !important;
    margin-top: 8px;
    padding-left: 1px;
}

.money-flow-timeline-v15119.is-source-filtered-v15130.is-internal-chronology-v15195::before {
    content: "";
    display: block !important;
    position: absolute;
    left: 13px;
    top: 16px;
    bottom: 16px;
    width: 0;
    background: none !important;
    border-left: 1px dashed rgba(96, 120, 150, .50);
    pointer-events: none;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 > .money-flow-event-v15119 {
    min-width: 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-marker-v15119 {
    position: relative;
    z-index: 2;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    border-width: 4px !important;
    border-color: var(--surface) !important;
    box-sizing: border-box;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-marker-v15119 svg {
    width: 11px;
    height: 11px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-body-v15119 {
    min-width: 0;
    padding: 0 0 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-head-v15119 {
    min-width: 0;
    align-items: baseline;
    gap: 10px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-internal-headline-v15137 {
    gap: 7px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-head-v15119 h3,
.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-internal-headline-v15137 h3 {
    font-size: 13px !important;
    line-height: 1.35;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-head-v15119 time,
.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-head-v15119 .money-flow-internal-headline-v15137 time {
    margin: 0 !important;
    font-size: 9px !important;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-head-v15119 > strong,
.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-internal-positive-v15119 {
    flex: 0 0 auto;
    font-size: 13px !important;
    white-space: nowrap;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-source-row-v15137 {
    gap: 7px;
    margin-top: 5px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-source-link-v15119,
.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-investor-source-v15190 {
    min-height: 0;
    margin-top: 4px;
    padding: 5px 7px;
    border-radius: 8px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-source-link-v15119 > span:first-child {
    width: 24px;
    height: 24px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-source-link-v15119 > span:first-child svg {
    width: 12px;
    height: 12px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-source-photo-v15137 {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-note-v15119 {
    margin-top: 4px;
    font-size: 10px;
}

.money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-internal-void-meta-v15136 {
    margin-top: 5px;
    padding-top: 0;
    border-top: 0;
    font-size: 9px;
    text-decoration: none !important;
}

html[data-theme="dark"] .money-flow-timeline-v15119.is-source-filtered-v15130.is-internal-chronology-v15195::before {
    border-left-color: rgba(126, 163, 207, .62);
}

html[data-theme="dark"] .money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-marker-v15119 {
    border-color: #171c23 !important;
}

@media (max-width: 700px) {
    .money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-event-head-v15119 {
        align-items: flex-start;
    }

    .money-flow-timeline-v15119.is-internal-chronology-v15195 .money-flow-internal-headline-v15137 {
        display: grid;
        gap: 1px;
    }
}

/* =========================================================
   v1.5.196 — investor profile actions menu
   ========================================================= */
.investor-profile-menu-v15196 {
    z-index: 90;
}
.investor-profile-menu-v15196[open] {
    z-index: 120;
}
@media (max-width: 620px) {
    .investor-profile-actions-v15192 {
        align-items: center;
    }
    .investor-profile-menu-v15196 {
        margin-left: auto;
    }
}


/* =========================================================
   v1.5.197 — investment id + compact investment heading
   ========================================================= */

/* Сумма слева, даты справа — одна строка в шапке карточки инвестиции. */
.investor-investment-detail-head-v15191 > .investor-investment-titleline-v15197 {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.investor-investment-titleline-v15197 h2 {
    flex: 0 0 auto;
    margin: 0 !important;
}

.investor-investment-titleline-v15197 p {
    min-width: 0;
    margin: 0 !important;
    color: var(--muted);
    font-size: 12px !important;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .investor-investment-detail-head-v15191 > .investor-investment-titleline-v15197 {
        width: 100%;
        gap: 10px;
    }

    .investor-investment-titleline-v15197 p {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .investor-investment-detail-head-v15191 > .investor-investment-titleline-v15197 {
        align-items: flex-start;
        flex-direction: column;
    }

    .investor-investment-titleline-v15197 p {
        text-align: left;
    }
}


/* =========================================================
   v1.5.198 — account menu + Investors mobile + money-flow polish
   ========================================================= */

/* Пользователи / Настройки / Мой профиль теперь живут в sidebar-account. */
.sidebar-account-menu-v15198 .sidebar-user-menu-item {
    text-decoration: none;
}

.sidebar-account-menu-v15198 .sidebar-user-menu-item.is-active-v15198 {
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--text);
    font-weight: 700;
}

.sidebar-account-menu-separator-v15198 {
    height: 1px;
    margin: 5px 4px;
    background: var(--border);
}

html[data-theme="dark"] .sidebar-account-menu-v15198 .sidebar-user-menu-item.is-active-v15198 {
    background: rgba(92, 112, 238, .16);
}

/* После удаления верхнего блока «Доступно для распределения» форма начинается
   сразу под заголовком и не оставляет лишний вертикальный зазор. */
.money-flow-modal-dialog-v15194 > form {
    padding-top: 8px !important;
}

/* «С других объектов» снова использует нативное оформление
   «Хронологии движения денег»: общая линия, крупные кружки и карточки событий. */
.money-flow-timeline-card-v15119 .money-flow-event-v15119.is-internal-in-v15119 .money-flow-event-head-v15119 {
    align-items: flex-start;
}

/* Полноценная мобильная раскладка раздела Инвесторы / Инвестиции. */
@media (max-width: 760px) {
    .investors-page-v15191,
    .investors-page-v15192 {
        min-width: 0;
    }

    .investor-workspace-v15191 {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .investor-sidebar-v15191,
    .investor-main-v15191,
    .investor-profile-v15192,
    .investor-investments-panel-v15192,
    .investor-investment-detail-v15192 {
        min-width: 0 !important;
    }

    .investor-sidebar-head-v15192 {
        min-height: 46px;
        align-items: center !important;
        flex-direction: row !important;
    }

    .investor-sidebar-head-v15192 h2 {
        font-size: 19px !important;
    }

    .investor-add-button-v15192 {
        width: auto !important;
        min-width: 84px;
        min-height: 36px;
    }

    .investor-list-v15191 {
        max-height: 250px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .investor-list-item-v15191 {
        grid-template-columns: 38px minmax(0, 1fr) auto !important;
        min-height: 56px !important;
        gap: 8px !important;
    }

    .investor-list-avatar-v15191 {
        width: 38px !important;
        height: 38px !important;
    }

    .investor-list-money-v15191 {
        max-width: 108px;
        text-align: right;
    }

    .investor-list-money-v15191 strong,
    .investor-list-money-v15191 small {
        overflow: hidden;
        display: block;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .investor-profile-v15192 {
        padding: 10px !important;
    }

    .investor-profile-head-v15192 {
        gap: 10px;
        align-items: center !important;
        flex-direction: row !important;
    }

    .investor-profile-title-v15192 {
        min-width: 0;
        flex: 1 1 auto;
    }

    .investor-profile-title-v15192 h2 {
        overflow: hidden;
        font-size: 18px !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .investor-profile-avatar-button-v15192,
    .investor-profile-avatar-v15192 {
        width: 44px !important;
        height: 44px !important;
    }

    .investor-profile-actions-v15192 {
        width: auto !important;
        flex: 0 0 auto;
        justify-content: flex-end !important;
    }

    .investor-profile-actions-v15192 > .secondary-button {
        min-height: 36px;
        padding-inline: 10px;
        white-space: nowrap;
    }

    .investor-profile-summary-grid-v15192 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .investor-profile-summary-grid-v15192 > div {
        min-height: 62px;
        padding: 9px !important;
    }

    .investor-profile-summary-grid-v15192 > div > strong {
        font-size: 15px !important;
    }

    /* Таблица превращается в карточки без горизонтального скролла. */
    .investor-investment-table-v15191 {
        overflow: visible !important;
        border-radius: 10px !important;
        background: transparent !important;
    }

    .investor-investment-row-v15191.is-head-v15191 {
        display: none !important;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) {
        min-width: 0 !important;
        min-height: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: auto auto !important;
        gap: 10px 8px !important;
        margin-bottom: 7px;
        padding: 11px !important;
        border: 0 !important;
        border-radius: 10px !important;
        background: var(--surface-soft) !important;
    }

    .investor-investment-row-v15191:not(.is-head-v15191):last-child {
        margin-bottom: 0;
    }

    .investor-investment-row-v15191:not(.is-head-v15191).is-active-v15191 {
        background: var(--surface) !important;
        box-shadow: inset 3px 0 0 #48ade3 !important;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1;
        min-width: 0;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(5) {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(2) {
        display: block !important;
        grid-column: 1;
        grid-row: 2;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(4) {
        grid-column: 3;
        grid-row: 2;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(2),
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(3),
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(4) {
        min-width: 0;
        font-size: 12px !important;
        font-weight: 700;
        line-height: 1.25;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(2)::before,
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(3)::before,
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(4)::before {
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: 9px !important;
        font-weight: 500;
        line-height: 1.15;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(2)::before { content: "Распределено"; }
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(3)::before { content: "К возврату"; }
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(4)::before { content: "Должны"; }

    .investor-investment-main-v15191 strong {
        max-width: 100%;
        gap: 4px !important;
        flex-wrap: wrap;
        white-space: normal !important;
        font-size: 14px !important;
        line-height: 1.25;
    }

    .investor-investment-main-v15191 strong small {
        font-size: 11px !important;
    }

    .investor-status-v15191 {
        min-height: 25px;
        padding-inline: 8px !important;
        font-size: 10px !important;
    }

    .investor-investments-panel-v15192.has-selection-v15194::after {
        left: 20px;
        bottom: -17px;
        height: 17px;
    }

    .investor-investment-detail-v15192 {
        padding: 10px !important;
    }

    .investor-investment-detail-head-v15191 {
        gap: 9px !important;
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .investor-investment-detail-head-v15191 > .investor-investment-titleline-v15197 {
        width: 100%;
        min-width: 0;
        display: flex !important;
        align-items: baseline !important;
        justify-content: space-between !important;
        flex-direction: row !important;
        gap: 10px !important;
    }

    .investor-investment-titleline-v15197 h2 {
        flex: 0 0 auto;
        font-size: 18px !important;
    }

    .investor-investment-titleline-v15197 p {
        min-width: 0;
        font-size: 11px !important;
        line-height: 1.3;
        text-align: right !important;
        white-space: normal !important;
    }

    .investor-investment-actions-v15191 {
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end;
    }

    .investor-investment-actions-v15191 > .primary-button {
        flex: 1 1 auto;
        min-height: 38px;
    }

    .investor-detail-metrics-v15191 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .investor-detail-metrics-v15191 > div {
        min-height: 67px;
        padding: 9px !important;
    }

    .investor-detail-metrics-v15191 span,
    .investor-detail-metrics-v15191 small {
        font-size: 10px !important;
    }

    .investor-detail-metrics-v15191 strong {
        font-size: 14px !important;
    }

    .investor-chronology-panel-v15191 {
        margin-top: 10px;
    }

    .investor-chronology-v15191 {
        overflow: visible;
    }

    .investor-chronology-item-v15191 {
        grid-template-columns: 22px minmax(0, 1fr) !important;
        gap: 8px !important;
        padding: 8px 0 !important;
    }

    .investor-chronology-marker-cell-v15194 {
        width: 22px;
        min-width: 22px;
    }

    .investor-chronology-head-v15191 {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px !important;
    }

    .investor-chronology-head-v15191 strong,
    .investor-chronology-body-v15191 p,
    .investor-chronology-body-v15191 small,
    .investor-chronology-body-v15191 a {
        overflow-wrap: anywhere;
        font-size: 12px !important;
    }

    .investor-chronology-head-v15191 time {
        font-size: 10px !important;
    }

    .investor-chronology-delete-v15194 > form {
        left: 0;
        width: min(235px, calc(100vw - 46px));
    }

    .investor-investment-menu-popover-v15194 {
        right: 0;
        left: auto;
        max-width: calc(100vw - 28px);
    }

    .investor-modal-v15188 {
        padding: 8px !important;
    }

    .investor-modal-dialog-v15188 {
        width: 100% !important;
        max-height: calc(100dvh - 16px);
        overflow-y: auto;
    }
}

@media (max-width: 430px) {
    .investor-profile-head-v15192 {
        align-items: flex-start !important;
        flex-wrap: wrap;
    }

    .investor-profile-actions-v15192 {
        width: 100% !important;
    }

    .investor-profile-actions-v15192 > .secondary-button {
        flex: 1 1 auto;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) {
        gap: 9px 5px !important;
        padding: 10px 9px !important;
    }

    .investor-investment-titleline-v15197 p {
        max-width: 62%;
    }

    .investor-profile-summary-grid-v15192,
    .investor-detail-metrics-v15191 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


/* =========================================================
   v1.5.199 — modal polish + no horizontal scroll
   ========================================================= */

/* Сильный blur фона у модальных окон. */
.investor-modal-backdrop-v15188,
.money-flow-modal-backdrop-v15119,
.project-status-modal-backdrop,
.project-worker-modal-backdrop,
.work-hours-modal-backdrop,
.payment-amount-modal-backdrop,
.estimate-expense-modal-backdrop,
.lead-kanban-modal-backdrop-v15168 {
    background: rgba(14, 19, 28, .34) !important;
    -webkit-backdrop-filter: blur(18px) saturate(90%) !important;
    backdrop-filter: blur(18px) saturate(90%) !important;
}

/* Поля модалок — мягкие, без тяжёлой обводки. */
.investor-modal-v15188 :is(input:not([type="radio"]):not([type="file"]), select, textarea),
.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119 :is(input:not([type="file"]), select, textarea) {
    border: 1px solid transparent !important;
    outline: none !important;
    box-shadow: none !important;
    background: var(--surface-soft) !important;
}

.investor-modal-v15188 :is(input:not([type="radio"]):not([type="file"]), select, textarea):focus,
.money-flow-modal-dialog-v15194 .money-flow-form-row-v15119 :is(input:not([type="file"]), select, textarea):focus {
    border-color: rgba(111, 110, 232, .32) !important;
    box-shadow: 0 0 0 2px rgba(111, 110, 232, .055) !important;
}

/* Подтверждение удаления распределения всегда выше соседних событий. */
.investor-investment-detail-v15192,
.investor-chronology-panel-v15191,
.investor-chronology-v15191,
.investor-chronology-item-v15191 {
    overflow: visible !important;
}

.investor-chronology-marker-cell-v15194:has(.investor-chronology-delete-v15194[open]),
.investor-chronology-delete-v15194[open] {
    position: relative;
    z-index: 10020 !important;
}

.investor-chronology-delete-v15194[open] > form {
    z-index: 10030 !important;
    isolation: isolate;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .30) !important;
}

/* Раздел инвесторов не должен расширять viewport по горизонтали. */
.investors-page-v15191,
.investors-page-v15192,
.investor-workspace-v15191,
.investor-main-v15191,
.investor-sidebar-v15191,
.investor-profile-v15192,
.investor-investments-panel-v15192,
.investor-investment-detail-v15192 {
    max-width: 100% !important;
}

.investors-page-v15191,
.investors-page-v15192 {
    overflow-x: clip !important;
}

/* Длинное имя инвестора в заголовке модалки переносится, а не раздвигает окно. */
.investor-modal-head-v15188 > div {
    min-width: 0;
}

.investor-modal-head-v15188 h3 {
    overflow-wrap: anywhere;
}

@media (max-width: 620px) {
    /* Быстрые аватары больше не создают горизонтальный скролл. */
    .avatar-preset-grid-v15192 {
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(auto-fill, 34px) !important;
        justify-content: start;
    }

    .investor-modal-grid-v15188,
    .investor-profit-grid-v15188 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .investor-modal-dialog-v15188,
    .investor-modal-dialog-v15188 form,
    .investor-modal-dialog-v15188 label {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .investor-modal-v15188 :is(input, select, textarea) {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}


/* =========================================================
   v1.5.200 — Инвесторы: инверсия заливок в светлой теме
   ========================================================= */

/*
 * Светлая тема: меняем местами два визуальных уровня.
 * То, что раньше было мягко-серым фоном секций, становится белым.
 * То, что раньше было белыми внутренними карточками/активными строками,
 * становится мягко-серым. Тёмная тема не затрагивается.
 */
html[data-theme="light"] .investor-summary-grid-v15192 .investor-summary-v15188,
html[data-theme="light"] .investor-sidebar-v15191,
html[data-theme="light"] .investor-profile-v15192,
html[data-theme="light"] .investor-investment-detail-v15192,
html[data-theme="light"] .investor-investment-row-v15191:not(.is-head-v15191) {
    background: #ffffff !important;
}

html[data-theme="light"] .investor-list-item-v15191:hover,
html[data-theme="light"] .investor-list-item-v15191.is-active-v15191,
html[data-theme="light"] .investor-profile-summary-grid-v15192 > div,
html[data-theme="light"] .investor-detail-metrics-v15191 > div,
html[data-theme="light"] .investor-investment-row-v15191:not(.is-head-v15191):hover,
html[data-theme="light"] .investor-investment-row-v15191.is-active-v15191,
html[data-theme="light"] .investors-page-v15191 .primary-button,
html[data-theme="light"] .investors-page-v15191 .secondary-button,
html[data-theme="light"] .investors-page-v15191 .ghost-danger-button,
html[data-theme="light"] .investor-profile-avatar-button-v15192 > i {
    background: #f3f5f8 !important;
}

/* На мобильном сохраняем ту же иерархию: карточка инвестиции белая,
   выбранная карточка — светло-серая. */
@media (max-width: 760px) {
    html[data-theme="light"] .investor-investment-row-v15191:not(.is-head-v15191) {
        background: #ffffff !important;
    }

    html[data-theme="light"] .investor-investment-row-v15191:not(.is-head-v15191).is-active-v15191 {
        background: #f3f5f8 !important;
    }
}


/* =========================================================
   v1.5.201 — Add investor modal overflow + user avatars
   ========================================================= */

/* Модалка «Добавить инвестора»: только вертикальная прокрутка. */
.investor-modal-v15188,
.investor-modal-dialog-v15188,
.investor-modal-dialog-v15188 form,
.investor-avatar-picker-v15192,
.investor-avatar-upload-v15192 {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.investor-modal-dialog-v15188 {
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
}

.investor-modal-dialog-v15188 :is(input, select, textarea, button, label, div) {
    box-sizing: border-box;
}

/* File input имеет собственную intrinsic width в браузерах — не даём ей растягивать dialog. */
.investor-avatar-upload-v15192 input[type="file"] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
}

/* Быстрые аватары всегда укладываются в доступную ширину, не только на mobile breakpoint. */
.investor-modal-v15188 .avatar-preset-grid-v15192:not(.is-editor-v15192) {
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(auto-fit, minmax(34px, 34px)) !important;
    justify-content: start;
    overflow: hidden;
}

@media (max-width: 620px) {
    .investor-modal-dialog-v15188 {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }

    .investor-modal-actions-v15188 {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
    }
}


/* =========================================================
   v1.5.206 — leads archive counters + compact settings UX
   ========================================================= */

/* Канбан: телефон отдельной строкой сразу под заголовком. */
.lead-card-head-v15164 {
    display: block !important;
}

.lead-card-phone-v15206 {
    margin-top: 3px;
    color: #438bd4;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Старый inline-вариант скрываем, если разметка осталась в кэше. */
.lead-card-phone-inline-v15164 {
    display: none !important;
}

/* Settings — компактная иерархия: основное → интеграции → справочники. */
.settings-page-v15206 {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.settings-top-grid-v15206,
.settings-integrations-grid-v15206 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}


.settings-panel-v15206 {
    min-width: 0;
    padding: 15px !important;
    border-radius: 14px !important;
}

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

.settings-card-head-v15206 > div {
    min-width: 0;
}

.settings-card-head-v15206 h2,
.settings-section-title-v15206 h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.settings-card-head-v15206 p,
.settings-section-title-v15206 p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.settings-section-title-v15206 {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 2px 2px 0;
}

.settings-version-v15206,
.settings-state-v15206 {
    flex: 0 0 auto;
    min-height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.settings-state-v15206.is-on-v15206 {
    color: #2fa968;
    background: rgba(47,169,104,.10);
}

.settings-system-form-v15206 label,
.settings-secret-grid-v15206 label,
.settings-connect-form-v15206 label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.settings-system-form-v15206 label > span,
.settings-secret-grid-v15206 label > span,
.settings-connect-form-v15206 label > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.settings-page-v15206 input[type="text"],
.settings-page-v15206 input[type="password"] {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid transparent !important;
    border-radius: 9px;
    outline: none !important;
    box-shadow: none !important;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px;
}

.settings-page-v15206 input:focus {
    border-color: rgba(111,110,232,.28) !important;
    box-shadow: 0 0 0 2px rgba(111,110,232,.05) !important;
}

.settings-input-action-v15206 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.settings-page-v15206 .primary-button,
.settings-page-v15206 .secondary-button {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 11px;
    white-space: nowrap;
}

.settings-source-add-v15206 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 8px;
}

.settings-source-list-v15206 {
    display: grid;
}

.settings-source-row-v15206 {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.settings-source-row-v15206 > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-source-row-v15206 .status-toggle-button {
    min-height: 26px;
    padding: 0 8px;
    font-size: 10px;
}

.settings-secret-grid-v15206 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.settings-card-actions-v15206 {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-card-actions-v15206 small,
.settings-inline-hint-v15206 {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.settings-connect-form-v15206 {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr) auto;
    align-items: end;
    gap: 8px;
}

.settings-connect-form-max-v15206 {
    grid-template-columns: minmax(0, 1fr) auto;
}

/* v1.5.215 — интеграции стоят по три карточки в строке, поэтому формы внутри компактно складываются. */
.settings-integrations-grid-v15206 .settings-secret-grid-v15206,
.settings-integrations-grid-v15206 .settings-connect-form-v15206,
.settings-integrations-grid-v15206 .settings-connect-form-max-v15206 {
    grid-template-columns: 1fr;
}

.settings-integrations-grid-v15206 .settings-connect-form-v15206 > button,
.settings-integrations-grid-v15206 .settings-connect-form-max-v15206 > button {
    width: 100%;
}

.settings-inline-hint-v15206 {
    margin: 7px 0 0;
}

.settings-connected-row-v15206,
.settings-notify-row-v15206 {
    margin-top: 9px;
    min-height: 44px;
    padding: 8px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.settings-connected-row-v15206 > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-connected-row-v15206 small,
.settings-notify-row-v15206 small {
    color: var(--muted);
    font-size: 9px;
}

.settings-connected-row-v15206 strong {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-notify-row-v15206 > label {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.settings-notify-row-v15206 input[type="checkbox"] {
    margin-top: 3px;
}

.settings-notify-row-v15206 label > span {
    display: grid;
    gap: 2px;
}

.settings-notify-row-v15206 b {
    font-size: 11px;
}

.settings-disconnect-v15206 {
    margin-top: 5px;
    display: flex;
    justify-content: flex-end;
}

.settings-disconnect-v15206 .text-button {
    min-height: 28px;
    font-size: 10px;
}

.settings-group-list-v15206 {
    margin-top: 9px;
    display: grid;
    gap: 6px;
}

.settings-group-list-v15206 > form {
    min-height: 42px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.settings-group-list-v15206 > form > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-group-list-v15206 strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-group-list-v15206 small {
    color: var(--muted);
    font-size: 9px;
}

.settings-types-v15206 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
}

.settings-types-v15206 .settings-card-head-v15206 {
    margin: 0;
}

.settings-type-chips-v15206 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.settings-type-chips-v15206 span {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 10px;
    font-weight: 650;
}

html[data-theme="dark"] .settings-page-v15206 :is(
    input[type="text"],
    input[type="password"],
    .settings-version-v15206,
    .settings-connected-row-v15206,
    .settings-notify-row-v15206,
    .settings-group-list-v15206 > form,
    .settings-type-chips-v15206 span
) {
    background: #20252c !important;
}

@media (max-width: 960px) {
    .settings-top-grid-v15206,
    .settings-integrations-grid-v15206 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .settings-top-grid-v15206,
    .settings-integrations-grid-v15206 {
        grid-template-columns: 1fr;
    }

    .settings-secret-grid-v15206 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .settings-page-v15206 {
        gap: 10px;
    }

    .settings-panel-v15206 {
        padding: 12px !important;
    }

    .settings-card-head-v15206 {
        margin-bottom: 10px;
    }

    .settings-input-action-v15206,
    .settings-source-add-v15206,
    .settings-connect-form-v15206,
    .settings-connect-form-max-v15206 {
        grid-template-columns: 1fr;
    }

    .settings-page-v15206 .settings-connect-form-v15206 > button,
    .settings-page-v15206 .settings-source-add-v15206 > button,
    .settings-page-v15206 .settings-input-action-v15206 > button {
        width: 100%;
    }

    .settings-card-actions-v15206,
    .settings-connected-row-v15206,
    .settings-notify-row-v15206,
    .settings-types-v15206 {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-card-actions-v15206 form,
    .settings-card-actions-v15206 button,
    .settings-connected-row-v15206 form,
    .settings-connected-row-v15206 button,
    .settings-notify-row-v15206 button {
        width: 100%;
    }

    .settings-type-chips-v15206 {
        justify-content: flex-start;
    }

    .lead-card-phone-v15206 {
        margin-top: 2px;
        font-size: 12px !important;
    }
}

/* =========================================================
   v1.5.207 — Инвесторы: выбор, возвраты, архив, хронология
   ========================================================= */

/* «Вернули с процентами»: вторичная строка показывает фактически выплаченные проценты. */
.investor-summary-returned-v15207 > small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 10px !important;
    line-height: 1.25;
}

/* Выбранная инвестиция: чёткая боковая пунктирная связка со своей карточкой. */
.investor-investments-panel-v15192.has-selection-v15194 {
    overflow: visible !important;
}

.investor-investments-panel-v15192.has-selection-v15194::after {
    display: none !important;
}

.investor-investment-row-v15191.is-active-v15191 {
    position: relative;
    border-left: 3px solid #48ade3 !important;
}

.investor-selected-rail-v15207 {
    position: absolute;
    z-index: 4;
    left: -17px;
    width: 18px;
    border-left: 2px dashed rgba(72, 173, 227, .82);
    pointer-events: none;
}

.investor-selected-rail-v15207::before,
.investor-selected-rail-v15207::after {
    content: "";
    position: absolute;
    left: -1px;
    width: 17px;
    border-top: 2px dashed rgba(72, 173, 227, .82);
}

.investor-selected-rail-v15207::before {
    top: 0;
}

.investor-selected-rail-v15207::after {
    bottom: 0;
}

/* Хронология: линия строится только между соседними событиями.
   После последнего кружка никакого хвоста больше нет. */
.investor-chronology-v15191::before {
    display: none !important;
}

.investor-chronology-item-v15191:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 13px;
    top: 22px;
    bottom: -22px;
    border-left: 1px dashed rgba(96, 120, 150, .58);
    pointer-events: none;
}

.investor-chronology-item-v15191.is-created-v15191 .investor-chronology-dot-v15191 {
    background: #37be67 !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 500;
    line-height: 1;
}

html[data-theme="dark"] .investor-chronology-item-v15191:not(:last-child)::after {
    border-left-color: rgba(127, 147, 172, .46);
}

/* Выбор источника ручного возврата. */
.investor-repayment-source-v15207 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.investor-repayment-source-v15207 > label {
    min-width: 0;
    display: block !important;
    cursor: pointer;
}

.investor-repayment-source-v15207 input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.investor-repayment-source-v15207 span {
    min-height: 34px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px !important;
    text-align: center;
    transition: .14s ease;
}

.investor-repayment-source-v15207 > label.is-active-v15207 span {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .07);
}

.investor-repayment-dialog-v15207 [hidden] {
    display: none !important;
}

/* Архив в меню инвестора. */
.investor-archive-dialog-v15207 {
    width: min(680px, 100%) !important;
}

.investor-archive-section-v15207 + .investor-archive-section-v15207 {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.investor-archive-head-v15207 {
    margin-bottom: 7px;
}

.investor-archive-head-v15207 strong {
    font-size: 13px !important;
}

.investor-archive-list-v15207 {
    display: grid;
    gap: 6px;
}

.investor-archive-row-v15207 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: var(--surface-soft);
}

.investor-archive-row-v15207 > div {
    min-width: 0;
}

.investor-archive-row-v15207 strong,
.investor-archive-row-v15207 small {
    display: block;
}

.investor-archive-row-v15207 strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px !important;
}

.investor-archive-row-v15207 small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px !important;
}

.investor-archive-row-v15207 form {
    margin: 0 !important;
}

.investor-archive-row-v15207 .secondary-button {
    min-height: 31px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
}

/* На мобильном не выносим связку за границы карточки. */
@media (max-width: 760px) {
    .investor-selected-rail-v15207 {
        display: none !important;
    }

    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(3)::before {
        content: "Вернули" !important;
    }

    .investor-repayment-source-v15207 {
        grid-template-columns: 1fr;
    }

    .investor-archive-row-v15207 {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .investor-archive-row-v15207 .secondary-button {
        width: 100%;
    }
}


/* =========================================================
   v1.5.208 — Инвесторы: точная связка выбранной инвестиции
   ========================================================= */

/*
 * Одна нейтральная линия связывает центр выбранной строки с центром
 * строки суммы в карточке. Вертикаль идёт по центру 12px-разрыва между
 * списком инвесторов и основной колонкой и не попадает под левый блок.
 */
.investor-investment-row-v15191.is-active-v15191 {
    border-left: 0 !important;
}

.investor-selected-rail-v15207 {
    --investor-selection-line-v15208: rgba(72, 173, 227, .82);
    z-index: 5 !important;
    left: -6px !important;
    width: 7px !important;
    border-left: 2px dashed var(--investor-selection-line-v15208) !important;
}

.investor-selected-rail-v15207::before,
.investor-selected-rail-v15207::after {
    left: -2px !important;
    width: 8px !important;
    border-top: 2px dashed var(--investor-selection-line-v15208) !important;
}

/* Линия должна быть видна в промежутке, а не перекрываться соседними карточками. */
.investor-workspace-v15191 {
    isolation: isolate;
}

.investor-sidebar-v15191 {
    z-index: 1;
}

.investor-main-v15191 {
    position: relative;
    z-index: 2;
}

.investor-investments-panel-v15192.has-selection-v15194,
.investor-investment-detail-v15192 {
    position: relative;
}

@media (max-width: 760px) {
    .investor-investment-row-v15191:not(.is-head-v15191) > span:nth-child(3)::before {
        content: "Вернули" !important;
    }
}


/* =========================================================
   v1.5.209 — Инвесторы: голубая связка и порядок действий
   ========================================================= */

.investor-selected-rail-v15207 {
    --investor-selection-line-v15208: rgba(72, 173, 227, .82) !important;
    z-index: 5 !important;
    border-left-width: 2px !important;
}

.investor-selected-rail-v15207::before,
.investor-selected-rail-v15207::after {
    border-top-width: 2px !important;
}

/* =========================================================
   v1.5.211 — Инвесторы: цвет связки в тёмной теме + аватары без обводки
   ========================================================= */

/* В тёмной теме вертикальный и горизонтальные сегменты — один точный голубой. */
html[data-theme="dark"] .investor-selected-rail-v15207 {
    --investor-selection-line-v15208: #48ade3 !important;
    border-color: #48ade3 !important;
}

html[data-theme="dark"] .investor-selected-rail-v15207::before,
html[data-theme="dark"] .investor-selected-rail-v15207::after {
    border-color: #48ade3 !important;
}

/* Аватары инвесторов без внешней обводки. */
.investors-page-v15191 .investor-list-avatar-v15191,
.investors-page-v15191 .investor-list-avatar-v15192,
.investors-page-v15191 .investor-profile-avatar-v15191,
.investors-page-v15191 .investor-profile-avatar-v15192 {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}


/* =========================================================
   v1.5.212 — тема без FOUC + источники лидов в графиках
   ========================================================= */

/* Активная половина переключателя известна уже из data-theme в <head>.
   Поэтому строка темы не ждёт app.js и не мигает при обновлении страницы. */
html[data-theme="light"] .app-theme-option-v15107[data-theme-option="light"],
html[data-theme="dark"] .app-theme-option-v15107[data-theme-option="dark"] {
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(31, 43, 68, .08);
}

html[data-theme="light"] .app-theme-option-v15107[data-theme-option="dark"],
html[data-theme="dark"] .app-theme-option-v15107[data-theme-option="light"] {
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}

/* «Отказ» — единственный красный этап. «КП отправлено» уходит в янтарный. */
.leads-board-v15161,
.leads-page-v15144 {
    --lead-stage-proposal: #f2b45f;
    --lead-stage-lost: #ef6262;
}

.leads-column-v15144.is-lost-v15144 {
    opacity: 1 !important;
}

.is-proposal-v15144 .lead-card-v15161,
.leads-column-v15161.is-proposal-v15144 .lead-card-v15161 {
    border-left-color: #d99a3e !important;
}

.is-lost-v15144 .lead-card-v15161,
.leads-column-v15161.is-lost-v15144 .lead-card-v15161 {
    border-left-color: #d94f4f !important;
}

.lead-status-pill-v15154.status-proposal {
    color: #d28d26;
    background: rgba(242, 180, 95, .13);
    border-color: rgba(217, 154, 62, .28);
}

.lead-status-pill-v15154.status-lost {
    color: #df5252;
    background: rgba(239, 98, 98, .13);
    border-color: rgba(217, 79, 79, .28);
}

.lead-status-options-v15155 .project-status-option-dot.is-proposal-v15144 {
    background: #e5a13e;
}

.lead-status-options-v15155 .project-status-option-dot.is-lost-v15144 {
    background: #e35b5b;
}

.lead-activity-status-v15169.is-proposal-v15144,
.lead-stats-status-pill-v15183.is-proposal-v15144 {
    background: #f2b45f;
}

.lead-activity-status-v15169.is-lost-v15144,
.lead-stats-status-pill-v15183.is-lost-v15144 {
    background: #ef6262;
}

/* Общая палитра источников для Dashboard и lead-statistics.php. */
.dashboard-lead-stack-v15212,
.lead-stats-chart-stack-v15212 {
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse;
    align-self: end;
    border-radius: 7px 7px 2px 2px;
    background: transparent;
}

.dashboard-lead-stack-v15212 {
    width: min(34px, 72%);
    min-height: 4px;
}

.lead-stats-chart-stack-v15212 {
    width: min(30px, 72%);
    min-height: 3px;
}

.dashboard-lead-stack-segment-v15212,
.lead-stats-chart-segment-v15212 {
    width: 100%;
    min-height: 2px;
    display: block;
    flex-basis: 0;
}

.dashboard-lead-stack-segment-v15212.is-yandex-direct-v15212,
.lead-stats-chart-segment-v15212.is-yandex-direct-v15212 {
    background: #48ade3;
}

.dashboard-lead-stack-segment-v15212.is-avito-v15212,
.lead-stats-chart-segment-v15212.is-avito-v15212 {
    background: #72c878;
}

.dashboard-lead-stack-segment-v15212.is-site-v15212,
.lead-stats-chart-segment-v15212.is-site-v15212 {
    background: #a58ae2;
}

.dashboard-lead-stack-segment-v15212.is-empty-v15212,
.lead-stats-chart-segment-v15212.is-empty-v15212 {
    flex: 1 1 auto;
    background: var(--border);
    opacity: .55;
}

.dashboard-lead-day-v15165.is-today-v15212 .dashboard-lead-label-v15165 strong {
    color: #48ade3;
    font-weight: 800;
}

/* Цветной маркер под графиком совпадает с сегментом столбца. */
.dashboard-lead-source-v15182 > span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dashboard-lead-source-v15182 > span::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #a58ae2;
}

.dashboard-lead-source-v15182[data-source-key="YANDEX_DIRECT"] > span::before {
    background: #48ade3;
}

.dashboard-lead-source-v15182[data-source-key="AVITO"] > span::before {
    background: #72c878;
}

.dashboard-lead-source-v15182[data-source-key="SITE"] > span::before {
    background: #a58ae2;
}

.lead-stats-chart-sources-v15212 {
    margin-top: 10px;
}

@media (max-width: 620px) {
    .dashboard-leads-stats-v15176 .dashboard-lead-stack-v15212 {
        width: min(24px, 72%);
    }

    .lead-stats-chart-stack-v15212 {
        width: min(24px, 72%);
    }
}

/* v1.5.212 — мобильные вкладки используют ту же семантику статусов. */
.leads-mobile-stages-v15163 .is-proposal-v15144 {
    background: #f2b45f !important;
}

.leads-mobile-stages-v15163 .is-lost-v15144 {
    background: #ef6262 !important;
}

/* =========================================================
   v1.5.213 — подписи внутри лид-графиков + платежи инвесторам
   ========================================================= */

/* Количество внутри каждого цветного сегмента — строго по центру. */
.dashboard-lead-stack-segment-v15212,
.lead-stats-chart-segment-v15212 {
    min-height: 10px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

.dashboard-lead-stack-segment-v15212 > span,
.lead-stats-chart-segment-v15212 > span {
    display: block;
    width: 100%;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .28);
    pointer-events: none;
}

/* Общее количество, день недели и дата центрируются относительно столбца. */
.dashboard-lead-day-v15165 > .chart-value {
    width: 100%;
    align-self: stretch;
    text-align: center;
}

.dashboard-lead-label-v15165 {
    width: 100%;
    justify-items: center;
    text-align: center !important;
}

.dashboard-lead-label-v15165 strong,
.dashboard-lead-label-v15165 small {
    width: 100%;
    text-align: center;
}

.lead-stats-chart-column-v15183 > span,
.lead-stats-chart-column-v15183 > small {
    width: 100%;
    justify-self: stretch;
    text-align: center;
}

/* Новый блок идёт сразу после рассрочки в мобильном Dashboard. */
@media (max-width: 920px) {
    .dashboard-mobile-order-investor-payments-v15213 {
        order: 4 !important;
    }

    .manager-workload-card-v3 {
        order: 5 !important;
    }

    .dashboard-mobile-order-charts {
        order: 6 !important;
    }

    .dashboard-leads-stats-v15165 {
        order: 7 !important;
    }

    .dashboard-mobile-order-recent {
        order: 8 !important;
    }

    .dashboard-right-column > .side-widget:not(.dashboard-mobile-order-payments):not(.dashboard-mobile-order-investor-payments-v15213) {
        order: 9 !important;
    }
}

@media (max-width: 620px) {
    .dashboard-lead-stack-segment-v15212 > span,
    .lead-stats-chart-segment-v15212 > span {
        font-size: 7px;
    }
}

/* =========================================================
   v1.5.214 — нижняя сетка Dashboard + активный тумблер темы
   ========================================================= */

/* Три операционных блока Dashboard всегда образуют одну общую строку
   на десктопе и имеют одинаковую высоту. */
.dashboard-bottom-grid-v15214 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-top: 13px;
    align-items: stretch;
}

.dashboard-bottom-card-v15214 {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-bottom-card-v15214 .widget-link {
    margin-top: auto;
}

/* «Объекты по ответственным» — отдельная строка на всю ширину Dashboard. */
.dashboard-manager-full-v15214 {
    width: 100%;
    margin-top: 13px;
}

/* Активный сегмент переключателя темы в тёмной теме — точный цвет. */
html[data-theme="dark"] .app-theme-option-v15107[data-theme-option="dark"],
html[data-theme="dark"] .app-theme-option-v15107.is-active-v15107 {
    background: #2a3038 !important;
}

@media (max-width: 920px) {
    .dashboard-bottom-grid-v15214 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   v1.5.216 — настройки уведомлений Telegram / MAX
   ========================================================= */
.settings-notification-form-v15216 {
    margin-top: 9px;
}

.settings-notification-details-v15216 {
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface-soft);
}

.settings-notification-details-v15216 > summary {
    min-height: 46px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.settings-notification-details-v15216 > summary::-webkit-details-marker {
    display: none;
}

.settings-notification-details-v15216 > summary > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-notification-details-v15216 > summary b {
    font-size: 11px;
}

.settings-notification-details-v15216 > summary small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}

.settings-notification-details-v15216 > summary > strong {
    min-width: 40px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 10px;
    text-align: center;
}

.settings-notification-details-v15216[open] > summary {
    border-bottom: 1px solid var(--border);
}

.settings-notification-list-v15216 {
    max-height: 310px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 8px;
}

.settings-notification-item-v15216 {
    min-height: 43px;
    padding: 7px 2px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.settings-notification-item-v15216:last-child {
    border-bottom: 0;
}

.settings-notification-item-v15216 input[type="checkbox"] {
    margin-top: 3px;
    flex: 0 0 auto;
}

.settings-notification-item-v15216 > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-notification-item-v15216 b {
    color: var(--text);
    font-size: 10px;
    line-height: 1.25;
}

.settings-notification-item-v15216 small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.3;
}

.settings-notification-save-v15216 {
    width: calc(100% - 16px);
    margin: 5px 8px 8px;
}

html[data-theme="dark"] .settings-notification-details-v15216 {
    background: #20252c !important;
}

html[data-theme="dark"] .settings-notification-details-v15216 > summary > strong {
    background: #2a3038 !important;
}

@media (max-width: 620px) {
    .settings-notification-list-v15216 {
        max-height: none;
    }
}


/* =========================================================
   v1.5.218 — отдельные группы системных уведомлений
   ========================================================= */
.settings-notification-grid-v15218 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.settings-notification-channel-v15218 {
    min-width: 0;
}

.settings-notification-destination-v15218 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
}

.settings-notification-destination-v15218 label {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.settings-notification-destination-v15218 label > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.settings-notification-max-find-v15218 {
    min-height: 44px;
    padding: 8px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.settings-notification-max-find-v15218 > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-notification-max-find-v15218 b {
    font-size: 11px;
}

.settings-notification-max-find-v15218 small,
.settings-notification-empty-v15218 {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.settings-notification-empty-v15218 {
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-soft);
}

html[data-theme="dark"] :is(
    .settings-notification-max-find-v15218,
    .settings-notification-empty-v15218
) {
    background: #20252c !important;
}

@media (max-width: 960px) {
    .settings-notification-grid-v15218 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .settings-notification-destination-v15218 {
        grid-template-columns: 1fr;
    }

    .settings-notification-destination-v15218 > button,
    .settings-notification-max-find-v15218 > button {
        width: 100%;
    }

    .settings-notification-max-find-v15218 {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   v1.5.219 — единые тумблеры в Настройках
   ========================================================= */
.settings-toggle-v15219 {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.settings-toggle-v15219 input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-toggle-v15219 i {
    position: relative;
    width: 38px;
    height: 22px;
    display: block;
    border-radius: 999px;
    background: #d7dbe1;
    box-shadow: inset 0 0 0 1px rgba(37, 43, 51, .06);
    transition: background .16s ease, box-shadow .16s ease;
}

.settings-toggle-v15219 i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
    transition: transform .16s ease;
}

.settings-toggle-v15219 input:checked + i {
    background: #48ade3;
}

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

.settings-toggle-v15219 input:focus-visible + i {
    box-shadow: 0 0 0 3px rgba(72, 173, 227, .16);
}

.settings-toggle-row-v15219,
.settings-type-list-v15219 > .settings-toggle-row-v15219 {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
}

.settings-toggle-row-v15219 > span {
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-toggle-row-v15219 > form {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.settings-type-list-v15219 {
    display: grid;
}

.settings-toggle-row-card-v15219 {
    align-items: center !important;
}

.settings-toggle-row-card-v15219 > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-toggle-row-card-v15219 > span b {
    color: var(--text);
    font-size: 11px;
}

.settings-toggle-row-card-v15219 > span small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.settings-notification-list-form-v15219 {
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface-soft);
}

.settings-notification-list-head-v15219 {
    min-height: 46px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.settings-notification-list-head-v15219 > span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-notification-list-head-v15219 b {
    color: var(--text);
    font-size: 11px;
}

.settings-notification-list-head-v15219 small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.25;
}

.settings-notification-list-head-v15219 > strong {
    min-width: 40px;
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 10px;
    text-align: center;
}

.settings-toggle-notification-item-v15219 {
    min-height: 48px;
    align-items: center !important;
    justify-content: space-between;
    gap: 12px !important;
}

.settings-toggle-notification-item-v15219 > span:first-child {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.settings-toggle-notification-item-v15219 > .settings-toggle-v15219 {
    flex: 0 0 38px;
}

/* Старые checkbox-стили больше не участвуют в этих списках. */
.settings-toggle-notification-item-v15219 input[type="checkbox"],
.settings-toggle-row-card-v15219 input[type="checkbox"] {
    margin: 0;
}

html[data-theme="dark"] .settings-toggle-v15219 i {
    background: #3a4049;
    box-shadow: inset 0 0 0 1px #454c56;
}

html[data-theme="dark"] .settings-toggle-v15219 input:checked + i {
    background: #48ade3;
    box-shadow: none;
}

html[data-theme="dark"] .settings-notification-list-form-v15219 {
    background: #20252c !important;
}

html[data-theme="dark"] .settings-notification-list-head-v15219 > strong {
    background: #2a3038 !important;
}

/* =========================================================
   v1.5.220 — Объект: «История» как хронология
   ========================================================= */

.project-history-card-v15220 {
    overflow: hidden;
}

.project-history-head-v15220 {
    margin-bottom: 0;
}

.project-history-timeline-v15220 {
    position: relative;
    margin-top: 20px;
}

.project-history-timeline-v15220::before {
    content: "";
    position: absolute;
    top: 23px;
    bottom: 30px;
    left: 20px;
    width: 1px;
    background: var(--border);
}

.project-history-event-v15220 {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    position: relative;
    padding-bottom: 16px;
}

.project-history-event-v15220:last-child {
    padding-bottom: 0;
}

.project-history-marker-v15220 {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    border: 5px solid var(--surface);
    color: #6f6ee8;
    background: rgba(111, 110, 232, .16);
    box-shadow: 0 0 0 1px rgba(111, 110, 232, .22);
}

.project-history-marker-v15220 svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.project-history-event-body-v15220 {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}

.project-history-event-head-v15220 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.project-history-event-head-v15220 > strong {
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
    text-align: right;
}

.project-history-event-meta-v15220 {
    min-width: 0;
}

.project-history-event-meta-v15220 time,
.project-history-event-meta-v15220 small {
    display: block;
}

.project-history-event-meta-v15220 time {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.project-history-event-meta-v15220 small {
    margin-top: 4px;
    color: var(--text);
    font-size: 11px;
    font-weight: 650;
}

.project-history-reason-v15220 {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    line-height: 1.55;
}

.project-history-details-v15220 {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.project-history-details-v15220 summary {
    font-size: 11px;
}

.project-history-json-v15220 pre {
    background: var(--surface);
    color: var(--text);
}

.project-history-event-v15220.is-created-v15220 .project-history-marker-v15220 {
    color: #159447;
    background: rgba(21, 148, 71, .16);
    box-shadow: 0 0 0 1px rgba(21, 148, 71, .24);
}

.project-history-event-v15220.is-created-v15220 .project-history-event-body-v15220 {
    border-color: rgba(21, 148, 71, .26);
    background: linear-gradient(135deg, rgba(21, 148, 71, .055), transparent 48%), var(--surface-soft);
}

.project-history-event-v15220.is-money-v15220 .project-history-marker-v15220 {
    color: #48ade3;
    background: rgba(72, 173, 227, .16);
    box-shadow: 0 0 0 1px rgba(72, 173, 227, .24);
}

.project-history-event-v15220.is-money-v15220 .project-history-event-body-v15220 {
    border-color: rgba(72, 173, 227, .24);
    background: linear-gradient(135deg, rgba(72, 173, 227, .055), transparent 48%), var(--surface-soft);
}

.project-history-event-v15220.is-status-v15220 .project-history-marker-v15220,
.project-history-event-v15220.is-edit-v15220 .project-history-marker-v15220 {
    color: #7777ef;
    background: rgba(111, 110, 232, .16);
    box-shadow: 0 0 0 1px rgba(111, 110, 232, .22);
}

.project-history-event-v15220.is-media-v15220 .project-history-marker-v15220 {
    color: #9a6de7;
    background: rgba(154, 109, 231, .15);
    box-shadow: 0 0 0 1px rgba(154, 109, 231, .22);
}

.project-history-event-v15220.is-comment-v15220 .project-history-marker-v15220 {
    color: #d79228;
    background: rgba(215, 146, 40, .15);
    box-shadow: 0 0 0 1px rgba(215, 146, 40, .22);
}

.project-history-event-v15220.is-removed-v15220 .project-history-marker-v15220 {
    color: #d55050;
    background: rgba(213, 80, 80, .14);
    box-shadow: 0 0 0 1px rgba(213, 80, 80, .22);
}

.project-history-event-v15220.is-removed-v15220 .project-history-event-body-v15220 {
    border-color: rgba(213, 80, 80, .20);
}

.project-history-empty-v15220 {
    margin-top: 8px;
}

@media (max-width: 760px) {
    .project-history-event-v15220 {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
    }

    .project-history-timeline-v15220::before {
        left: 16px;
    }

    .project-history-marker-v15220 {
        width: 34px;
        height: 34px;
        border-width: 4px;
    }

    .project-history-marker-v15220 svg {
        width: 14px;
        height: 14px;
    }

    .project-history-event-head-v15220 {
        display: grid;
        gap: 8px;
    }

    .project-history-event-head-v15220 > strong {
        text-align: left;
        justify-self: start;
    }

    .project-history-event-meta-v15220 time {
        white-space: normal;
    }

    .project-history-json-v15220 {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.5.221 — Настройки: статусы лидов + новая компоновка
   ========================================================= */
.settings-main-grid-v15221 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}

.settings-main-stack-v15221 {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 12px;
    min-width: 0;
}

.settings-main-grid-v15221 > .settings-panel-v15206,
.settings-main-stack-v15221 > .settings-panel-v15206 {
    min-width: 0;
}

.settings-main-grid-v15221 > .settings-sources-v15206,
.settings-main-grid-v15221 > .settings-lead-statuses-v15221 {
    height: 100%;
}

.settings-lead-statuses-v15221 form {
    display: grid;
    gap: 10px;
}

.settings-lead-status-list-v15221 {
    display: grid;
    gap: 5px;
}

.settings-lead-status-row-v15221 {
    min-width: 0;
    min-height: 42px;
    display: grid;
    grid-template-columns: 18px 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 4px 5px 4px 7px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    transition: border-color .15s ease, opacity .15s ease, transform .15s ease;
}


.settings-lead-status-row-v15221.is-dragging-v15221 {
    opacity: .45;
    cursor: grabbing;
}

.settings-lead-status-row-v15221.is-drag-over-v15221 {
    border-color: #48ade3;
}

.settings-lead-status-handle-v15221 {
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    letter-spacing: -3px;
    user-select: none;
    cursor: grab;
}

.settings-lead-status-handle-v15221:active {
    cursor: grabbing;
}

.settings-lead-status-dot-v15221 {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #5f9df1;
}

.settings-lead-status-dot-v15221.is-new-v15144 { background: #5f9df1; }
.settings-lead-status-dot-v15221.is-work-v15144 { background: #d6a13e; }
.settings-lead-status-dot-v15221.is-interested-v15144 { background: #9661db; }
.settings-lead-status-dot-v15221.is-proposal-v15144 { background: #e5a13e; }
.settings-lead-status-dot-v15221.is-contract-v15144 { background: #35ad66; }
.settings-lead-status-dot-v15221.is-lost-v15144 { background: #ef6262; }

.settings-page-v15206 .settings-lead-status-row-v15221 input[type="text"] {
    height: 32px;
    padding: 0 8px;
    background: transparent;
    border-color: transparent !important;
    font-size: 12px;
    font-weight: 650;
}

.settings-page-v15206 .settings-lead-status-row-v15221 input[type="text"]:focus {
    background: var(--surface);
    border-color: rgba(72, 173, 227, .28) !important;
}

.settings-lead-status-move-v15221 {
    display: inline-flex;
    gap: 3px;
}

.settings-lead-status-move-v15221 button {
    width: 27px;
    height: 27px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.settings-lead-status-move-v15221 button:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.settings-lead-status-actions-v15221 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 2px;
}

.settings-lead-status-actions-v15221 small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

html[data-theme="dark"] .settings-lead-status-row-v15221 {
    background: #20252c;
}

html[data-theme="dark"] .settings-lead-status-move-v15221 button,
html[data-theme="dark"] .settings-page-v15206 .settings-lead-status-row-v15221 input[type="text"]:focus {
    background: #2a3038;
}

@media (max-width: 1100px) {
    .settings-main-grid-v15221 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-main-grid-v15221 > .settings-lead-statuses-v15221 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .settings-main-grid-v15221 {
        grid-template-columns: 1fr;
    }

    .settings-main-grid-v15221 > .settings-lead-statuses-v15221 {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .settings-lead-status-row-v15221 {
        grid-template-columns: 16px 9px minmax(0, 1fr) auto;
        gap: 6px;
    }

    .settings-lead-status-actions-v15221 {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-lead-status-actions-v15221 .primary-button {
        width: 100%;
    }
}

/* =========================================================
   v1.5.222 — Лиды: компактное модальное создание лида
   ========================================================= */
html.lead-create-modal-open-v15222,
html.lead-create-modal-open-v15222 body {
    overflow: hidden !important;
}

.lead-create-open-v15222 {
    width: 100%;
    font: inherit;
    cursor: pointer;
}

.lead-create-modal-v15222 {
    position: fixed;
    inset: 0;
    z-index: 2900;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .14s ease;
}

.lead-create-modal-v15222[hidden] {
    display: none !important;
}

.lead-create-modal-v15222.is-open-v15222 {
    opacity: 1;
}

.lead-create-modal-backdrop-v15222 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(9, 12, 17, .58);
    backdrop-filter: blur(5px);
    cursor: default;
}

.lead-create-modal-card-v15222 {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    transform: translateY(8px) scale(.99);
    transition: transform .14s ease;
}

.lead-create-modal-v15222.is-open-v15222 .lead-create-modal-card-v15222 {
    transform: translateY(0) scale(1);
}

.lead-create-modal-head-v15222 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
}

.lead-create-modal-head-v15222 h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.lead-create-modal-head-v15222 p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.lead-create-modal-close-v15222 {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2px;
    border: 0;
    border-radius: 10px;
    background: var(--surface-hover);
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.lead-create-modal-close-v15222:hover {
    color: var(--text);
}

.lead-create-modal-form-v15222 {
    padding: 18px 22px 20px;
}

.lead-create-modal-grid-v15222 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.lead-create-modal-grid-v15222 .field {
    min-width: 0;
}

.lead-create-modal-grid-v15222 .field-wide,
.lead-create-comment-v15222 {
    grid-column: 1 / -1;
}

.lead-create-modal-grid-v15222 textarea {
    min-height: 96px;
    resize: vertical;
}

.lead-create-modal-actions-v15222 {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
}

html[data-theme="dark"] .lead-create-modal-card-v15222 {
    background: #1b2026;
    border-color: rgba(255,255,255,.08);
}

html[data-theme="dark"] .lead-create-modal-close-v15222 {
    background: #2a3038;
}

@media (max-width: 620px) {
    .lead-create-modal-v15222 {
        align-items: end;
        padding: 10px;
    }

    .lead-create-modal-card-v15222 {
        width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .lead-create-modal-head-v15222 {
        padding: 17px 16px 14px;
    }

    .lead-create-modal-form-v15222 {
        padding: 15px 16px 16px;
    }

    .lead-create-modal-grid-v15222 {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .lead-create-modal-grid-v15222 .field-wide,
    .lead-create-comment-v15222 {
        grid-column: auto;
    }

    .lead-create-modal-actions-v15222 {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .lead-create-modal-actions-v15222 .primary-button,
    .lead-create-modal-actions-v15222 .secondary-button {
        width: 100%;
    }
}

/* v1.5.225 — причина отказа при переводе лида в LOST. */
.lead-lost-reason-modal-v15225 {
    z-index: 13850;
}

.lead-lost-reason-modal-v15225 .project-status-modal-backdrop {
    border: 0;
    padding: 0;
    cursor: default;
}

.lead-lost-reason-dialog-v15225 {
    width: min(460px, 100%);
}

.lead-lost-reason-form-v15225 {
    display: grid;
    gap: 14px;
}

.lead-lost-reason-form-v15225 .field {
    margin: 0;
}

.lead-lost-reason-form-v15225 textarea {
    min-height: 116px;
    resize: vertical;
}

.lead-lost-reason-actions-v15225 {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.lead-refusal-reason-v15225 {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(217, 79, 79, .24);
    border-radius: 10px;
    background: rgba(239, 98, 98, .08);
}

.lead-refusal-reason-v15225 strong {
    display: block;
    margin-bottom: 4px;
    color: #d94f4f;
    font-size: 12px;
}

.lead-refusal-reason-v15225 p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

html[data-theme="dark"] .lead-refusal-reason-v15225 {
    border-color: rgba(239, 98, 98, .26);
    background: rgba(239, 98, 98, .09);
}

@media (max-width: 620px) {
    .lead-lost-reason-actions-v15225 {
        flex-direction: column-reverse;
    }

    .lead-lost-reason-actions-v15225 > * {
        width: 100%;
    }
}

/* =========================================================
   v1.5.233 — тип лида, меню «⋯» и компактный focus
   ========================================================= */
.lead-card-head-v15233 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    gap: 8px;
}

.lead-card-head-v15233 > strong {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-type-badge-v15233 {
    max-width: 120px;
    min-height: 22px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #26313c;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-type-badge-v15233.is-bath-v15233,
.lead-type-option-v15233.is-bath-v15233 { background: #f9d8a6; border-color: #efc37e; }
.lead-type-badge-v15233.is-barn-v15233,
.lead-type-option-v15233.is-barn-v15233 { background: #d8c8f3; border-color: #bea6e8; }
.lead-type-badge-v15233.is-aframe-v15233,
.lead-type-option-v15233.is-aframe-v15233 { background: #bfe8df; border-color: #91d3c5; }
.lead-type-badge-v15233.is-classic-v15233,
.lead-type-option-v15233.is-classic-v15233 { background: #bedcf5; border-color: #91c4ec; }
.lead-type-badge-v15233.is-other-v15233,
.lead-type-option-v15233.is-other-v15233 { background: #e4e7eb; border-color: #cfd4da; }

.lead-title-control-v15233 {
    flex: 1 1 auto;
    min-width: 0;
}

.lead-title-control-v15233 h2 {
    flex: 0 1 auto;
}

.lead-type-badge-button-v15233 {
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    transition: filter .14s ease, transform .14s ease;
}

.lead-type-badge-button-v15233:hover {
    filter: brightness(.97);
}

.lead-type-badge-button-v15233:active {
    transform: translateY(1px);
}

.lead-type-badge-button-v15233:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(72,173,227,.18);
}

.lead-type-modal-dialog-v15233 {
    width: min(470px, calc(100vw - 28px));
}

.lead-type-options-v15233 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.lead-type-option-v15233 {
    min-height: 54px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #26313c;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform .14s ease, box-shadow .14s ease;
}

.lead-type-option-v15233 > span {
    font-size: 11px;
    font-weight: 650;
}

.lead-type-option-v15233 > small {
    font-size: 8px;
    opacity: .68;
}

.lead-type-option-v15233:hover {
    transform: translateY(-1px);
}

.lead-type-option-v15233.is-current-v15233 {
    box-shadow: inset 0 0 0 2px rgba(38,49,60,.22);
}

.lead-type-option-v15233.is-saving-v15233 {
    opacity: .58;
}

.lead-actions-menu-v15233 > summary {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.lead-edit-modal-dialog-v15233 {
    width: min(650px, calc(100vw - 28px));
    max-height: min(760px, calc(100dvh - 28px));
    overflow: auto;
}

.lead-edit-form-v15233 {
    display: grid;
    gap: 12px;
}

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

.lead-edit-wide-v15233 {
    grid-column: 1 / -1;
}

.lead-edit-actions-v15233 {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.lead-type-transition-v15233 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.lead-activity-marker-type-v15233 {
    color: #317da8 !important;
    background: rgba(72,173,227,.14) !important;
}

.lead-activity-marker-details-v15233 {
    color: #6a7280 !important;
    background: rgba(120,128,140,.12) !important;
}

/* leads.php: справа остаётся статистика и одно меню действий. */
.leads-toolbar-actions-v15233 {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leads-page-menu-v15233 {
    position: relative;
    z-index: 80;
    flex: 0 0 auto;
}

.leads-page-menu-v15233 > summary {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.leads-page-menu-v15233 > summary::-webkit-details-marker {
    display: none;
}

.leads-page-menu-v15233 > summary:hover,
.leads-page-menu-v15233[open] > summary {
    background: var(--surface);
}

.leads-page-menu-popover-v15233 {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 180px;
    padding: 6px;
    display: grid;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 14px 35px rgba(0,0,0,.20);
}

.leads-page-menu-popover-v15233 form {
    margin: 0 !important;
}

.leads-page-menu-popover-v15233 :is(a, button) {
    width: 100%;
    min-height: 35px;
    padding: 0 9px;
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    text-align: left;
    text-decoration: none;
}

.leads-page-menu-popover-v15233 :is(a, button):hover {
    background: var(--surface-soft);
}

.leads-page-menu-popover-v15233 button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* На страницах лидов focus больше не рисует тяжёлую четырёхпиксельную рамку. */
.leads-page-v15144 :is(input, select, textarea):focus,
.lead-page-v15154 :is(input, select, textarea):focus {
    outline: none !important;
    border-color: #48ade3 !important;
    box-shadow: 0 0 0 1px rgba(72,173,227,.18) !important;
}

html[data-theme="dark"] .lead-type-badge-v15233,
html[data-theme="dark"] .lead-type-option-v15233 {
    color: #e8edf3;
}
html[data-theme="dark"] .lead-type-badge-v15233.is-bath-v15233,
html[data-theme="dark"] .lead-type-option-v15233.is-bath-v15233 { background: #5b4327; border-color: #7b5d36; }
html[data-theme="dark"] .lead-type-badge-v15233.is-barn-v15233,
html[data-theme="dark"] .lead-type-option-v15233.is-barn-v15233 { background: #403153; border-color: #5a4472; }
html[data-theme="dark"] .lead-type-badge-v15233.is-aframe-v15233,
html[data-theme="dark"] .lead-type-option-v15233.is-aframe-v15233 { background: #244b43; border-color: #35685d; }
html[data-theme="dark"] .lead-type-badge-v15233.is-classic-v15233,
html[data-theme="dark"] .lead-type-option-v15233.is-classic-v15233 { background: #263f55; border-color: #375a78; }
html[data-theme="dark"] .lead-type-badge-v15233.is-other-v15233,
html[data-theme="dark"] .lead-type-option-v15233.is-other-v15233 { background: #333942; border-color: #464e59; }

@media (max-width: 720px) {
    .lead-card-head-v15233 {
        align-items: flex-start !important;
    }

    .lead-type-badge-v15233 {
        max-width: 102px;
    }

    .lead-title-control-v15233 {
        flex-wrap: wrap;
    }

    .lead-edit-grid-v15233,
    .lead-type-options-v15233 {
        grid-template-columns: 1fr;
    }

    .lead-edit-wide-v15233 {
        grid-column: auto;
    }

    .lead-edit-actions-v15233 {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .leads-toolbar-actions-v15233 {
        flex: 0 0 auto;
    }

    .leads-statistics-button-v15184 {
        padding-inline: 10px;
    }
}

/* =========================================================
   v1.5.234 — копирование телефона + видимый loader фото
   ========================================================= */
.phone-copy-row-v15234 {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.phone-copy-button-v15234 {
    width: 26px;
    height: 26px;
    padding: 0;
    flex: 0 0 26px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--muted);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.phone-copy-button-v15234 svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-copy-button-v15234:hover {
    color: var(--text);
    background: var(--surface);
    border-color: var(--text-soft, var(--border));
}

.phone-copy-button-v15234:active {
    transform: scale(.94);
}

.phone-copy-button-v15234:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(72, 173, 227, .18);
    border-color: #48ade3;
}

.phone-copy-button-v15234.is-copied-v15234 {
    color: #2f9d63;
    border-color: rgba(47, 157, 99, .42);
    background: rgba(47, 157, 99, .10);
}

.lead-phone-copy-row-v15234 {
    max-width: 100%;
}

/* В тёмной теме сегмент spinner должен быть светлым и заметным. */
html[data-theme="dark"] .photo-thumb-loader-v1538 {
    border-color: rgba(255, 255, 255, .20) !important;
    border-top-color: #f4f7fb !important;
    border-right-color: #dce8f5 !important;
}

html[data-theme="dark"] .phone-copy-button-v15234 {
    background: #252b33;
    border-color: #3a424d;
    color: #c8d0da;
}

html[data-theme="dark"] .phone-copy-button-v15234:hover {
    background: #2d343d;
    border-color: #4a5562;
    color: #f2f5f8;
}

@media (max-width: 720px) {
    .phone-copy-button-v15234 {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }
}



/* =========================================================
   v1.5.235 — карточки лидов, типы и телефон
   ========================================================= */
.lead-card-head-v15233 {
    display: block;
}

.lead-card-contact-row-v15235 {
    min-width: 0;
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.lead-card-contact-row-v15235 .lead-card-phone-v15206 {
    min-width: 0;
    margin: 0;
    flex: 1 1 auto;
}

.lead-card-contact-row-v15235 .lead-card-client-v15161 {
    min-width: 0;
    margin: 0;
    flex: 0 1 48%;
    overflow: hidden;
    color: var(--muted);
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-card-penultimate-row-v15235 {
    min-width: 0;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lead-card-penultimate-row-v15235 .lead-card-detail-line-v15161 {
    min-width: 0;
    margin: 0;
    flex: 1 1 auto;
}

.lead-card-penultimate-row-v15235 .lead-type-badge-v15233 {
    margin-left: auto;
    flex: 0 0 auto;
}

.phone-copy-row-v15235 {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.phone-copy-number-v15235 {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-mobile-number-v15235 {
    display: none !important;
}

.lead-actions-popover-v15169 :is(a, button) {
    font-size: 12px;
}

@media (max-width: 720px) {
    .phone-desktop-number-v15235 {
        display: none !important;
    }

    .phone-mobile-number-v15235 {
        display: inline !important;
    }

    .lead-application-grid-v15155 > .project-info-item-v158 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .lead-application-grid-v15155 .project-info-icon-v158 {
        display: none !important;
    }
}


/* =========================================================
   v1.5.236 — inline-редактирование полей лида
   ========================================================= */
.lead-inline-value-v15236 {
    min-width: 0;
    display: inline-block;
    border-radius: 5px;
    cursor: text;
    transition: background .14s ease, box-shadow .14s ease;
}

.lead-inline-value-v15236:hover {
    background: var(--surface-soft);
    box-shadow: 0 0 0 4px var(--surface-soft);
}

.lead-inline-value-v15236:focus-visible {
    outline: none;
    background: var(--surface-soft);
    box-shadow: 0 0 0 2px rgba(72,173,227,.18);
}

.lead-inline-editor-v15236 {
    width: 100%;
    min-width: 120px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #48ade3;
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: inherit;
    line-height: 1.35;
    box-shadow: 0 0 0 1px rgba(72,173,227,.14);
    resize: vertical;
}

.lead-inline-editor-v15236:focus {
    outline: none !important;
    border-color: #48ade3 !important;
    box-shadow: 0 0 0 1px rgba(72,173,227,.18) !important;
}

.lead-inline-editor-v15236.is-saving-v15236 {
    opacity: .58;
    pointer-events: none;
}

.lead-application-item-v15155.is-inline-saved-v15236 {
    animation: lead-inline-saved-v15236 .7s ease;
}

@keyframes lead-inline-saved-v15236 {
    0% { background: rgba(72,173,227,.13); }
    100% { background: transparent; }
}

html[data-theme="dark"] .lead-inline-value-v15236:hover,
html[data-theme="dark"] .lead-inline-value-v15236:focus-visible {
    background: #2a3038;
    box-shadow: 0 0 0 4px #2a3038;
}

/* =========================================================
   v1.5.238 — фиксированный ID в заголовке лида
   ========================================================= */
.lead-title-locked-field-v15238 {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
}

.lead-title-locked-field-v15238 input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.lead-title-locked-field-v15238:focus-within {
    border-color: #48ade3;
    box-shadow: 0 0 0 2px rgba(72, 173, 227, .10);
}

.lead-title-locked-field-v15238 > strong {
    flex: 0 0 auto;
    padding: 0 12px;
    border-left: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 38px;
    user-select: none;
}

html[data-theme="dark"] .lead-title-locked-field-v15238 {
    background: #20252c;
}


/* =========================================================
   v1.5.240 — Настройки: иконка CRM для iPhone / Home Screen
   ========================================================= */
.settings-app-icon-v15240 {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.settings-app-icon-v15240 > img {
    width: 64px;
    height: 64px;
    display: block;
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid var(--border);
    background: #fff;
}

.settings-app-icon-body-v15240 {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.settings-app-icon-body-v15240 > div {
    display: grid;
    gap: 2px;
}

.settings-app-icon-body-v15240 strong {
    font-size: 12px;
    line-height: 1.25;
}

.settings-app-icon-body-v15240 small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.settings-app-icon-form-v15240 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.settings-page-v15206 .settings-app-icon-form-v15240 input[type="file"] {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 10px;
}

.settings-page-v15206 .settings-app-icon-form-v15240 input[type="file"]::file-selector-button {
    height: 22px;
    margin-right: 7px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.settings-app-icon-hint-v15240 {
    display: block;
}

html[data-theme="dark"] .settings-app-icon-v15240 > img {
    border-color: #2a3038;
}

html[data-theme="dark"] .settings-page-v15206 .settings-app-icon-form-v15240 input[type="file"] {
    background: #20252c;
}

html[data-theme="dark"] .settings-page-v15206 .settings-app-icon-form-v15240 input[type="file"]::file-selector-button {
    background: #2a3038;
}

@media (max-width: 520px) {
    .settings-app-icon-v15240 {
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: start;
    }

    .settings-app-icon-v15240 > img {
        width: 58px;
        height: 58px;
        border-radius: 14px;
    }

    .settings-app-icon-form-v15240 {
        grid-template-columns: 1fr;
    }

    .settings-app-icon-form-v15240 .secondary-button {
        width: 100%;
    }
}


/* -------------------------------------------------------
   v1.5.242 — Обязательства: вкладки Инвесторы / Поставщики / Зарплата
-------------------------------------------------------- */
.obligations-page-v15242 {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.obligations-hero-v15242 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.obligations-heading-v15242 h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -.04em;
}

.obligations-heading-v15242 p {
    margin: 8px 0 0;
    color: var(--muted);
}

.obligations-tabs-wrap-v15242 {
    margin-top: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
    gap: 18px;
    align-items: stretch;
}

.obligations-tabs-v15242 {
    display: flex;
    gap: 12px;
    align-items: stretch;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.obligations-tab-v15242 {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    transition: .18s ease;
    flex-shrink: 0;
}

.obligations-tab-v15242 span {
    color: var(--muted);
    font-size: 13px;
}

.obligations-tab-v15242 strong {
    font-size: 20px;
    letter-spacing: -.03em;
}

.obligations-tab-v15242:hover {
    border-color: rgba(34, 185, 91, .25);
    transform: translateY(-1px);
}

.obligations-tab-v15242.is-active-v15242 {
    background: linear-gradient(180deg, rgba(34, 185, 91, .16), rgba(34, 185, 91, .08));
    border-color: rgba(34, 185, 91, .35);
    box-shadow: inset 0 0 0 1px rgba(34, 185, 91, .1);
}

.obligations-tab-v15242.is-active-v15242 span,
.obligations-tab-v15242.is-active-v15242 strong {
    color: var(--text);
}

.obligations-total-v15242 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.obligations-gauge-v15242 {
    position: relative;
    height: 156px;
}

.obligations-gauge-arc-v15242 {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.obligations-gauge-arc-v15242::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 220px;
    height: 220px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: conic-gradient(
        from 180deg,
        var(--green) 0deg var(--investor-deg),
        var(--blue) var(--investor-deg) var(--supplier-deg),
        var(--orange) var(--supplier-deg) var(--salary-deg),
        rgba(123, 132, 152, .18) var(--salary-deg) 180deg,
        transparent 180deg 360deg
    );
}

.obligations-gauge-cutout-v15242 {
    position: absolute;
    left: 50%;
    top: 31px;
    width: 158px;
    height: 158px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--surface-soft);
}

.obligations-gauge-value-v15242 {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.obligations-gauge-value-v15242 span {
    color: var(--muted);
    font-size: 12px;
}

.obligations-gauge-value-v15242 strong {
    font-size: 24px;
    letter-spacing: -.04em;
}

.obligations-legend-v15242 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.obligations-legend-v15242 span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.obligations-legend-v15242 i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.obligations-legend-v15242 i.is-investors-v15242 { background: var(--green); }
.obligations-legend-v15242 i.is-suppliers-v15242 { background: var(--blue); }
.obligations-legend-v15242 i.is-salary-v15242 { background: var(--orange); }

.obligation-placeholder-v15242 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 24px;
}

.obligation-placeholder-card-v15242 {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.obligation-placeholder-card-v15242 h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.04em;
}

.obligation-placeholder-card-v15242 p,
.obligation-placeholder-card-v15242 li {
    color: var(--muted);
    line-height: 1.65;
}

.obligation-placeholder-card-v15242 ul {
    margin: 0;
    padding-left: 20px;
}

.obligation-placeholder-badge-v15242 {
    align-self: flex-start;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

html[data-theme="dark"] .obligations-hero-v15242,
html[data-theme="dark"] .obligation-placeholder-v15242 {
    background: #171b20;
    border-color: #2a3038;
    box-shadow: none;
}

html[data-theme="dark"] .obligations-total-v15242,
html[data-theme="dark"] .obligations-tab-v15242 {
    background: #14171c;
    border-color: #2a3038;
}

html[data-theme="dark"] .obligations-gauge-cutout-v15242 {
    background: #14171c;
}

html[data-theme="dark"] .obligations-tab-v15242.is-active-v15242 {
    background: linear-gradient(180deg, rgba(74, 222, 128, .16), rgba(74, 222, 128, .07));
    border-color: rgba(74, 222, 128, .35);
}

@media (max-width: 1120px) {
    .obligations-tabs-wrap-v15242 {
        grid-template-columns: 1fr;
    }

    .obligations-total-v15242 {
        order: -1;
    }
}

@media (max-width: 720px) {
    .obligations-hero-v15242,
    .obligation-placeholder-v15242 {
        padding: 18px;
        border-radius: 22px;
    }

    .obligations-tab-v15242 {
        min-width: 156px;
        padding: 14px 16px;
        border-radius: 18px;
    }

    .obligations-tab-v15242 strong {
        font-size: 17px;
    }

    .obligations-gauge-value-v15242 strong {
        font-size: 22px;
    }
}


/* -------------------------------------------------------
   v1.5.243 — Обязательства: Сводка / Инвесторы / Поставщики / Зарплата / Налоги
-------------------------------------------------------- */
.obligations-page-v15243{display:flex;flex-direction:column;gap:20px}.obligations-nav-card-v15243{background:var(--surface);border:1px solid var(--border);border-radius:26px;padding:22px;box-shadow:var(--shadow)}.obligations-nav-head-v15243 h1{margin:0;font-size:34px;letter-spacing:-.04em}.obligations-nav-head-v15243 p{margin:6px 0 0;color:var(--muted)}.obligations-tabs-v15243{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:20px}.obligations-tab-v15243{min-width:0;padding:14px 16px;border:1px solid var(--border);border-radius:18px;background:var(--surface-soft);display:flex;flex-direction:column;gap:5px}.obligations-tab-v15243 span{font-size:12px;color:var(--muted)}.obligations-tab-v15243 strong{font-size:17px;letter-spacing:-.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.obligations-tab-v15243.is-active-v15243{border-color:rgba(34,185,91,.38);background:var(--green-soft);box-shadow:inset 0 0 0 1px rgba(34,185,91,.08)}
.obligations-summary-v15243{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(0,1.25fr);gap:18px}.obligations-total-card-v15243,.obligations-breakdown-v15243>a{background:var(--surface);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow)}.obligations-total-card-v15243{padding:24px}.obligations-gauge-v15243{position:relative;height:220px}.obligations-gauge-arc-v15243{position:absolute;inset:0;overflow:hidden}.obligations-gauge-arc-v15243:before{content:"";position:absolute;left:50%;top:8px;width:310px;height:310px;transform:translateX(-50%);border-radius:50%;background:conic-gradient(from 180deg,var(--green) 0 var(--investor-end),var(--blue) var(--investor-end) var(--supplier-end),var(--orange) var(--supplier-end) var(--salary-end),var(--violet) var(--salary-end) var(--tax-end),rgba(123,132,152,.16) var(--tax-end) 180deg,transparent 180deg 360deg)}.obligations-gauge-cutout-v15243{position:absolute;left:50%;top:55px;width:216px;height:216px;border-radius:50%;transform:translateX(-50%);background:var(--surface)}.obligations-gauge-value-v15243{position:absolute;inset:auto 0 15px;display:flex;flex-direction:column;align-items:center;gap:5px}.obligations-gauge-value-v15243 span{color:var(--muted);font-size:13px}.obligations-gauge-value-v15243 strong{font-size:30px;letter-spacing:-.05em}.obligations-summary-legend-v15243{display:flex;justify-content:center;flex-wrap:wrap;gap:10px 14px}.obligations-summary-legend-v15243 span{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:12px}.obligations-summary-legend-v15243 i{width:9px;height:9px;border-radius:50%}.obligations-summary-legend-v15243 .is-investors-v15243{background:var(--green)}.obligations-summary-legend-v15243 .is-suppliers-v15243{background:var(--blue)}.obligations-summary-legend-v15243 .is-salary-v15243{background:var(--orange)}.obligations-summary-legend-v15243 .is-taxes-v15243{background:var(--violet)}.obligations-breakdown-v15243{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.obligations-breakdown-v15243>a{padding:22px;display:flex;flex-direction:column;gap:6px;transition:.16s}.obligations-breakdown-v15243>a:hover{transform:translateY(-1px);border-color:rgba(34,185,91,.28)}.obligations-breakdown-v15243 span,.obligations-breakdown-v15243 small{color:var(--muted)}.obligations-breakdown-v15243 strong{font-size:26px;letter-spacing:-.04em}
.supplier-summary-grid-v15243{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.supplier-summary-grid-v15243 article{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:6px}.supplier-summary-grid-v15243 span{color:var(--muted);font-size:12px}.supplier-summary-grid-v15243 strong{font-size:22px}.supplier-summary-grid-v15243 .is-danger-v15243 strong{color:var(--red)}.supplier-workspace-v15243{display:grid;grid-template-columns:300px minmax(0,1fr);gap:16px;align-items:start}.supplier-sidebar-v15243,.supplier-card-v15243,.supplier-payables-v15243,.supplier-history-v15243,.supplier-empty-main-v15243{background:var(--surface);border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow)}.supplier-sidebar-v15243{padding:14px;position:sticky;top:16px}.supplier-sidebar-head-v15243{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 4px 12px}.supplier-sidebar-head-v15243 h2{margin:0;font-size:18px}.supplier-sidebar-head-v15243 .primary-button{padding:9px 12px;font-size:12px}.supplier-list-v15243{display:flex;flex-direction:column;gap:6px}.supplier-list-item-v15243{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:center;padding:10px;border-radius:15px}.supplier-list-item-v15243:hover,.supplier-list-item-v15243.is-active-v15243{background:var(--surface-soft)}.supplier-list-item-v15243.is-active-v15243{box-shadow:inset 3px 0 0 var(--green)}.supplier-initial-v15243{width:42px;height:42px;border-radius:13px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;font-weight:700;font-size:17px}.supplier-initial-v15243.is-large-v15243{width:54px;height:54px;border-radius:16px;font-size:20px}.supplier-list-copy-v15243{min-width:0;display:flex;flex-direction:column;gap:4px}.supplier-list-copy-v15243 strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.supplier-list-copy-v15243 span,.supplier-empty-v15243{color:var(--muted);font-size:12px}.supplier-main-v15243{display:flex;flex-direction:column;gap:14px;min-width:0}.supplier-card-v15243,.supplier-payables-v15243,.supplier-history-v15243,.supplier-empty-main-v15243{padding:20px}.supplier-card-head-v15243,.supplier-history-top-v15243,.supplier-payables-head-v15243{display:flex;align-items:center;justify-content:space-between;gap:14px}.supplier-card-person-v15243{display:flex;align-items:center;gap:13px}.supplier-card-person-v15243 span{color:var(--muted);font-size:12px}.supplier-card-person-v15243 h2,.supplier-history-top-v15243 h3,.supplier-payables-head-v15243 h3{margin:2px 0 0}.supplier-card-actions-v15243{display:flex;gap:8px;flex-wrap:wrap}.supplier-card-meta-v15243{display:flex;gap:10px 20px;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}.supplier-card-meta-v15243 span{color:var(--muted);font-size:12px}.supplier-card-meta-v15243 strong{color:var(--text);margin-left:5px}.supplier-note-v15243{margin:14px 0 0;color:var(--muted);line-height:1.55}.supplier-payables-head-v15243>span{color:var(--muted);font-size:12px}.supplier-payable-table-v15243{margin-top:14px;overflow-x:auto}.supplier-payable-row-v15243{display:grid;grid-template-columns:minmax(190px,1.5fr) minmax(110px,.7fr) minmax(120px,.75fr) minmax(120px,.75fr) minmax(145px,.85fr);align-items:center;gap:10px;min-width:790px;padding:12px 10px;border-top:1px solid var(--border)}.supplier-payable-row-v15243.is-head-v15243{border-top:0;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em}.supplier-payable-row-v15243:not(.is-head-v15243):hover,.supplier-payable-row-v15243.is-active-v15243{background:var(--surface-soft);border-radius:13px}.supplier-payable-row-v15243>span:first-child{display:flex;flex-direction:column;gap:3px}.supplier-payable-row-v15243 small{color:var(--muted);font-size:11px}.supplier-status-v15243{display:inline-flex;padding:6px 9px;border-radius:999px;background:var(--surface-soft);font-style:normal;font-size:11px;white-space:nowrap}.supplier-status-v15243.is-paid-v15243{background:var(--green-soft);color:var(--green)}.supplier-status-v15243.is-overdue-v15243{background:var(--red-soft);color:var(--red)}.supplier-status-v15243.is-partial-v15243{background:var(--blue-soft);color:var(--blue)}.supplier-history-summary-v15243{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}.supplier-history-summary-v15243>div{background:var(--surface-soft);border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:4px}.supplier-history-summary-v15243 span{color:var(--muted);font-size:11px}.supplier-history-summary-v15243 strong{font-size:16px}.supplier-timeline-v15243{margin-top:20px;padding-left:12px}.supplier-timeline-item-v15243{position:relative;display:grid;grid-template-columns:16px minmax(0,1fr);gap:12px;padding:0 0 20px}.supplier-timeline-item-v15243:before{content:"";position:absolute;left:7px;top:15px;bottom:-3px;width:1px;background:var(--border)}.supplier-timeline-item-v15243:last-child:before{display:none}.supplier-timeline-item-v15243>i{width:11px;height:11px;border-radius:50%;background:var(--green);margin-top:5px;z-index:1}.supplier-timeline-item-v15243.is-created-v15243>i{background:var(--blue)}.supplier-timeline-item-v15243>div{display:flex;flex-direction:column;gap:5px}.supplier-timeline-head-v15243{display:flex;justify-content:space-between;gap:10px}.supplier-timeline-head-v15243 time,.supplier-timeline-item-v15243 small,.supplier-timeline-item-v15243 p{color:var(--muted);font-size:12px;margin:0}.supplier-modal-v15243{position:fixed;inset:0;z-index:1005;display:grid;place-items:center;padding:18px}.supplier-modal-v15243[hidden]{display:none}.supplier-modal-backdrop-v15243{position:absolute;inset:0;background:rgba(7,10,14,.55);backdrop-filter:blur(18px)}.supplier-modal-panel-v15243{position:relative;width:min(100%,620px);max-height:calc(100vh - 36px);overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:24px;padding:20px;box-shadow:0 30px 100px rgba(0,0,0,.25)}.supplier-modal-head-v15243{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.supplier-modal-head-v15243 h3{margin:0}.supplier-modal-head-v15243>button{border:0;background:transparent;color:var(--muted);font-size:28px;cursor:pointer}.supplier-form-v15243{display:flex;flex-direction:column;gap:13px}.supplier-form-v15243 label{display:flex;flex-direction:column;gap:7px}.supplier-form-v15243 label>span,.supplier-source-v15243 legend{font-size:12px;color:var(--muted)}.supplier-form-v15243 input,.supplier-form-v15243 select,.supplier-form-v15243 textarea{width:100%;border:1px solid var(--border);background:var(--surface-soft);color:var(--text);border-radius:13px;padding:12px 13px;outline:none}.supplier-form-grid-v15243{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.supplier-modal-actions-v15243{display:flex;justify-content:flex-end;gap:8px;margin-top:5px}.supplier-source-v15243{border:0;padding:0;margin:0;display:flex;gap:8px;flex-wrap:wrap}.supplier-source-v15243 legend{width:100%;margin-bottom:5px}.supplier-source-v15243 label{display:inline-flex;flex-direction:row;align-items:center;gap:7px;padding:9px 11px;border:1px solid var(--border);border-radius:999px;cursor:pointer}.supplier-source-v15243 input{width:auto}.obligation-placeholder-v15243{background:var(--surface);border:1px solid var(--border);border-radius:24px;padding:28px}.obligation-placeholder-v15243>div{max-width:700px}.obligation-placeholder-v15243 span{display:inline-flex;padding:6px 10px;border-radius:999px;background:var(--green-soft);color:var(--green);font-size:12px}.obligation-placeholder-v15243 h2{margin:12px 0 6px;font-size:28px}.obligation-placeholder-v15243 p{color:var(--muted);line-height:1.6}
html[data-theme="dark"] .obligations-nav-card-v15243,html[data-theme="dark"] .obligations-total-card-v15243,html[data-theme="dark"] .obligations-breakdown-v15243>a,html[data-theme="dark"] .supplier-summary-grid-v15243 article,html[data-theme="dark"] .supplier-sidebar-v15243,html[data-theme="dark"] .supplier-card-v15243,html[data-theme="dark"] .supplier-payables-v15243,html[data-theme="dark"] .supplier-history-v15243,html[data-theme="dark"] .supplier-empty-main-v15243,html[data-theme="dark"] .obligation-placeholder-v15243{background:#171b20;border-color:#2a3038;box-shadow:none}html[data-theme="dark"] .obligations-tab-v15243,html[data-theme="dark"] .supplier-payable-row-v15243:not(.is-head-v15243):hover,html[data-theme="dark"] .supplier-payable-row-v15243.is-active-v15243,html[data-theme="dark"] .supplier-history-summary-v15243>div,html[data-theme="dark"] .supplier-list-item-v15243:hover,html[data-theme="dark"] .supplier-list-item-v15243.is-active-v15243{background:#14171c;border-color:#2a3038}html[data-theme="dark"] .obligations-tab-v15243.is-active-v15243{background:rgba(74,222,128,.1);border-color:rgba(74,222,128,.32)}html[data-theme="dark"] .obligations-gauge-cutout-v15243{background:#171b20}html[data-theme="dark"] .supplier-modal-panel-v15243{background:#171b20;border-color:#2a3038}html[data-theme="dark"] .supplier-form-v15243 input,html[data-theme="dark"] .supplier-form-v15243 select,html[data-theme="dark"] .supplier-form-v15243 textarea{background:#14171c;border-color:#2a3038}
@media(max-width:1150px){.obligations-tabs-v15243{display:flex;overflow-x:auto}.obligations-tab-v15243{min-width:155px}.obligations-summary-v15243{grid-template-columns:1fr}.supplier-summary-grid-v15243{grid-template-columns:repeat(2,minmax(0,1fr))}.supplier-workspace-v15243{grid-template-columns:260px minmax(0,1fr)}}@media(max-width:780px){.obligations-nav-card-v15243{padding:16px;border-radius:20px}.obligations-nav-head-v15243 h1{font-size:28px}.obligations-summary-v15243{gap:12px}.obligations-breakdown-v15243{grid-template-columns:1fr}.supplier-summary-grid-v15243{grid-template-columns:repeat(2,minmax(0,1fr))}.supplier-workspace-v15243{grid-template-columns:1fr}.supplier-sidebar-v15243{position:static}.supplier-list-v15243{display:flex;flex-direction:row;overflow-x:auto}.supplier-list-item-v15243{min-width:230px}.supplier-card-head-v15243,.supplier-history-top-v15243{align-items:flex-start;flex-direction:column}.supplier-history-summary-v15243{grid-template-columns:repeat(2,minmax(0,1fr))}.supplier-form-grid-v15243{grid-template-columns:1fr}.supplier-modal-actions-v15243{flex-direction:column-reverse}.supplier-modal-actions-v15243 button{width:100%}}@media(max-width:480px){.supplier-summary-grid-v15243{grid-template-columns:1fr 1fr}.supplier-summary-grid-v15243 strong{font-size:18px}.obligations-gauge-value-v15243 strong{font-size:24px}.obligations-gauge-v15243{height:195px}.obligations-gauge-arc-v15243:before{width:270px;height:270px}.obligations-gauge-cutout-v15243{top:50px;width:190px;height:190px}.supplier-history-summary-v15243{grid-template-columns:1fr 1fr}}


/* -------------------------------------------------------
   v1.5.244 — Обязательства: компактная шапка вкладок
-------------------------------------------------------- */
.obligations-nav-card-v15244 {
    padding: 10px;
    border-radius: 18px;
}

.obligations-tabs-v15244 {
    margin-top: 0;
    gap: 8px;
}

.obligations-tabs-v15244 .obligations-tab-v15243 {
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 13px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.obligations-tabs-v15244 .obligations-tab-v15243 span {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.obligations-tabs-v15244 .obligations-tab-v15243 strong {
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: -.02em;
    flex: 0 0 auto;
}

@media (max-width: 1150px) {
    .obligations-tabs-v15244 .obligations-tab-v15243 {
        min-width: 158px;
    }
}

@media (max-width: 780px) {
    .obligations-nav-card-v15243.obligations-nav-card-v15244 {
        padding: 8px;
        border-radius: 16px;
    }

    .obligations-tabs-v15244 {
        gap: 6px;
    }

    .obligations-tabs-v15244 .obligations-tab-v15243 {
        min-width: 148px;
        padding: 9px 10px;
        min-height: 42px;
        border-radius: 12px;
    }
}


/* -------------------------------------------------------
   v1.5.245 — Обязательства: единый дизайн с разделом «Инвесторы»
-------------------------------------------------------- */
.obligations-page-v15243{gap:18px}
.obligations-nav-card-v15243.obligations-nav-card-v15244.obligations-nav-card-v15245{
    position:relative;
    overflow:visible;
    padding:0 0 14px !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
}
.obligations-tabs-v15245{
    position:relative;
    overflow:visible;
    gap:7px;
}
.obligations-tabs-v15245 .obligations-tab-v15243{
    position:relative;
    min-height:46px;
    padding:9px 11px;
    border:1px solid var(--border) !important;
    border-radius:9px;
    background:var(--surface-soft) !important;
    box-shadow:none !important;
}
.obligations-tabs-v15245 .obligations-tab-v15243:hover,
.obligations-tabs-v15245 .obligations-tab-v15243.is-active-v15243{
    background:var(--surface) !important;
    border-color:rgba(72,173,227,.62) !important;
}
.obligations-tabs-v15245 .obligations-tab-v15243.is-active-v15243::after{
    content:"";
    position:absolute;
    z-index:2;
    left:50%;
    top:100%;
    height:34px;
    border-left:2px dashed rgba(72,173,227,.72);
    pointer-events:none;
}
.obligations-tabs-v15245 .obligations-tab-v15243 span,
.obligations-tabs-v15245 .obligations-tab-v15243 strong{font-size:14px !important}

/* Поставщики повторяют геометрию, заливки и типографику инвесторов. */
.suppliers-page-v15245 .investor-summary-grid-v15192{margin:0 !important}
.supplier-workspace-v15245{grid-template-columns:minmax(270px,330px) minmax(0,1fr) !important;gap:12px !important}
.supplier-sidebar-v15245{padding:7px !important}
.supplier-list-v15245{display:grid;gap:4px}
.supplier-profile-v15245{padding:12px !important}
.supplier-profile-v15245 .investor-profile-title-v15192 p{margin:3px 0 0;color:var(--muted);font-size:11px !important}
.supplier-note-v15245{margin:8px 0 0;padding:0;color:var(--muted);font-size:12px;line-height:1.5}
.supplier-payables-panel-v15245{position:relative;overflow:visible !important}
.supplier-payable-table-v15245{overflow:visible !important}
.supplier-payable-row-v15245{grid-template-columns:minmax(180px,1.45fr) minmax(100px,.75fr) minmax(110px,.75fr) minmax(110px,.75fr) minmax(105px,.7fr) !important}
.supplier-payable-row-v15245 .investor-status-v15191.is-partial-v15245{color:#48ade3;background:rgba(72,173,227,.12)}
.supplier-payable-detail-v15245{padding:12px !important}
.supplier-chronology-v15245 .investor-chronology-item-v15191:not(:last-child)::after{
    content:"";
    position:absolute;
    z-index:0;
    left:8px;
    top:22px;
    bottom:-8px;
    border-left:2px dashed rgba(96,120,150,.62);
}
.supplier-chronology-v15245::before{display:none !important}
.supplier-modal-v15245 .investor-modal-backdrop-v15188{backdrop-filter:blur(18px)}
.supplier-modal-v15245 .investor-repayment-source-v15207{grid-template-columns:repeat(3,minmax(0,1fr))}
.supplier-payables-panel-v15245.has-selection-v15194 .investor-selected-rail-v15207{display:block}

/* Все изображения поставщиков ведут себя ровно как аватары инвесторов. */
.suppliers-page-v15245 .investor-list-avatar-v15192,
.suppliers-page-v15245 .investor-profile-avatar-v15192{overflow:hidden}
.suppliers-page-v15245 .investor-list-avatar-v15192 img,
.suppliers-page-v15245 .investor-profile-avatar-v15192 img{width:100%;height:100%;display:block;object-fit:cover}

html[data-theme="dark"] .obligations-tabs-v15245 .obligations-tab-v15243{background:#14171c !important}
html[data-theme="dark"] .obligations-tabs-v15245 .obligations-tab-v15243:hover,
html[data-theme="dark"] .obligations-tabs-v15245 .obligations-tab-v15243.is-active-v15243{background:#20252c !important}
html[data-theme="dark"] .supplier-chronology-v15245 .investor-chronology-item-v15191:not(:last-child)::after{border-left-color:rgba(151,180,216,.82)}

@media(max-width:1150px){
    .obligations-tabs-v15245{display:flex;overflow-x:auto;overflow-y:visible;padding-bottom:0}
    .obligations-tabs-v15245 .obligations-tab-v15243{min-width:150px}
}
@media(max-width:780px){
    .obligations-nav-card-v15243.obligations-nav-card-v15244.obligations-nav-card-v15245{padding:0 0 12px !important}
    .obligations-tabs-v15245 .obligations-tab-v15243.is-active-v15243::after{height:28px}
    .supplier-workspace-v15245{grid-template-columns:1fr !important}
    .supplier-sidebar-v15245{position:static !important}
    .supplier-list-v15245{display:flex;overflow-x:auto}
    .supplier-list-v15245 .investor-list-item-v15191{min-width:245px}
    .supplier-payable-table-v15245{overflow-x:auto !important}
    .supplier-payable-row-v15245{min-width:760px}
    .supplier-modal-v15245 .investor-repayment-source-v15207{grid-template-columns:1fr}
}


/* -------------------------------------------------------
   v1.5.246 — Обязательства: порядок, закрытые строки, вкладки, поставщики
-------------------------------------------------------- */
/* Неактивные верхние вкладки визуально уходят на второй план. */
.obligations-tabs-v15245 .obligations-tab-v15243 {
    opacity: .46;
    transition: opacity .16s ease, background .16s ease, border-color .16s ease;
}
.obligations-tabs-v15245 .obligations-tab-v15243.is-active-v15243 {
    opacity: 1;
}
.obligations-tabs-v15245 .obligations-tab-v15243:hover {
    opacity: .82;
}
.obligations-tabs-v15245 .obligations-tab-v15243.is-active-v15243:hover {
    opacity: 1;
}

/* Закрытые позиции: вся строка зелёная и остаётся зелёной даже при выборе. */
.investor-investment-row-v15191.is-closed-row-v15246,
.investor-investment-row-v15191.is-closed-row-v15246:hover,
.investor-investment-row-v15191.is-closed-row-v15246.is-active-v15191 {
    background: rgba(51, 167, 101, .16) !important;
}
.investor-investment-row-v15191.is-closed-row-v15246.is-active-v15191 {
    box-shadow: inset 3px 0 0 #33a765 !important;
}
html[data-theme="dark"] .investor-investment-row-v15191.is-closed-row-v15246,
html[data-theme="dark"] .investor-investment-row-v15191.is-closed-row-v15246:hover,
html[data-theme="dark"] .investor-investment-row-v15191.is-closed-row-v15246.is-active-v15191 {
    background: rgba(51, 167, 101, .18) !important;
}

/* Таблица поставщика — те же размеры шрифтов и ритм, что у инвестиций. */
.supplier-payable-row-v15246 {
    grid-template-columns: minmax(210px, 1.55fr) minmax(110px, .7fr) minmax(120px, .75fr) minmax(125px, .8fr) !important;
}
.supplier-payable-row-v15246 > span,
.supplier-payable-row-v15246 .investor-status-v15191 {
    font-size: 14px;
}
.supplier-payable-row-v15246 .investor-investment-main-v15191 strong,
.supplier-payable-row-v15246 .investor-investment-main-v15191 strong small {
    font-size: 14px !important;
}

@media (max-width: 780px) {
    .supplier-payable-table-v15245 {
        overflow: visible !important;
    }
    .supplier-payable-row-v15246 {
        min-width: 0 !important;
    }
    .supplier-payable-row-v15246:not(.is-head-v15191) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: auto auto !important;
    }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1;
    }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(4) {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(2) {
        grid-column: 1 / 2;
        grid-row: 2;
    }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(3) {
        grid-column: 2 / 4;
        grid-row: 2;
    }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(2)::before { content: "Сумма" !important; }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(3)::before { content: "Вернуть до" !important; }
    .supplier-payable-row-v15246:not(.is-head-v15191) > span:nth-child(4)::before { display: none !important; }
}


/* -------------------------------------------------------
   v1.5.247 — Общая сводка + поставщики: таблица, архив, геометрия
-------------------------------------------------------- */
/* Блок списка поставщиков ровно той же геометрии, что у инвесторов. */
.supplier-workspace-v15245 {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr) !important;
}
.supplier-sidebar-v15245 {
    width: 100%;
    border-radius: 12px !important;
    overflow: hidden;
}
.supplier-list-v15245 .investor-list-item-v15191 {
    border-radius: 9px !important;
}

/* Таблица задолженностей: название / сумма / оплачено / вернуть до / статус. */
.supplier-payable-table-v15245 {
    border-radius: 9px !important;
}
.supplier-payable-row-v15247 {
    grid-template-columns: minmax(235px, 1.65fr) minmax(105px, .72fr) minmax(105px, .72fr) minmax(118px, .78fr) minmax(112px, .72fr) !important;
}
.supplier-payable-row-v15247 .investor-investment-main-v15191 strong,
.supplier-payable-row-v15247 .investor-investment-main-v15191 small,
.supplier-payable-row-v15247 > span,
.supplier-payable-row-v15247 .investor-status-v15191 {
    font-size: 14px !important;
}
.supplier-payable-row-v15247 .investor-investment-main-v15191 small {
    color: var(--muted);
    font-weight: 400;
}

/* В открытой задолженности оставляем только три денежные метрики. */
.supplier-detail-metrics-v15247 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Общая сводка: слева ближайший возврат, справа круг как в дашборде. */
.obligations-summary-dashboard-v15247 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
    gap: 14px;
    align-items: start;
}
.obligations-next-return-v15247,
.obligations-overview-v15247 {
    min-width: 0;
}
.obligations-next-return-v15247 {
    min-height: 100%;
}
.obligations-payment-list-v15247 {
    margin-top: 8px;
}
.obligations-payment-row-v15247 .payment-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.obligations-payment-row-v15247 > b {
    white-space: nowrap;
}

.obligations-ring-stage-v15247 {
    min-height: 225px;
    padding: 12px 5px 18px;
    display: grid;
    place-items: center;
}
.obligations-full-ring-v15247 {
    position: relative;
    width: 205px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(
        from -90deg,
        #33a765 0deg var(--investor-end),
        #48ade3 var(--investor-end) var(--supplier-end),
        #f2a64b var(--supplier-end) var(--salary-end),
        #9677e6 var(--salary-end) var(--tax-end),
        rgba(123,132,152,.18) var(--tax-end) 360deg
    );
    box-shadow: inset 0 0 28px rgba(255,255,255,.12), 0 20px 44px rgba(52,72,115,.08);
}
.obligations-full-ring-v15247::before {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}
.obligations-full-ring-hole-v15247 {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 3px;
    text-align: center;
}
.obligations-full-ring-hole-v15247 span {
    color: var(--muted);
    font-size: 12px !important;
}
.obligations-full-ring-hole-v15247 strong {
    font-size: 25px !important;
    letter-spacing: -.04em;
}
.obligations-overview-strips-v15247 {
    display: grid;
    gap: 8px;
}
.obligations-summary-strip-v15247 {
    text-decoration: none;
}
.obligations-summary-strip-v15247 > div > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.obligations-summary-strip-v15247 i {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
    flex: 0 0 auto;
}
.obligations-summary-strip-v15247 i.is-investors-v15247 { background: #33a765; }
.obligations-summary-strip-v15247 i.is-suppliers-v15247 { background: #48ade3; }
.obligations-summary-strip-v15247 i.is-salary-v15247 { background: #f2a64b; }
.obligations-summary-strip-v15247 i.is-taxes-v15247 { background: #9677e6; }

html[data-theme="dark"] .obligations-full-ring-v15247::before {
    background: #171b20;
    border-color: #2a3038;
}

@media (max-width: 1050px) {
    .obligations-summary-dashboard-v15247 {
        grid-template-columns: 1fr;
    }
    .obligations-overview-v15247 {
        max-width: none;
    }
}

@media (max-width: 780px) {
    .supplier-payable-row-v15247:not(.is-head-v15191) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-rows: auto auto auto !important;
    }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1;
    }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(5) {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(4) {
        grid-column: 1 / 3;
        grid-row: 3;
    }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(2)::before { content: "Сумма" !important; }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(3)::before { content: "Оплачено" !important; }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(4)::before { content: "Вернуть до" !important; }
    .supplier-payable-row-v15247:not(.is-head-v15191) > span:nth-child(5)::before { display: none !important; }
    .supplier-detail-metrics-v15247 {
        grid-template-columns: 1fr !important;
    }
    .obligations-ring-stage-v15247 {
        min-height: 205px;
    }
    .obligations-full-ring-v15247 {
        width: 180px;
    }
}

/* -------------------------------------------------------
   v1.5.248 — Поставщики + единая логика «Куда» в движении денег
-------------------------------------------------------- */
/* Поставщики используют ровно ту же ширину master-колонки и скругления, что инвесторы. */
.supplier-workspace-v15245 {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr) !important;
    gap: 12px !important;
}
.supplier-sidebar-v15245 {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    border-radius: 16px !important;
}
.supplier-list-v15245,
.supplier-payable-table-v15245 {
    border-radius: 16px !important;
}
.supplier-list-v15245 .investor-list-item-v15191,
.supplier-payable-table-v15245 .investor-investment-row-v15191 {
    border-radius: 9px !important;
}

/* Новая шапка выбора назначения. */
.money-flow-form-row-v15248 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(118px, .52fr) 34px !important;
    align-items: end !important;
}
.money-flow-destination-v15248 {
    grid-column: 1 / -1;
    display: grid;
    gap: 7px;
    min-width: 0;
}
.money-flow-destination-v15248 > span {
    color: var(--muted);
    font-size: 11px;
}
.money-flow-destination-tabs-v15248 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 11px;
    background: var(--surface);
}
.money-flow-destination-tab-v15248 {
    min-width: 0;
    min-height: 36px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    transition: .15s ease;
}
.money-flow-destination-tab-v15248:hover {
    color: var(--text);
    background: var(--surface-soft);
}
.money-flow-destination-tab-v15248.is-active-v15248 {
    color: var(--text);
    background: var(--surface-soft);
    border-color: var(--border);
    box-shadow: 0 3px 12px rgba(40, 55, 80, .06);
}
.money-flow-form-row-v15248 [data-money-flow-project-wrap],
.money-flow-form-row-v15248 [data-money-flow-label-wrap] {
    grid-column: 1 / 3;
}
.money-flow-form-row-v15248 [data-money-flow-investor-wrap],
.money-flow-form-row-v15248 [data-money-flow-supplier-wrap] {
    grid-column: 1 / 2;
}
.money-flow-form-row-v15248 [data-money-flow-investment-wrap],
.money-flow-form-row-v15248 [data-money-flow-supplier-payable-wrap] {
    grid-column: 2 / 3;
}
.money-flow-form-row-v15248 .money-flow-row-amount-v15121 {
    grid-column: 3 / 4;
}
.money-flow-form-row-v15248 .money-flow-row-remove-v15119 {
    grid-column: 4 / 5;
}
.money-flow-form-row-v15248 .money-flow-row-comment-v15121 {
    grid-column: 1 / 3;
}
.money-flow-form-row-v15248 .money-flow-row-photo-v15121 {
    grid-column: 3 / 5;
}
.money-flow-form-row-v15248 [hidden] {
    display: none !important;
}

/* Разные направления заметны в хронологии, но остаются в общей стилистике Money Flow. */
.money-flow-target-v15119.is-supplier-v15248,
.money-flow-tranche-target-v15128.is-supplier-v15248 {
    box-shadow: inset 3px 0 0 #e7a64d;
}
.money-flow-target-v15119.is-supplier-v15248 small,
.money-flow-tranche-target-v15128.is-supplier-v15248 small {
    color: #c58a3b;
}
.money-flow-target-v15119.is-salary-v15248,
.money-flow-tranche-target-v15128.is-salary-v15248 {
    box-shadow: inset 3px 0 0 #55b878;
}
.money-flow-target-v15119.is-salary-v15248 small,
.money-flow-tranche-target-v15128.is-salary-v15248 small {
    color: #55a975;
}

html[data-theme="dark"] .money-flow-destination-tabs-v15248 {
    background: #14171c;
}
html[data-theme="dark"] .money-flow-destination-tab-v15248.is-active-v15248 {
    background: #2a3038;
    border-color: #39414c;
}

@media (max-width: 900px) {
    .money-flow-form-row-v15248 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px !important;
    }
    .money-flow-form-row-v15248 [data-money-flow-project-wrap],
    .money-flow-form-row-v15248 [data-money-flow-label-wrap],
    .money-flow-form-row-v15248 [data-money-flow-investor-wrap],
    .money-flow-form-row-v15248 [data-money-flow-supplier-wrap] {
        grid-column: 1 / 2;
    }
    .money-flow-form-row-v15248 [data-money-flow-investment-wrap],
    .money-flow-form-row-v15248 [data-money-flow-supplier-payable-wrap],
    .money-flow-form-row-v15248 .money-flow-row-amount-v15121 {
        grid-column: 2 / 3;
    }
    .money-flow-form-row-v15248 .money-flow-row-remove-v15119 {
        grid-column: 3 / 4;
    }
    .money-flow-form-row-v15248 .money-flow-row-comment-v15121 {
        grid-column: 1 / 3;
    }
    .money-flow-form-row-v15248 .money-flow-row-photo-v15121 {
        grid-column: 1 / 3;
    }
}

@media (max-width: 650px) {
    .money-flow-form-row-v15248 {
        grid-template-columns: 1fr !important;
        padding-right: 12px !important;
    }
    .money-flow-destination-tabs-v15248 {
        display: flex;
        overflow-x: auto;
    }
    .money-flow-destination-tab-v15248 {
        min-width: 96px;
        flex: 0 0 auto;
    }
    .money-flow-form-row-v15248 > * {
        grid-column: 1 / -1 !important;
    }
    .money-flow-form-row-v15248 .money-flow-row-remove-v15119 {
        position: absolute;
        top: 12px;
        right: 12px;
    }
}


/* =========================================================
   v1.5.249 — платежные блоки обязательств и Dashboard
   ========================================================= */
.obligations-summary-dashboard-v15249 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    align-items: stretch;
}

.obligations-summary-payment-card-v15249,
.obligations-total-card-v15249 {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.obligations-summary-payment-card-v15249 .widget-link {
    margin-top: auto;
    padding-top: 10px;
}

.obligations-summary-payment-card-v15249 .payment-row {
    grid-template-columns: 39px minmax(0, 1fr) auto;
}

.obligations-total-card-v15249 .obligations-ring-stage-v15247 {
    min-height: 205px;
    padding-top: 5px;
    padding-bottom: 10px;
}

.obligations-total-card-v15249 .obligations-full-ring-v15247 {
    width: 185px;
}

.dashboard-payment-grid-v15249 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-secondary-grid-v15249 {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr);
    gap: 13px;
    margin-top: 13px;
    align-items: stretch;
}

.dashboard-manager-half-v15249 {
    width: auto !important;
    margin-top: 0 !important;
    min-width: 0;
    height: 100%;
}

.dashboard-manager-half-v15249 .manager-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-secondary-card-v15249 {
    min-width: 0;
    height: 100%;
}

@media (max-width: 1240px) {
    .obligations-summary-dashboard-v15249 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .obligations-total-card-v15249 {
        grid-column: 1 / -1;
    }
    .dashboard-secondary-grid-v15249 {
        grid-template-columns: 1fr;
    }
    .dashboard-manager-half-v15249 .manager-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .obligations-summary-dashboard-v15249,
    .dashboard-payment-grid-v15249,
    .dashboard-secondary-grid-v15249 {
        grid-template-columns: 1fr;
    }
    .obligations-total-card-v15249 {
        grid-column: auto;
    }
    .dashboard-manager-half-v15249 .manager-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .dashboard-manager-half-v15249 .manager-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   v1.5.250 — Зарплата как обязательство + отдельный блок в смете
   ========================================================= */
.salary-workspace-v15250 {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr) !important;
    gap: 12px !important;
}
.salary-sidebar-v15250 {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 7px !important;
    border-radius: 16px !important;
    overflow: hidden;
}
.salary-user-group-v15250 + .salary-user-group-v15250 {
    margin-top: 12px;
}
.salary-user-group-title-v15250 {
    display: block;
    padding: 7px 8px 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}
.salary-user-list-v15250 {
    display: grid;
    gap: 4px;
    border-radius: 16px !important;
}
.salary-user-list-v15250 .investor-list-item-v15191 {
    border-radius: 9px !important;
}
.salary-page-v15250 .investor-list-avatar-v15192,
.salary-page-v15250 .investor-profile-avatar-v15192 {
    overflow: hidden;
}
.salary-page-v15250 .investor-list-avatar-v15192 img,
.salary-page-v15250 .investor-profile-avatar-v15192 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.salary-profile-v15250 {
    padding: 12px !important;
}
.salary-charges-panel-v15250 {
    position: relative;
    overflow: visible !important;
    border-radius: 16px !important;
}
.salary-charge-table-v15250 {
    overflow: visible !important;
    border-radius: 16px !important;
}
.salary-charge-row-v15250 {
    grid-template-columns: minmax(225px, 1.45fr) minmax(105px, .68fr) minmax(105px, .68fr) minmax(180px, 1fr) minmax(105px, .7fr) !important;
    border-radius: 9px !important;
}
.salary-charge-row-v15250 > span,
.salary-charge-row-v15250 .investor-investment-main-v15191 strong,
.salary-charge-row-v15250 .investor-investment-main-v15191 small,
.salary-charge-row-v15250 .investor-status-v15191 {
    font-size: 14px !important;
}
.salary-charges-panel-v15250.has-selection-v15194 .investor-selected-rail-v15207 {
    display: block;
}
.salary-linked-project-v15250 {
    margin-top: 10px;
    padding: 11px 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 10px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}
.salary-linked-project-v15250 > span,
.salary-linked-project-v15250 > small {
    color: var(--muted);
    font-size: 11px;
}
.salary-linked-project-v15250 > a {
    min-width: 0;
    font-size: 13px;
    text-decoration: underline;
    text-decoration-color: rgba(123,132,152,.35);
    text-underline-offset: 3px;
}
.salary-linked-project-v15250 > small {
    grid-column: 1 / -1;
}
.salary-legacy-card-v15250 {
    margin-top: 12px;
}

/* Поля зарплаты занимают те же две колонки, что инвестор/поставщик. */
.money-flow-form-row-v15248 [data-money-flow-salary-user-wrap] {
    grid-column: 1 / 2;
}
.money-flow-form-row-v15248 [data-money-flow-salary-charge-wrap] {
    grid-column: 2 / 3;
}

/* Зарплата в смете — отдельный фактический блок, без дублирования расходов. */
.estimate-salary-card-v15250 .estimate-card-head {
    align-items: center;
}
.estimate-salary-total-v15250 {
    white-space: nowrap;
    font-size: 24px;
    letter-spacing: -.04em;
}
.estimate-salary-row-v15250 .estimate-expense-copy strong {
    font-size: 14px;
}

html[data-theme="dark"] .salary-linked-project-v15250 {
    background: #14171c;
    border-color: #2a3038;
}

@media (max-width: 900px) {
    .money-flow-form-row-v15248 [data-money-flow-salary-user-wrap] {
        grid-column: 1 / 2;
    }
    .money-flow-form-row-v15248 [data-money-flow-salary-charge-wrap] {
        grid-column: 2 / 3;
    }
}

@media (max-width: 780px) {
    .salary-workspace-v15250 {
        grid-template-columns: 1fr !important;
    }
    .salary-sidebar-v15250 {
        position: static !important;
    }
    .salary-user-list-v15250 {
        display: flex;
        overflow-x: auto;
    }
    .salary-user-list-v15250 .investor-list-item-v15191 {
        min-width: 245px;
    }
    .salary-charge-table-v15250 {
        overflow-x: auto !important;
    }
    .salary-charge-row-v15250 {
        min-width: 780px;
    }
}

@media (max-width: 650px) {
    .money-flow-form-row-v15248 [data-money-flow-salary-user-wrap],
    .money-flow-form-row-v15248 [data-money-flow-salary-charge-wrap] {
        grid-column: 1 / -1 !important;
    }
    .estimate-salary-total-v15250 {
        font-size: 20px;
    }
}


/* v1.5.251 — создание начисления зарплаты прямо из распределения */
.money-flow-form-row-v15248 [data-money-flow-salary-new-wrap] {
    grid-column: span 2;
}
.money-flow-form-row-v15248 [data-money-flow-salary-new-wrap] small {
    display:block; margin-top:6px; color:var(--muted); font-size:11px; line-height:1.45;
}
@media (max-width:720px){.money-flow-form-row-v15248 [data-money-flow-salary-new-wrap]{grid-column:1 / -1;}}


/* -------------------------------------------------------
   v1.5.252 — Партнеры + видимые комментарии обязательств
-------------------------------------------------------- */
.obligation-record-note-v15252 {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    display: grid;
    gap: 5px;
}
.obligation-record-note-v15252 > span {
    color: var(--muted);
    font-size: 10px;
}
.obligation-record-note-v15252 > p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text);
    overflow-wrap: anywhere;
}
html[data-theme="dark"] .obligation-record-note-v15252 {
    background: #14171c;
    border-color: #2a3038;
}


/* =========================================================
   v1.5.253 — Инвесторы: «Свои вложения» + связь с администратором
   ========================================================= */
.investor-list-main-v15191 small,
.investor-list-money-v15191 small {
    font-size: 10px !important;
}

.investor-list-section-v15253 {
    display: grid;
    gap: 6px;
}

.investor-list-section-v15253 + .investor-list-section-v15253 {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed var(--border);
}

.investor-list-section-head-v15253 {
    min-height: 28px;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.investor-list-section-head-v15253 strong {
    font-size: 12px !important;
    font-weight: 600;
}

.investor-list-section-head-v15253 small {
    color: var(--muted);
    font-size: 9px !important;
}

.investor-own-list-v15253 {
    padding-bottom: 1px;
}

.investor-own-item-v15253 {
    position: relative;
}

.investor-own-item-v15253::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    bottom: 11px;
    width: 2px;
    border-radius: 999px;
    background: var(--green);
    opacity: .72;
}

.investor-own-item-v15253.is-unlinked-v15253 {
    opacity: .48;
    cursor: default;
}

.investor-own-item-v15253.is-unlinked-v15253::before {
    background: var(--muted);
    opacity: .35;
}

.investor-own-item-v15253.is-unlinked-v15253:hover {
    background: transparent !important;
}

.investor-own-link-caption-v15253 {
    margin: 3px 0 0 !important;
    color: var(--green) !important;
    font-size: 10px !important;
}

.investor-admin-link-button-v15253 {
    white-space: nowrap;
}

.investor-admin-link-note-v15253 {
    padding: 10px 11px;
    border-radius: 9px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .investor-list-section-head-v15253 small {
        display: none;
    }

    .investor-admin-link-button-v15253 {
        width: 100%;
    }
}

/* -------------------------------------------------------
   v1.5.254 — Права «Обязательства» + 3 группы уведомлений
-------------------------------------------------------- */
.permission-fixed-row-v15254 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
}
.permission-fixed-row-v15254 > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.permission-fixed-row-v15254 strong { font-size: 13px; }
.permission-fixed-row-v15254 small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.permission-fixed-row-v15254 > b {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
}
.permission-fixed-row-v15254.is-allowed-v15254 > b { color: var(--green); }
.permission-fixed-row-v15254.is-denied-v15254 > b { color: var(--muted); }

.settings-notification-categories-v15254 {
    display: grid;
    gap: 18px;
}
.settings-notification-category-v15254 {
    padding: 22px;
    border-radius: 24px;
}
.settings-notification-category-head-v15254 {
    align-items: flex-start;
}
.settings-notification-category-count-v15254 {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}
.settings-notification-destinations-v15254 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.settings-notification-destination-card-v15254 {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
}
.settings-notification-destination-head-v15254 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.settings-notification-destination-head-v15254 > strong { font-size: 13px; }
.settings-notification-group-form-v15254 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}
.settings-notification-group-form-v15254 label {
    min-width: 0;
    display: grid;
    gap: 6px;
}
.settings-notification-group-form-v15254 label > span,
.settings-notification-max-find-v15254 small,
.settings-notification-group-current-v15254 small,
.settings-notification-max-candidates-v15254 small {
    color: var(--muted);
    font-size: 10px;
}
.settings-notification-group-form-v15254 input {
    width: 100%;
}
.settings-notification-max-find-v15254,
.settings-notification-group-current-v15254,
.settings-notification-max-candidates-v15254 form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.settings-notification-group-current-v15254 {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.settings-notification-group-current-v15254 > span,
.settings-notification-max-candidates-v15254 form > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.settings-notification-group-current-v15254 strong,
.settings-notification-max-candidates-v15254 strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.settings-notification-max-candidates-v15254 {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}
.settings-notification-max-candidates-v15254 form {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}
.settings-notification-events-v15254 {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}
.settings-notification-events-head-v15254,
.settings-notification-event-row-v15254 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px 84px;
    gap: 12px;
    align-items: center;
}
.settings-notification-events-head-v15254 {
    padding: 9px 14px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 10px;
    border-bottom: 1px solid var(--border);
}
.settings-notification-events-head-v15254 span:nth-child(n+2) { text-align: center; }
.settings-notification-event-row-v15254 {
    padding: 11px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}
.settings-notification-event-row-v15254:last-child { border-bottom: 0; }
.settings-notification-event-copy-v15254 {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.settings-notification-event-copy-v15254 b { font-size: 12px; font-weight: 600; }
.settings-notification-event-copy-v15254 small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.settings-notification-event-row-v15254 > .settings-toggle-v15219 {
    justify-self: center;
}
.dashboard-payment-grid-v15249.is-obligations-hidden-v15254 {
    grid-template-columns: minmax(0, 1fr);
}

html[data-theme="dark"] .permission-fixed-row-v15254,
html[data-theme="dark"] .settings-notification-destination-card-v15254,
html[data-theme="dark"] .settings-notification-events-head-v15254,
html[data-theme="dark"] .settings-notification-category-count-v15254 {
    background: #14171c;
    border-color: #2a3038;
}
html[data-theme="dark"] .settings-notification-events-v15254,
html[data-theme="dark"] .settings-notification-event-row-v15254,
html[data-theme="dark"] .settings-notification-group-current-v15254,
html[data-theme="dark"] .settings-notification-max-candidates-v15254 form {
    border-color: #2a3038;
}
html[data-theme="dark"] .settings-notification-max-candidates-v15254 form {
    background: #171b20;
}

@media (max-width: 820px) {
    .settings-notification-destinations-v15254 {
        grid-template-columns: 1fr;
    }
    .settings-notification-events-head-v15254,
    .settings-notification-event-row-v15254 {
        grid-template-columns: minmax(0, 1fr) 66px 54px;
        gap: 8px;
    }
    .settings-notification-events-head-v15254 { padding-inline: 10px; }
    .settings-notification-event-row-v15254 { padding: 10px; }
}

@media (max-width: 560px) {
    .settings-notification-category-v15254 { padding: 16px; border-radius: 20px; }
    .settings-notification-group-form-v15254 { grid-template-columns: 1fr; }
    .settings-notification-events-head-v15254 span:nth-child(2) { font-size: 0; }
    .settings-notification-events-head-v15254 span:nth-child(2)::after { content: "TG"; font-size: 10px; }
    .settings-notification-events-head-v15254 span:nth-child(3) { font-size: 0; }
    .settings-notification-events-head-v15254 span:nth-child(3)::after { content: "MAX"; font-size: 10px; }
}

/* =========================================================
   v1.5.255 — Уведомления: тумблеры событий в одну строку
   ========================================================= */
@media (min-width: 821px) {
    .settings-notification-events-v15254 {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }

    .settings-notification-events-v15254::-webkit-scrollbar {
        height: 6px;
    }

    .settings-notification-events-v15254::-webkit-scrollbar-track {
        background: transparent;
    }

    .settings-notification-events-v15254::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 999px;
    }

    .settings-notification-events-head-v15254 {
        display: none;
    }

    .settings-notification-events-list-v15254 {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        min-width: max-content;
    }

    .settings-notification-event-row-v15254 {
        width: 238px;
        min-width: 238px;
        min-height: 64px;
        padding: 10px 12px;
        grid-template-columns: minmax(0, 1fr) 42px 42px;
        gap: 8px;
        border-bottom: 0;
        border-right: 1px solid var(--border);
    }

    .settings-notification-event-row-v15254:last-child {
        border-right: 0;
    }

    .settings-notification-event-copy-v15254 {
        gap: 0;
        align-self: center;
    }

    .settings-notification-event-copy-v15254 b {
        font-size: 11px;
        line-height: 1.25;
    }

    .settings-notification-event-copy-v15254 small {
        display: none;
    }

    .settings-notification-event-row-v15254 > .settings-toggle-v15219 {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        align-self: center;
        justify-self: center;
        align-items: flex-end;
    }

    .settings-notification-event-row-v15254 > .settings-toggle-v15219::before {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        color: var(--muted);
        font-size: 8px;
        line-height: 1;
        font-weight: 600;
        white-space: nowrap;
    }

    .settings-notification-event-row-v15254 > .settings-toggle-v15219:nth-child(2)::before {
        content: "TG";
    }

    .settings-notification-event-row-v15254 > .settings-toggle-v15219:nth-child(3)::before {
        content: "MAX";
    }
}

/* -------------------------------------------------------
   v1.5.256 — «Свои вложения»: аватар пользователя CRM
-------------------------------------------------------- */
.investor-own-profile-avatar-v15256 {
    flex: 0 0 auto;
}

/* =========================================================
   v1.5.257 — Уведомления: Заявки / Отчеты / Финансы в одну строку
   ========================================================= */
@media (min-width: 1180px) {
    .settings-notification-categories-v15254 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
        gap: 14px;
    }

    .settings-notification-category-v15254 {
        min-width: 0;
        padding: 18px;
    }

    .settings-notification-destinations-v15254 {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 14px;
    }

    /* Возвращаем события внутри каждого блока к обычному вертикальному списку. */
    .settings-notification-events-v15254 {
        overflow: hidden;
    }

    .settings-notification-events-head-v15254 {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 58px 52px;
        gap: 8px;
        padding: 8px 10px;
    }

    .settings-notification-events-list-v15254 {
        display: block;
        min-width: 0;
    }

    .settings-notification-event-row-v15254 {
        width: auto;
        min-width: 0;
        min-height: 0;
        padding: 10px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 58px 52px;
        gap: 8px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .settings-notification-event-row-v15254:last-child {
        border-bottom: 0;
    }

    .settings-notification-event-copy-v15254 {
        gap: 3px;
        align-self: center;
    }

    .settings-notification-event-copy-v15254 b {
        font-size: 11px;
        line-height: 1.3;
    }

    .settings-notification-event-copy-v15254 small {
        display: block;
        font-size: 9px;
        line-height: 1.3;
    }

    .settings-notification-event-row-v15254 > .settings-toggle-v15219 {
        position: relative;
        width: 38px;
        height: 22px;
        flex-basis: 38px;
        align-self: center;
        justify-self: center;
        align-items: center;
    }

    .settings-notification-event-row-v15254 > .settings-toggle-v15219::before {
        content: none !important;
    }

    .settings-notification-group-form-v15254 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 821px) and (max-width: 1179px) {
    .settings-notification-categories-v15254 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .settings-notification-categories-v15254 {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v1.5.258 — инвесторы: подписи / компактность
   ========================================================= */
.investor-list-main-v15191 small,
.investor-list-money-v15191 small {
    font-size: 12px !important;
}

.investor-own-link-caption-v15253 {
    margin: 4px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.25;
}

/* =========================================================
   v1.5.259 — Лиды: общая хронология действий
   ========================================================= */
.leads-history-page-v15259 {
    display: grid;
    gap: 14px;
}

.leads-history-head-v15259 {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.leads-history-head-v15259 h1 {
    margin: 8px 0 4px;
    font-size: 28px;
    letter-spacing: -.035em;
}

.leads-history-head-v15259 p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.leads-history-card-v15259 {
    max-width: 980px;
    width: 100%;
    padding: 18px 20px 20px;
}

.lead-history-timeline-v15259 {
    position: relative;
    display: grid;
    gap: 0;
}

.lead-history-timeline-v15259::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 17px;
    width: 2px;
    border-radius: 2px;
    background: var(--border);
    opacity: .85;
}

.lead-history-event-v15259 {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 36px minmax(0,1fr);
    gap: 12px;
    padding: 0 0 18px;
}

.lead-history-event-v15259:last-child {
    padding-bottom: 0;
}

.lead-history-marker-cell-v15259 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.lead-history-marker-v15259 {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--surface);
    border-radius: 999px;
    background: #697383;
    color: #fff;
    box-sizing: border-box;
}

.lead-history-marker-v15259 svg {
    width: 12px;
    height: 12px;
    color: currentColor;
    stroke: currentColor;
}

.lead-history-marker-v15259.is-comment-v15259 {
    background: #3987e8;
}

.lead-history-marker-v15259.lead-activity-marker-created-v15224,
.lead-history-marker-v15259.lead-activity-marker-status-v15170 {
    background: #33a765 !important;
    color: #fff !important;
}

.lead-history-marker-v15259.lead-activity-marker-title-v15170 {
    background: #7759d8 !important;
    color: #fff !important;
}

.lead-history-marker-v15259.lead-activity-marker-document-v15170 {
    background: #dc9630 !important;
    color: #fff !important;
}

.lead-history-marker-v15259.lead-activity-marker-archive-v15170,
.lead-history-marker-v15259.lead-history-marker-delete-v15259 {
    background: #d85b62 !important;
    color: #fff !important;
}

.lead-history-marker-v15259.lead-activity-marker-restore-v15170,
.lead-history-marker-v15259.lead-history-marker-project-v15259 {
    background: #2e9f9a !important;
    color: #fff !important;
}

.lead-history-marker-v15259.lead-history-marker-person-v15259 {
    background: #6f79c7 !important;
    color: #fff !important;
}

.lead-history-event-body-v15259 {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.lead-history-event-head-v15259 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.lead-history-event-head-v15259 > div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.lead-history-event-head-v15259 strong {
    font-size: 12px;
    font-weight: 650;
}

.lead-history-event-head-v15259 a {
    color: var(--link, #4f83d8);
    font-size: 11px;
    text-decoration: none;
}

.lead-history-event-head-v15259 a:hover {
    text-decoration: underline;
}

.lead-history-event-head-v15259 small {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.lead-history-comment-v15259,
.lead-history-note-v15259 {
    margin: 9px 0 0;
    color: var(--text);
    font-size: 11px;
    line-height: 1.55;
}

.lead-history-photo-grid-v15259 {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.lead-history-photo-v15259 {
    width: 64px;
    height: 54px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    cursor: pointer;
}

.lead-history-photo-v15259 img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.lead-history-documents-v15259 {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.lead-history-documents-v15259 a {
    min-width: 0;
    max-width: 320px;
    padding: 8px 10px;
    display: inline-grid;
    grid-template-columns: 16px minmax(0,1fr) auto;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 10px;
}

.lead-history-documents-v15259 a svg {
    width: 15px;
    height: 15px;
}

.lead-history-documents-v15259 a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-history-documents-v15259 a small {
    color: var(--muted);
    font-size: 8px;
}

.lead-history-changes-v15259 {
    display: grid;
    gap: 5px;
    margin-top: 9px;
}

.lead-history-changes-v15259 > div {
    display: grid;
    grid-template-columns: minmax(110px, .42fr) minmax(0,1fr);
    gap: 8px;
    font-size: 10px;
}

.lead-history-changes-v15259 > div strong {
    color: var(--muted);
    font-weight: 600;
}

.lead-history-changes-v15259 > div span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lead-history-project-link-v15259 {
    width: fit-content;
    margin-top: 9px;
    padding: 7px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 10px;
}

.lead-history-project-link-v15259 svg {
    width: 14px;
    height: 14px;
}

.lead-history-event-v15259.is-deleted-v15259 .lead-history-event-body-v15259 {
    opacity: .7;
}

.lead-history-event-v15259.is-deleted-v15259 .lead-history-comment-v15259 {
    text-decoration: line-through;
}

.lead-history-deleted-meta-v15259 {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 9px;
}

.leads-history-more-wrap-v15259,
.lead-detail-timeline-more-wrap-v15259 {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.leads-history-more-v15259,
.lead-detail-timeline-more-v15259 {
    min-width: 120px;
}

.leads-history-empty-v15259 {
    min-height: 150px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 5px;
    color: var(--muted);
    text-align: center;
}

.leads-history-empty-v15259 strong {
    color: var(--text);
}

html[data-theme="dark"] .lead-history-timeline-v15259::before {
    background: #59626f;
}

html[data-theme="dark"] .lead-history-marker-v15259 {
    border-color: var(--surface);
}

@media (max-width: 720px) {
    .leads-history-card-v15259 {
        padding: 14px 12px 16px;
    }

    .leads-history-head-v15259 h1 {
        font-size: 24px;
    }

    .lead-history-timeline-v15259::before {
        left: 14px;
    }

    .lead-history-event-v15259 {
        grid-template-columns: 30px minmax(0,1fr);
        gap: 8px;
    }

    .lead-history-marker-v15259 {
        width: 26px;
        height: 26px;
        border-width: 4px;
    }

    .lead-history-event-body-v15259 {
        padding: 10px 11px;
        border-radius: 12px;
    }

    .lead-history-event-head-v15259 {
        display: grid;
        gap: 4px;
    }

    .lead-history-event-head-v15259 small {
        white-space: normal;
    }

    .lead-history-changes-v15259 > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Маркеры новых типов действий внутри карточки конкретного лида. */
.lead-system-marker-v15168.lead-history-marker-project-v15259 {
    color: #fff !important;
    background: #2e9f9a !important;
}
.lead-system-marker-v15168.lead-history-marker-delete-v15259 {
    color: #fff !important;
    background: #d85b62 !important;
}
.lead-system-marker-v15168.lead-history-marker-person-v15259 {
    color: #fff !important;
    background: #6f79c7 !important;
}

/* -------------------------------------------------------
   v1.5.260 — распределение зарплаты: дата, новая строка и готовность формы
-------------------------------------------------------- */
.money-flow-form-row-v15248 [data-money-flow-salary-new-date-wrap] {
    grid-column: 3 / 4;
}

.money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-wrap] {
    grid-column: 1 / 4;
}

.money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-amount-v15121 {
    grid-column: 1 / 4;
}

.money-flow-submit-v15260:disabled {
    background: #8c939d !important;
    border-color: transparent !important;
    color: rgba(255,255,255,.78) !important;
    opacity: .42 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

html[data-theme="dark"] .money-flow-submit-v15260:disabled {
    background: #59616c !important;
    color: rgba(255,255,255,.68) !important;
}

@media (max-width: 900px) {
    .money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-date-wrap],
    .money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-wrap],
    .money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-amount-v15121 {
        grid-column: 1 / 3;
    }
}

@media (max-width: 650px) {
    .money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-date-wrap],
    .money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-wrap],
    .money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-amount-v15121 {
        grid-column: 1 / -1 !important;
    }
}

/* -------------------------------------------------------
   v1.5.261 — зарплата: название начисления и сумма в одну строку
-------------------------------------------------------- */
.money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-wrap] {
    grid-column: 1 / 3 !important;
}
.money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-amount-v15121 {
    grid-column: 3 / 4 !important;
}

@media (max-width: 900px) and (min-width: 651px) {
    .money-flow-form-row-v15248.is-salary-new-v15260 {
        grid-template-columns: minmax(0, 1.65fr) minmax(118px, .7fr) 34px !important;
    }
    .money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-wrap] {
        grid-column: 1 / 2 !important;
    }
    .money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-amount-v15121 {
        grid-column: 2 / 3 !important;
    }
    .money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-remove-v15119 {
        grid-column: 3 / 4 !important;
    }
}

@media (max-width: 650px) {
    .money-flow-form-row-v15248.is-salary-new-v15260 [data-money-flow-salary-new-wrap],
    .money-flow-form-row-v15248.is-salary-new-v15260 .money-flow-row-amount-v15121 {
        grid-column: 1 / -1 !important;
    }
}

/* =========================================================
   v1.5.263 — зарплата: администрация только хронология
   ========================================================= */
.salary-office-summary-v15263:empty {
    display: none;
}

.salary-office-summary-v15263 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.salary-office-history-v15263 {
    padding: 20px;
    border-radius: 22px;
}

/* Убираем зелёную вертикальную полосу в хронологии распределения денег. */
.money-flow-tranche-history-v15128::before,
.money-flow-tranche-history-unified-v15131::before {
    display: none !important;
}

@media (max-width: 700px) {
    .salary-office-summary-v15263 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   v1.5.266 — налоги: хронология + общая сумма
   ========================================================= */
.taxes-workspace-v15266 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 18px;
    align-items: start;
}

.taxes-history-card-v15266,
.taxes-total-card-v15266 {
    border-radius: 22px;
}

.taxes-history-card-v15266 {
    min-width: 0;
}

.taxes-history-head-v15266 {
    margin-bottom: 14px;
}

.taxes-history-head-v15266 p,
.taxes-total-copy-v15266 p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.taxes-success-v15266 {
    margin-bottom: 14px;
}

.taxes-empty-v15266 {
    margin-top: 8px;
}

.taxes-chronology-v15266 {
    margin-top: 4px;
}

.taxes-chronology-row-v15266 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: baseline;
}

.taxes-chronology-row-v15266 > strong:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.taxes-chronology-amount-v15266 {
    white-space: nowrap;
}

.taxes-chronology-note-v15266 {
    white-space: normal;
}

.taxes-total-card-v15266 {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.taxes-total-copy-v15266 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.taxes-total-copy-v15266 > small {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.taxes-total-copy-v15266 > span {
    color: var(--muted);
    font-size: 12px;
}

.taxes-total-copy-v15266 > strong {
    margin-top: 3px;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.taxes-add-button-v15266 {
    width: 100%;
}

@media (max-width: 900px) {
    .taxes-workspace-v15266 {
        grid-template-columns: 1fr;
    }

    .taxes-total-card-v15266 {
        order: -1;
    }
}

@media (max-width: 600px) {
    .taxes-chronology-row-v15266 {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .taxes-total-copy-v15266 > strong {
        font-size: 26px;
    }
}

/* =========================================================
   v1.5.267 — обязательства: долг / строки без задолженности
   ========================================================= */
.obligation-debt-v15267 {
    color: #d75c5c !important;
    font-weight: 600;
}
.investor-list-item-v15191.is-no-debt-v15267 {
    opacity: .5;
}
.investor-list-item-v15191.is-no-debt-v15267:hover,
.investor-list-item-v15191.is-no-debt-v15267.is-active-v15191 {
    opacity: .68;
}
html[data-theme="dark"] .obligation-debt-v15267 {
    color: #ff7b7b !important;
}

/* =========================================================
   v1.5.268 — «Долгов нет» + порядок зарплатных групп
   ========================================================= */
.obligation-no-debt-v15268 {
    color: #3aa86b !important;
    opacity: .72;
    font-weight: 600;
}
html[data-theme="dark"] .obligation-no-debt-v15268 {
    color: #68d394 !important;
    opacity: .74;
}


/* -------------------------------------------------------
   v1.5.271 — рабочий режим: финансовый экран без раскрытия способа оплаты
-------------------------------------------------------- */
.finance-visual-grid-v1572.is-worker-v15271 {
    grid-template-columns: minmax(0, 1fr);
}
.finance-bar-worker-total-v15271 {
    background: var(--finance-color);
}
html[data-theme="dark"] .finance-bar-worker-total-v15271 {
    background: linear-gradient(180deg, #39c26a, #22a95a) !important;
}

/* -------------------------------------------------------
   v1.5.272 — Уведомления: независимые тумблеры TG / MAX
-------------------------------------------------------- */
.settings-notification-event-row-v15254 {
    cursor: default;
}
.settings-notification-event-row-v15254 > label.settings-toggle-v15219 {
    cursor: pointer;
}

/* -------------------------------------------------------
   v1.5.273 — Обязательства: длинные названия без наложения
-------------------------------------------------------- */
/* Заголовок выбранного профиля: имя занимает только доступную ширину. */
.obligations-page-v15243 .investor-profile-title-v15191 > div {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.obligations-page-v15243 .investor-profile-title-v15191 h2 {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.obligations-page-v15243 .investor-profile-actions-v15192 {
    flex: 0 0 auto;
}

/* В таблицах обязательств название не может вылезать в соседние колонки. */
.obligations-page-v15243 .investor-investment-row-v15191 > * {
    min-width: 0;
}
.obligations-page-v15243 .investor-investment-main-v15191 {
    min-width: 0;
    overflow: hidden;
}
.obligations-page-v15243 .investor-investment-main-v15191 > strong {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Заголовок открытой задолженности / начисления. */
.obligations-page-v15243 .investor-investment-detail-head-v15191 > .investor-investment-titleline-v15197 {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.obligations-page-v15243 .investor-investment-titleline-v15197 h2 {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.obligations-page-v15243 .investor-investment-actions-v15191 {
    flex: 0 0 auto;
}

/* В строке сохраняем дату/ID, а троеточие применяем только к самому названию. */
.obligations-page-v15243 .obligation-row-titleline-v15273 {
    display: flex !important;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}
.obligations-page-v15243 .obligation-row-title-v15273 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.obligations-page-v15243 .obligation-row-titleline-v15273 > small {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* -------------------------------------------------------
   v1.5.274 — «Свои вложения»: временные списки, фото и «Куда»
-------------------------------------------------------- */
.own-investment-tools-v15274 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
}
.own-investment-tools-v15274 > strong {
    font-size: 14px;
    font-weight: 600;
}
.own-investment-group-row-v15274 .investor-investment-main-v15191 > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.own-investment-group-members-v15274 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 6px;
}
.own-investment-group-members-v15274 > span {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}
.own-investment-group-members-v15274 strong {
    font-size: 12px;
    font-weight: 600;
}
.own-investment-group-members-v15274 small {
    color: var(--muted);
    font-size: 10px;
}
.own-investment-combine-list-v15274 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 14px;
}
.own-investment-combine-list-v15274 > strong {
    font-size: 13px;
}
.own-investment-combine-list-v15274 > small {
    margin-top: -4px;
    color: var(--muted);
    font-size: 11px;
}
.own-investment-combine-row-v15274 {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    cursor: pointer;
}
.own-investment-combine-row-v15274 input {
    width: 17px;
    height: 17px;
    margin: 0;
}
.own-investment-combine-row-v15274 > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.own-investment-combine-row-v15274 b,
.own-investment-combine-row-v15274 small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.own-investment-combine-row-v15274 b {
    font-size: 12px;
    font-weight: 600;
}
.own-investment-combine-row-v15274 small {
    color: var(--muted);
    font-size: 10px;
}
.investment-photo-upload-v15274 {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.investment-photo-upload-v15274 small {
    color: var(--muted);
    font-size: 10px;
}
.investment-photo-thumb-v15274 {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    max-width: 100%;
    margin-top: 8px;
    padding: 6px 8px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
}
.investment-photo-thumb-v15274 img {
    display: block;
    width: 58px;
    height: 44px;
    flex: 0 0 58px;
    object-fit: cover;
    border-radius: 8px;
}
.investment-photo-thumb-v15274 span {
    min-width: 0;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}
.investment-photo-detail-v15274 {
    margin: 12px 0 4px;
}
.own-investment-distribute-now-v15274 {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    cursor: pointer;
}
.own-investment-distribute-now-v15274 input {
    width: 17px;
    height: 17px;
    margin: 0;
}
.own-investment-distribute-now-v15274 > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.own-investment-distribute-now-v15274 b {
    font-size: 12px;
}
.own-investment-distribute-now-v15274 small {
    color: var(--muted);
    font-size: 10px;
}
.investment-where-box-v15274 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.investment-where-box-v15274[hidden] {
    display: none !important;
}
.investment-target-tabs-v15274 {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}
.investment-target-tabs-v15274 label {
    min-width: 0;
}
.investment-target-tabs-v15274 label > span {
    justify-content: center;
    white-space: nowrap;
}
.investment-source-summary-v15274 {
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
}
.investment-source-summary-v15274 strong {
    color: var(--text);
    font-size: 12px;
}
.investment-where-modal-v15274,
.own-investment-group-modal-v15274 {
    width: min(760px, calc(100vw - 28px));
}

@media (max-width: 840px) {
    .investment-target-tabs-v15274 {
        display: flex;
        overflow-x: auto;
        scrollbar-width: thin;
        padding-bottom: 3px;
    }
    .investment-target-tabs-v15274 label {
        flex: 0 0 auto;
        min-width: 112px;
    }
}
@media (max-width: 620px) {
    .own-investment-tools-v15274 {
        align-items: stretch;
        flex-direction: column;
    }
    .own-investment-tools-v15274 .secondary-button {
        width: 100%;
    }
    .own-investment-group-members-v15274 > span {
        width: 100%;
    }
    .investment-photo-thumb-v15274 {
        width: 100%;
    }
}

/* =========================================================
   v1.5.276 — постоянные списки своих вложений, общий возврат,
   настоящие миниатюры 96×72
   ========================================================= */
.investment-photo-thumb-v15274 {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    margin-top: 10px;
    padding: 6px 9px 6px 6px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
}
.investment-photo-thumb-v15274 img {
    width: 96px;
    height: 72px;
    flex: 0 0 96px;
    object-fit: cover;
    border-radius: 8px;
}
.investor-form-error-v15274 {
    margin-top: 8px;
    color: var(--danger, #d34b4b);
    font-size: 11px;
}
.investor-form-error-v15274[hidden] {
    display: none !important;
}


/* =========================================================
   v1.5.277 — Инвесторы / Свои вложения
   ========================================================= */

/* Источники погашения держим одной строкой и в полной, и в мобильной версии.
 * Шестипозиционные вкладки «Распределить» сюда не относятся. */
.investor-repayment-source-v15207:not(.investment-target-tabs-v15274) {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 760px) {
    .investor-repayment-source-v15207:not(.investment-target-tabs-v15274) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .investor-repayment-source-v15207:not(.investment-target-tabs-v15274) span {
        padding-left: 5px;
        padding-right: 5px;
        font-size: 11px !important;
        white-space: nowrap;
    }
}

/* Подпись «Из них проценты» под остатком в профиле инвестора. */
.investor-profile-summary-grid-v15192 > div > small {
    color: var(--muted);
    font-size: 10px !important;
    line-height: 1.25;
}

/* =========================================================
   v1.5.278 — «Свои вложения»: сумма + дата в одной строке
   ========================================================= */
.investor-modal-grid-v15188.own-investment-amount-date-row-v15278{
    grid-template-columns:minmax(0,1fr) minmax(150px,.82fr)!important;
    align-items:end;
}
.own-investment-member-line-v15278{
    min-width:0;
}
.own-investment-member-line-v15278>strong{
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.own-investment-titleline-v15278{
    display:flex;
    align-items:baseline;
    flex-wrap:wrap;
    gap:5px;
}
.own-investment-titleline-v15278>small{
    color:var(--muted);
    font-size:.58em!important;
    font-weight:500;
}
@media(max-width:420px){
    .investor-modal-grid-v15188.own-investment-amount-date-row-v15278{
        grid-template-columns:minmax(0,1fr) minmax(132px,.9fr)!important;
        gap:7px;
    }
}

/* v1.5.281 — Коммерческие предложения */
.quotes-page-v15281,.quote-editor-v15281{display:flex;flex-direction:column;gap:18px}.quotes-head-v15281,.quote-editor-head-v15281{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.quotes-head-v15281 h1,.quote-editor-head-v15281 h1{margin:0 0 5px;font-size:28px}.quotes-head-v15281 p,.quote-editor-head-v15281 p{margin:0;color:var(--text-muted,#89919d)}.quotes-head-actions-v15281,.quote-editor-actions-v15281{display:flex;gap:10px;flex-wrap:wrap}.quotes-kpi-grid-v15281{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.quotes-kpi-v15281{padding:14px 16px;border:1px solid var(--border,#2a3038);border-radius:14px;background:var(--panel,#171b20);display:flex;flex-direction:column;gap:8px}.quotes-kpi-v15281 small{color:var(--text-muted,#89919d)}.quotes-kpi-v15281 strong{font-size:20px}.quotes-toolbar-v15281{display:flex;justify-content:space-between}.quotes-search-v15281{display:flex;align-items:center;gap:8px;min-width:min(620px,100%);padding:8px 10px;border:1px solid var(--border,#2a3038);border-radius:12px;background:var(--panel,#171b20)}.quotes-search-v15281 svg{width:18px;height:18px;fill:none;stroke:currentColor}.quotes-search-v15281 input{flex:1;min-width:0;border:0!important;background:transparent!important;padding:6px!important}.quotes-search-v15281 button,.quotes-search-v15281 a{border:0;background:transparent;color:var(--accent,#aab4ff);cursor:pointer;text-decoration:none}.quotes-table-wrap-v15281{overflow:auto;border:1px solid var(--border,#2a3038);border-radius:14px;background:var(--panel,#171b20)}.quotes-table-v15281{width:100%;border-collapse:collapse;min-width:980px}.quotes-table-v15281 th,.quotes-table-v15281 td{padding:13px 14px;text-align:left;border-bottom:1px solid var(--border,#2a3038);vertical-align:middle}.quotes-table-v15281 th{font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted,#89919d)}.quotes-table-v15281 td strong,.quotes-table-v15281 td small{display:block}.quotes-table-v15281 td small{margin-top:4px;color:var(--text-muted,#89919d)}.quotes-table-v15281 td a{color:inherit}.quotes-row-actions-v15281{white-space:nowrap}.quotes-row-actions-v15281 a{margin-right:10px;color:var(--accent,#aab4ff)!important}.quote-status-v15281{display:inline-flex;padding:5px 9px;border-radius:999px;background:#2b3138;font-size:12px}.quote-status-v15281.is-viewed,.quote-status-v15281.is-agreed{background:rgba(52,168,83,.15);color:#7cdb98}.quote-status-v15281.is-published{background:rgba(99,114,255,.15);color:#b4bcff}.quotes-empty-v15281{text-align:center;padding:36px}.quotes-empty-v15281 p{color:var(--text-muted,#89919d)}
.quote-back-v15281{display:inline-block;margin-bottom:10px;text-decoration:none;color:var(--text-muted,#89919d)}.quote-share-card-v15281{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid rgba(79,169,96,.35);border-radius:14px;background:rgba(79,169,96,.08)}.quote-share-card-v15281 div{min-width:0}.quote-share-card-v15281 small{color:var(--text-muted,#89919d)}.quote-share-card-v15281 div small,.quote-share-card-v15281 div strong{display:block}.quote-share-card-v15281 div strong{margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quote-form-v15281{display:flex;flex-direction:column;gap:14px}.quote-card-title-v15281{margin-bottom:14px}.quote-card-title-v15281 strong,.quote-card-title-v15281 small{display:block}.quote-card-title-v15281 small{margin-top:3px;color:var(--text-muted,#89919d)}.quote-fields-grid-v15281{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.quote-field-wide-v15281{grid-column:1/-1}.quote-publish-toggle-v15281{display:flex;align-items:flex-start;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border,#2a3038);cursor:pointer}.quote-publish-toggle-v15281 input{margin-top:3px}.quote-publish-toggle-v15281 strong,.quote-publish-toggle-v15281 small{display:block}.quote-publish-toggle-v15281 small{margin-top:2px;color:var(--text-muted,#89919d)}.quote-import-card-v15281{display:flex;align-items:center;justify-content:space-between;gap:16px}.quote-import-card-v15281>div:first-child strong,.quote-import-card-v15281>div:first-child small{display:block}.quote-import-card-v15281>div:first-child small{margin-top:4px;color:var(--text-muted,#89919d)}.quote-import-actions-v15281{display:flex;align-items:center;gap:10px;white-space:nowrap}.quote-import-actions-v15281 span{font-size:12px;color:var(--text-muted,#89919d)}.quote-sections-v15281{display:flex;flex-direction:column;gap:12px}.quote-section-card-v15281{padding:0!important;overflow:hidden}.quote-section-head-v15281{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border,#2a3038)}.quote-section-head-v15281>div{display:flex;align-items:center;gap:10px}.quote-section-head-v15281 button,.quote-item-remove-v15281{width:30px;height:30px;border:0;border-radius:8px;background:transparent;color:var(--text-muted,#89919d);font-size:20px;cursor:pointer}.quote-section-head-v15281 button:hover,.quote-item-remove-v15281:hover{background:rgba(255,90,90,.1);color:#ff8f8f}.quote-section-title-v15281{flex:1;min-width:0;border:0!important;background:transparent!important;font-weight:700;font-size:16px;padding:6px 0!important}.quote-item-head-v15281,.quote-item-row-v15281{display:grid;grid-template-columns:52px minmax(260px,1fr) 80px 92px 112px 124px 36px;gap:8px;align-items:center;padding:7px 12px}.quote-item-head-v15281{font-size:11px;text-transform:uppercase;color:var(--text-muted,#89919d);background:rgba(255,255,255,.02)}.quote-item-row-v15281{border-top:1px solid rgba(255,255,255,.035)}.quote-item-row-v15281 input{min-width:0;width:100%;padding:8px 9px!important;border-radius:8px!important}.quote-add-item-v15281{margin:8px 12px 12px;border:0;background:transparent;color:var(--accent,#aab4ff);cursor:pointer}.quote-add-section-v15281{align-self:flex-start}.quote-footer-fields-v15281{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.quote-savebar-v15281{position:sticky;bottom:12px;z-index:9;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;border:1px solid var(--border,#2a3038);border-radius:14px;background:rgba(20,23,28,.94);backdrop-filter:blur(12px);box-shadow:0 12px 30px rgba(0,0,0,.22)}.quote-savebar-v15281 small,.quote-savebar-v15281 strong{display:block}.quote-savebar-v15281 small{color:var(--text-muted,#89919d)}.quote-savebar-v15281 strong{font-size:20px;margin-top:2px}
.quote-stats-grid-v15281{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.quote-stat-card-v15281{padding:14px 16px;border:1px solid var(--border,#2a3038);border-radius:14px;background:var(--panel,#171b20)}.quote-stat-card-v15281 small,.quote-stat-card-v15281 strong{display:block}.quote-stat-card-v15281 small{color:var(--text-muted,#89919d)}.quote-stat-card-v15281 strong{margin-top:8px;font-size:21px}.quote-events-v15281{display:flex;flex-direction:column;gap:8px}.quote-event-v15281{display:grid;grid-template-columns:150px 150px 1fr;gap:12px;padding:10px 0;border-bottom:1px solid var(--border,#2a3038)}.quote-event-v15281 small{color:var(--text-muted,#89919d)}
@media(max-width:1000px){.quotes-kpi-grid-v15281{grid-template-columns:repeat(3,1fr)}.quote-stats-grid-v15281{grid-template-columns:repeat(3,1fr)}.quote-item-head-v15281{display:none}.quote-item-row-v15281{grid-template-columns:60px minmax(0,1fr) 70px 90px 100px 110px 34px;overflow-x:auto}.quote-share-card-v15281{grid-template-columns:1fr auto}.quote-share-card-v15281>small{grid-column:1/-1}}
@media(max-width:700px){.quotes-head-v15281,.quote-editor-head-v15281,.quote-import-card-v15281{flex-direction:column}.quotes-head-actions-v15281,.quote-editor-actions-v15281{width:100%}.quotes-head-actions-v15281>a,.quote-editor-actions-v15281>a{flex:1;justify-content:center}.quotes-kpi-grid-v15281,.quote-stats-grid-v15281{grid-template-columns:repeat(2,1fr)}.quote-fields-grid-v15281,.quote-footer-fields-v15281{grid-template-columns:1fr}.quote-field-wide-v15281{grid-column:auto}.quote-share-card-v15281{grid-template-columns:1fr}.quote-item-row-v15281{display:grid;grid-template-columns:48px 1fr 34px;gap:8px;padding:10px 12px}.quote-item-row-v15281 .quote-item-title-v15281{grid-column:2/3}.quote-item-row-v15281 input[data-key="unit"],.quote-item-row-v15281 input[data-key="quantity"],.quote-item-row-v15281 input[data-key="unit_price"],.quote-item-row-v15281 input[data-key="total"]{grid-column:1/-1}.quote-item-row-v15281 input[data-key="unit"]::placeholder{content:'Ед.'}.quote-item-remove-v15281{grid-column:3;grid-row:1}.quote-savebar-v15281{bottom:8px}.quote-event-v15281{grid-template-columns:1fr}.quote-import-actions-v15281{white-space:normal;flex-wrap:wrap}}

/* v1.5.283 — КП: компактный редактор, фото и расширенная аналитика */
.quote-editor-v15283{display:flex;flex-direction:column;gap:18px}.quote-main-card-v15283 .field>span,.quote-media-card-v15283 .field>span{margin-bottom:5px}.quote-main-card-v15283 .field input,.quote-main-card-v15283 .field select,.quote-specs-grid-v15283 .field input{min-height:38px;height:38px;padding:0 10px;border-radius:9px;font-size:13px}.quote-fields-grid-v15283{display:grid;grid-template-columns:minmax(230px,1.25fr) minmax(220px,1fr) minmax(220px,1fr);gap:10px 12px;align-items:end}.quote-field-lead-v15283,.quote-field-title-v15283,.quote-field-subtitle-v15283{min-width:0}.quote-specs-grid-v15283{display:grid;grid-template-columns:repeat(4,minmax(120px,180px));gap:10px;margin-top:11px}.quote-specs-grid-v15283 .field{max-width:180px}.quote-editor-v15283 .quote-item-row-v15281 input{border:1px solid rgba(142,151,164,.18)!important;background:rgba(255,255,255,.025)!important;box-shadow:none!important}.quote-editor-v15283 .quote-item-row-v15281 input:hover{border-color:rgba(142,151,164,.3)!important}.quote-editor-v15283 .quote-item-row-v15281 input:focus{border-color:rgba(170,180,255,.52)!important;box-shadow:0 0 0 2px rgba(170,180,255,.05)!important}.quote-editor-v15283 .quote-section-card-v15281{border-color:rgba(142,151,164,.2)}.quote-media-grid-v15283{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(360px,1.6fr);gap:16px}.quote-media-block-v15283{min-width:0}.quote-media-label-v15283{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:9px}.quote-media-label-v15283 small{color:var(--text-muted,#89919d);font-size:11px}.quote-cover-preview-v15283{position:relative;aspect-ratio:16/7;border-radius:12px;overflow:hidden;margin-bottom:9px;background:#0f1216}.quote-cover-preview-v15283 img{width:100%;height:100%;object-fit:cover;display:block}.quote-cover-preview-v15283 button{position:absolute;right:8px;top:8px;border:0;border-radius:8px;background:rgba(11,14,18,.72);color:#fff;padding:7px 9px;cursor:pointer}.quote-upload-zone-v15283{min-height:84px;border:1px dashed rgba(170,180,255,.34);border-radius:11px;background:rgba(170,180,255,.035);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:12px;text-align:center;cursor:pointer}.quote-upload-zone-v15283 input{display:none}.quote-upload-zone-v15283 span{font-weight:700;color:var(--accent,#aab4ff);font-size:13px}.quote-upload-zone-v15283 small{color:var(--text-muted,#89919d);font-size:11px}.quote-upload-zone-small-v15283{min-height:70px}.quote-gallery-admin-v15283{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:9px}.quote-gallery-thumb-v15283{position:relative;aspect-ratio:4/3;border-radius:9px;overflow:hidden;background:#0f1216}.quote-gallery-thumb-v15283 img{width:100%;height:100%;object-fit:cover;display:block}.quote-gallery-thumb-v15283 button{position:absolute;right:5px;top:5px;width:26px;height:26px;border:0;border-radius:7px;background:rgba(11,14,18,.72);color:#fff;cursor:pointer}.quote-stats-note-v15283{padding:10px 12px;border:1px solid rgba(99,114,255,.22);border-radius:11px;background:rgba(99,114,255,.06);color:var(--text-muted,#89919d);font-size:12px}.quote-forward-card-v15283{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:13px;align-items:center;border-color:rgba(81,168,100,.28)!important;background:rgba(81,168,100,.05)!important}.quote-forward-card-v15283.is-notice{border-color:rgba(218,165,60,.32)!important;background:rgba(218,165,60,.055)!important}.quote-forward-card-v15283.is-warning{border-color:rgba(236,108,82,.34)!important;background:rgba(236,108,82,.055)!important}.quote-forward-icon-v15283{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:rgba(81,168,100,.12);font-size:20px}.quote-forward-card-v15283 h2{margin:3px 0 4px;font-size:18px}.quote-forward-card-v15283 p{margin:0;color:var(--text-muted,#89919d);font-size:12px;line-height:1.45}.quote-forward-card-v15283 small{color:var(--text-muted,#89919d)}.quote-forward-count-v15283{text-align:right}.quote-forward-count-v15283 strong,.quote-forward-count-v15283 small,.quote-forward-count-v15283 span{display:block}.quote-forward-count-v15283 strong{font-size:26px}.quote-forward-count-v15283 span{margin-top:4px;color:var(--text-muted,#89919d);font-size:11px}.quote-stat-section-head-v15283 h2{margin:0 0 4px}.quote-stat-section-head-v15283 p{margin:0 0 14px;color:var(--text-muted,#89919d);font-size:12px}.quote-visitors-v15283{display:flex;flex-direction:column}.quote-visitor-v15283{display:grid;grid-template-columns:32px minmax(220px,1fr) auto auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--border,#2a3038)}.quote-visitor-v15283:first-child{border-top:0}.quote-visitor-v15283.is-ignored{opacity:.5}.quote-visitor-num-v15283{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:rgba(170,180,255,.1);font-size:11px}.quote-visitor-main-v15283 strong,.quote-visitor-main-v15283 small{display:block}.quote-visitor-main-v15283 small{margin-top:3px;color:var(--text-muted,#89919d);font-size:11px}.quote-visitor-metrics-v15283{display:flex;gap:10px;color:var(--text-muted,#89919d);font-size:11px;white-space:nowrap}.quote-ignore-button-v15283{min-height:34px!important;padding:0 10px!important;font-size:11px}.quote-event-v15281.is-ignored-v15283{opacity:.45;text-decoration:none}.quote-share-signal-v15283{display:inline-flex;padding:5px 8px;border-radius:999px;background:rgba(81,168,100,.11);color:#74ce88;font-size:11px;white-space:nowrap}.quote-share-signal-v15283.is-notice{background:rgba(218,165,60,.12);color:#e3bc66}.quote-share-signal-v15283.is-warning{background:rgba(236,108,82,.12);color:#f19784}
@media(max-width:1050px){.quote-fields-grid-v15283{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-specs-grid-v15283{grid-template-columns:repeat(4,minmax(100px,1fr))}.quote-specs-grid-v15283 .field{max-width:none}.quote-media-grid-v15283{grid-template-columns:1fr}.quote-gallery-admin-v15283{grid-template-columns:repeat(6,minmax(0,1fr))}.quote-visitor-v15283{grid-template-columns:32px 1fr auto}.quote-visitor-v15283 form{grid-column:2/4}.quote-ignore-button-v15283{width:auto}}
@media(max-width:700px){.quote-fields-grid-v15283,.quote-specs-grid-v15283{grid-template-columns:1fr 1fr}.quote-field-lead-v15283,.quote-field-title-v15283,.quote-field-subtitle-v15283{grid-column:1/-1}.quote-media-label-v15283{align-items:flex-start;flex-direction:column}.quote-gallery-admin-v15283{grid-template-columns:repeat(3,minmax(0,1fr))}.quote-forward-card-v15283{grid-template-columns:38px 1fr}.quote-forward-count-v15283{grid-column:2;text-align:left;display:flex;align-items:baseline;gap:6px}.quote-forward-count-v15283 small,.quote-forward-count-v15283 span{display:inline}.quote-visitor-v15283{grid-template-columns:28px 1fr}.quote-visitor-metrics-v15283,.quote-visitor-v15283 form{grid-column:2}.quote-visitor-metrics-v15283{flex-wrap:wrap}.quote-ignore-button-v15283{width:100%}.quote-main-card-v15283 .field input,.quote-main-card-v15283 .field select,.quote-specs-grid-v15283 .field input{font-size:16px}}

/* v1.5.284 — Commercial: compact fields, dual hero previews and AJAX media */
.quote-editor-v15284{display:flex;flex-direction:column;gap:16px}.quote-main-card-v15284 .field>span{margin-bottom:4px}.quote-main-card-v15284 .field input,.quote-main-card-v15284 .field select,.quote-specs-grid-v15284 .field input{height:36px;min-height:36px;padding:0 9px;border-radius:8px;font-size:12px}.quote-fields-grid-v15284{display:grid;grid-template-columns:minmax(215px,1.25fr) 92px minmax(185px,1fr) minmax(185px,1fr);gap:8px 10px;align-items:end}.quote-field-id-v15286{max-width:92px}.quote-field-id-v15286 input{font-weight:700;text-align:center;opacity:.9}.quote-specs-grid-v15284{display:grid;grid-template-columns:repeat(3,minmax(110px,155px));gap:8px;margin-top:9px}.quote-specs-grid-v15284 .field{max-width:155px}.quote-display-options-v15284{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin-top:12px;padding-top:11px;border-top:1px solid var(--border,#2a3038);font-size:12px}.quote-display-options-v15284>strong{font-size:12px}.quote-display-options-v15284 label{display:inline-flex;align-items:center;gap:6px;color:var(--text-muted,#89919d)}.quote-display-options-v15284 input{margin:0}.quote-editor-v15284 .quote-item-row-v15281 input{border:1px solid rgba(142,151,164,.13)!important;background:rgba(255,255,255,.018)!important;box-shadow:none!important}.quote-editor-v15284 .quote-item-row-v15281 input:hover{border-color:rgba(142,151,164,.22)!important}.quote-editor-v15284 .quote-item-row-v15281 input:focus{border-color:rgba(170,180,255,.42)!important;box-shadow:0 0 0 2px rgba(170,180,255,.04)!important}.quote-media-card-v15284{overflow:hidden}.quote-media-hint-v15284{margin:0 0 13px;padding:9px 11px;border-radius:8px;border:1px solid rgba(218,165,60,.28);background:rgba(218,165,60,.06);color:var(--text-muted,#89919d);font-size:11px}.quote-cover-editors-v15284{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(245px,.55fr);gap:18px;align-items:start}.quote-cover-editor-v15284{min-width:0}.quote-client-hero-preview-v15284{position:relative;overflow:hidden;border-radius:11px;background:#121712;color:#fff;border:1px solid rgba(142,151,164,.2)}.quote-client-hero-preview-v15284>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.quote-client-hero-preview-desktop-v15284{aspect-ratio:16/7.2}.quote-client-hero-preview-mobile-v15284{aspect-ratio:9/15;max-height:430px;max-width:260px;margin:0 auto}.quote-preview-shade-v15284{position:absolute;inset:0;background:linear-gradient(90deg,rgba(4,8,5,.78),rgba(4,8,5,.25))}.quote-client-hero-preview-mobile-v15284 .quote-preview-shade-v15284{background:linear-gradient(0deg,rgba(4,8,5,.82),rgba(4,8,5,.08))}.quote-preview-copy-v15284{position:absolute;z-index:2;left:5%;right:5%;bottom:7%;display:flex;flex-direction:column;align-items:flex-start;text-shadow:0 1px 8px rgba(0,0,0,.3)}.quote-preview-copy-v15284>small{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.4);font-size:7px}.quote-preview-copy-v15284>strong{margin-top:7px;font-size:24px;line-height:1.05}.quote-preview-copy-v15284>span{margin-top:2px;font-size:12px}.quote-preview-specs-v15284{display:flex;gap:12px;margin-top:10px;font-size:9px}.quote-preview-client-v15284{margin-top:12px;width:min(270px,100%);border-radius:6px;background:rgba(35,42,35,.57);border:1px solid rgba(255,255,255,.1);overflow:hidden;font-size:8px}.quote-preview-client-v15284>div{padding:6px 8px}.quote-preview-client-v15284>div+div{border-top:1px solid rgba(255,255,255,.12);display:flex;justify-content:space-between;gap:12px}.quote-client-hero-preview-mobile-v15284 .quote-preview-copy-v15284{left:7%;right:7%;bottom:5%}.quote-client-hero-preview-mobile-v15284 .quote-preview-copy-v15284>strong{font-size:18px}.quote-client-hero-preview-mobile-v15284 .quote-preview-copy-v15284>span{font-size:10px}.quote-client-hero-preview-mobile-v15284 .quote-preview-specs-v15284{gap:7px;font-size:7px}.quote-crop-controls-v15284{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:9px}.quote-crop-controls-v15284 label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;color:var(--text-muted,#89919d);font-size:10px}.quote-crop-controls-v15284 input[type=range]{width:100%}.quote-cover-actions-v15284{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:9px}.quote-cover-actions-v15284>small,[data-upload-status]{color:var(--text-muted,#89919d);font-size:10px}.quote-upload-inline-v15284{min-height:34px!important;width:auto!important;display:inline-flex!important;padding:0 11px!important;border-style:solid!important}.quote-upload-inline-v15284 small{display:none}.quote-upload-inline-v15284 input:disabled+span{opacity:.45}.quote-delete-cover-v15284{min-height:34px!important;padding:0 10px!important;font-size:11px}.quote-gallery-admin-block-v15284{margin-top:20px;padding-top:17px;border-top:1px solid var(--border,#2a3038)}.quote-gallery-admin-block-v15284 .quote-gallery-admin-v15283{grid-template-columns:repeat(8,minmax(0,1fr))}.quote-import-actions-v15281{flex-wrap:wrap}
@media(max-width:1100px){.quote-fields-grid-v15284{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-field-id-v15286{max-width:none}.quote-field-lead-v15284,.quote-field-title-v15284,.quote-field-subtitle-v15284{min-width:0}.quote-cover-editors-v15284{grid-template-columns:1fr 280px}.quote-gallery-admin-block-v15284 .quote-gallery-admin-v15283{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:760px){.quote-fields-grid-v15284{grid-template-columns:1fr 1fr}.quote-field-lead-v15284,.quote-field-title-v15284,.quote-field-subtitle-v15284{grid-column:1/-1}.quote-specs-grid-v15284{grid-template-columns:1fr 1fr}.quote-specs-grid-v15284 .field{max-width:none}.quote-cover-editors-v15284{grid-template-columns:1fr}.quote-client-hero-preview-mobile-v15284{max-width:300px}.quote-gallery-admin-block-v15284 .quote-gallery-admin-v15283{grid-template-columns:repeat(3,minmax(0,1fr))}.quote-main-card-v15284 .field input,.quote-main-card-v15284 .field select,.quote-specs-grid-v15284 .field input{font-size:16px}.quote-crop-controls-v15284{grid-template-columns:1fr}}

/* v1.5.285 — commercial editor reliability + estimate history */
.quote-specs-grid-v15285{display:grid;grid-template-columns:repeat(4,minmax(115px,165px));gap:8px;margin-top:9px}.quote-specs-grid-v15285 .field{max-width:165px}.quote-specs-grid-v15285 .field input{height:36px;min-height:36px;padding:0 9px;border-radius:8px;font-size:12px}.quote-save-message-v15285{padding:11px 13px;border-radius:10px;border:1px solid rgba(170,180,255,.22);background:rgba(170,180,255,.06);font-size:12px;line-height:1.45}.quote-save-message-v15285.is-error{border-color:rgba(236,108,82,.4);background:rgba(236,108,82,.08);color:#ffb4a5}.quote-save-message-v15285.is-success{border-color:rgba(81,168,100,.36);background:rgba(81,168,100,.08);color:#89dda0}.quote-save-message-v15285.is-draft{border-color:rgba(218,165,60,.34);background:rgba(218,165,60,.07);color:#e8c875}.quote-save-message-v15285.is-progress{color:var(--text-muted,#89919d)}
.quote-import-card-v15285{display:flex;flex-direction:column;gap:13px}.quote-work-head-v15285{display:flex;align-items:center;justify-content:space-between;gap:16px}.quote-work-head-v15285>div:first-child strong,.quote-work-head-v15285>div:first-child small{display:block}.quote-work-head-v15285>div:first-child small{margin-top:4px;color:var(--text-muted,#89919d)}.quote-import-history-v15285{display:flex;flex-direction:column;border-top:1px solid var(--border,#2a3038)}.quote-import-empty-v15285{padding:12px 0 0;color:var(--text-muted,#89919d);font-size:12px}.quote-import-row-v15285{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:11px 0;border-bottom:1px solid rgba(142,151,164,.13)}.quote-import-row-v15285:last-child{border-bottom:0}.quote-import-row-v15285 strong,.quote-import-row-v15285 small{display:block}.quote-import-row-v15285 strong{font-size:13px}.quote-import-row-v15285 small{margin-top:3px;color:var(--text-muted,#89919d);font-size:11px}.quote-import-row-actions-v15285{display:flex;gap:7px;align-items:center}.quote-import-row-actions-v15285 .secondary-button{min-height:32px;padding:0 10px;font-size:11px}
@media(max-width:1000px){.quote-specs-grid-v15285{grid-template-columns:repeat(3,minmax(110px,1fr))}.quote-specs-grid-v15285 .field{max-width:none}}
@media(max-width:760px){.quote-specs-grid-v15285{grid-template-columns:1fr 1fr}.quote-specs-grid-v15285 .field input{font-size:16px}.quote-work-head-v15285{align-items:stretch;flex-direction:column}.quote-import-row-v15285{grid-template-columns:1fr}.quote-import-row-actions-v15285{flex-wrap:wrap}}

/* v1.5.287 — commercial stable edit route */
.quote-field-id-v15287{max-width:92px}.quote-field-id-v15287 input{font-weight:700;text-align:center;opacity:.9}@media(max-width:1100px){.quote-field-id-v15287{max-width:none}}

/* v1.5.288 */
.quote-event-v15281.is-staff-view-v15288{opacity:.46}

/* v1.5.293 — коммерческое: полная строка активности без обрезания */
.quote-event-v15281{
  grid-template-columns:140px minmax(0,1fr);
  align-items:start;
}
.quote-event-v15281>span{
  grid-column:2;
  min-width:0;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  line-height:1.45;
}
.quote-event-v15281>small{
  grid-column:2;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.4;
}
@media(max-width:700px){
  .quote-event-v15281{grid-template-columns:1fr;gap:4px}
  .quote-event-v15281>span,.quote-event-v15281>small{grid-column:1}
}

/* v1.5.295: quote editor price column alignment */
.quote-item-head-v15281 span:nth-child(5){text-align:right}.quote-item-row-v15281 input[data-key="unit_price"]{text-align:right}


/* v1.5.297 — меню действий КП / архив */
.quote-toolbar-split-v15297{align-items:center;gap:14px;flex-wrap:wrap}.quote-list-tabs-v15297{display:flex;gap:4px;padding:4px;border:1px solid var(--border,#2a3038);border-radius:11px;background:var(--panel,#171b20)}.quote-list-tabs-v15297 a{padding:7px 12px;border-radius:8px;color:var(--text-muted,#89919d);text-decoration:none;font-size:13px}.quote-list-tabs-v15297 a.is-active{background:rgba(170,180,255,.14);color:var(--accent,#aab4ff)}
.quote-more-v15297{position:relative;display:inline-flex}.quote-more-button-v15297{min-width:40px;padding-left:10px!important;padding-right:10px!important;font-size:18px;letter-spacing:2px}.quote-more-inline-v15297{border:0;background:transparent;color:var(--text,#e8ebef);font-size:18px;line-height:1;padding:5px 7px;cursor:pointer;letter-spacing:1px}.quote-more-menu-v15297{position:absolute;right:0;top:calc(100% + 6px);z-index:80;min-width:150px;padding:6px;border:1px solid var(--border,#2a3038);border-radius:10px;background:var(--panel,#171b20);box-shadow:0 14px 38px rgba(0,0,0,.28)}.quote-more-menu-v15297[hidden]{display:none!important}.quote-more-menu-v15297 button{width:100%;border:0;background:transparent;color:var(--text,#e8ebef);text-align:left;padding:9px 10px;border-radius:7px;cursor:pointer}.quote-more-menu-v15297 button:hover{background:rgba(255,255,255,.05)}.quote-more-menu-v15297 button.is-danger{color:#ff7373}.quote-status-v15281.is-archived{background:rgba(151,159,170,.14);color:#b0b7c0}.quote-status-v15281.is-deleted{background:rgba(255,83,83,.13);color:#ff8585}
.quote-action-modal-v15297{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px;background:rgba(5,7,10,.68);backdrop-filter:blur(7px)}.quote-action-modal-v15297[hidden]{display:none!important}.quote-action-modal-dialog-v15297{width:min(430px,100%);padding:20px;border:1px solid var(--border,#2a3038);border-radius:16px;background:var(--panel,#171b20);box-shadow:0 25px 70px rgba(0,0,0,.42)}.quote-action-modal-dialog-v15297 h3{margin:0 0 8px;font-size:20px}.quote-action-modal-dialog-v15297 p{margin:0 0 20px;color:var(--text-muted,#89919d);line-height:1.5}.quote-action-modal-buttons-v15297{display:flex;justify-content:flex-end;gap:9px}.quote-action-modal-buttons-v15297 .is-danger{background:#c93d45!important;border-color:#c93d45!important;color:#fff!important}
@media(max-width:700px){.quote-toolbar-split-v15297{align-items:stretch}.quote-list-tabs-v15297{width:100%}.quote-list-tabs-v15297 a{flex:1;text-align:center}.quote-action-modal-buttons-v15297{flex-direction:column-reverse}.quote-action-modal-buttons-v15297 button{width:100%}}

/* v1.5.304 — quote archive/delete feedback */
.quote-action-modal-v15297 [data-quote-action-text].is-error{color:#ff7e7e}

/* =========================================================
   v1.5.310 — КП: компактный редактор / Excel версии / лиды
   ========================================================= */
@media (min-width:901px){
  .quote-fields-grid-v15310{grid-template-columns:minmax(240px,1.15fr) minmax(220px,1fr) minmax(220px,1fr)!important;gap:8px 10px!important;}
  .quote-fields-grid-v15310 .quote-field-lead-v15284,
  .quote-fields-grid-v15310 .quote-field-title-v15284,
  .quote-fields-grid-v15310 .quote-field-subtitle-v15284{grid-column:auto!important;min-width:0!important;}
}
@media (min-width:1001px){
  .quote-specs-grid-v15310{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important;}
  .quote-specs-grid-v15310 .field{max-width:none!important;min-width:0!important;}
  .quote-specs-grid-v15310 .field input{min-width:0!important;width:100%!important;}
}
@media (min-width:761px) and (max-width:1000px){
  .quote-specs-grid-v15310{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  .quote-specs-grid-v15310 .field{max-width:none!important;}
}
.quote-editor-v15281 .quote-form-v15281 input:not([type="checkbox"]):not([type="file"]):not([type="range"]),
.quote-editor-v15281 .quote-form-v15281 select,
.quote-editor-v15281 .quote-form-v15281 textarea{
  border-width:1px!important;
  outline:0!important;
  box-shadow:none!important;
}
.quote-editor-v15281 .quote-form-v15281 input:not([type="checkbox"]):not([type="file"]):not([type="range"]):hover,
.quote-editor-v15281 .quote-form-v15281 select:hover,
.quote-editor-v15281 .quote-form-v15281 textarea:hover{
  border-width:1px!important;
  border-color:rgba(142,151,164,.28)!important;
  box-shadow:none!important;
}
.quote-editor-v15281 .quote-form-v15281 input:not([type="checkbox"]):not([type="file"]):not([type="range"]):focus,
.quote-editor-v15281 .quote-form-v15281 select:focus,
.quote-editor-v15281 .quote-form-v15281 textarea:focus{
  border-width:1px!important;
  border-color:rgba(170,180,255,.46)!important;
  outline:0!important;
  box-shadow:none!important;
}
.quote-client-link-button-v15310{white-space:nowrap;}
.quote-import-name-v15310{min-width:0;}
.quote-import-name-v15310>strong{display:flex!important;align-items:center;gap:7px;min-width:0;}
.quote-import-name-v15310>strong>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.quote-import-file-icon-v15310{width:18px;height:18px;flex:0 0 18px;display:grid;place-items:center;color:#75a97d;}
.quote-import-file-icon-v15310 svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.lead-additional-info-v15310{margin-top:16px;padding-top:15px;border-top:1px solid var(--border,#2a3038);}
.lead-additional-info-v15310 h3{margin:0 0 11px;font-size:13px;font-weight:800;color:var(--text,#e8ebef);}
.lead-primary-info-grid-v15310{margin-top:0;}
@media(max-width:760px){
  .quote-fields-grid-v15310{grid-template-columns:1fr!important;}
  .quote-fields-grid-v15310 .quote-field-lead-v15284,
  .quote-fields-grid-v15310 .quote-field-title-v15284,
  .quote-fields-grid-v15310 .quote-field-subtitle-v15284{grid-column:1!important;}
  .quote-specs-grid-v15310{grid-template-columns:1fr 1fr!important;}
  .quote-import-name-v15310>strong>span:last-child{white-space:normal;overflow-wrap:anywhere;}
}
.lead-additional-info-v15310 .lead-application-source-v15310{margin-top:12px;padding-top:12px;border-top:1px solid rgba(142,151,164,.12);}

/* v1.5.311 — client KP blocks editor */
.quote-client-blocks-v15311{display:flex;flex-direction:column;gap:16px}.quote-client-settings-row-v15311{display:grid;grid-template-columns:minmax(160px,220px) minmax(170px,220px) minmax(240px,1fr);gap:10px;align-items:end}.quote-client-settings-row-v15311 .field input{height:36px;min-height:36px;padding:0 9px;border-radius:8px;font-size:12px}.quote-check-toggle-v15311{height:36px;display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--border,#2a3038);border-radius:8px;color:var(--text-muted,#89919d);font-size:12px}.quote-check-toggle-v15311 input{margin:0}.quote-client-lists-grid-v15311{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quote-config-box-v15311{padding:13px;border:1px solid var(--border,#2a3038);border-radius:12px;background:rgba(255,255,255,.012)}.quote-config-head-v15311{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.quote-config-head-v15311>strong{font-size:13px}.quote-config-head-v15311 .secondary-button{min-height:30px!important;padding:0 9px!important;font-size:11px}.quote-config-list-v15311,.quote-stages-editor-v15311{display:flex;flex-direction:column;gap:7px}.quote-config-row-v15311{display:grid;grid-template-columns:22px minmax(0,1fr) 30px;gap:7px;align-items:center}.quote-config-row-v15311>input[type=text],.quote-stage-row-v15311>input[type=text]{height:34px!important;min-height:34px!important;padding:0 9px!important;border:1px solid rgba(142,151,164,.16)!important;border-radius:8px!important;background:rgba(255,255,255,.018)!important;box-shadow:none!important}.quote-config-row-v15311>input[type=text]:hover,.quote-config-row-v15311>input[type=text]:focus,.quote-stage-row-v15311>input[type=text]:hover,.quote-stage-row-v15311>input[type=text]:focus{border-color:rgba(170,180,255,.34)!important;box-shadow:none!important}.quote-config-row-v15311>button,.quote-stage-row-v15311>button{height:30px;border:0;background:transparent;color:#ff8585;font-size:19px;cursor:pointer}.quote-stages-config-v15311{margin-top:0}.quote-stage-row-v15311{display:grid;grid-template-columns:22px minmax(160px,1fr) minmax(100px,180px) 30px;gap:7px;align-items:center}
@media(max-width:980px){.quote-client-settings-row-v15311{grid-template-columns:1fr 1fr}.quote-check-toggle-v15311{grid-column:1/-1}.quote-client-lists-grid-v15311{grid-template-columns:1fr}}
@media(max-width:720px){.quote-client-settings-row-v15311{grid-template-columns:1fr}.quote-check-toggle-v15311{grid-column:auto}.quote-stage-row-v15311{grid-template-columns:22px minmax(0,1fr) 90px 28px}.quote-config-box-v15311{padding:10px}}

/* v1.5.314 — quote stages toggle + inline status chooser */
.quote-config-actions-v15314{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.quote-status-menu-v15314{position:relative;display:inline-block}
.quote-status-button-v15314{border:0;cursor:pointer;font:inherit}
.quote-status-v15281.is-not_agreed{background:rgba(255,170,54,.14);color:#f4bd70}
.quote-status-options-v15314{position:absolute;left:0;top:calc(100% + 6px);z-index:90;min-width:156px;padding:6px;border:1px solid var(--border,#2a3038);border-radius:10px;background:var(--panel,#171b20);box-shadow:0 14px 34px rgba(0,0,0,.32)}
.quote-status-options-v15314[hidden]{display:none!important}
.quote-status-options-v15314 button{display:block;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--text,#e8ebef);text-align:left;cursor:pointer}
.quote-status-options-v15314 button:hover{background:rgba(255,255,255,.06)}


/* =========================================================
   v1.5.315 — КП: визуальный редактор клиентских блоков
   ========================================================= */
@media (min-width:1180px){
  .quote-specs-grid-v15315{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:7px!important}
  .quote-specs-grid-v15315 .field{max-width:none!important;min-width:0!important}
  .quote-specs-grid-v15315 .field input{min-width:0!important;width:100%!important}
}
@media (min-width:1001px) and (max-width:1179px){.quote-specs-grid-v15315{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
.quote-preview-client-v15315{margin-top:10px!important;width:min(300px,100%)!important}
.quote-preview-client-v15315>div{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:6px 8px!important}
.quote-preview-summary-v15315{position:relative;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:-24px 10px 12px;padding:0 2px}
.quote-preview-summary-v15315>div{min-width:0;min-height:49px;padding:9px 10px;border:1px solid rgba(142,151,164,.18);border-radius:9px;background:var(--panel,#171b20);box-shadow:0 7px 18px rgba(0,0,0,.18)}
.quote-preview-summary-v15315 small,.quote-preview-summary-v15315 strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quote-preview-summary-v15315 small{font-size:8px;color:var(--text-muted,#89919d)}
.quote-preview-summary-v15315 strong{margin-top:4px;font-size:11px;color:var(--text,#e8ebef)}
.quote-client-settings-row-v15315{display:block!important}
.quote-block-toggle-row-v15315{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:360px;padding:11px 13px;border:1px solid var(--border,#2a3038);border-radius:10px;background:rgba(255,255,255,.012);transition:opacity .16s ease}
.quote-block-toggle-row-v15315>span strong,.quote-block-toggle-row-v15315>span small{display:block}.quote-block-toggle-row-v15315>span strong{font-size:12px}.quote-block-toggle-row-v15315>span small{margin-top:2px;font-size:10px;color:var(--text-muted,#89919d)}
.quote-config-box-v15311,.quote-block-toggle-row-v15315{transition:opacity .16s ease,filter .16s ease}
.quote-config-box-v15311.is-disabled-v15315,.quote-block-toggle-row-v15315.is-disabled-v15315{opacity:.46;filter:saturate(.55)}
.quote-config-box-v15311.is-disabled-v15315 .quote-config-head-v15311{opacity:1}.quote-config-box-v15311.is-disabled-v15315 .settings-toggle-v15219{opacity:1;filter:none}
.quote-config-row-v15311.quote-sortable-row-v15315{grid-template-columns:24px minmax(0,1fr) 66px!important}
.quote-stage-row-v15311.quote-sortable-row-v15315{grid-template-columns:24px minmax(150px,1fr) minmax(95px,160px) 66px!important}
.quote-drag-handle-v15315{height:30px!important;padding:0!important;border:0!important;background:transparent!important;color:var(--text-muted,#89919d)!important;font-size:17px!important;letter-spacing:-4px;cursor:grab!important;user-select:none}
.quote-drag-handle-v15315:active{cursor:grabbing!important}
.quote-row-state-v15315{height:30px!important;padding:0 7px!important;border:1px solid rgba(255,107,107,.25)!important;border-radius:7px!important;background:rgba(255,107,107,.06)!important;color:#ff8585!important;font-size:10px!important;cursor:pointer!important}
.quote-sortable-row-v15315.is-disabled-v15315{opacity:.42}
.quote-sortable-row-v15315.is-disabled-v15315 input[type=text]{text-decoration:line-through;color:var(--text-muted,#89919d)!important}
.quote-sortable-row-v15315.is-disabled-v15315 .quote-row-state-v15315{border-color:rgba(96,190,122,.26)!important;background:rgba(96,190,122,.07)!important;color:#7fcf91!important;text-decoration:none!important}
.quote-sortable-row-v15315.is-dragging-v15315{opacity:.24!important}
.quote-display-options-v15315{margin-top:10px!important;padding-top:10px!important}
@media(max-width:760px){
 .quote-preview-summary-v15315{grid-template-columns:1fr 1fr;margin-top:-18px}
 .quote-stage-row-v15311.quote-sortable-row-v15315{grid-template-columns:22px minmax(0,1fr) 78px 60px!important}
 .quote-config-row-v15311.quote-sortable-row-v15315{grid-template-columns:22px minmax(0,1fr) 60px!important}
 .quote-row-state-v15315{padding:0 5px!important;font-size:9px!important}
}

/* =========================================================
   v1.5.316 — КП: компоновка сметы / график оплаты в редакторе
   ========================================================= */
@media (min-width:1180px){
  .quote-specs-grid-v15315{grid-template-columns:repeat(7,minmax(0,1fr))!important}
}
.quote-stages-payment-grid-v15316{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.8fr);gap:12px;align-items:start}
.quote-payment-preview-v15316{min-width:0}
.quote-payment-preview-track-v15316{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding-top:4px}
.quote-payment-preview-track-v15316::before{content:"";position:absolute;left:16%;right:16%;top:19px;height:2px;background:rgba(91,173,111,.38)}
.quote-payment-preview-stage-v15316{position:relative;z-index:1;text-align:center;min-width:0}
.quote-payment-preview-stage-v15316>span{width:38px;height:38px;margin:0 auto 8px;border-radius:50%;display:grid;place-items:center;background:#2e8f48;color:#fff;font-size:10px;font-weight:800;box-shadow:0 0 0 4px var(--panel,#171b20)}
.quote-payment-preview-stage-v15316>strong,.quote-payment-preview-stage-v15316>small{display:block;min-width:0}
.quote-payment-preview-stage-v15316>strong{font-size:11px;color:var(--text,#e8ebef);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quote-payment-preview-stage-v15316>small{margin-top:4px;font-size:9px;line-height:1.25;color:var(--text-muted,#89919d)}
.quote-payment-preview-note-v15316{display:block;margin-top:12px;font-size:9px;color:var(--text-muted,#89919d)}
.quote-work-head-v15316{align-items:center!important}
.quote-import-actions-v15316{display:flex!important;align-items:center!important;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.quote-display-options-inline-v15316{display:flex!important;align-items:center;gap:9px;margin:0!important;padding:0!important;border:0!important;white-space:nowrap}
.quote-display-options-inline-v15316 strong{font-size:11px;color:var(--text-muted,#89919d);font-weight:700}
.quote-display-options-inline-v15316 label{display:inline-flex;align-items:center;gap:4px;margin:0!important;font-size:11px;white-space:nowrap}
.quote-display-options-inline-v15316 input{margin:0}
@media(max-width:1100px){
  .quote-stages-payment-grid-v15316{grid-template-columns:1fr}
  .quote-payment-preview-v15316{max-width:none}
}
@media(max-width:760px){
  .quote-work-head-v15316{align-items:stretch!important}
  .quote-import-actions-v15316{justify-content:flex-start!important}
  .quote-display-options-inline-v15316{width:100%;flex-wrap:wrap;white-space:normal}
  .quote-display-options-inline-v15316 strong{width:100%}
  .quote-payment-preview-track-v15316{gap:3px}
  .quote-payment-preview-stage-v15316>strong{font-size:10px}
}

/* v1.5.321 — сортировка фотографий КП */
.quote-gallery-thumb-v15283{touch-action:auto;transition:transform .14s ease,opacity .14s ease,box-shadow .14s ease}
.quote-gallery-thumb-v15283.is-dragging-v15321{opacity:.58;transform:scale(.97);box-shadow:0 0 0 2px rgba(170,180,255,.48);z-index:3}
.quote-gallery-drag-handle-v15321{position:absolute;left:6px;bottom:6px;width:30px;height:28px;display:grid;place-items:center;border-radius:7px;background:rgba(11,14,18,.76);color:#fff;font-size:18px;font-weight:800;line-height:1;letter-spacing:-4px;padding-right:4px;cursor:grab;user-select:none;-webkit-user-select:none;touch-action:none;z-index:2}
.quote-gallery-drag-handle-v15321:active{cursor:grabbing}
.quote-gallery-sort-status-v15321{min-height:20px;margin:-2px 0 8px;color:var(--text-muted,#89919d);font-size:11px;line-height:1.4}
.quote-gallery-sort-status-v15321[data-state="saving"]{color:#aab4ff}
.quote-gallery-sort-status-v15321[data-state="saved"]{color:#74ce88}
.quote-gallery-sort-status-v15321[data-state="error"]{color:#f19784}

/* v1.5.322 — расширенная статистика устройства КП */
.quote-device-details-v15322{grid-column:2/-1;margin-top:0;border:1px solid rgba(142,151,164,.16);border-radius:10px;background:rgba(255,255,255,.018);overflow:hidden}.quote-device-details-v15322 summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;cursor:pointer;font-size:12px;font-weight:700;color:var(--text,#e8ecf2)}.quote-device-details-v15322 summary::-webkit-details-marker{display:none}.quote-device-details-v15322 summary span{font-weight:500;color:var(--text-muted,#89919d);font-size:11px}.quote-device-details-v15322[open] summary{border-bottom:1px solid rgba(142,151,164,.14)}.quote-device-grid-v15322{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:rgba(142,151,164,.10)}.quote-device-grid-v15322>div{min-width:0;padding:10px 11px;background:var(--card,#171b20)}.quote-device-grid-v15322>div.is-wide{grid-column:span 2}.quote-device-grid-v15322 small,.quote-device-grid-v15322 strong{display:block}.quote-device-grid-v15322 small{margin-bottom:4px;color:var(--text-muted,#89919d);font-size:10px}.quote-device-grid-v15322 strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere}.quote-visitor-metrics-v15283 span+span{padding-left:9px;border-left:1px solid rgba(142,151,164,.18)}
@media(max-width:1050px){.quote-device-details-v15322{grid-column:2/4}.quote-device-grid-v15322{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.quote-device-details-v15322{grid-column:2}.quote-device-grid-v15322{grid-template-columns:1fr 1fr}.quote-device-grid-v15322>div.is-wide{grid-column:1/-1}.quote-device-details-v15322 summary{padding:10px}.quote-device-grid-v15322>div{padding:9px 10px}}

/* v1.5.328 — visitor actions in one row */
.quote-visitor-actions-v15328{display:flex;align-items:center;justify-content:flex-end;gap:7px;white-space:nowrap}.quote-visitor-actions-v15328 form{margin:0}.quote-details-button-v15328,.quote-visitor-actions-v15328 .quote-ignore-button-v15283{min-height:34px!important;height:34px!important;width:auto!important;padding:0 10px!important;font-size:11px!important}.quote-device-details-panel-v15328{grid-column:2/-1;border:1px solid rgba(142,151,164,.16);border-radius:10px;background:rgba(255,255,255,.018);overflow:hidden}.quote-device-details-panel-v15328[hidden]{display:none!important}
@media(max-width:1050px){.quote-visitor-actions-v15328{grid-column:2/4;justify-content:flex-end}.quote-device-details-panel-v15328{grid-column:2/4}}
@media(max-width:700px){.quote-visitor-actions-v15328{grid-column:2;justify-content:flex-start;flex-wrap:nowrap}.quote-device-details-panel-v15328{grid-column:2}.quote-details-button-v15328,.quote-visitor-actions-v15328 .quote-ignore-button-v15283{flex:0 0 auto!important;width:auto!important}}

/* v1.5.331 — SaaS micro-interactions */
@keyframes mkSaasPop331 { from{opacity:.72} to{opacity:1} }
@keyframes mkSaasPress331 { 0%{transform:scale(1)} 45%{transform:scale(.975)} 100%{transform:scale(1)} }
@keyframes mkSaasNumber331 { from{opacity:.55} to{opacity:1} }

button,.primary-button,.secondary-button,[role="button"] { transition: transform .14s ease, filter .14s ease, box-shadow .18s ease; }
button:active:not(:disabled),.primary-button:active:not(:disabled),.secondary-button:active:not(:disabled),[role="button"]:active { transform:scale(.975); }

.estimate-expense-modal.is-visible .estimate-expense-modal-dialog,
.estimate-file-preview-modal.is-visible .estimate-file-preview-dialog,
.payment-amount-modal.is-visible .payment-amount-modal-dialog,
.guest-login-modal.is-visible .guest-login-dialog,
.user-create-modal.is-visible .user-create-dialog,
.project-status-modal.is-visible .project-status-modal-dialog { animation:mkSaasPop331 .22s ease-out both; }

[data-saas-sfx-toggle] { font-size:9px; }
.saas-sfx-toggle-v15331 { display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 9px;border:1px solid rgba(128,138,158,.22);border-radius:8px;background:transparent;color:inherit;cursor:pointer;opacity:.8; }
.saas-sfx-toggle-v15331:hover { opacity:1; }
.saas-sfx-toggle-v15331.is-off-v15331 { opacity:.5; }

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; }
}

/* =========================================================
   v1.5.332 — global CRM motion system
   ========================================================= */
:root{
  --mk-motion-fast-v15332:140ms;
  --mk-motion-base-v15332:220ms;
  --mk-motion-slow-v15332:360ms;
  --mk-motion-ease-v15332:cubic-bezier(.22,.82,.28,1);
  --mk-motion-spring-v15332:cubic-bezier(.22,.82,.28,1);
}

@keyframes mkPageInV15332{from{opacity:0}to{opacity:1}}
@keyframes mkItemInV15332{from{opacity:0}to{opacity:1}}
@keyframes mkPopV15332{from{opacity:0}to{opacity:1}}
@keyframes mkMenuInV15332{from{opacity:0}to{opacity:1}}
@keyframes mkActionV15332{0%{filter:brightness(1);transform:scale(1)}45%{filter:brightness(1.08);transform:scale(.972)}100%{filter:brightness(1);transform:scale(1)}}
@keyframes mkSavedV15332{0%{box-shadow:0 0 0 0 rgba(88,190,116,.34)}100%{box-shadow:0 0 0 10px rgba(88,190,116,0)}}
@keyframes mkAlertInV15332{from{opacity:0}to{opacity:1}}

html.mk-motion-enabled-v15332 .page-body,
html.mk-motion-enabled-v15332 body.login-page .login-layout{
  animation:mkPageInV15332 var(--mk-motion-base-v15332) var(--mk-motion-ease-v15332) both;
}

/* Элементы страниц появляются мягко; JS включает эффект только при первом показе. */
.mk-motion-item-v15332{
  opacity:0;
  transition:opacity var(--mk-motion-base-v15332) var(--mk-motion-ease-v15332);
  transition-delay:var(--mk-motion-delay-v15332,0ms);
  will-change:opacity;
}
.mk-motion-item-v15332.is-visible-v15332{opacity:1;will-change:auto}

/* Переход на другую страницу синхронизирован с уже существующей полосой загрузки. */
body.is-app-loading-v15113 .page-body{
  opacity:.78;
  transition:opacity 150ms ease;
  pointer-events:none;
}

/* Унифицированные микроэффекты действий. */
button,.primary-button,.secondary-button,[role="button"],.nav-link,.tab-link,
[class*="-button"],[class*="-tab-v"]{
  transition-property:transform,filter,box-shadow,background-color,border-color,color,opacity;
  transition-duration:var(--mk-motion-fast-v15332);
  transition-timing-function:ease;
}
.mk-motion-action-v15332{animation:mkActionV15332 210ms ease-out}
.mk-motion-saved-v15332{animation:mkSavedV15332 520ms ease-out}

@media (hover:hover) and (pointer:fine){
  /* v1.5.333: окна/карточки при наведении остаются неподвижными. */
  .nav-link:hover,.tab-link:hover,[class*="-tab-v"]:hover{transform:translateY(-1px)}
  button:hover:not(:disabled),.primary-button:hover:not(:disabled),.secondary-button:hover:not(:disabled),[role="button"]:hover{filter:brightness(1.035)}
}

/* Поля не прыгают по размеру: только мягко подсвечиваются. */
input,select,textarea{
  transition:border-color var(--mk-motion-fast-v15332) ease,
             box-shadow var(--mk-motion-fast-v15332) ease,
             background-color var(--mk-motion-fast-v15332) ease,
             opacity var(--mk-motion-fast-v15332) ease;
}
input:focus,select:focus,textarea:focus{
  box-shadow:0 0 0 3px rgba(170,180,255,.08);
}
input[type="checkbox"],input[type="radio"]{transition:transform var(--mk-motion-fast-v15332) ease,filter var(--mk-motion-fast-v15332) ease}
input[type="checkbox"]:active,input[type="radio"]:active{transform:scale(.88)}

/* Модальные окна, меню, popover и выпадающие панели. */
.mk-motion-pop-v15332{animation:mkPopV15332 var(--mk-motion-base-v15332) var(--mk-motion-spring-v15332) both}
[data-sidebar-account-menu]:not([hidden]),
[class*="popover"]:not([hidden]),
[class*="dropdown"]:not([hidden]),
[class*="menu-popover"]:not([hidden]){
  transform-origin:top right;
  animation:mkMenuInV15332 170ms var(--mk-motion-ease-v15332) both;
}

/* alerts / уведомления */
.alert:not([hidden]),[class*="toast"]:not([hidden]),[class*="notice"]:not([hidden]){
  animation:mkAlertInV15332 190ms var(--mk-motion-ease-v15332) both;
}

/* Details / раскрывающиеся блоки. */
details[open] > :not(summary){animation:mkItemInV15332 180ms var(--mk-motion-ease-v15332) both}
details > summary{transition:background-color var(--mk-motion-fast-v15332) ease,color var(--mk-motion-fast-v15332) ease}

/* Прогресс-бары и заполнение шкал двигаются, а не перескакивают. */
progress,[class*="progress"] i,[class*="progress"] span{
  transition:width var(--mk-motion-slow-v15332) var(--mk-motion-ease-v15332),
             max-width var(--mk-motion-slow-v15332) var(--mk-motion-ease-v15332);
}

/* Строки/карточки, которые добавляются через AJAX/JS. */
.mk-motion-new-v15332{animation:mkItemInV15332 260ms var(--mk-motion-ease-v15332) both}

@media (max-width:760px){
  .mk-motion-item-v15332{transition-duration:190ms}
  body.is-app-loading-v15113 .page-body{transform:none}
}

@media (prefers-reduced-motion:reduce){
  html.mk-motion-enabled-v15332 .page-body,
  html.mk-motion-enabled-v15332 body.login-page .login-layout,
  .mk-motion-item-v15332,.mk-motion-pop-v15332,.mk-motion-action-v15332,.mk-motion-saved-v15332,.mk-motion-new-v15332,
  [data-sidebar-account-menu]:not([hidden]),[class*="popover"]:not([hidden]),[class*="dropdown"]:not([hidden]),
  .alert:not([hidden]),[class*="toast"]:not([hidden]),[class*="notice"]:not([hidden]),details[open] > :not(summary){
    animation:none!important;transition:none!important;transform:none!important;opacity:1!important;
  }
}

/* =========================================================
   v1.5.333 — chart motion + static card hover
   ========================================================= */
@keyframes mkChartBarYV15333{from{transform:scaleY(.04);opacity:.28}to{transform:scaleY(1);opacity:1}}
@keyframes mkChartBarXV15333{from{transform:scaleX(.02);opacity:.3}to{transform:scaleX(1);opacity:1}}
@keyframes mkChartDonutV15333{from{opacity:.22}to{opacity:1}}
@keyframes mkChartFadeV15333{from{opacity:.25;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes mkChartStrokeV15333{from{stroke-dashoffset:900;opacity:.25}to{stroke-dashoffset:0;opacity:1}}

/* Вертикальные столбцы и стековые графики. */
.mk-chart-play-v15333 .chart-bar,
.mk-chart-play-v15333 .dashboard-lead-stack-v15212,
.mk-chart-play-v15333 .lead-stats-chart-stack-v15212,
.mk-chart-play-v15333 .finance-bar-segment-v1572,
.mk-chart-play-v15333.quote-mini-chart-v15281 > span,
.mk-chart-play-v15333 .quote-mini-chart-v15281 > span{
  transform-origin:50% 100%;
  animation:mkChartBarYV15333 560ms var(--mk-motion-ease-v15332) both;
}

/* Разные столбцы стартуют с небольшой лесенкой. */
.mk-chart-play-v15333 .chart-column:nth-child(2n) .chart-bar,
.mk-chart-play-v15333 .finance-bar-column-v1572:nth-child(2n) .finance-bar-segment-v1572,
.mk-chart-play-v15333 .lead-stats-chart-column-v15183:nth-child(2n) .lead-stats-chart-stack-v15212,
.mk-chart-play-v15333.quote-mini-chart-v15281 > span:nth-child(2n){animation-delay:35ms}
.mk-chart-play-v15333 .chart-column:nth-child(3n) .chart-bar,
.mk-chart-play-v15333 .finance-bar-column-v1572:nth-child(3n) .finance-bar-segment-v1572,
.mk-chart-play-v15333 .lead-stats-chart-column-v15183:nth-child(3n) .lead-stats-chart-stack-v15212,
.mk-chart-play-v15333.quote-mini-chart-v15281 > span:nth-child(3n){animation-delay:70ms}

/* Горизонтальные полосы сметы/сравнения. */
.mk-chart-play-v15333 .estimate-bar,
.mk-chart-play-v15333 .estimate-section-progress,
.mk-chart-play-v15333 .estimate-item-progress-bar{
  transform-origin:0 50%;
  animation:mkChartBarXV15333 620ms var(--mk-motion-ease-v15332) both;
}

/* Кольцевой график финансов. */
.finance-donut-v1572.mk-chart-play-v15333,
.mk-chart-play-v15333 .finance-donut-v1572{
  animation:mkChartDonutV15333 620ms var(--mk-motion-spring-v15332) both;
}

/* SVG-линии внутри реальных графических блоков (не иконки интерфейса). */
.mk-chart-play-v15333.users-flow-card .users-flow-branch-svg-v15104 path,
.mk-chart-play-v15333.users-flow-card .users-flow-branch-svg-v15104 line,
.mk-chart-play-v15333 .users-flow-branch-svg-v15104 path,
.mk-chart-play-v15333 .users-flow-branch-svg-v15104 line{
  stroke-dasharray:900;
  animation:mkChartStrokeV15333 700ms ease-out both;
}

.mk-chart-play-v15333 .chart-value,
.mk-chart-play-v15333 .finance-bar-value-v1572,
.mk-chart-play-v15333 .lead-stats-chart-total-v15187{
  animation:mkChartFadeV15333 320ms ease-out both;
}

/* На карточках/окнах больше нет hover-подъёма — только функциональные контролы реагируют на hover. */
@media (hover:hover) and (pointer:fine){
  .content-card:hover,.kpi-card:hover,.quote-stat-card-v15281:hover,.lead-card-v15144:hover,
  [class*="summary-card"]:hover,[class*="metric-card"]:hover,[class*="stat-card"]:hover{
    transform:none!important;
  }
}

@media (prefers-reduced-motion:reduce){
  .mk-chart-play-v15333 .chart-bar,
  .mk-chart-play-v15333 .dashboard-lead-stack-v15212,
  .mk-chart-play-v15333 .lead-stats-chart-stack-v15212,
  .mk-chart-play-v15333 .finance-bar-segment-v1572,
  .mk-chart-play-v15333 .estimate-bar,
  .mk-chart-play-v15333 .estimate-section-progress,
  .mk-chart-play-v15333 .estimate-item-progress-bar,
  .finance-donut-v1572.mk-chart-play-v15333,
  .mk-chart-play-v15333 .finance-donut-v1572,
  .mk-chart-play-v15333.quote-mini-chart-v15281 > span,
  .mk-chart-play-v15333 .quote-mini-chart-v15281 > span,
  .mk-chart-play-v15333 .users-flow-branch-svg-v15104 path,
  .mk-chart-play-v15333 .users-flow-branch-svg-v15104 line{
    animation:none!important;transform:none!important;opacity:1!important;stroke-dashoffset:0!important;
  }
}


/* =========================================================
   v1.5.334 — lead actions layering + progress/finance motion
   ========================================================= */

/* Лиды: меню действий всегда выше основного sidebar и не обрезается карточкой. */
.lead-application-v15155 {
    overflow: visible !important;
}
.lead-application-heading-v15155,
.lead-status-actions-v15169,
.lead-actions-menu-v15169,
.lead-actions-menu-v15169[open] {
    position: relative;
    z-index: 180 !important;
}
.lead-actions-popover-v15169 {
    z-index: 190 !important;
}
.lead-kanban-modal-v15168 {
    z-index: 5000 !important;
}
.lead-kanban-modal-side-v15169 {
    overflow: visible;
}
.lead-kanban-modal-rail-v15169 {
    z-index: 5002 !important;
}

/* Прогресс-бары: заполнение плавно доезжает до фактического значения. */
.mk-progress-fill-v15334 {
    transition: width 760ms cubic-bezier(.18,.82,.24,1) !important;
    will-change: width;
}
.mk-progress-fill-v15334.is-settled-v15334 {
    will-change: auto;
}

/* finance-journey-ring: мягкое появление + JS-прорисовка conic-gradient от 0 до значения. */
@keyframes mkFinanceRingInV15334 {
    from { opacity:.38; }
    to { opacity:1; }
}
.finance-journey-ring.mk-finance-ring-play-v15334 {
    animation: mkFinanceRingInV15334 760ms cubic-bezier(.18,.82,.24,1) both;
}

/* Суммы/проценты в финансах: плавный count-up без повторного подпрыгивания в конце. */
.mk-finance-number-v15334 {
    font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
    .mk-progress-fill-v15334,
    .finance-journey-ring.mk-finance-ring-play-v15334,
    .mk-finance-number-v15334 {
        animation:none !important;
        transition:none !important;
        transform:none !important;
        opacity:1 !important;
    }
}

/* =========================================================
   v1.5.335 — lead modal action rail stays inside workspace
   ========================================================= */
@media (min-width: 721px) {
    .lead-kanban-modal-side-v15169 {
        width: min(1236px, calc(100vw - var(--sidebar) - 12px));
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 8px;
        overflow: visible;
    }

    .lead-kanban-modal-rail-v15169 {
        position: relative;
        top: 14px;
        left: auto;
        align-self: start;
        justify-self: center;
        z-index: 5002 !important;
    }

    .lead-kanban-modal-side-v15169 .lead-kanban-modal-panel-v15168 {
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   v1.5.336 — payment modal viewport portal, mobile-safe drawer
   ========================================================= */
body > .installment-payment-modal-v1553 {
    position: fixed !important;
    inset: 0 !important;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 30000 !important;
    isolation: isolate;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
}
body > .installment-payment-modal-v1553 > .installment-payment-backdrop-v1553 {
    position: absolute;
    inset: 0;
}
body > .installment-payment-modal-v1553 .installment-payment-dialog-v1553 {
    box-sizing: border-box;
    min-width: 0;
    max-height: calc(100dvh - 36px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
@media (max-width: 760px) {
    body > .installment-payment-modal-v1553 {
        display: flex;
        align-items: flex-end;
        justify-content: stretch;
        padding: 0;
        overflow: hidden;
    }
    body > .installment-payment-modal-v1553 .installment-payment-dialog-v1553 {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        max-height: 90dvh;
        margin: 0;
        border-radius: 18px 18px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}


/* v1.5.337: lightweight asynchronous settings toggle feedback. */
.settings-autosave-toast-v15337 {
    position: fixed;
    right: max(18px, env(safe-area-inset-right, 0px));
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 2147483000;
    pointer-events: none;
    max-width: min(430px, calc(100vw - 36px));
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid var(--border, #2a3038);
    background: var(--surface, #171b20);
    color: var(--text, #e7ebf3);
    box-shadow: 0 12px 34px rgba(0,0,0,.2);
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .16s ease, transform .16s ease;
}
.settings-autosave-toast-v15337.is-visible { opacity: 1; transform: translateY(0); }
.settings-autosave-toast-v15337.is-error { border-color: #b95d68; }
form[data-settings-autosave].is-saving-v15337 .settings-toggle-v15219 { opacity: .65; }
@media (max-width: 760px) {
    .settings-autosave-toast-v15337 {
        right: 12px;
        left: 12px;
        bottom: max(14px, env(safe-area-inset-bottom, 0px));
        max-width: none;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .settings-autosave-toast-v15337 { transition: none; transform: none; }
}

/* v1.5.339 — плавные fade-анимации без пружинного подпрыгивания. */


/* v1.5.341: доля способов оплаты и прогресс погашения — разные показатели. */
.finance-method-portfolio-share-v15341 {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    min-width: 50px;
    text-align: right;
    color: var(--finance-method);
}
.finance-method-portfolio-share-v15341 b {
    font-size: 20px;
    font-weight: 750;
    line-height: 1.1;
}
.finance-method-portfolio-share-v15341 small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}
.finance-method-progress-summary-v15341 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 12px;
}
.finance-method-progress-summary-v15341 strong {
    color: var(--finance-method);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}
.finance-method-progress-summary-v15341 + .finance-method-progress-v1572 {
    margin-top: 6px;
}

/* v1.5.343 — вкладки вариантов одного КП / лида */
.quote-variant-tabs-v15343{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 20px;padding:12px;border:1px solid #2a3038;border-radius:14px;background:#171b20}
.quote-variant-title-v15343{font-size:12px;opacity:.7;margin-right:6px}
.quote-variant-link-v15343,.quote-variant-add-v15343{display:inline-flex;align-items:center;padding:8px 11px;border-radius:8px;border:1px solid #353c47;text-decoration:none;color:inherit;font-size:13px;white-space:nowrap}
.quote-variant-link-v15343.is-current{border-color:#aab4ff;color:#aab4ff;background:#aab4ff12}
.quote-variant-add-v15343{border-style:dashed;color:#aab4ff}
.quote-variant-list-name-v15343{font-weight:600;color:#aab4ff}
@media(max-width:650px){.quote-variant-tabs-v15343{gap:6px;padding:10px}.quote-variant-title-v15343{width:100%}.quote-variant-link-v15343,.quote-variant-add-v15343{font-size:12px}}

/* v1.5.346 — ссылки КП: компактная адаптивная панель статистики */
.quote-share-tools-v15346{display:grid;gap:14px}
.quote-share-tools-v15346 h2{margin-bottom:0}
.quote-share-hint-v15346{font-size:13px;color:var(--text-muted,#9ba2ad);margin:0;line-height:1.6}
.quote-share-create-v15346,.quote-share-new-v15346{display:flex;gap:10px;align-items:end;flex-wrap:wrap}
.quote-share-create-v15346 label{display:grid;gap:7px;flex:1;min-width:210px;font-size:13px}
.quote-share-tools-v15346 input{min-width:0;padding:10px 12px;border:1px solid var(--border,#343941);background:var(--input-bg,#181c22);color:inherit;border-radius:9px;font:inherit}
.quote-share-new-v15346{align-items:center;border:1px solid var(--border,#343941);padding:12px;border-radius:12px}
.quote-share-new-v15346 strong{width:100%;font-size:13px}
.quote-share-new-v15346 input{flex:1;min-width:140px}
.quote-share-error-v15346{color:#f09292}
.quote-share-list-v15346{display:grid;gap:8px}
.quote-share-item-v15346{display:flex;gap:10px;align-items:center;justify-content:space-between;border-top:1px solid var(--border,#343941);padding:10px 0}
.quote-share-item-v15346>div{display:grid;gap:5px;min-width:0}
.quote-share-item-v15346 small{font-size:12px;color:var(--text-muted,#9ba2ad)}
@media(max-width:640px){.quote-share-item-v15346{align-items:flex-start;flex-direction:column}.quote-share-create-v15346 button{width:100%}}

/* v1.5.350: variant duplication and comparison toggle */
.quote-variant-clone-form-v15350{display:inline-flex;align-items:center;margin:0}
.quote-variant-clone-form-v15350 button{cursor:pointer;font:inherit}
.quote-compare-control-v15350{align-self:end}
.quote-compare-check-v15350{display:flex;align-items:center;gap:9px;min-height:39px;font-size:13px}
.quote-compare-check-v15350 input{width:17px;height:17px;accent-color:#7c91ff;flex:0 0 auto}

.quote-variant-clone-form-v15350 button.quote-variant-add-v15343{background:transparent;appearance:none;color:#aab4ff}

/* v1.5.352 — independent comparison toggle and reference selector */
.quote-compare-settings-v15352{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:end;margin:12px 0 18px}
.quote-compare-settings-v15352>.field{min-width:0;margin:0}
@media(max-width:680px){.quote-compare-settings-v15352{grid-template-columns:minmax(0,1fr)}}

/* v1.5.353: comparison after build term, full-width row and existing CRM toggle */
.quote-compare-settings-v15353{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:end;margin-top:18px;padding-top:16px;border-top:1px solid var(--border,#2a3038)}
.quote-compare-heading-v15353{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:41px;font-size:13px;font-weight:600}
.quote-compare-select-v15353{min-width:0;margin:0}
.quote-compare-select-v15353 select:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:720px){.quote-compare-settings-v15353{grid-template-columns:minmax(0,1fr);gap:8px}.quote-compare-heading-v15353{min-height:36px}}
