/* TreeServiceBel WorkControl 1.0 — единые стили приложения */

.visually-hidden-file {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}

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

.camera-action {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(23, 50, 77, .12);
}

.camera-action:hover { background: var(--primary-2); }
.camera-action.is-ready { background: var(--success); }
.camera-action.is-ready::after {
    content: "✓";
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-left: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
}

.photo-source-panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: #f8fbfc;
}
.photo-source-heading { display: grid; gap: 3px; margin-bottom: 13px; }
.photo-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); }
.photo-or::before,.photo-or::after { content:""; height:1px; flex:1; background:var(--border); }
.photo-count { margin-top:10px; padding:10px 12px; border-radius:10px; background:#eef3f6; color:var(--muted); font-weight:700; }
.photo-count.ok { background:#e7f6ee; color:var(--success); }
.photo-count.error { background:#fbeaea; color:var(--danger); }

.assignment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.assignment-card { margin: 0; color: var(--text); }
.assignment-card:hover { text-decoration:none; border-color:#9fb3c1; transform:translateY(-1px); }
.assignment-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.assignment-date { font-size: 26px; font-weight: 850; line-height:1; }
.assignment-meta { display:flex; flex-wrap:wrap; gap:8px 14px; color:var(--muted); margin:12px 0; }
.assignment-status-planned { background:#fff1c7; color:#755000; }
.assignment-status-completed { background:#dff4e8; color:#176b43; }
.assignment-status-cancelled { background:#eceff1; color:#59636b; }

.tree-choice-list { display:grid; gap:10px; max-height:560px; overflow:auto; padding-right:4px; }
.tree-choice {
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:12px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:11px;
    background:#fafcfd;
}
.tree-choice input { width:21px; height:21px; }
.tree-choice.is-hidden { display:none; }
.tree-choice small { color:var(--muted); }

.crew-summary { display:flex; flex-wrap:wrap; gap:8px; }
.crew-chip { padding:7px 10px; border-radius:999px; background:#edf3f6; font-weight:700; }
.assignment-tree-card { display:grid; grid-template-columns:110px 1fr auto; gap:16px; align-items:center; padding:14px 0; border-bottom:1px solid var(--border); }
.assignment-tree-card:last-child { border-bottom:0; }
.assignment-tree-photo { width:110px; height:82px; object-fit:cover; border-radius:10px; background:#eef3f6; }
.assignment-tree-actions { display:grid; gap:8px; min-width:180px; }
.assignment-banner { border-left:5px solid var(--primary-2); }

@media (max-width: 900px) {
    .camera-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .assignment-grid { grid-template-columns:1fr; }
    .assignment-tree-card { grid-template-columns:90px 1fr; }
    .assignment-tree-photo { width:90px; height:72px; }
    .assignment-tree-actions { grid-column:1 / -1; grid-template-columns:1fr 1fr; }
}
@media (max-width: 480px) {
    .camera-actions { grid-template-columns:1fr; }
    .camera-action { min-height:54px; }
    .assignment-tree-card { grid-template-columns:1fr; }
    .assignment-tree-photo { width:100%; height:180px; }
    .assignment-tree-actions { grid-template-columns:1fr; }
}

.pending-text { color:#a35f00; font-weight:800; }
.task-status-assigned { background:#e9eff3; color:#334b5c; }
.task-status-in_progress { background:#e5eff8; color:#244e73; }
.task-status-reported_cut { background:#fff0c2; color:#885400; }
.task-status-completed { background:#dff4e8; color:#176b43; }
.task-status-skipped { background:#eceff1; color:#59636b; }
.assignment-editor-columns { grid-template-columns:minmax(300px,.75fr) minmax(0,1.5fr); }
.assignment-tree-picker { max-height:none; }
.tree-picker-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.tree-picker-head input { max-width:330px; }
.object-tree-section { border:1px solid var(--border); border-radius:14px; padding:14px; margin-bottom:14px; background:#fafcfd; }
.object-tree-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:10px; }
.object-tree-heading h3 { margin-bottom:4px; }
.object-tree-heading p { margin:0; }
.no-scroll-limit { max-height:none; overflow:visible; }
.tree-choice-photo { width:58px; height:46px; object-fit:cover; border-radius:8px; }
.object-tree-section .tree-choice { grid-template-columns:auto auto minmax(0,1fr) auto; background:#fff; }
.worker-object-card { padding-top:18px; }
.worker-object-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid var(--border); margin-bottom:4px; }
.worker-object-heading p { margin:4px 0 12px; }
.cut-report-form { display:grid; gap:8px; }
.cut-report-form input { padding:9px 10px; }
.report-cut-button { background:#8d5a00; }
.report-cut-button:hover { background:#a66b00; }
.inline-action-form { display:block; }
.pending-note { margin:8px 0 0; color:#8a5600; font-size:14px; font-weight:700; }
.pending-cut-alert { background:#fff6d9; border-color:#ebc86f; color:var(--text); display:flex; justify-content:space-between; align-items:center; gap:20px; }
.pending-cut-alert p { margin:4px 0; }
.pending-cut-actions { display:flex; flex-wrap:wrap; gap:8px; min-width:280px; justify-content:flex-end; }
.pending-cut-actions form { display:block; }
.confirm-cut-button { background:#176b43; }
.pending-row { background:#fffaf0; }
@media(max-width:950px){.assignment-editor-columns{grid-template-columns:1fr}.tree-picker-head{flex-direction:column}.tree-picker-head input{max-width:none}.pending-cut-alert{align-items:stretch;flex-direction:column}.pending-cut-actions{min-width:0;justify-content:flex-start}}
@media(max-width:600px){.object-tree-heading,.worker-object-heading{flex-direction:column}.object-tree-section .tree-choice{grid-template-columns:auto 1fr}.tree-choice-photo{grid-column:2}.object-tree-section .tree-choice .badge{grid-column:1/-1}.pending-cut-actions{display:grid}.pending-cut-actions .button{width:100%}}

/* TreeServiceBel WorkControl */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-copy {
    display: grid;
    line-height: 1;
}

.brand-copy strong {
    color: #fff;
    font-size: 17px;
    letter-spacing: .01em;
}

.brand-copy small {
    color: rgba(255,255,255,.72);
    font-size: 11px;
    margin-top: 4px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
}

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

.login-brand div {
    display: grid;
    line-height: 1;
}

.login-brand span {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
}

.login-brand strong {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background:
        radial-gradient(circle at 88% 18%, rgba(255,255,255,.16), transparent 26%),
        linear-gradient(135deg, #17324d 0%, #245579 100%);
    color: #fff;
    border: 0;
}

.dashboard-hero h1 {
    max-width: 780px;
    margin-bottom: 14px;
}

.dashboard-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 17px;
}

.dashboard-hero .button {
    background: #fff;
    color: var(--primary);
    min-width: 220px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: rgba(255,255,255,.7);
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    display: grid;
    gap: 9px;
    min-height: 126px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
}

.stat-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: #9fb4c2;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    font-size: 38px;
    line-height: 1;
}

.stat-warning {
    background: #fff8e5;
    border-color: #efd48b;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .8fr);
    gap: 20px;
    align-items: start;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin-bottom: 4px;
}

.section-heading p {
    margin: 0;
}

.dashboard-assignment-list,
.pending-dashboard-list {
    display: grid;
}

.dashboard-assignment {
    display: grid;
    grid-template-columns: 78px minmax(0,1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.dashboard-assignment:last-child {
    border-bottom: 0;
}

.dashboard-assignment:hover {
    text-decoration: none;
}

.dashboard-assignment h3 {
    margin: 0 0 4px;
}

.dashboard-assignment p,
.dashboard-assignment small {
    margin: 0;
    color: var(--muted);
}

.dashboard-date {
    display: grid;
    place-items: center;
    min-height: 62px;
    border-radius: 12px;
    background: #edf3f6;
}

.dashboard-date strong {
    font-size: 22px;
}

.dashboard-date span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.dashboard-progress {
    display: grid;
    min-width: 105px;
    text-align: right;
}

.dashboard-progress strong {
    font-size: 22px;
}

.dashboard-progress span {
    color: var(--muted);
    font-size: 12px;
}

.dashboard-progress em {
    margin-top: 5px;
    color: #8a5600;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.pending-dashboard-list a {
    display: grid;
    gap: 3px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.pending-dashboard-list a:last-child {
    border-bottom: 0;
}

.pending-dashboard-list a:hover {
    text-decoration: none;
}

.pending-dashboard-list span,
.pending-dashboard-list small {
    color: var(--muted);
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 20px;
}

.quick-actions a {
    padding: 12px;
    border-radius: 10px;
    background: #edf3f6;
    color: var(--text);
    font-weight: 750;
    text-align: center;
}

.quick-actions a:hover {
    text-decoration: none;
    background: #e3ebef;
}

.empty-state {
    padding: 30px 10px;
    text-align: center;
}

.record-row-link {
    color: var(--text);
}

.record-row-link:hover {
    text-decoration: none;
    background: #f8fafb;
}

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

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

@media (max-width: 860px) {
    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero .button {
        width: 100%;
    }

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

@media (max-width: 600px) {
    .topbar-inner {
        display: grid;
        gap: 12px;
    }

    .nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .nav a {
        white-space: nowrap;
    }

    .brand-copy strong {
        font-size: 16px;
    }

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

    .stat-card {
        min-height: 105px;
        padding: 16px;
    }

    .stat-card strong {
        font-size: 30px;
    }

    .dashboard-assignment {
        grid-template-columns: 62px 1fr;
    }

    .dashboard-progress {
        grid-column: 1 / -1;
        text-align: left;
    }

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

.assignment-object-picker{margin-bottom:20px}.object-assignment-list{display:grid;gap:12px;max-height:760px;overflow:auto;padding-right:4px}.object-assignment-choice{grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:14px;padding:16px;border:1px solid var(--border);border-radius:14px;background:#fff;cursor:pointer}.object-assignment-choice:hover{border-color:#9fb4c2;background:#f9fbfc}.object-assignment-choice>input{width:22px;height:22px;margin-top:2px}.object-assignment-copy{display:grid;gap:5px;font-weight:400}.object-assignment-copy strong{font-size:17px}.object-assignment-copy small{color:var(--muted)}.object-assignment-copy>span{color:var(--text);line-height:1.45}.object-task-status-reported_done{background:#fff1c7;color:#755000}.object-task-status-completed{background:#dff4e8;color:#176b43}.object-task-status-skipped{background:#eceff1;color:#59636b}.object-tree-section.disabled-by-object{opacity:.48}.object-tree-section.disabled-by-object::after{content:"Объект назначен целиком — отдельные деревья выбирать не требуется";display:block;margin-top:10px;color:var(--muted);font-size:13px;font-weight:700}.worker-whole-object-card{border-left:5px solid var(--primary-2)}.whole-object-description{padding:16px;border-radius:12px;background:#f2f6f8;margin:16px 0}.whole-object-description h3{margin-bottom:8px}.whole-object-description p{margin:0;white-space:normal}.whole-object-actions{display:grid;gap:12px}.pending-object-report{padding:14px;border:1px solid #efd48b;border-radius:12px;background:#fff8e5;margin:14px 0}.pending-object-report p{margin:5px 0 0}.object-confirmation-card{margin-top:20px}.object-confirmation-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;padding:16px 0;border-bottom:1px solid var(--border)}.object-confirmation-row:last-child{border-bottom:0}.object-confirmation-row p{margin:5px 0 0}.object-confirmation-actions{display:flex;gap:10px;flex-wrap:wrap}.object-confirmation-actions form{display:block}.assignment-task-summary{display:flex;flex-wrap:wrap;gap:8px 18px;padding:10px 0;color:var(--muted)}.object-description-card p:last-child{margin-bottom:0}
@media(max-width:760px){.object-assignment-choice{grid-template-columns:auto minmax(0,1fr)}.object-assignment-choice>.badge{grid-column:2;justify-self:start}.object-confirmation-row{grid-template-columns:1fr}.object-confirmation-actions{display:grid}.object-confirmation-actions button{width:100%}}

.object-photo-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.object-photo-item{margin:0;border:1px solid var(--border);border-radius:13px;overflow:hidden;background:#fff}
.object-photo-item>a{display:block}
.object-photo-item img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.object-photo-item figcaption{display:grid;gap:9px;padding:10px}
.object-photo-item figcaption small{color:var(--muted)}
.object-photo-item form{display:block}
.empty-object-photos{padding:24px;border:1px dashed #aebec8;border-radius:13px;background:#f8fbfc;text-align:center}
.empty-object-photos p{margin-bottom:0;color:var(--muted)}
.object-photo-upload-form{margin-top:20px;padding-top:20px;border-top:1px solid var(--border)}
.object-camera-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.object-camera-button,.object-gallery-button{position:relative;display:grid;place-items:center;min-height:94px;padding:14px;border:1px dashed #9fb4c2;border-radius:12px;background:#fff;color:var(--primary);text-align:center;cursor:pointer;overflow:hidden}
.object-camera-button:hover,.object-gallery-button:hover{border-color:var(--primary-2);background:#f2f7fa}
.object-camera-button.photo-ready{border-style:solid;border-color:#7ec39d;background:#e7f6ee;color:var(--success)}
.camera-button-title{font-weight:850}
.camera-button-status{margin-top:5px;font-size:12px;color:var(--muted)}
.hidden-photo-input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.object-gallery-button{min-height:58px;border-style:solid;font-weight:800}
.worker-object-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
.worker-object-gallery a{display:block;border-radius:11px;overflow:hidden;background:#edf3f6}
.worker-object-gallery img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.worker-no-object-photos{padding:12px;border-radius:10px;background:#f2f6f8}
.object-choice-cover{width:82px;height:68px;object-fit:cover;border-radius:10px;background:#edf3f6}
.object-assignment-choice{grid-template-columns:auto auto minmax(0,1fr) auto}
.object-list-card{overflow:hidden}
.object-list-cover{display:block;width:calc(100% + 48px);height:180px;margin:-24px -24px 18px;object-fit:cover}
.admin-object-title-cell{display:flex;gap:12px;min-width:300px}
.admin-object-title-cell img{width:76px;height:62px;flex:0 0 auto;object-fit:cover;border-radius:9px}
.admin-object-title-cell small{color:var(--muted)}
@media(max-width:900px){.object-camera-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.worker-object-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.object-photo-gallery{grid-template-columns:1fr 1fr}.object-camera-grid{grid-template-columns:1fr 1fr}.worker-object-gallery{grid-template-columns:1fr 1fr}.object-assignment-choice{grid-template-columns:auto minmax(0,1fr)}.object-choice-cover{grid-column:2;width:100%;height:140px}.object-assignment-choice>.badge{grid-column:2}}
@media(max-width:420px){.object-photo-gallery,.object-camera-grid,.worker-object-gallery{grid-template-columns:1fr}.object-camera-button{min-height:70px}}

.nav-user {
    display: grid;
    min-width: max-content;
    padding: 8px 10px;
    color: #fff;
    line-height: 1.1;
}

.nav-user small {
    margin-top: 4px;
    color: rgba(255,255,255,.65);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.user-access-row {
    align-items: center;
}

.user-main-info {
    display: grid;
    gap: 5px;
}

.user-rights-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 6px;
}

.user-rights-summary span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #edf3f6;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.position-hint {
    margin: -5px 0 15px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f2f6f8;
    color: var(--muted);
    font-size: 13px;
}

.access-editor {
    align-items: start;
}

.crew-access-switch {
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fbfc;
}

.crew-access-switch span {
    display: grid;
    gap: 4px;
}

.crew-access-switch small {
    color: var(--muted);
}

.permission-groups {
    display: grid;
    gap: 18px;
}

.permission-group {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f9fbfc;
}

.permission-group h3 {
    margin-bottom: 12px;
}

.permission-option {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 11px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.permission-option:last-child {
    border-bottom: 0;
}

.permission-option input {
    width: 21px;
    height: 21px;
    margin-top: 1px;
}

.permission-option span {
    display: grid;
    gap: 3px;
}

.permission-option small {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
}

.access-example-card ul {
    margin: 10px 0 18px;
    padding-left: 22px;
}

.access-example-card li {
    margin-bottom: 6px;
}

.restore-defaults-form {
    margin-top: 14px;
    text-align: center;
}

.check-card > span {
    display: grid;
    gap: 3px;
}

.check-card > span small {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 760px) {
    .nav-user {
        display: none;
    }

    .user-access-row {
        display: grid;
        gap: 14px;
    }

    .user-actions {
        justify-content: stretch;
    }

    .user-actions > * {
        flex: 1;
    }

    .user-actions .button {
        width: 100%;
    }
}

.pwa-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-left:auto}.pwa-tools .button{padding:8px 10px;font-size:12px}.pwa-connection{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border-radius:999px;background:rgba(255,255,255,.12);color:#fff;font-size:12px;font-weight:800}.pwa-connection:before{content:"";width:8px;height:8px;border-radius:50%;background:#72d49c}.pwa-connection.offline:before{background:#ffb65c}.pwa-queue-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ffca55;color:#17324d;font-size:11px;font-weight:900}.pwa-notification-button.enabled{background:#dff4e8;color:#176b43}.offline-save-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:20px}.offline-save-bar .is-saved{background:#dff4e8;color:#176b43}.yandex-route-button:before{content:"Я";display:inline-grid;place-items:center;width:22px;height:22px;margin-right:7px;border-radius:50%;background:#ffdf00;color:#111;font-weight:900}.pwa-toast-container,#pwa-toast-container{position:fixed;z-index:5000;right:18px;bottom:18px;display:grid;gap:9px;max-width:min(390px,calc(100vw - 36px))}.pwa-toast{padding:13px 15px;border-radius:12px;background:#17324d;color:#fff;box-shadow:0 16px 40px rgba(0,0,0,.24)}.pwa-toast-success{background:#176b43}.pwa-toast-error{background:#9a2d2d}.notification-list{display:grid}.notification-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;padding:16px 0;border-bottom:1px solid var(--border)}.notification-row.unread{padding-left:12px;border-left:4px solid var(--primary-2)}.notification-row p{margin:5px 0}.notification-row small{color:var(--muted)}.offline-page{background:#eef3f5}.offline-header-actions{display:flex;align-items:center;gap:9px}.offline-hero{display:flex;justify-content:space-between;align-items:center;gap:24px}.offline-queue-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}.offline-queue-row>div{display:grid;gap:4px}.offline-queue-row small{color:var(--muted)}.offline-card-actions,.offline-action-grid{display:flex;flex-wrap:wrap;gap:9px}.offline-modal{position:fixed;z-index:6000;inset:0}.offline-modal-backdrop{position:absolute;inset:0;background:rgba(13,29,42,.66)}.offline-modal-panel{position:absolute;top:0;right:0;width:min(840px,100%);height:100%;overflow:auto;padding:28px;background:#eef3f5;box-shadow:-20px 0 55px rgba(0,0,0,.3)}.offline-modal-close{position:sticky;top:0;z-index:2;float:right;width:42px;height:42px;border-radius:50%;font-size:28px;line-height:1}.offline-task-block,.offline-tree-block{margin-bottom:14px}.object-location-box{padding:14px;border-radius:12px;background:#f2f6f8;margin-bottom:14px}.location-controls{display:flex;gap:10px;flex-wrap:wrap}.location-coordinates{margin-top:8px;color:var(--muted);font-size:13px}
@media(max-width:1000px){.pwa-tools{width:100%;order:3;overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.pwa-tools>*{white-space:nowrap}}
@media(max-width:650px){.offline-hero{align-items:stretch;flex-direction:column}.offline-modal-panel{padding:18px}.offline-header-actions button{display:none}.notification-row{grid-template-columns:1fr}.offline-card-actions,.offline-action-grid{display:grid}.offline-card-actions .button,.offline-action-grid .button{width:100%}}

.stage-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stage-check-card{display:flex;gap:10px;align-items:center;padding:13px;border:1px solid var(--border);border-radius:12px;background:#fff;cursor:pointer}.stage-check-card input{width:20px;height:20px}.stage-check-card:has(input:checked){border-color:#4c87ad;background:#eef6fb}.object-workflow-overview{display:flex;justify-content:space-between;align-items:center;gap:24px;border-left:7px solid var(--workflow-color,#83909a)}.workflow-progress{min-width:210px;display:grid;gap:5px}.workflow-progress strong{font-size:28px}.progress-track{height:9px;border-radius:999px;background:#dfe7ec;overflow:hidden}.progress-track i{display:block;height:100%;background:var(--workflow-color,#3e7da3);border-radius:inherit}.workflow-badge{display:inline-flex;align-items:center;padding:7px 11px;border-radius:999px;background:var(--workflow-color,#71808a);color:#fff;font-size:12px;font-weight:850}.workflow-new{--workflow-color:#75838c}.workflow-not_started{--workflow-color:#7c8992}.workflow-planned{--workflow-color:#2878b5}.workflow-in_progress{--workflow-color:#d79600}.workflow-continuation{--workflow-color:#e46c21}.workflow-awaiting{--workflow-color:#7651b5}.workflow-attention{--workflow-color:#c83d3d}.workflow-completed{--workflow-color:#23834a}.workflow-cancelled{--workflow-color:#50575c}.stage-list{display:grid;gap:10px}.stage-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,auto) auto;gap:10px;align-items:center;padding:13px;border:1px solid var(--border);border-left:5px solid #87949c;border-radius:12px;background:#fff}.stage-row-main{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.stage-row-main small{width:100%;color:var(--muted)}.stage-status-not_started{border-left-color:#87949c}.stage-status-assigned{border-left-color:#2878b5}.stage-status-in_progress{border-left-color:#d79600}.stage-status-reported_done{border-left-color:#7651b5}.stage-status-completed{border-left-color:#23834a;background:#f2fbf5}.stage-status-needs_revisit{border-left-color:#c83d3d;background:#fff5f5}.stage-status-cancelled{opacity:.65}.stage-status-form{display:flex;gap:8px;align-items:end}.stage-status-form select{margin:0;min-width:210px}.add-stage-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end;margin-top:18px;padding-top:18px;border-top:1px solid var(--border)}.compact-stage-list .stage-row{grid-template-columns:minmax(0,1fr) auto}.object-workflow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.object-workflow-card{display:block;border-top:6px solid var(--workflow-color,#84919a);overflow:hidden}.object-workflow-cover{width:calc(100% + 48px);height:180px;margin:-24px -24px 18px;object-fit:cover}.object-workflow-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.object-workflow-card-head h2{margin-bottom:5px}.object-workflow-card-head p{margin:0;color:var(--muted)}.object-next-action{margin:15px 0;color:var(--workflow-color,#344b59)}.object-workflow-stats{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.object-workflow-stats span{padding:5px 8px;border-radius:999px;background:#edf3f6;color:var(--muted);font-size:12px}.object-heading-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.crew-notification-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,1fr);gap:20px;align-items:center;border-left:6px solid #d79b00}.crew-notification-card form{display:grid;gap:10px}.pending-stage-row{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--border)}.pending-stage-row>div:first-child{display:grid;gap:3px}.pending-stage-row small,.pending-stage-row span{color:var(--muted)}.pending-stage-actions{display:flex;gap:8px}.assignment-stage-picker .stage-object-picker-list{display:grid;gap:14px;max-height:760px;overflow:auto}.stage-object-choice{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#fff}.stage-object-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px;background:#f4f8fa}.stage-object-heading img{width:78px;height:66px;object-fit:cover;border-radius:10px}.stage-object-heading h3,.stage-object-heading p{margin:0}.stage-object-heading small{color:var(--muted)}.stage-task-choice-list{display:grid}.stage-task-choice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px 14px;border-top:1px solid var(--border);cursor:pointer}.stage-task-choice:has(input:checked){background:#eef7fc}.stage-task-choice input{width:21px;height:21px}.stage-task-choice span{display:grid;gap:3px}.stage-task-choice small{color:var(--muted)}.worker-stage-list{display:grid;gap:12px;margin-top:18px}.worker-stage-task,.offline-stage-task{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:15px;border:1px solid var(--border);border-left:6px solid #2878b5;border-radius:12px;background:#fff}.worker-stage-task h3,.offline-stage-task h3{margin:4px 0 8px}.stage-report-form{display:grid;gap:8px;min-width:280px}.stage-control-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.stage-control-grid a{display:flex;justify-content:space-between;gap:10px;padding:13px;border-radius:11px;background:#f1f6f8}.stage-control-grid strong{font-size:20px}.object-map-marker-wrap{background:transparent!important;border:0!important}.object-map-marker{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--object-color);color:#fff;border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.3);font-weight:900}.object-map-popup{display:grid;gap:8px}.object-map-popup>strong{font-size:16px}.object-map-popup ul{display:grid;gap:4px;margin:0;padding:0;list-style:none}.object-map-popup li{display:flex;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px solid #e7ecef}.object-map-popup li span{color:#66757e;font-size:12px}.map-popup-actions{display:flex;gap:8px;flex-wrap:wrap}.map-popup-actions a{display:inline-flex;padding:7px 9px;border-radius:8px;background:#e9f2f7;font-weight:800}.object-map-legend{flex-wrap:wrap}.object-dot{width:12px;height:12px;border-radius:3px;background:#7c8992}.object-dot.planned{background:#2878b5}.object-dot.in_progress{background:#d79600}.object-dot.continuation{background:#e46c21}.object-dot.awaiting{background:#7651b5}.object-dot.completed{background:#23834a}
@media(max-width:1000px){.object-workflow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stage-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stage-row{grid-template-columns:1fr}.stage-status-form{display:grid;grid-template-columns:1fr auto}.crew-notification-card{grid-template-columns:1fr}}
@media(max-width:650px){.stage-check-grid,.object-workflow-grid,.stage-control-grid{grid-template-columns:1fr}.object-workflow-overview{display:grid}.workflow-progress{min-width:0}.add-stage-form{grid-template-columns:1fr}.stage-object-heading{grid-template-columns:1fr}.stage-object-heading img{width:100%;height:150px}.stage-task-choice{grid-template-columns:auto minmax(0,1fr)}.stage-task-choice em{grid-column:2}.worker-stage-task,.offline-stage-task,.pending-stage-row{display:grid}.stage-report-form{min-width:0}.pending-stage-actions{display:grid;grid-template-columns:1fr 1fr}.pending-stage-actions button{width:100%}}

.topbar {
    position: sticky;
    top: 0;
}

.topbar-shell {
    width: min(1680px, calc(100% - 28px));
    margin-inline: auto;
    padding: 9px 0 10px;
}

.header-primary {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-primary-actions,
.header-account {
    min-width: 0;
    display: flex;
    align-items: center;
}

.header-primary-actions {
    gap: 12px;
}

.header-account {
    gap: 11px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,.16);
}

.header-account .nav-user {
    max-width: 260px;
    padding: 0;
    overflow: hidden;
}

.header-account .nav-user,
.header-account .nav-user small {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.header-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 9px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    opacity: .92;
}

.header-logout:hover {
    text-decoration: none;
    opacity: 1;
    background: rgba(255,255,255,.1);
}

.header-secondary {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 16px;
    align-items: center;
    margin-top: 7px;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,.13);
}

.header-secondary .nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
}

.header-secondary .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 8px;
    color: rgba(255,255,255,.88);
    line-height: 1.2;
    white-space: nowrap;
    opacity: 1;
}

.header-secondary .nav a:hover,
.header-secondary .nav a.is-active {
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,.12);
}

.header-secondary .nav a.is-active {
    box-shadow: inset 0 -2px 0 rgba(255,255,255,.8);
}

.header-secondary .pwa-tools {
    width: auto;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: visible;
}

.header-secondary .pwa-tools .button,
.header-secondary .pwa-connection {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
    white-space: nowrap;
}

.header-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 850;
}

.header-menu-icon,
.header-menu-icon::before,
.header-menu-icon::after {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.header-menu-icon {
    position: relative;
}

.header-menu-icon::before,
.header-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.header-menu-icon::before {
    top: -6px;
}

.header-menu-icon::after {
    top: 6px;
}

.topbar.menu-open .header-menu-icon {
    background: transparent;
}

.topbar.menu-open .header-menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.topbar.menu-open .header-menu-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 1380px) {
    .header-secondary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .header-secondary .pwa-tools {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
}

@media (max-width: 900px) {
    .topbar-shell {
        width: min(100% - 22px, 1680px);
    }

    .header-account .nav-user {
        max-width: 190px;
    }

    .header-secondary .nav {
        font-size: 13px;
    }

    .header-secondary .nav a {
        padding-inline: 8px;
    }
}

@media (max-width: 760px) {
    .topbar {
        position: sticky;
    }

    .topbar-shell {
        padding: 7px 0;
    }

    .header-primary {
        min-height: 50px;
        gap: 10px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .brand-copy strong {
        font-size: 15px;
    }

    .brand-copy small {
        font-size: 10px;
    }

    .header-account {
        display: none;
    }

    .header-menu-toggle {
        display: inline-flex;
    }

    .header-secondary {
        display: none;
        grid-template-columns: 1fr;
        margin-top: 7px;
        padding: 10px 0 4px;
        border-top: 1px solid rgba(255,255,255,.16);
    }

    .topbar.menu-open .header-secondary {
        display: grid;
    }

    .header-secondary .nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 6px;
        overflow: visible;
        padding: 0;
    }

    .header-secondary .nav a {
        min-width: 0;
        min-height: 42px;
        justify-content: center;
        padding: 9px 7px;
        border: 1px solid rgba(255,255,255,.12);
        background: rgba(255,255,255,.06);
        text-align: center;
        white-space: normal;
    }

    .header-secondary .pwa-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 6px;
        overflow: visible;
        padding: 0;
    }

    .header-secondary .pwa-tools > * {
        width: 100%;
        min-height: 40px;
        justify-content: center;
    }
}

@media (max-width: 430px) {
    .topbar-shell {
        width: min(100% - 16px, 1680px);
    }

    .brand-lockup {
        gap: 7px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .brand-copy small {
        display: none;
    }

    .header-menu-toggle {
        padding-inline: 10px;
    }

    .header-secondary .nav {
        grid-template-columns: 1fr 1fr;
    }
}

.header-primary-actions {
    flex-wrap: nowrap;
}

.header-connection {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(126, 214, 164, .2);
    border-radius: 999px;
    background: rgba(126, 214, 164, .14);
    color: #f5fff9;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.header-connection::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: #73d69d;
    box-shadow: 0 0 0 3px rgba(115, 214, 157, .12);
    vertical-align: 1px;
}

.header-connection.offline {
    border-color: rgba(255, 181, 181, .22);
    background: rgba(193, 73, 73, .18);
    color: #fff5f5;
}

.header-connection.offline::before {
    background: #ff9b9b;
    box-shadow: 0 0 0 3px rgba(255, 155, 155, .12);
}

.header-secondary .nav a.is-active {
    color: #17324d;
    background: #f4f7f9;
    box-shadow: none;
}

.header-secondary .nav a.is-active:hover {
    color: #17324d;
    background: #fff;
}

.registry-page-title {
    margin-bottom: 14px;
}

.registry-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow-x: auto;
    box-shadow: 0 8px 28px rgba(30, 58, 79, .06);
}

.registry-tabs a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 10px;
    color: var(--primary);
    font-weight: 850;
    white-space: nowrap;
}

.registry-tabs a:hover {
    text-decoration: none;
    background: #eef3f6;
}

.registry-tabs a.active {
    color: #fff;
    background: var(--primary);
}

.registry-section-heading {
    margin: 4px 0 12px;
}

.registry-create-card {
    margin-inline: auto;
}

@media (max-width: 760px) {
    .header-connection {
        min-height: 38px;
        padding-inline: 10px;
    }

    .registry-tabs {
        margin-inline: -2px;
        padding: 5px;
    }

    .registry-tabs a {
        min-height: 40px;
        padding-inline: 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header-primary-actions {
        gap: 7px;
    }

    .header-connection {
        padding-inline: 8px;
        font-size: 0;
    }

    .header-connection::before {
        margin-right: 0;
    }
}

/* Постоянная двухстрочная шапка на компьютере:
   первая строка — логотип, PWA-инструменты, профиль;
   вторая строка — навигация строго без переноса. */
@media (min-width: 761px) {
    .topbar-shell {
        display: grid;
        grid-template-columns: auto minmax(340px, 1fr) auto;
        grid-template-areas:
            "brand tools account"
            "nav nav nav";
        column-gap: 18px;
        row-gap: 7px;
        align-items: center;
    }

    .header-primary,
    .header-secondary {
        display: contents;
    }

    .header-primary .brand-lockup {
        grid-area: brand;
        align-self: center;
    }

    .header-primary-actions {
        grid-area: account;
        justify-self: end;
        align-self: center;
    }

    .header-secondary .pwa-tools {
        grid-area: tools;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 1px 0 2px;
        scrollbar-width: none;
    }

    .header-secondary .pwa-tools::-webkit-scrollbar {
        display: none;
    }

    .header-secondary .nav {
        grid-area: nav;
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        margin: 0;
        padding: 9px 0 0;
        border-top: 1px solid rgba(255,255,255,.13);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .header-secondary .nav::-webkit-scrollbar {
        display: none;
    }

    .header-secondary .nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .header-secondary {
        margin: 0;
        padding: 0;
        border: 0;
    }
}

@media (min-width: 761px) and (max-width: 1120px) {
    .topbar-shell {
        grid-template-columns: auto minmax(220px, 1fr) auto;
        column-gap: 10px;
    }

    .header-secondary .pwa-tools .button {
        padding-inline: 8px;
        font-size: 10px;
    }

    .header-account .nav-user {
        max-width: 160px;
    }
}



/* Добавление отдельного дерева из общего реестра */
.tree-object-selector {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 20px 0;
}

.tree-object-selector label {
    margin: 0;
}

.selected-tree-object {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f7fafb;
}

.selected-tree-object h3 {
    margin: 4px 0 6px;
}

.selected-tree-object p {
    margin: 0 0 6px;
    color: var(--muted);
}

@media (max-width: 650px) {
    .tree-object-selector {
        grid-template-columns: 1fr;
    }

    .tree-object-selector button {
        width: 100%;
    }
}


/* Частичное выполнение удаления деревьев */
.assigned-tree-stage {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fbfc;
}

.tree-stage-progress {
    min-width: 250px;
    padding: 12px;
    border-radius: 11px;
    background: #edf4f7;
}

.tree-stage-progress p {
    margin: 5px 0 0;
}

.bulk-tree-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.bulk-tree-check {
    display: grid;
    place-items: center;
    align-self: stretch;
    min-width: 74px;
    padding: 9px;
    border-right: 1px solid var(--border);
    background: #eef5f8;
    cursor: pointer;
}

.bulk-tree-check input {
    width: 21px;
    height: 21px;
    margin-bottom: 4px;
}

.bulk-tree-check span {
    font-size: 11px;
    font-weight: 800;
}

.assignment-tree-card:has(.bulk-tree-check input:checked) {
    outline: 2px solid #2c7eaa;
    background: #f1f9fd;
}

@media (max-width: 700px) {
    .bulk-tree-actions .button {
        width: 100%;
    }

    .bulk-tree-check {
        min-width: 58px;
    }
}

/* Цветовые статусы карты объектов и деревьев */
.map-status-legend {
    display: grid;
    gap: 14px;
    margin-top: 15px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f8fafb;
}

.map-legend-group {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.map-legend-group > strong {
    padding-top: 3px;
    color: var(--primary);
}

.map-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
}

.map-legend-items span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #344752;
    font-size: 13px;
    white-space: nowrap;
}

.map-legend-marker {
    display: inline-block;
    flex: 0 0 auto;
    background: var(--legend-color);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(32, 55, 69, .14);
}

.map-legend-object {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.map-legend-tree {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.map-popup-status {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 7px;
    margin: 3px 0 5px;
    padding: 5px 8px;
    border-radius: 999px;
    background: color-mix(
        in srgb,
        var(--marker-color) 13%,
        white
    );
    color: var(--marker-color);
    font-size: 12px;
    font-weight: 850;
}

.map-popup-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--marker-color);
}

.tree-map-popup {
    display: grid;
    gap: 7px;
    min-width: 230px;
}

.tree-map-popup > strong {
    font-size: 16px;
}

@media (max-width: 700px) {
    .map-legend-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .map-legend-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .map-legend-items span {
        white-space: normal;
    }
}

@media (max-width: 430px) {
    .map-legend-items {
        grid-template-columns: 1fr;
    }
}

/* Единая геометрия интерфейса на всех экранах */
:root {
    --control-height: 46px;
    --control-height-small: 40px;
    --control-height-large: 54px;
    --control-radius: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

button,
.button {
    min-height: var(--control-height);
    height: auto;
    padding: 10px 17px;
    border-radius: var(--control-radius);
    line-height: 1.2;
    text-align: center;
    vertical-align: middle;
}

.button-small,
button.button-small {
    min-height: var(--control-height-small);
    padding: 8px 12px;
    font-size: 13px;
}

.button-large,
button.button-large {
    min-height: var(--control-height-large);
    padding: 13px 21px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select {
    min-height: var(--control-height);
    height: var(--control-height);
    padding-block: 9px;
    line-height: 1.2;
}

textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.45;
}

form,
label,
.card,
.page-title > *,
.section-heading > * {
    min-width: 0;
}

label {
    align-content: start;
}

.filters,
.filters.compact,
.map-filters,
.inline-form,
.add-stage-form,
.tree-object-selector,
.stage-status-form {
    align-items: end;
}

.filters > button,
.filters > .button,
.filters.compact > button,
.filters.compact > .button,
.map-filters > button,
.map-filters > .button,
.inline-form > button,
.inline-form > .button,
.add-stage-form > button,
.add-stage-form > .button,
.tree-object-selector > button,
.tree-object-selector > .button {
    min-height: var(--control-height);
    align-self: end;
}

:is(
    .object-heading-actions,
    .map-toolbar-actions,
    .user-actions,
    .pending-stage-actions,
    .pending-cut-actions,
    .object-confirmation-actions,
    .map-popup-actions,
    .offline-card-actions,
    .offline-action-grid,
    .header-primary-actions,
    .header-account,
    .quick-actions,
    .bulk-tree-actions
) {
    align-items: center;
}

:is(
    .object-heading-actions,
    .map-toolbar-actions,
    .user-actions,
    .pending-stage-actions,
    .pending-cut-actions,
    .object-confirmation-actions,
    .map-popup-actions,
    .offline-card-actions,
    .offline-action-grid,
    .bulk-tree-actions
) > form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

:is(
    .object-heading-actions,
    .map-toolbar-actions,
    .user-actions,
    .pending-stage-actions,
    .pending-cut-actions,
    .object-confirmation-actions,
    .offline-card-actions,
    .offline-action-grid
) > :is(button,.button),
:is(
    .object-heading-actions,
    .map-toolbar-actions,
    .user-actions,
    .pending-stage-actions,
    .pending-cut-actions,
    .object-confirmation-actions,
    .offline-card-actions,
    .offline-action-grid
) > form > :is(button,.button) {
    align-self: stretch;
}

.stage-status-form {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto;
    gap: 8px;
}

.stage-status-form select,
.stage-status-form button {
    min-height: var(--control-height-small);
    height: var(--control-height-small);
    margin: 0;
}

.assignment-tree-actions,
.stage-report-form,
.cut-report-form {
    align-content: start;
}

.assignment-tree-actions :is(button,.button),
.stage-report-form :is(button,.button),
.cut-report-form :is(button,.button),
.assignment-tree-actions input,
.stage-report-form input,
.cut-report-form input {
    min-height: var(--control-height-small);
}

.record-row :is(button,.button),
table :is(button,.button) {
    min-height: var(--control-height-small);
}

.quick-actions a {
    min-height: var(--control-height);
    display: flex;
    align-items: center;
}

.card > :last-child {
    margin-bottom: 0;
}

.danger-zone-card {
    margin-top: 18px;
    border: 1px solid #e2aaaa;
    border-top: 6px solid #a52c2c;
    background: #fff8f8;
}

.danger-zone-card .eyebrow,
.danger-zone-card h2 {
    color: #842323;
}

.danger-zone-card p {
    color: #674a4a;
}

.danger-zone-card strong {
    overflow-wrap: anywhere;
}

.danger-zone-card button:disabled {
    background: #bdaaaa;
    cursor: not-allowed;
    opacity: .72;
}

@media (max-width: 860px) {
    .page-title,
    .section-heading {
        align-items: stretch;
    }

    .object-heading-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .object-heading-actions > :is(button,.button),
    .object-heading-actions > form,
    .object-heading-actions > form > :is(button,.button) {
        width: 100%;
    }

    .map-toolbar-actions,
    .pending-stage-actions,
    .pending-cut-actions,
    .object-confirmation-actions,
    .user-actions {
        align-items: stretch;
    }
}

@media (max-width: 600px) {
    button,
    .button {
        width: 100%;
    }

    .header-menu-toggle,
    .header-logout,
    .header-secondary .nav a,
    .header-secondary .pwa-tools > *,
    .map-popup-actions a,
    .registry-tabs a,
    .workflow-badge,
    .badge {
        width: auto;
    }

    .object-heading-actions,
    .map-toolbar-actions,
    .user-actions,
    .pending-stage-actions,
    .pending-cut-actions,
    .object-confirmation-actions,
    .offline-card-actions,
    .offline-action-grid,
    .quick-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }

    .object-heading-actions > *,
    .map-toolbar-actions > *,
    .user-actions > *,
    .pending-stage-actions > *,
    .pending-cut-actions > *,
    .object-confirmation-actions > *,
    .offline-card-actions > *,
    .offline-action-grid > *,
    .quick-actions > * {
        width: 100%;
    }

    .stage-status-form {
        grid-template-columns: 1fr;
    }

    .stage-status-form select,
    .stage-status-form button {
        width: 100%;
        height: var(--control-height);
        min-height: var(--control-height);
    }
}

/* Исправление правой колонки карточки объекта */
.object-admin-sidebar {
    display: grid;
    gap: 20px;
    align-content: start;
    min-width: 0;
}

.object-admin-sidebar > .card {
    width: 100%;
    margin: 0;
}

.object-admin-sidebar .sticky-card {
    position: static;
    top: auto;
    z-index: auto;
}

.object-admin-sidebar .danger-zone-card {
    position: relative;
    z-index: 1;
    margin-top: 0;
    clear: both;
}

.object-admin-sidebar form {
    position: static;
}

.object-admin-sidebar form > button:last-child {
    margin-top: 4px;
}

@media (min-width: 901px) {
    .object-admin-sidebar {
        align-self: start;
    }
}

@media (max-width: 900px) {
    .object-admin-sidebar {
        width: 100%;
    }
}



/* Гарантированно видимая легенда карты */
.map-status-legend {
    overflow: visible;
}

.map-legend-items > span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #dbe4e9;
    border-radius: 999px;
    background: #fff;
}

.map-legend-swatch {
    flex: 0 0 16px !important;
}

/* Корзина объектов и фотофиксаций */
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    height: 25px;
    margin-left: 7px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    font-size: 12px;
    font-weight: 900;
}

.registry-tabs a:not(.active) .tab-count {
    background: #e9eff3;
}

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

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

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

    .trash-actions form,
    .trash-actions button {
        width: 100%;
    }
}


/* Корзина дневных заданий */
.assignment-trash-form {
    display: flex;
    align-items: center;
    margin: 0;
}

.assignment-trash-form .button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .assignment-trash-form,
    .assignment-trash-form .button {
        width: 100%;
    }
}


/* ==========================================================
   Компактная навигация и меню настроек
   ========================================================== */
@media (min-width: 761px) {
    .topbar-shell {
        grid-template-columns: auto minmax(0,1fr);
        grid-template-areas:
            "brand account"
            "nav nav";
    }

    .header-primary-actions {
        justify-self: end;
    }
}

.header-settings-menu,
.nav-dropdown {
    position: relative;
}

.header-settings-toggle,
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.header-settings-toggle:hover,
.header-settings-toggle[aria-expanded="true"] {
    background: #f4f7f9;
    color: #17324d;
}

.header-settings-panel {
    position: absolute;
    z-index: 3000;
    top: calc(100% + 10px);
    right: 0;
    width: min(350px, calc(100vw - 24px));
    padding: 17px;
    border: 1px solid #d7e0e5;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 18px 50px rgba(10,32,48,.28);
}

.header-settings-panel[hidden],
.nav-dropdown-menu[hidden] {
    display: none !important;
}

.header-settings-panel > strong {
    display: block;
    font-size: 17px;
}

.header-settings-panel > p {
    margin: 5px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.settings-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.settings-tools > * {
    width: 100%;
    min-height: 42px;
    justify-content: center;
}

.nav-dropdown-toggle {
    min-height: 36px;
    padding: 7px 10px;
    border-color: transparent;
    background: transparent;
    color: rgba(255,255,255,.88);
    font-size: 14px;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown.is-active .nav-dropdown-toggle {
    background: #f4f7f9;
    color: #17324d;
}

.nav-dropdown-menu {
    position: absolute;
    z-index: 2500;
    top: calc(100% + 7px);
    left: 0;
    min-width: 210px;
    padding: 7px;
    border: 1px solid #d7e0e5;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(10,32,48,.25);
}

.header-secondary .nav .nav-dropdown-menu a {
    width: 100%;
    min-height: 39px;
    color: var(--text);
    background: transparent;
}

.header-secondary .nav .nav-dropdown-menu a:hover,
.header-secondary .nav .nav-dropdown-menu a.is-active {
    color: #17324d;
    background: #eaf1f5;
    box-shadow: none;
}

.header-connection,
#pwa-connection-status {
    display: none !important;
}

/* ==========================================================
   Строчный список объектов
   ========================================================== */
.object-list {
    display: grid;
    gap: 7px;
}

.object-list-header,
.object-list-row {
    display: grid;
    grid-template-columns:
        minmax(300px,1.7fr)
        minmax(210px,1.1fr)
        minmax(145px,.7fr)
        90px
        75px
        34px;
    gap: 14px;
    align-items: center;
}

.object-list-header {
    padding: 0 16px 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.object-list-row {
    min-height: 84px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-left: 6px solid var(--workflow-color,#7b8992);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 7px 24px rgba(30,58,79,.05);
}

.object-list-row:hover {
    text-decoration: none;
    border-color: #a8bac5;
    transform: translateY(-1px);
}

.object-list-main {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.object-list-main img,
.object-list-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 10px;
}

.object-list-main img {
    object-fit: cover;
}

.object-list-placeholder {
    display: grid;
    place-items: center;
    background: #eaf1f5;
    color: var(--primary);
    font-size: 23px;
    font-weight: 900;
}

.object-list-main > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.object-list-main strong {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.object-list-main span,
.object-list-main small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.object-list-status {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.object-list-status small {
    color: var(--muted);
    line-height: 1.25;
}

.object-list-progress {
    display: grid;
    gap: 7px;
}

.object-list-progress .progress-track {
    width: 100%;
}

.object-list-metric {
    display: grid;
    justify-items: center;
    gap: 2px;
}

.object-list-metric strong {
    font-size: 20px;
}

.object-list-metric span {
    color: var(--muted);
    font-size: 11px;
}

.object-list-arrow {
    color: var(--primary-2);
    font-size: 25px;
    font-weight: 900;
}

.object-list-empty {
    margin: 0;
}

/* ==========================================================
   Прочитанные и непрочитанные уведомления
   ========================================================== */
.notification-list {
    display: grid;
    gap: 10px;
}

.notification-row {
    display: grid;
    grid-template-columns: 92px minmax(0,1fr) auto;
    gap: 15px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(30,58,79,.05);
}

.notification-row.is-unread {
    border-color: #9cc8e4;
    border-left: 6px solid #2f83b7;
    background: #edf7fd;
}

.notification-row.is-read {
    background: #f3f5f6;
    color: #62717a;
    box-shadow: none;
}

.notification-row.is-read .notification-content {
    opacity: .72;
}

.notification-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.notification-state-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8b969d;
}

.is-unread .notification-state {
    color: #17658f;
}

.is-unread .notification-state-dot {
    background: #2f83b7;
    box-shadow: 0 0 0 4px rgba(47,131,183,.14);
}

.notification-content p {
    margin: 5px 0;
}

.notification-content small {
    color: var(--muted);
}

/* ==========================================================
   Выбор спиленных деревьев
   ========================================================== */
.assignment-tree-main {
    min-width: 0;
}

.assignment-tree-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.assignment-tree-title-row h3 {
    margin: 0;
}

.bulk-tree-check {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 7px;
    min-width: 0;
    padding: 6px 9px;
    border: 1px solid #b9d3e2;
    border-radius: 999px;
    background: #eef7fb;
    cursor: pointer;
}

.bulk-tree-check input {
    width: 21px;
    height: 21px;
    margin: 0;
}

.bulk-tree-check span {
    font-size: 11px;
    font-weight: 850;
}

/* Подпись дерева на карте */
.tree-map-label {
    padding: 4px 7px !important;
    border: 1px solid rgba(23,50,77,.22) !important;
    border-radius: 7px !important;
    background: rgba(255,255,255,.94) !important;
    color: #17324d !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    box-shadow: 0 5px 14px rgba(20,40,55,.18) !important;
}

.tree-map-label::before {
    display: none !important;
}

@media (max-width: 1050px) {
    .object-list-header {
        display: none;
    }

    .object-list-row {
        grid-template-columns: minmax(0,1fr) auto;
        gap: 11px;
    }

    .object-list-main {
        grid-column: 1 / -1;
    }

    .object-list-status {
        grid-column: 1;
    }

    .object-list-progress {
        grid-column: 2;
        min-width: 130px;
    }

    .object-list-metric {
        display: inline-flex;
        justify-items: initial;
        gap: 5px;
    }

    .object-list-arrow {
        justify-self: end;
    }
}

@media (max-width: 760px) {
    .header-primary-actions {
        gap: 7px;
    }

    .header-settings-panel {
        position: fixed;
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .header-settings-toggle {
        min-height: 40px;
        padding-inline: 10px;
    }

    .header-settings-toggle > span:last-child {
        display: none;
    }

    .header-secondary .nav {
        align-items: stretch;
    }

    .nav-dropdown {
        display: grid;
        grid-column: 1 / -1;
    }

    .nav-dropdown-toggle {
        width: 100%;
        min-height: 42px;
        border: 1px solid rgba(255,255,255,.12);
        background: rgba(255,255,255,.06);
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 6px;
        box-shadow: none;
    }

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

    .notification-state {
        justify-self: start;
    }

    .notification-action,
    .notification-action .button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .settings-tools {
        grid-template-columns: 1fr;
    }

    .object-list-row {
        grid-template-columns: 1fr 1fr;
        padding: 12px;
    }

    .object-list-main {
        grid-template-columns: 48px minmax(0,1fr);
    }

    .object-list-main img,
    .object-list-placeholder {
        width: 48px;
        height: 48px;
    }

    .object-list-status,
    .object-list-progress {
        grid-column: 1 / -1;
    }

    .object-list-metric {
        justify-self: start;
    }

    .object-list-arrow {
        align-self: center;
    }

    .assignment-tree-title-row {
        align-items: center;
    }

    .bulk-tree-check {
        flex: 0 0 auto;
    }
}


/* ==========================================================
   TREE SERVICE BEL — фирменная цветовая схема (ярче, светлее)
   Основа: яркий жёлтый + салатовый, минимум тёмного зелёного
   ========================================================== */
:root {
    --primary: #6fae35;
    --primary-2: #8bcf46;
    --accent: #ffd534;
    --accent-2: #c8f05d;
    --accent-3: #eefac9;
    --surface-green: #f4fee1;
    --surface-yellow: #fff9d9;
    --surface-brand: #fbfff1;
    --text: #20321f;
    --muted: #64705f;
    --border: #dce9b8;
    --danger: #b93f3f;
    --danger-bg: #fff0ee;
    --success: #2f7e48;
    --success-bg: #e8f6e7;
    --warning: #a86a00;
    --warning-bg: #fff4d5;
    --info: #2a6d85;
    --info-bg: #edf8ff;

    --workflow-unassigned: #8f8f79;
    --workflow-planned: #d89a00;
    --workflow-progress: #4a8e43;
    --workflow-pending: #8b7a00;
    --workflow-attention: #a84a3b;
    --workflow-complete: #2c7d45;
    --workflow-cancelled: #6d7480;
}

body {
    background:
        linear-gradient(180deg, rgba(247,255,232,0.95), rgba(255,254,244,0.98)),
        #f9fbf2;
    color: var(--text);
}

a { color: #4d8a1d; }
a:hover { color: #376d13; }

.page-title h1,
.hero h1,
h1, h2, h3 { color: #20321f; }

.topbar {
    background:
        linear-gradient(135deg, #74ba35 0%, #9ad63f 48%, #d4ec5e 100%);
    border-bottom: 1px solid rgba(255,255,255,.3);
}

.brand-copy strong,
.brand-copy small,
.topbar .nav a,
.header-account .nav-user,
.header-account .nav-user small,
.header-logout { color: #fff; }

.topbar .nav a:hover,
.topbar .nav a.is-active {
    background: rgba(255,255,255,.92);
    color: #3a6f16;
    box-shadow: inset 0 0 0 1px rgba(255,213,52,.55);
}

.nav-dropdown-toggle { color: rgba(255,255,255,.96); }

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown.is-active .nav-dropdown-toggle {
    background: rgba(255,255,255,.92);
    color: #3a6f16;
}

.header-settings-toggle {
    border-color: rgba(255,255,255,.25);
    background: rgba(255,255,255,.14);
    color: #fff;
}

.header-settings-toggle:hover,
.header-settings-toggle[aria-expanded="true"],
.header-settings-menu.open .header-settings-toggle {
    background: #ffffff;
    color: #4a881c;
    border-color: rgba(255,213,52,.75);
}

.header-settings-panel {
    border-color: #d9e6ba;
    background: #fbfff3;
}

.header-menu-toggle {
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.10);
    color: #fff;
}

.header-menu-toggle:hover {
    background: #ffffff;
    color: #4a881c;
}

.header-logout {
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.10);
}

.header-logout:hover {
    background: #ffffff;
    color: #4a881c;
}

.card,
.panel,
.notification-row,
.object-list-row,
.object-grid-card,
.section,
.form-section {
    border-color: var(--border);
    background: #ffffff;
    box-shadow: 0 9px 24px rgba(110, 148, 38, 0.08);
}

.hero,
.dashboard-hero,
.banner-panel {
    background:
        linear-gradient(135deg, #a7dc46 0%, #d9f06d 48%, #ffe15f 100%);
    color: #234019;
}

.hero h1,
.dashboard-hero h1,
.banner-panel h1,
.hero p,
.dashboard-hero p,
.banner-panel p {
    color: #234019;
}

.hero .button,
.dashboard-hero .button,
.banner-panel .button {
    background: linear-gradient(180deg, #4f9320 0%, #3f7c16 100%);
    color: #fff;
    border-color: rgba(55,109,19,.45);
}

.hero .button:hover,
.dashboard-hero .button:hover,
.banner-panel .button:hover {
    background: linear-gradient(180deg, #5ea82a 0%, #4b8b1b 100%);
    color: #fff;
}

.button,
button,
input[type="submit"],
input[type="button"] { border-radius: 12px; }

.button-primary,
.button:not(.button-light):not(.button-secondary):not(.button-danger):not(.button-outline):not(.header-settings-toggle):not(.nav-dropdown-toggle):not(.header-menu-toggle) {
    background: linear-gradient(180deg, #ffd534 0%, #f2c400 100%);
    color: #284018;
    border: 1px solid #deb000;
    font-weight: 850;
}

.button-primary:hover,
.button:not(.button-light):not(.button-secondary):not(.button-danger):not(.button-outline):not(.header-settings-toggle):not(.nav-dropdown-toggle):not(.header-menu-toggle):hover {
    background: linear-gradient(180deg, #ffe062 0%, #ffd126 100%);
    color: #1f3212;
}

.button-light,
.button-secondary {
    background: #eef8d9;
    color: #3a6f16;
    border: 1px solid #c5dca7;
}

.button-light:hover,
.button-secondary:hover {
    background: #e2f0c2;
    color: #315f12;
}

.button-outline {
    background: #fff;
    color: #4a881c;
    border: 1px solid #9ecc61;
}

.button-outline:hover { background: #f8fce9; }

.button-danger,
button.button-danger,
a.button-danger {
    background: linear-gradient(180deg, #c94c49 0%, #aa3737 100%);
    color: #fff;
    border: 1px solid #962d2d;
}

.button-danger:hover,
button.button-danger:hover,
a.button-danger:hover {
    background: linear-gradient(180deg, #d95c58 0%, #b94040 100%);
}

.button-success {
    background: linear-gradient(180deg, #74b34a 0%, #5c9838 100%);
    color: #fff;
    border: 1px solid #4b7b2f;
}

.button-success:hover { background: linear-gradient(180deg, #84c35a 0%, #69a942 100%); }

input, select, textarea {
    border: 1px solid #c8d9b2;
    background: #fff;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    border-color: #8fbc47;
    box-shadow: 0 0 0 4px rgba(191,227,106,.28);
    outline: none;
}

.badge, .status-badge { border-radius: 999px; font-weight: 850; }
.badge-success, .status-success, .tree-status-cut, .task-status-done { background: #e4f5df; color: #286d3d; }
.badge-warning, .status-warning, .task-status-planned { background: #fff1c5; color: #8b6000; }
.badge-info, .status-info { background: #e6f8e7; color: #3a7f40; }
.badge-muted, .status-muted, .task-status-cancelled { background: #eef2eb; color: #647262; }
.badge-danger, .status-danger, .task-status-problem { background: #fde7e3; color: #a23930; }

.progress-track { background: #edf3de; }
.progress-track > i { background: linear-gradient(90deg, #7fb149 0%, #f3c825 100%); }

.workflow-badge.workflow-unassigned { background: #f1f1e6; color: #6b6b56; }
.workflow-badge.workflow-planned { background: #fff0be; color: #8b6100; }
.workflow-badge.workflow-progress { background: #e3f4df; color: #2e7442; }
.workflow-badge.workflow-pending { background: #fff4c8; color: #876b00; }
.workflow-badge.workflow-attention { background: #fde6e1; color: #a63b34; }
.workflow-badge.workflow-complete { background: #dbefdc; color: #2b7240; }
.workflow-badge.workflow-cancelled { background: #eff2ef; color: #657067; }

.object-list-row { border-left-color: var(--workflow-color, #9ad63f); }
.object-list-placeholder {
    background: linear-gradient(135deg, #e8f7b9 0%, #fff1a4 100%);
    color: #4a881c;
}
.object-list-arrow { color: #6fae35; }

.notification-row.is-unread {
    border-color: #cbe198;
    border-left-color: #7fa93e;
    background: linear-gradient(180deg, #f8ffea 0%, #f2fadf 100%);
}
.notification-row.is-read { background: #f4f6f1; }
.notification-state-dot { background: #8ca076; }
.is-unread .notification-state { color: #456f2f; }
.is-unread .notification-state-dot { background: #7ea342; box-shadow: 0 0 0 4px rgba(126,163,66,.14); }

.table thead th, table thead th {
    background: #f6fbe9;
    color: #426a19;
    border-bottom: 1px solid #dce8c9;
}
.table tbody tr:nth-child(even), table tbody tr:nth-child(even) { background: #fcfef8; }
.table tbody tr:hover, table tbody tr:hover { background: #f4f9ea; }

.tabs, .subtabs, .tab-bar { background: #fbfff4; border-color: var(--border); }
.tabs .is-active, .subtabs .is-active, .tab-bar .is-active { background: #7ab938; color: #fff; }

.muted { color: var(--muted); }
.flash-success, .alert-success { background: #edf9e8; border-color: #bfe0b2; color: #2b6c3e; }
.flash-error, .alert-error { background: #fff0ed; border-color: #f0b8ae; color: #a33b34; }
.flash-warning, .alert-warning { background: #fff8dd; border-color: #efd690; color: #8b6500; }
.flash-info, .alert-info { background: #f2fbef; border-color: #cce5ae; color: #3d6f31; }

.stats-card, .metric-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfff4 100%);
    border-color: #d9e6c5;
}
.stats-card strong, .metric-card strong { color: #3c6718; }

.tree-map-label {
    border-color: rgba(95,143,58,.32) !important;
    background: rgba(255,253,240,.96) !important;
    color: #244730 !important;
}
.leaflet-popup-content-wrapper { border: 1px solid #d8e5c0; box-shadow: 0 12px 32px rgba(66,90,38,.18); }
.leaflet-popup-content strong { color: #244730; }
.leaflet-control-zoom a { color: #244730 !important; }
.assignment-tree-title-row .bulk-tree-check { background: #f4fbe3; border-color: #bfd99e; }
.assignment-tree-title-row .bulk-tree-check input { accent-color: #5f8f3a; }

.header-settings-menu.open .header-settings-panel,
.nav-dropdown.open .nav-dropdown-menu {
    display: block !important;
}

@media (min-width: 761px) {
    .header-settings-menu:hover .header-settings-panel,
    .nav-dropdown:hover .nav-dropdown-menu {
        display: block;
    }
}

@media (max-width: 760px) {
    .topbar {
        background: linear-gradient(135deg, #7abd37 0%, #9ed945 52%, #d8ef64 100%);
    }
}

/* ==========================================================
   Компактная светлая шапка с нативными раскрывающимися меню
   ========================================================== */
.topbar {
    background: linear-gradient(135deg, #8bcf38 0%, #a8dc45 55%, #d9ef61 100%) !important;
    color: #20321f !important;
}

.brand-copy strong,
.brand-copy small,
.topbar .nav > a,
.header-account .nav-user,
.header-account .nav-user small,
.header-logout,
.header-settings-toggle,
.nav-dropdown-toggle {
    color: #20321f !important;
}

.header-primary {
    min-height: 58px;
}

.brand-logo {
    width: 48px;
    height: 48px;
}

.brand-copy strong {
    font-size: 19px;
}

.brand-copy small {
    font-size: 11px;
}

.header-primary-actions {
    gap: 10px;
}

.header-settings-menu,
.nav-dropdown {
    position: relative;
    margin: 0;
}

.header-settings-menu > summary,
.nav-dropdown > summary {
    list-style: none;
}

.header-settings-menu > summary::-webkit-details-marker,
.nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.header-settings-toggle,
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px !important;
    height: 34px !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(32,50,31,.22) !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.42) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.header-settings-menu[open] > .header-settings-toggle,
.nav-dropdown[open] > .nav-dropdown-toggle,
.header-settings-toggle:hover,
.nav-dropdown-toggle:hover,
.nav-dropdown.is-active > .nav-dropdown-toggle {
    background: #ffffff !important;
    color: #315f16 !important;
    border-color: #bfd261 !important;
}

.nav-dropdown-arrow {
    display: inline-block;
    transition: transform .18s ease;
}

.nav-dropdown[open] .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.header-settings-panel,
.nav-dropdown-menu {
    display: none;
}

.header-settings-menu[open] > .header-settings-panel,
.nav-dropdown[open] > .nav-dropdown-menu {
    display: block !important;
}

.header-settings-panel {
    position: absolute;
    z-index: 5000;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 24px));
    padding: 14px;
    border: 1px solid #d6e49d;
    border-radius: 13px;
    background: #fbfff3;
    color: #20321f;
    box-shadow: 0 18px 42px rgba(43,67,24,.24);
}

.header-settings-panel > strong {
    font-size: 16px;
}

.header-settings-panel > p {
    margin: 4px 0 11px;
    font-size: 12px;
    line-height: 1.4;
}

.settings-tools {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.settings-tools > .button,
.settings-tools > button,
.settings-tools > a {
    min-height: 36px !important;
    height: auto !important;
    padding: 7px 8px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.nav-dropdown-menu {
    position: absolute;
    z-index: 4500;
    top: calc(100% + 7px);
    left: 0;
    min-width: 190px;
    padding: 6px;
    border: 1px solid #d6e49d;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(43,67,24,.22);
}

.header-secondary .nav .nav-dropdown-menu a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 8px;
    color: #20321f !important;
    background: transparent !important;
    font-size: 13px;
}

.header-secondary .nav .nav-dropdown-menu a:hover,
.header-secondary .nav .nav-dropdown-menu a.is-active {
    background: #eef8d9 !important;
    color: #315f16 !important;
}

.topbar .nav > a {
    min-height: 34px !important;
    padding: 7px 10px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
}

.topbar .nav > a:hover,
.topbar .nav > a.is-active {
    background: rgba(255,255,255,.86) !important;
    color: #315f16 !important;
}

.header-account {
    gap: 9px;
}

.header-account .nav-user {
    font-size: 14px;
    line-height: 1.1;
}

.header-account .nav-user small {
    font-size: 10px;
    opacity: .76;
}

.header-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px !important;
    height: 34px !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(32,50,31,.22) !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.32) !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

.header-logout:hover {
    background: #fff !important;
    color: #315f16 !important;
}

.header-menu-toggle {
    min-height: 34px !important;
    height: 34px !important;
    padding: 6px 9px !important;
    color: #20321f !important;
    border-color: rgba(32,50,31,.22) !important;
    background: rgba(255,255,255,.32) !important;
}

@media (max-width: 760px) {
    .header-settings-toggle,
    .nav-dropdown-toggle,
    .header-logout,
    .header-menu-toggle {
        min-height: 38px !important;
        height: 38px !important;
    }

    .header-settings-panel {
        position: fixed;
        top: 66px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .nav-dropdown {
        display: block;
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 6px;
        box-shadow: none;
    }
}



/* Финально: отдельные вкладки полевых функций */
.nav-dropdown[data-nav-dropdown] { display: none !important; }
.header-secondary .nav > a { flex: 0 0 auto; }


/* Загрузка фотографий самого объекта в карточке администратора */
.object-photo-limit-note {
    margin-top: 18px;
}

.empty-object-photos {
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--surface-brand, #fbfff4);
}

.empty-object-photos strong {
    display: block;
    margin-bottom: 5px;
}

.empty-object-photos p {
    margin: 0;
    color: var(--muted);
}


/* Фотографии при создании объекта осмотрщиком */
.inspector-create-object-photos {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.inspector-create-object-photos .section-heading {
    margin-bottom: 15px;
}

.inspector-create-object-photos .small-note {
    margin: 10px 0 0;
    font-size: 13px;
}


/* Яркий блок фотографий при создании объекта */
.object-create-photo-block {
    margin: 18px 0 22px;
    padding: 20px;
    border: 2px solid #a9d94f;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8ffe7 0%, #fff8d0 100%);
    box-shadow: 0 10px 26px rgba(104, 150, 40, .12);
}
.object-create-photo-block .section-heading { margin-bottom: 15px; }
.object-create-photo-block h2 { margin-bottom: 5px; }
@media (max-width: 650px) {
    .object-create-photo-block { padding: 14px; }
}


/* Добавление фотографий в существующий объект администратором */
.admin-object-photo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.admin-object-photo-actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 11px 16px;
    text-align: center;
    cursor: pointer;
}

.admin-object-camera-inputs {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.admin-object-photo-feedback {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 13px 0;
}

.admin-object-photo-preview {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 9px;
    margin-bottom: 13px;
}

.admin-object-photo-preview:empty {
    display: none;
}

.admin-object-photo-preview-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.admin-object-photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-object-photo-preview-item span {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(32,50,31,.82);
    color: #fff;
    font-size: 10px;
    font-weight: 850;
}

@media (max-width: 700px) {
    .admin-object-photo-actions {
        grid-template-columns: 1fr;
    }

    .admin-object-photo-actions .button {
        width: 100%;
    }

    .admin-object-photo-feedback {
        align-items: stretch;
        flex-direction: column;
    }

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


/* === Простые формы объектов 2026-09 === */
.field-optional{font-size:12px;font-weight:600;color:var(--muted);margin-left:4px}
.compact-object-photo-picker{margin:16px 0;padding:16px;border:1px solid #d9e6c6;border-radius:14px;background:#fbfff4}
.compact-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}
.compact-section-head h2{margin:0 0 4px;font-size:18px}.compact-section-head p{margin:0;color:var(--muted);font-size:13px}
.compact-photo-actions{display:flex;gap:10px;flex-wrap:wrap}.compact-photo-actions .button{min-height:46px;flex:0 1 auto}
.compact-photo-inputs{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}
.compact-photo-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}.compact-photo-meta .photo-count{font-size:13px;color:var(--muted)}
.compact-photo-preview{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-top:10px}.compact-photo-preview:empty{display:none}
.compact-photo-preview-item{position:relative;overflow:hidden;aspect-ratio:1;border-radius:9px;background:#eef3e6}.compact-photo-preview-item img{width:100%;height:100%;object-fit:cover;display:block}.compact-photo-preview-item span{position:absolute;right:4px;bottom:4px;display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:rgba(20,40,15,.78);color:#fff;font-size:10px;font-weight:800}
.compact-existing-photo-form{margin-top:14px}.compact-existing-photo-form .compact-object-photo-picker{margin-bottom:0}
.location-controls{display:flex;gap:9px;flex-wrap:wrap}.geo-status.warning{color:#9a6b00}.geo-status.error{color:#a83232}
.tsb-map-picker-overlay{position:fixed;z-index:10000;inset:0;padding:20px;background:rgba(18,31,18,.62);display:grid;place-items:center}.tsb-map-picker-panel{width:min(900px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:16px;padding:16px;box-shadow:0 25px 70px rgba(0,0,0,.3)}
.tsb-map-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.tsb-map-picker-head strong{display:block;font-size:18px}.tsb-map-picker-head small{display:block;color:var(--muted);margin-top:3px}.map-picker-close{border:0;background:#edf1e8;width:36px;height:36px;border-radius:50%;font-size:25px;cursor:pointer}.tsb-map-canvas{height:min(56vh,520px);border-radius:12px;background:#edf1e8;overflow:hidden}.map-load-error{padding:25px;color:var(--muted)}
.tsb-map-coordinate-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.tsb-map-coordinate-row label{margin:0}.tsb-map-picker-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:12px}

/* Группировка объектов */
.grouped-object-list{display:grid;gap:12px}.object-customer-group{border:1px solid var(--border);border-radius:14px;background:#fff;overflow:hidden}.object-customer-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;cursor:pointer;background:#fbfcf8}.object-customer-group>summary::-webkit-details-marker{display:none}.object-group-summary-main{display:grid;gap:2px}.object-group-summary-main strong{font-size:17px}.object-group-summary-main small{color:var(--muted)}.object-group-chevron{font-size:22px;transition:transform .2s}.object-customer-group[open] .object-group-chevron{transform:rotate(180deg)}.object-group-items{border-top:1px solid var(--border)}.object-group-items-standalone{border:0;display:grid;gap:8px}.object-customer-group .object-list-row{border-left-width:4px;border-radius:0;border-right:0;border-bottom:0;border-top:0}.object-customer-group .object-list-row+.object-list-row{border-top:1px solid var(--border)}

/* Простая карточка объекта */
.simple-object-title{align-items:center}.simple-object-view,.simple-object-edit{display:grid;gap:16px}.object-summary-card h2{margin-top:0}.object-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.object-summary-grid>div{padding:12px 14px;border-radius:11px;background:#f7f9f3}.object-summary-grid .summary-wide{grid-column:1/-1}.object-summary-grid span,.summary-stage-block>span{display:block;color:var(--muted);font-size:12px;font-weight:700;margin-bottom:5px}.object-summary-grid p{margin:0}.object-summary-grid small{display:block;color:var(--muted);margin-top:5px}.summary-stage-block{margin-top:16px}.summary-stage-chips{display:flex;gap:7px;flex-wrap:wrap}.summary-stage-chips span{margin:0;padding:7px 10px;border-radius:999px;background:#edf6dc;color:#3e6c1d;font-size:12px;font-weight:800}.simple-photo-gallery{grid-template-columns:repeat(5,minmax(0,1fr))}.simple-object-photo{display:block;overflow:hidden;aspect-ratio:4/3;border-radius:10px}.simple-object-photo img{width:100%;height:100%;object-fit:cover;display:block}.object-related-details>summary{cursor:pointer;font-weight:800;display:flex;justify-content:space-between}.related-details-body{padding-top:14px}.compact-tree-links{display:flex;flex-wrap:wrap;gap:8px}.compact-tree-links a{padding:8px 10px;border:1px solid var(--border);border-radius:9px;background:#fff;font-weight:700}.simple-edit-form{display:grid;gap:12px}.two-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.advanced-edit-details{margin:5px 0 2px;padding:12px;border:1px solid var(--border);border-radius:11px}.advanced-edit-details>summary{cursor:pointer;font-weight:800}.advanced-edit-body{display:grid;gap:12px;padding-top:12px}.compact-related-card .section-heading{align-items:center}

@media(max-width:700px){.compact-object-photo-picker{padding:12px}.compact-section-head{display:block}.compact-section-head .badge{display:inline-flex;margin-top:8px}.compact-photo-actions{display:grid;grid-template-columns:1fr 1fr}.compact-photo-actions .button{width:100%;padding:10px 8px;font-size:14px}.compact-photo-preview{grid-template-columns:repeat(4,minmax(0,1fr))}.tsb-map-picker-overlay{padding:0}.tsb-map-picker-panel{width:100%;height:100%;max-height:none;border-radius:0;padding:12px}.tsb-map-canvas{height:55vh}.tsb-map-coordinate-row{grid-template-columns:1fr 1fr}.object-summary-grid,.two-field-grid{grid-template-columns:1fr}.object-summary-grid .summary-wide{grid-column:auto}.simple-photo-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.object-customer-group>summary{padding:14px}.object-list-row{border-radius:0}.simple-object-title .object-heading-actions{width:100%}.simple-object-title .object-heading-actions .button{flex:1;text-align:center}}
@media(max-width:430px){.compact-photo-actions{grid-template-columns:1fr}.compact-photo-preview{grid-template-columns:repeat(3,minmax(0,1fr))}.tsb-map-coordinate-row{grid-template-columns:1fr}.simple-photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* === Компактные группы и списки деревьев 2026-09-11 v2 === */

/* Группа заказчика/договора: без высокой пустой плашки */
.object-customer-group > summary {
    min-height: 0;
    padding: 10px 14px;
    gap: 12px;
}

.object-group-summary-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.object-group-summary-main strong {
    min-width: 0;
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.object-group-summary-main small {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.object-group-chevron {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
}

/* Деревья в карточке объекта — всегда обычным списком */
.object-tree-list-card {
    padding-top: 18px;
    padding-bottom: 18px;
}

.object-tree-list-heading {
    margin-bottom: 10px;
}

.object-tree-list-heading h2 {
    margin: 0;
}

.object-tree-list {
    display: grid;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
    background: #fff;
}

.object-tree-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    padding: 10px 13px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}

.object-tree-list-row + .object-tree-list-row {
    border-top: 1px solid var(--border);
}

.object-tree-list-row:hover {
    background: #f8fbea;
}

.object-tree-list-row strong {
    font-size: 15px;
}

.object-tree-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
}

.object-tree-status-planned {
    background: #fff3c7;
    color: #765b00;
}

.object-tree-status-cut {
    background: #e4f5df;
    color: #286d3d;
}

.object-tree-status-cancelled {
    background: #edf0f2;
    color: #5d6870;
}

/* Редактирование этапов на телефоне: строго вертикально */
@media (max-width: 700px) {
    .object-customer-group > summary {
        padding: 9px 12px;
    }

    .object-group-summary-main {
        display: grid;
        gap: 2px;
    }

    .object-group-summary-main small {
        white-space: normal;
    }

    .object-tree-list-card {
        padding: 14px;
    }

    .object-tree-list-heading {
        align-items: center;
    }

    .object-tree-list-heading .button {
        width: 100%;
        margin-top: 8px;
    }

    .object-tree-list-row {
        min-height: 46px;
        padding: 9px 10px;
    }

    .object-tree-list-row strong {
        font-size: 14px;
    }

    .object-tree-status {
        font-size: 11px;
        padding: 5px 8px;
    }

    .compact-stage-list .stage-row {
        grid-template-columns: minmax(0,1fr) !important;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .compact-stage-list .stage-row-main {
        display: grid;
        grid-template-columns: minmax(0,1fr) auto;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .compact-stage-list .stage-row-main strong {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .compact-stage-list .stage-status-form {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) !important;
        width: 100%;
        min-width: 0;
        gap: 8px;
    }

    .compact-stage-list .stage-status-form select,
    .compact-stage-list .stage-status-form button {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 0;
    }

    .compact-stage-list .stage-row > form:not(.stage-status-form) {
        width: 100%;
        margin: 0;
    }

    .compact-stage-list .stage-row > form:not(.stage-status-form) button {
        width: 100%;
    }

    .add-stage-form {
        grid-template-columns: minmax(0,1fr) !important;
    }

    .add-stage-form > * {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 430px) {
    .object-tree-list-row {
        gap: 8px;
    }

    .object-tree-status {
        max-width: 44%;
        text-align: center;
        white-space: normal;
    }
}

.object-trees-map{height:420px;border-radius:16px;overflow:hidden}
.object-top-tree-controls{padding:12px}
.object-edit-bottom{margin-top:20px}
@media(max-width:700px){
 .object-trees-map{height:280px}
 .object-top-tree-controls .button,
 .object-edit-bottom .button{width:100%}
}

/* object view final layout */
.object-bottom-edit{margin:20px 0;display:flex;justify-content:flex-end}
.object-map-card .object-trees-map{height:420px}
@media(max-width:700px){.object-bottom-edit .button{width:100%}.object-map-card .object-trees-map{height:300px}}
.object-tree-status-planned{background:#fff1a8!important;color:#6d5600!important}


/* TreeServiceBel Mobile UI simplification v2 */

/* Убираем эффект "карточка в карточке" */
.card .card,
.card .panel,
.card .inner-card,
.object-details-card .card {
    box-shadow: none;
    border: 0;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

/* Более компактные рабочие блоки */
.card {
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}

.section-heading {
    margin-bottom: 10px;
}

.section-heading h2 {
    font-size: 17px;
    line-height: 1.25;
    margin: 0;
}

.muted {
    font-size: 13px;
}

/* Кнопки компактнее */
.button,
button.button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.button.full-width {
    min-height: 40px;
}

/* Список деревьев */
.object-tree-list {
    border-radius: 10px;
}

.object-tree-list-row {
    min-height: 44px;
    padding: 8px 10px;
}

.object-tree-list-row strong {
    font-size: 14px;
}

/* Меньше воздуха в данных объекта */
.object-info-grid,
.info-grid,
.data-grid {
    gap: 8px !important;
}

.info-item,
.data-item {
    padding: 8px 0;
}

/* Фото объекта */
.photo-gallery,
.object-photo-gallery {
    gap: 8px;
}

.photo-gallery img,
.object-photo-gallery img {
    border-radius: 8px;
}

/* Мобильный экран */
@media (max-width:700px) {

    body {
        font-size: 14px;
    }

    main,
    .container,
    .page-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .card {
        padding: 12px;
        border-radius: 12px;
    }

    .section-heading {
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:8px;
    }

    .button,
    button.button {
        min-height:36px;
        padding:7px 11px;
    }

    .object-tree-list-row {
        display:flex;
        align-items:center;
        justify-content:space-between;
        min-height:42px;
    }

    /* убираем большие пустые зоны */
    .hero,
    .dashboard-card,
    .large-card {
        padding:12px !important;
    }

    /* формы */
    input,
    select,
    textarea {
        min-height:40px;
        font-size:16px;
    }

    .camera-actions {
        grid-template-columns:1fr 1fr;
        gap:8px;
    }
}


/* Mobile compact object view */
.simple-object-title{
    margin-bottom:12px!important;
    padding-top:8px!important;
}
.simple-object-title h1{
    margin:8px 0 4px!important;
    font-size:30px!important;
}
.simple-object-view{
    display:flex;
    flex-direction:column;
    gap:12px!important;
}
.simple-object-view .card{
    margin:0!important;
    padding:16px!important;
    border-radius:16px!important;
}
.object-top-tree-controls{
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
}
.object-top-tree-controls .button{
    width:100%;
    min-height:46px!important;
    padding:10px 16px!important;
}
.object-map-card .section-heading{
    margin-bottom:10px!important;
}
.object-map-card .section-heading p{
    display:none!important;
}
.object-trees-map{
    height:300px!important;
    border-radius:14px!important;
}
.object-tree-list-card{
    padding:14px!important;
}
.object-tree-list-heading{
    margin-bottom:8px!important;
}
.object-tree-list{
    border:1px solid #e4ead7;
    border-radius:12px;
    overflow:hidden;
}
.object-tree-list-row{
    min-height:48px!important;
    padding:10px 12px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    border-bottom:1px solid #edf1e6!important;
}
.object-tree-list-row:last-child{
    border-bottom:0!important;
}
.object-summary-card h2{
    margin-bottom:12px!important;
}
.object-summary-grid{
    gap:10px!important;
}
@media(max-width:700px){
    .page-title.simple-object-title{
        padding-left:16px!important;
        padding-right:16px!important;
    }
    .simple-object-title h1{
        font-size:28px!important;
    }
}

/* Unified object tree map: same visual language as the global objects/trees map */
.object-trees-map .leaflet-tooltip.tree-map-label{
    padding:4px 7px !important;
    border:1px solid rgba(23,50,77,.22) !important;
    border-radius:7px !important;
    background:rgba(255,255,255,.94) !important;
    color:#17324d !important;
    font-size:11px !important;
    font-weight:850 !important;
    box-shadow:0 5px 14px rgba(20,40,55,.18) !important;
}
.object-trees-map .leaflet-tooltip.tree-map-label::before{display:none !important;}
.object-trees-map .leaflet-popup-content{margin:10px 12px;}

/* Stage 62: object data card uses the same compact field alignment as the tree data card. */
.object-summary-card .object-summary-grid{
    display:block!important;
    margin:0!important;
    padding:0!important;
}
.object-summary-card .object-summary-grid>div{
    padding:0!important;
    background:transparent!important;
    border-radius:0!important;
}
.object-summary-card .object-details{
    margin:0!important;
}
.object-summary-card .object-details dt{
    font-weight:600;
}
.object-summary-card .object-details dd{
    margin:0 0 8px;
    font-weight:650;
}
.object-summary-card .object-details-accuracy{
    margin:0 0 8px 198px;
    color:var(--muted);
    font-size:13px;
}
@media(max-width:600px){
    .object-summary-card .object-details-accuracy{
        margin:0 0 10px;
    }
}


/* Stage 76: photo fixation uses the same compact picker as object/tree photos. */
.record-create-step .compact-object-photo-picker{
  margin: 10px 0 0;
}
.record-create-step .compact-photo-preview{
  max-width: 100%;
}
@media(max-width:560px){
  .record-create-step .compact-object-photo-picker{
    padding: 11px;
  }
}
