:root {
    --bg: #f4efe6;
    --panel: rgba(255, 252, 246, 0.88);
    --panel-strong: #fffdf8;
    --line: rgba(33, 42, 62, 0.12);
    --text: #182033;
    --muted: #050505;
    --accent: #c75c3a;
    --accent-dark: #9f4326;
    --accent-soft: #f6d5c8;
    --success: #2d8a61;
    --warning: #d4832e;
    --shadow: 0 24px 70px rgba(36, 29, 22, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(199, 92, 58, 0.18), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(54, 124, 176, 0.14), transparent 28%),
        linear-gradient(135deg, #f7f2ea 0%, #efe5d6 50%, #f8f5ef 100%);
}

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

.page-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.page-shell--wide {
    width: calc(100% - 48px);
    max-width: none;
}

.login-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.login-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(18, 60, 50, 0.12);
}

.login-logo-text {
    max-width: 220px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.login-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.login-stack .login-hero {
    margin-bottom: 0;
}

.login-panel {
    width: 100%;
}

.login-form-center {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.login-panel-header {
    display: block;
    text-align: center;
    margin-bottom: 18px;
}

.login-panel-header h2 {
    margin: 14px auto 0;
    text-align: center;
}

.login-help-text {
    margin: 20px 0 0;
    text-align: center;
    color: rgba(24, 32, 51, 0.42);
    font-size: 14px;
    line-height: 1.55;
}

.page-glow {
    position: fixed;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.page-glow-left {
    top: 40px;
    left: -80px;
    background: rgba(199, 92, 58, 0.24);
}

.page-glow-right {
    bottom: 80px;
    right: -70px;
    background: rgba(54, 124, 176, 0.22);
}

.hero,
.panel,
.table-panel {
    position: relative;
    z-index: 1;
    background: var(--panel);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
}

.hero {
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 24px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.6), transparent 35%),
        linear-gradient(160deg, rgba(199, 92, 58, 0.1), transparent 65%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: rgba(199, 92, 58, 0.12);
}

.hero h1,
.panel h2,
.table-panel h2 {
    margin: 14px 0 10px;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 68px);
    max-width: 10ch;
}

/* Headings longer than ~10 glyphs: drop ch cap so phrases stay readable (e.g. map page). */
.hero h1.hero-h1-expanded {
    max-width: none;
}

.lead {
    max-width: 54ch;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.hero-side,
.panel {
    border-radius: var(--radius-lg);
    padding: 22px;
}

.hero-side {
    background: rgba(24, 32, 51, 0.96);
    color: #f8f4ed;
}

.hero-side h3,
.panel h3 {
    margin: 0 0 14px;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.credentials {
    display: grid;
    gap: 12px;
}

.credential-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.credential-card strong,
.stat strong {
    display: block;
    margin-bottom: 6px;
}

.code {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
}

.grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.span-5 {
    grid-column: span 5;
}

.span-6 {
    grid-column: span 6;
}

.span-7 {
    grid-column: span 7;
}

.span-12 {
    grid-column: 1 / -1;
}

.panel {
    overflow: hidden;
}

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

.panel-subtitle {
    margin: 0;
    color: var(--muted);
}

.actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.inline-form {
    margin-top: 12px;
}

.inline-form button {
    width: 100%;
}

.geo-input {
    width: 100%;
    margin-bottom: 10px;
}

.geo-field-with-locate {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.geo-field-with-locate .geo-input {
    margin-bottom: 0;
}

/* Та же ширина и акцентный стиль, что у «Начать день» / «Завершить день» (см. .inline-form button) */
.inline-form .geo-field-with-locate .geo-locate-btn {
    width: 100%;
}

.request-visit-stack {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.visit-meta {
    font-size: 13px;
    line-height: 1.35;
}

.form-grid-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    margin-bottom: 20px;
}

.form-actions-row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.form-actions-row .action-link,
.form-actions-row button {
    min-height: 48px;
}

.button,
button,
.action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button,
button {
    color: #fffaf2;
    background: linear-gradient(135deg, var(--accent) 0%, #df7b55 100%);
    box-shadow: 0 18px 36px rgba(199, 92, 58, 0.22);
}

.button-highlight {
    background: linear-gradient(135deg, #1f8f63 0%, #33b07d 100%);
    box-shadow: 0 18px 36px rgba(31, 143, 99, 0.28);
    color: #f5fff8;
}

.button:hover,
button:hover,
.action-link:hover {
    transform: translateY(-1px);
}

.button-secondary,
.action-link {
    background: rgba(24, 32, 51, 0.06);
    color: var(--text);
    box-shadow: none;
}

button.button-secondary {
    background: rgba(24, 32, 51, 0.06);
    color: var(--text);
    box-shadow: none;
}

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

.stat {
    padding: 16px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

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

.form-grid {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 700;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font: inherit;
}

.field textarea {
    min-height: 150px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: rgba(199, 92, 58, 0.45);
    box-shadow: 0 0 0 4px rgba(199, 92, 58, 0.12);
}

.search-shell {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(24, 32, 51, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 242, 234, 0.95));
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.search-input:focus {
    outline: none;
    border-color: rgba(199, 92, 58, 0.4);
    box-shadow: 0 0 0 4px rgba(199, 92, 58, 0.12);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(24, 32, 51, 0.2);
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(24, 32, 51, 0.12);
    overflow: hidden;
}

.search-suggestions[hidden] {
    display: none;
}

.search-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    box-shadow: none;
    border-radius: 0;
}

.search-suggestion-label {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: #ffffff;
}

.search-suggestion::before {
    content: "";
    display: none;
}

.search-suggestion:hover,
.search-suggestion:focus {
    background: #8a8a8a;
    color: #ffffff;
    transform: none;
}

.search-hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.note,
.alert,
.empty-state {
    border-radius: 18px;
    padding: 16px 18px;
}

.note {
    background: rgba(24, 32, 51, 0.05);
    color: var(--muted);
}

.alert {
    background: rgba(199, 92, 58, 0.12);
    color: var(--accent-dark);
    border: 1px solid rgba(199, 92, 58, 0.14);
}

.alert-success {
    background: rgba(45, 138, 97, 0.14);
    color: var(--success);
    border: 1px solid rgba(45, 138, 97, 0.18);
}

.flash-grid {
    margin-bottom: 24px;
}

.flash-stack {
    display: grid;
    gap: 12px;
}

.table-panel {
    border-radius: var(--radius-xl);
    padding: 24px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.sort-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.sort-form label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.sort-form select {
    min-width: 180px;
}

.filter-panel {
    display: grid;
    gap: 18px;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
}

.filter-disclosure {
    margin-bottom: 20px;
}

.filter-summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.filter-summary::-webkit-details-marker {
    display: none;
}

.filter-summary::after {
    content: '+';
    float: right;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
}

.filter-disclosure[open] .filter-summary::after {
    content: '-';
}

.filter-disclosure[open] .filter-summary {
    margin-bottom: 12px;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
}

.filter-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.filter-control-group {
    flex: 1 1 320px;
}

.filter-search {
    min-width: 260px;
}

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

.filter-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(247, 248, 244, 0.92);
}

.filter-card h3 {
    margin: 0;
    font-size: 16px;
}

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

.filter-group {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow: auto;
    padding-right: 4px;
}

.filter-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
}

.checkbox-option-inline {
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

.admin-inline-checkbox {
    align-self: end;
}

.checkbox-option input {
    margin-top: 2px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

table.table-col-resizable th {
    position: relative;
    padding-right: 22px;
}

table.table-columns-customized {
    table-layout: fixed;
}

table.table-columns-customized th,
table.table-columns-customized td {
    overflow-wrap: break-word;
    word-break: normal;
}

table.table-requests-list {
    min-width: 1380px;
}

table.table-requests-list th:nth-child(1),
table.table-requests-list td:nth-child(1) {
    width: 4.5rem;
    min-width: 4.5rem;
}

table.table-requests-list th:nth-child(10),
table.table-requests-list td:nth-child(10) {
    min-width: 9.75rem;
    white-space: nowrap;
}

table.table-requests-list th.table-col-closed,
table.table-requests-list td.table-col-closed {
    min-width: 10.5rem;
    width: 11rem;
}

table.table-requests-list th.table-col-act,
table.table-requests-list td.table-col-act {
    min-width: 9.5rem;
    width: 10rem;
}

table.table-requests-list th.table-col-action,
table.table-requests-list td.table-col-action {
    min-width: 13rem;
    width: 13.5rem;
}

table.table-requests-list td.table-col-action:has(.act-upload-form) {
    min-width: 15.5rem;
    width: 16rem;
}

table.table-requests-list th.table-col-closed,
table.table-requests-list th.table-col-act,
table.table-requests-list th.table-col-action {
    white-space: normal;
    line-height: 1.4;
    vertical-align: bottom;
}

table.table-requests-list .table-cell-form {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

table.table-requests-list .table-cell-form button {
    width: auto;
    align-self: flex-start;
}

table.table-requests-list td.table-col-closed .table-cell-form input[type="date"] {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

table.table-requests-list td.table-col-closed .table-cell-form button {
    width: 100%;
    align-self: stretch;
}

table.table-requests-list .table-cell-form--action button {
    width: 100%;
    max-width: 13rem;
    white-space: normal;
    line-height: 1.35;
    text-align: center;
    padding: 10px 14px;
}

table.table-requests-list .amount-field-label {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 4px;
}

table.table-requests-list .amount-input {
    min-width: 0;
    width: 100%;
    max-width: 9rem;
    box-sizing: border-box;
}

table.table-requests-list td.table-col-amount-customer,
table.table-requests-list td.table-col-amount-executor {
    min-width: 7.5rem;
    vertical-align: top;
}

table.table-requests-list .note-textarea {
    min-width: 0;
    width: 100%;
    min-height: 4.5rem;
    max-width: 14rem;
    box-sizing: border-box;
    resize: vertical;
    font: inherit;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

table.table-requests-list .note-display {
    display: block;
    max-width: 14rem;
    white-space: pre-wrap;
    word-break: break-word;
}

table.table-requests-list td.table-col-act-comment,
table.table-requests-list td.table-col-manager-note {
    min-width: 9rem;
    max-width: 16rem;
    vertical-align: top;
}

table.table-requests-list td.table-col-act .act-cell {
    min-width: 0;
}

table.table-requests-list td.table-col-act .act-link,
table.table-requests-list td.table-col-act .act-download {
    white-space: nowrap;
}

table.table-requests-list td.table-col-act .act-meta {
    white-space: normal;
    line-height: 1.35;
}

table.table-requests-list td.table-col-action .act-upload-form {
    margin-top: 0;
}

table.table-requests-list td.table-col-action .act-upload-form button {
    width: 100%;
}

.col-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
    user-select: none;
    z-index: 1;
}

.col-resize-handle::after {
    content: "";
    position: absolute;
    top: 18%;
    bottom: 18%;
    right: 4px;
    width: 2px;
    border-radius: 1px;
    background: rgba(24, 32, 51, 0.14);
    transition: background 0.15s ease;
}

.col-resize-handle:hover::after,
body.col-resizing .col-resize-handle::after {
    background: rgba(31, 91, 67, 0.55);
}

body.col-resizing {
    cursor: col-resize;
    user-select: none;
}

.table-actions-col {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.table-actions-col .button-secondary {
    min-width: 120px;
}

table input[type="text"],
table input[type="password"],
table input[type="email"],
table input[type="date"] {
    width: 100%;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    font: inherit;
    color: var(--text);
}

th,
td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(24, 32, 51, 0.04);
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge.priority-low {
    background: rgba(54, 124, 176, 0.12);
    color: #2d658d;
}

.badge.priority-medium {
    background: rgba(212, 131, 46, 0.15);
    color: #9d611f;
}

.badge.priority-high {
    background: rgba(199, 92, 58, 0.14);
    color: var(--accent-dark);
}

.badge.status-new {
    background: rgba(212, 131, 46, 0.14);
    color: #9d611f;
}

.badge.status-done {
    background: rgba(45, 138, 97, 0.15);
    color: var(--success);
}

.badge.status-trebuetsya-vyezd,
.badge.status-trebuetsya-povtoryi-vyezd {
    background: rgba(199, 92, 58, 0.14);
    color: var(--accent-dark);
}

.badge.status-dostavka,
.badge.status-postavka-zakazchikom {
    background: rgba(54, 124, 176, 0.12);
    color: #2d658d;
}

.badge.status-kp-na-soglasovanii {
    background: rgba(118, 87, 168, 0.14);
    color: #5c4580;
}

.badge.status-v-zakupke {
    background: rgba(212, 131, 46, 0.15);
    color: #9d611f;
}

.badge.status-vypolneno,
.badge.status-zakryto-zakazchikom {
    background: rgba(45, 138, 97, 0.15);
    color: var(--success);
}

.badge.max-linked {
    background: rgba(45, 138, 97, 0.15);
    color: var(--success);
}

.badge.max-pending {
    background: rgba(212, 131, 46, 0.15);
    color: #9d611f;
}

.badge.max-off {
    background: rgba(120, 120, 120, 0.12);
    color: #5c5c5c;
}

.map-page .map-host {
    height: min(70vh, 620px);
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 252, 246, 0.5);
    z-index: 1;
}

.map-page .map-empty-note {
    margin-top: 12px;
}

.map-controls {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.map-counter {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.map-controls button[aria-pressed="true"] {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.act-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.act-link {
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: underline;
}

.act-download {
    font-size: 12px;
    text-decoration: underline;
}

.act-meta {
    font-size: 11px;
}

.act-upload-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 180px;
}

.act-file-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

.act-file-label input[type="file"] {
    font-size: 12px;
}

.leaflet-container {
    font-family: "Manrope", sans-serif;
    color: var(--text);
    cursor: grab;
}

.leaflet-container,
.leaflet-container .leaflet-tile-pane,
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-overlay-pane,
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane,
.leaflet-container .leaflet-shadow-pane,
.leaflet-container .leaflet-popup-pane,
.leaflet-container .leaflet-tooltip-pane,
.leaflet-container .leaflet-pane {
    cursor: grab;
}

.leaflet-grab,
.leaflet-container.leaflet-grab,
.leaflet-touch .leaflet-container {
    cursor: grab;
}

.leaflet-dragging,
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-tile,
.leaflet-dragging .leaflet-tile-pane,
.leaflet-dragging .leaflet-overlay-pane,
.leaflet-dragging .leaflet-overlay-pane svg,
.leaflet-dragging .leaflet-marker-pane,
.leaflet-dragging .leaflet-pane,
.leaflet-dragging .leaflet-interactive,
.leaflet-dragging .leaflet-clickable {
    cursor: grabbing !important;
    cursor: -webkit-grabbing !important;
}

.leaflet-interactive,
.leaflet-clickable,
.leaflet-marker-icon,
.leaflet-container .leaflet-overlay-pane svg path.leaflet-interactive,
.leaflet-container a.leaflet-popup-close-button {
    cursor: pointer;
}

.leaflet-control,
.leaflet-control a {
    cursor: pointer;
}

.map-popup {
    font-size: 13px;
    line-height: 1.45;
}

.map-popup-address {
    margin-top: 4px;
    font-size: 12px;
}

.map-popup-empty {
    margin: 10px 0 0;
    color: var(--muted);
}

.map-popup-list {
    margin: 10px 0 0;
    padding-left: 18px;
}

.map-popup-list li {
    margin-bottom: 10px;
}

.map-popup-list a {
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: underline;
}

.map-popup-assignee {
    font-size: 12px;
    margin-top: 2px;
}

.map-popup-desc {
    margin-top: 4px;
    font-size: 12px;
    max-height: 4.5em;
    overflow: hidden;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff7f0;
    background: linear-gradient(135deg, var(--accent-dark) 0%, #e28863 100%);
    box-shadow: 0 12px 24px rgba(199, 92, 58, 0.24);
}

@media (max-width: 960px) {
    .hero-grid,
    .grid {
        grid-template-columns: 1fr;
    }

    .span-5,
    .span-7,
    .span-12 {
        grid-column: auto;
    }

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

    .toolbar,
    .panel-header,
    .form-actions-row,
    .sort-form,
    .filter-toolbar,
    .filter-actions-row {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .filter-grid,
    .filter-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 20px;
    }

    .login-logo {
        width: 78px;
        height: 78px;
    }

    .login-logo-link {
        gap: 14px;
    }

    .login-logo-text {
        max-width: 180px;
        font-size: 20px;
    }

    .hero,
    .table-panel,
    .panel {
        padding: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }
}

/* Виджет диска в админке */
.disk-bar-wrap {
    height: 6px;
    background: var(--line);
    border-radius: 3px;
    margin: 6px 0 4px;
    overflow: hidden;
}
.disk-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}
.disk-card-warn { border-left: 3px solid #e0a800; }
.disk-card-critical { border-left: 3px solid #c0392b; }
.disk-alert {
    font-size: 0.78rem;
    margin-top: 4px;
    font-weight: 600;
}
.disk-alert--warn { color: #7a5800; }
.disk-alert--critical { color: #c0392b; }

/* Подсказка «только активные» в заголовке фильтров */
.filter-summary-hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--accent-dark);
    margin-left: 6px;
}

/* Пагинация */
.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 0 8px;
}
.pagination-info {
    font-size: 0.82rem;
    color: #666;
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.pagination-btn {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 0.82rem;
    background: var(--panel);
    color: var(--text, #222);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.pagination-btn:hover {
    background: var(--accent-soft);
}
.pagination-current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
    pointer-events: none;
}
.pagination-ellipsis {
    padding: 4px 6px;
    color: #999;
    font-size: 0.82rem;
}

.autosave-indicator {
    display: inline-block;
    font-size: 0.72rem;
    color: #4a7c59;
    margin-left: 6px;
    opacity: 1;
    transition: opacity 0.5s ease;
}
