:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #111827;
  --primary-hover: #000000;
  --danger: #b91c1c;
  --success: #166534;
  --shadow: 0 18px 48px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
a { color: inherit; }

.auth-page { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #eef2ff, transparent 35%), #f8fafc; }
.auth-card { width: min(420px, 100%); padding: 32px; background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.auth-card-wide { width: min(520px, 100%); }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #111827; color: white; font-size: 26px; margin-bottom: 18px; }
h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.02em; }
h2 { margin: 0 0 18px; font-size: 18px; }
.muted { color: var(--muted); margin: 0 0 24px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; margin-bottom: 15px; }
input, select { width: 100%; min-height: 44px; border: 1px solid #cbd5e1; border-radius: 11px; padding: 9px 12px; background: white; color: var(--text); outline: none; }
input:focus, select:focus { border-color: #64748b; box-shadow: 0 0 0 3px rgba(100,116,139,.13); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; min-height: 40px; padding: 8px 14px; border: 1px solid transparent; text-decoration: none; cursor: pointer; font-weight: 700; }
.btn-primary { color: white; background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: white; border-color: var(--border); color: #334155; }
.btn-block { width: 100%; min-height: 46px; }
.btn-small { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 18px; font-size: 14px; }
.alert-error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.alert-success { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }

.app-shell { height: 100vh; display: grid; grid-template-columns: 360px 1fr; overflow: hidden; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); display: flex; min-width: 0; flex-direction: column; z-index: 5; }
.sidebar-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 22px 14px; }
.sidebar-head h1 { font-size: 22px; }
.eyebrow { font-size: 10px; letter-spacing: .17em; font-weight: 800; color: #94a3b8; margin-bottom: 5px; }
.filters { padding: 0 18px 14px; border-bottom: 1px solid var(--border); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.filters input, .filters select { min-height: 40px; font-size: 13px; }
.result-summary { padding: 11px 18px; color: var(--muted); font-size: 12px; font-weight: 700; }
.object-list { flex: 1; overflow: auto; padding: 0 10px 10px; }
.object-card { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 12px 10px; border: 0; border-bottom: 1px solid #f1f5f9; background: transparent; text-align: left; cursor: pointer; border-radius: 10px; }
.object-card:hover { background: #f8fafc; }
.status-dot { width: 8px; height: 8px; border-radius: 99px; }
.object-card-main { min-width: 0; display: grid; gap: 4px; }
.object-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.object-card-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.object-tag { color: #475569; background: #f1f5f9; border-radius: 99px; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.empty-state { padding: 24px 10px; text-align: center; color: var(--muted); }
.sidebar-footer { border-top: 1px solid var(--border); padding: 12px 16px; display: grid; gap: 10px; }
.user-chip { min-width: 0; display: grid; gap: 2px; }
.user-chip strong, .user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: 12px; }.user-chip span { color: var(--muted); font-size: 11px; }
.footer-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-actions form { margin: 0; }

.map-wrap { position: relative; min-width: 0; }
#map { width: 100%; height: 100%; }
.loading-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(248,250,252,.78); z-index: 3; backdrop-filter: blur(3px); color: #334155; font-weight: 700; }
.loading-overlay.hidden { display: none; }
.spinner { width: 34px; height: 34px; border: 3px solid #cbd5e1; border-top-color: #111827; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-error { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); max-width: 560px; padding: 12px 16px; border-radius: 10px; background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; z-index: 4; box-shadow: var(--shadow); }
.map-menu-btn { position: absolute; top: 12px; left: 12px; z-index: 2; border: 1px solid var(--border); background: white; border-radius: 10px; padding: 9px 12px; box-shadow: 0 3px 14px rgba(15,23,42,.13); font-weight: 800; }
.icon-btn { border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.mobile-only { display: none; }

.info-card { width: min(330px, 72vw); color: #0f172a; padding: 2px; }
.info-photo { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.info-title { font-weight: 800; font-size: 17px; margin-bottom: 3px; }
.info-address { color: #64748b; font-size: 12px; margin-bottom: 8px; }
.info-description { margin: 8px 0 10px; font-size: 13px; line-height: 1.4; }
.info-details { display: grid; gap: 5px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.info-details > div { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; }
.info-details span { color: #64748b; }.info-details strong { text-align: right; }
.info-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.info-actions a { text-decoration: none; font-weight: 800; font-size: 12px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; }

.admin-page { padding: 24px; }
.admin-shell { max-width: 1180px; margin: 0 auto; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 18px; box-shadow: 0 5px 20px rgba(15,23,42,.04); }
.admin-form { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr 1fr .7fr auto; gap: 10px; align-items: end; }
.admin-form label { margin: 0; }.admin-form .btn { margin-bottom: 0; min-height: 44px; }
.table-wrap { overflow: auto; }
.users-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.users-table th, .users-table td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; font-size: 12px; vertical-align: top; }
.users-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; padding: 4px 7px; border-radius: 99px; font-weight: 800; font-size: 10px; }
.badge-ok { background: #dcfce7; color: #166534; }.badge-off { background: #f1f5f9; color: #475569; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }.actions-cell form { margin: 0; }
.reset-form { display: flex; gap: 5px; }.reset-form input { min-height: 32px; height: 32px; width: 125px; font-size: 11px; padding: 4px 6px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(390px, 92vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-flex; }
  .admin-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .auth-page, .admin-page { padding: 14px; }
  .auth-card { padding: 24px 20px; border-radius: 18px; }
  .filter-row { grid-template-columns: 1fr; }
  .admin-form { grid-template-columns: 1fr; }
}

/* Photo gallery v1.1 */
body.modal-open { overflow: hidden; }
.info-action-button { appearance: none; border: 0; background: transparent; color: #2563eb; font: inherit; font-weight: 800; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.info-photo-disabled { color: var(--muted); font-size: 11px; font-weight: 700; }
.photo-modal, .lightbox { position: fixed; inset: 0; z-index: 2000; }
.photo-modal-backdrop, .lightbox-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); }
.photo-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(720px, 100%); background: var(--panel); box-shadow: -24px 0 60px rgba(15, 23, 42, .22); padding: 22px; overflow: auto; overscroll-behavior: contain; }
.photo-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.photo-panel-head h2 { margin: 3px 0 0; font-size: 24px; line-height: 1.1; }
.photo-address { margin: 7px 0 0; font-size: 13px; }
.photo-upload-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 18px 0 8px; padding: 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: 16px; }
.photo-upload-form input[type="text"], .photo-upload-form input:not([type]) { min-width: 0; }
.photo-file-label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px dashed #94a3b8; border-radius: 12px; background: #fff; padding: 10px 12px; cursor: pointer; text-align: center; font-size: 12px; font-weight: 800; color: #334155; }
.photo-file-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-help { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.photo-message { margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 700; }
.photo-message.is-error { background: #fee2e2; color: #991b1b; }
.photo-gallery-loading, .photo-empty { padding: 28px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.photo-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.photo-card { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 4px 16px rgba(15, 23, 42, .05); }
.photo-thumb-button { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: #e2e8f0; cursor: zoom-in; overflow: hidden; }
.photo-thumb-button img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .18s ease; }
.photo-thumb-button:hover img { transform: scale(1.025); }
.photo-card-body { padding: 11px 12px 12px; }
.photo-caption { font-size: 13px; font-weight: 700; line-height: 1.35; margin-bottom: 7px; overflow-wrap: anywhere; }
.photo-meta { color: var(--muted); font-size: 10px; line-height: 1.35; }
.photo-delete { margin-top: 9px; border: 0; background: transparent; color: #b91c1c; padding: 0; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.lightbox { z-index: 3000; display: grid; place-items: center; padding: 28px; }
.lightbox-content { position: relative; z-index: 1; margin: 0; max-width: min(1200px, 94vw); max-height: 90vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox-content img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 14px; box-shadow: 0 30px 90px rgba(0,0,0,.38); background: #0f172a; }
.lightbox-content figcaption { max-width: 900px; color: #fff; font-size: 13px; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.lightbox-close { position: fixed; z-index: 2; top: 16px; right: 18px; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(15,23,42,.7); color: white; font-size: 28px; line-height: 1; cursor: pointer; }

@media (max-width: 760px) {
  .photo-panel { width: 100%; padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .photo-panel-head h2 { font-size: 20px; }
  .photo-upload-form { grid-template-columns: 1fr; position: sticky; top: -16px; z-index: 2; box-shadow: 0 8px 24px rgba(15,23,42,.08); }
  .photo-help { grid-column: 1; }
  .photo-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lightbox { padding: 12px; }
}

@media (max-width: 420px) {
  .photo-gallery { grid-template-columns: 1fr; }
}

/* PDF plans + security UX v1.3 */
.route-action { background: #111827 !important; color: #fff !important; border-color: #111827 !important; }
.plan-list { display: grid; gap: 10px; margin-top: 14px; }
.plan-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.plan-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 11px; background: #fee2e2; color: #991b1b; font-weight: 900; font-size: 12px; }
.plan-card-main { min-width: 0; display: grid; gap: 5px; }
.plan-card-main strong { overflow-wrap: anywhere; font-size: 13px; }
.plan-card-main span { color: var(--muted); font-size: 10px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.plan-delete { background: #fff; border-color: #fecaca; color: #b91c1c; }
@media (max-width: 620px) {
  .plan-card { grid-template-columns: 42px 1fr; }
  .plan-icon { width: 42px; height: 42px; }
  .plan-actions { grid-column: 1 / -1; justify-content: stretch; }
  .plan-actions .btn { flex: 1; }
}

/* v1.4 role-based access */
.role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.role-card{display:flex;flex-direction:column;gap:6px;padding:14px;border:1px solid var(--border,#dbe2ea);border-radius:14px;background:rgba(255,255,255,.55)}
.role-card strong{font-size:15px}.role-card span{font-size:13px;line-height:1.45;color:var(--muted,#64748b)}
.role-form{display:flex;align-items:center;gap:8px;min-width:260px}.role-form select{min-width:140px}
.badge-role{background:#eef2ff;color:#3730a3}.readonly-notice{margin-top:8px;padding:10px 12px;border-radius:10px;background:#f8fafc}
@media(max-width:760px){.role-form{min-width:0;flex-direction:column;align-items:stretch}.role-form select{min-width:0}}

/* v1.5 audit journal */
.admin-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.audit-shell{max-width:1440px}
.audit-summary{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}
.audit-summary>div{display:flex;align-items:baseline;gap:10px}.audit-summary>div strong{font-size:28px}.audit-summary>div span{color:var(--muted)}
.audit-summary p{max-width:680px;margin:4px 0 0}
.audit-filters{display:grid;grid-template-columns:1.2fr 1fr 1.3fr 1fr 1fr 1fr auto;gap:10px;align-items:end}
.audit-filters label{margin:0}.audit-filter-actions{display:flex;gap:8px;align-items:center}.audit-filter-actions .btn{margin:0;white-space:nowrap}
.audit-table{min-width:1180px}.audit-table td{font-size:12px;line-height:1.45}.audit-date{white-space:nowrap}.audit-date span,.audit-code{color:var(--muted);font-size:10px}
.audit-result-success{background:#dcfce7;color:#166534}.audit-result-failure{background:#fee2e2;color:#991b1b}.audit-result-blocked{background:#fef3c7;color:#92400e}
.audit-details{margin-top:6px}.audit-details summary{cursor:pointer;color:var(--accent);font-weight:600}.audit-details pre{max-width:480px;white-space:pre-wrap;word-break:break-word;background:#f8fafc;border:1px solid var(--border);border-radius:8px;padding:10px;font-size:11px;overflow:auto}.audit-ua{max-width:500px;word-break:break-word;color:var(--muted);font-size:11px;margin-top:6px}.audit-empty{text-align:center!important;color:var(--muted);padding:32px!important}.audit-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:18px}.audit-pagination span{color:var(--muted);font-size:12px}
@media(max-width:1050px){.audit-filters{grid-template-columns:1fr 1fr 1fr}.audit-summary{flex-direction:column;gap:8px}}
@media(max-width:680px){.admin-head{align-items:flex-start;gap:12px}.admin-head-actions{justify-content:flex-start}.audit-filters{grid-template-columns:1fr}.audit-filter-actions{display:grid;grid-template-columns:1fr 1fr}.audit-summary>div strong{font-size:24px}}

/* v1.6 create object directly from the map */
.map-create-btn{position:absolute;top:14px;right:60px;z-index:2;min-height:42px;padding:9px 14px;border:1px solid #cbd5e1;border-radius:11px;background:#111827;color:#fff;box-shadow:0 4px 18px rgba(15,23,42,.18);font-weight:850;cursor:pointer}
.map-create-btn:hover{background:#000}.map-create-btn.is-active{background:#b91c1c;border-color:#b91c1c}
.placement-hint{position:absolute;top:70px;left:50%;z-index:3;transform:translateX(-50%);width:min(520px,calc(100% - 28px));display:grid;grid-template-columns:1fr auto;gap:3px 14px;align-items:center;padding:12px 14px;border:1px solid #c4b5fd;border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 12px 36px rgba(15,23,42,.16)}
.placement-hint[hidden]{display:none}.placement-hint strong{font-size:13px}.placement-hint span{grid-column:1;color:#64748b;font-size:11px}.placement-hint button{grid-column:2;grid-row:1 / span 2;border:0;border-radius:9px;background:#f1f5f9;padding:8px 10px;color:#334155;font-weight:800;cursor:pointer}
#map.placing-object,#map.placing-object *{cursor:crosshair!important}
.object-create-panel{width:min(680px,100%)}
.object-create-form{padding-top:18px}
.object-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.object-form-grid label{margin:0}.object-form-grid .field-wide{grid-column:1 / -1}
.object-form-grid textarea{width:100%;min-height:88px;resize:vertical;border:1px solid #cbd5e1;border-radius:11px;padding:10px 12px;background:#fff;color:var(--text);outline:none;font:inherit;line-height:1.45}
.object-form-grid textarea:focus{border-color:#64748b;box-shadow:0 0 0 3px rgba(100,116,139,.13)}
.object-form-grid input[readonly]{background:#f8fafc;color:#475569}
.object-create-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
@media(max-width:900px){.map-create-btn{top:12px;right:12px}.placement-hint{top:66px}}
@media(max-width:620px){.object-form-grid{grid-template-columns:1fr}.object-form-grid .field-wide{grid-column:1}.object-create-actions{display:grid;grid-template-columns:1fr 1fr}.object-create-actions #saveObjectButton{grid-column:1 / -1;grid-row:1}.map-create-btn{font-size:12px;padding:8px 10px}.placement-hint{grid-template-columns:1fr auto;top:62px}}

/* v2.0 OpenStreetMap + Leaflet + encrypted MySQL objects */
.map-create-cluster{position:absolute;top:14px;right:14px;z-index:800;display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.map-create-cluster .map-create-btn{position:static;top:auto;right:auto;z-index:auto}
.map-create-menu{display:grid;min-width:190px;padding:8px;border:1px solid #dbe2ea;border-radius:14px;background:rgba(255,255,255,.98);box-shadow:0 14px 38px rgba(15,23,42,.2)}
.map-create-menu[hidden]{display:none}
.map-create-menu button{border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:9px;color:#111827;font:inherit;font-weight:750;cursor:pointer}
.map-create-menu button:hover{background:#f1f5f9}
.leaflet-container{font:inherit;background:#e5e7eb}
.leaflet-control-container{z-index:650}
.leaflet-popup-content-wrapper{border-radius:14px;box-shadow:0 14px 40px rgba(15,23,42,.18)}
.leaflet-popup-content{margin:12px 14px;min-width:270px;max-width:340px}
.object-marker-shell{background:transparent;border:0}
.object-marker-pin{--pin:#7c3aed;display:grid;place-items:center;width:34px;height:34px;border:3px solid #fff;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--pin);color:#fff;font-weight:900;font-size:13px;box-shadow:0 5px 12px rgba(15,23,42,.3)}
.object-marker-pin{line-height:1}
.object-marker-pin b{display:block;transform:rotate(45deg);color:#fff;font:inherit}
.route-waze{background:#e0f7ff!important;color:#075985!important;border-color:#bae6fd!important}
.placement-hint{z-index:850}
#map.placing-object,#map.placing-object *{cursor:crosshair!important}
@media(max-width:900px){.map-create-cluster{top:12px;right:12px}}

/* v2.1 object cards, multi-system categories, editing, protected credentials */
.category-field{display:grid;gap:7px}.field-label{font-size:12px;font-weight:800;color:var(--text)}
.category-checks{display:flex;flex-wrap:wrap;gap:8px}.category-checks label{display:inline-flex;align-items:center;gap:6px;margin:0;padding:8px 10px;border:1px solid var(--border);border-radius:999px;background:#fff;font-size:12px;font-weight:750;cursor:pointer}.category-checks input{width:auto;margin:0;accent-color:#2563eb}
.object-number{font-style:normal;color:#475569;font-size:11px;font-weight:850;white-space:nowrap}.object-tags-mini{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end;max-width:110px}.object-tags-mini .object-tag{font-size:9px}
.info-eyebrow{font-size:10px;font-weight:850;letter-spacing:.08em;color:#64748b;text-transform:uppercase;margin-bottom:3px}.popup-categories{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}.popup-category{display:inline-flex;padding:4px 7px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:10px;font-weight:850}
.popup-contact{display:grid;gap:3px;margin:10px 0;padding:10px 11px;border:1px solid #dbeafe;border-radius:11px;background:#f8fbff}.popup-contact span{font-size:10px;color:#64748b;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.popup-contact strong{font-size:13px}.popup-contact a{width:max-content;color:#0f5fc2;font-weight:850;text-decoration:none}.popup-contact a:hover{text-decoration:underline}
.info-notes{margin:9px 0;padding:9px 10px;border-radius:10px;background:#fff8e6;color:#604600;font-size:11px;line-height:1.45;white-space:pre-wrap}.pdf-button{color:#7c3aed!important}.secret-button{color:#8b5cf6!important}
.secret-panel{width:min(760px,100%)}.secret-form{margin:18px 0 8px;padding:14px;border:1px solid var(--border);border-radius:16px;background:#f8fafc}.secret-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.secret-grid label{margin:0}.password-input-wrap{display:grid;grid-template-columns:1fr auto;gap:6px}.password-input-wrap button{width:42px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;cursor:pointer}.secret-actions{margin-top:12px;padding-top:12px}.secret-list{display:grid;gap:10px;margin-top:14px}.secret-card{padding:13px;border:1px solid var(--border);border-radius:14px;background:#fff}.secret-card-head{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.secret-card-head strong{font-size:14px}.secret-card-head span{font-size:11px;color:var(--muted);word-break:break-all}.secret-password-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:10px}.secret-password-row code{min-width:120px;max-width:100%;padding:8px 10px;border-radius:9px;background:#0f172a;color:#f8fafc;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;overflow-wrap:anywhere;white-space:pre-wrap}.secret-note{margin-top:8px;padding:8px 9px;border-radius:9px;background:#f8fafc;color:#475569;font-size:11px;white-space:pre-wrap}.secret-card-actions{display:flex;gap:6px;margin-top:10px}
#objectEditModal .object-create-panel{width:min(720px,100%)}
@media(max-width:620px){.secret-grid{grid-template-columns:1fr}.object-tags-mini{display:none}.category-checks{gap:6px}.category-checks label{padding:7px 8px;font-size:11px}}


/* v2.2 multi-system map icons + richer object popup */
.object-marker-shell{background:transparent!important;border:0!important;overflow:visible!important}
.object-marker-cluster{--pin:#7c3aed;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:2px;min-height:38px;padding:4px 5px;border:3px solid var(--pin);border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 7px 18px rgba(15,23,42,.28);white-space:nowrap;transform:translateZ(0)}
.object-marker-cluster::after{content:"";position:absolute;left:50%;bottom:-9px;width:13px;height:13px;background:#fff;border-right:3px solid var(--pin);border-bottom:3px solid var(--pin);transform:translateX(-50%) rotate(45deg);border-radius:0 0 3px 0;z-index:-1}
.object-marker-system{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#f8fafc;font-size:18px;line-height:1;border:1px solid #e2e8f0}
.object-marker-more{display:grid;place-items:center;min-width:24px;height:26px;padding:0 5px;border-radius:8px;background:var(--pin);color:#fff;font-size:10px;font-weight:900;line-height:1}
.system-icons-mini{align-items:center;max-width:128px}.system-mini-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;font-size:15px;line-height:1}.system-mini-more{display:grid;place-items:center;min-width:24px;height:24px;border-radius:8px;background:#e2e8f0;color:#475569;font-size:9px;font-weight:900;padding:0 4px}.object-list-contact{display:block;margin-top:4px;color:#64748b;font-size:10px;line-height:1.25}

.leaflet-popup-content{min-width:300px;max-width:390px}.info-card-v22{width:min(370px,78vw);max-height:72vh;overflow:auto;padding:1px 3px 4px}.info-topline{display:flex;align-items:center;justify-content:space-between;gap:10px}.popup-status{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border:1px solid color-mix(in srgb,var(--status) 45%,white);border-radius:999px;background:color-mix(in srgb,var(--status) 12%,white);color:var(--status);font-size:10px;font-weight:900;line-height:1}.info-card-v22 .info-title{font-size:20px;line-height:1.15;margin-top:3px}.info-card-v22 .info-address{margin-top:5px;font-size:12px;color:#64748b;line-height:1.35}.popup-section-label{font-size:9px;color:#64748b;font-weight:850;text-transform:uppercase;letter-spacing:.075em;margin-bottom:5px}.popup-system-block{margin-top:11px}.popup-categories{margin:0;gap:6px}.popup-category{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;background:#f1f5f9;color:#1e293b;border:1px solid #e2e8f0}.popup-category-icon{font-size:15px;line-height:1}.popup-contact-rich{margin:12px 0 0;padding:11px 12px;gap:4px}.popup-contact-rich .popup-section-label{margin:0}.popup-contact-name{font-size:14px;font-weight:850;color:#0f172a}.popup-phone{font-size:17px!important;color:#0b63c8!important}.popup-email{font-size:11px;color:#475569!important;word-break:break-all}.popup-contact-empty{font-size:11px;color:#94a3b8}.popup-text-section{margin-top:10px;padding:9px 10px;border-radius:10px;background:#f8fafc;color:#334155;font-size:11px;line-height:1.45;white-space:pre-wrap}.popup-notes-section{background:#fff8e6;color:#604600}.info-details-v22{margin-top:11px;padding-top:10px;border-top:1px solid #e2e8f0}.info-details-v22>div{display:flex;justify-content:space-between;gap:14px;padding:4px 0}.info-details-v22>div span{color:#64748b;font-size:10px}.info-details-v22>div strong{text-align:right;font-size:10px;color:#1e293b}.popup-action-section{margin-top:11px;padding-top:9px;border-top:1px solid #e2e8f0}.popup-action-section .info-actions{margin-top:0}.info-actions .info-action-button,.info-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:32px}.route-actions .route-action{background:#111827!important;color:#fff!important;border-color:#111827!important}.route-actions .route-waze{background:#e0f7ff!important;color:#075985!important;border-color:#bae6fd!important}
@supports not (color:color-mix(in srgb,red 50%,white)){.popup-status{border-color:#cbd5e1;background:#f8fafc}}
@media(max-width:620px){.leaflet-popup-content{min-width:270px;max-width:calc(100vw - 48px)}.info-card-v22{width:min(340px,78vw);max-height:66vh}.object-marker-system{width:26px;height:26px;font-size:17px}.object-marker-cluster{min-height:36px}}

/* v2.3 language preference */
.language-form{display:inline-flex;align-items:center}
.language-form select{min-height:38px;border:1px solid var(--line,#dbe2ea);border-radius:10px;background:#fff;padding:7px 9px;color:inherit;font:inherit}
@media(max-width:760px){.language-form{width:100%}.language-form select{width:100%}}

/* v2.4 mobile UX: mobile search, Safari media modals, safer touch layout */
.app-shell{height:100vh;height:100dvh}
.object-delete-button{color:#b91c1c!important}
.app-toast{position:fixed;left:50%;bottom:max(22px,env(safe-area-inset-bottom));z-index:5000;max-width:min(520px,calc(100vw - 28px));transform:translate(-50%,20px);padding:11px 15px;border-radius:12px;background:#166534;color:#fff;font-size:13px;font-weight:800;box-shadow:0 14px 40px rgba(15,23,42,.25);opacity:0;pointer-events:none;transition:.2s ease}.app-toast.is-error{background:#991b1b}.app-toast.show{opacity:1;transform:translate(-50%,0)}

.mobile-map-toolbar,.mobile-search-results{display:none}

@media(max-width:900px){
  body.map-page{overflow:hidden}
  .app-shell{height:100vh;height:100dvh}
  .map-wrap{height:100vh;height:100dvh}
  #map{height:100vh;height:100dvh}
  .sidebar{z-index:1400;width:min(400px,96vw);height:100vh;height:100dvh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);background:#fff}
  .sidebar-head{padding-top:16px}
  .sidebar-footer{padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .mobile-map-toolbar.mobile-only{position:absolute;display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:8px;top:max(10px,env(safe-area-inset-top));left:10px;right:10px;z-index:950;pointer-events:auto}
  .mobile-toolbar-menu{width:46px;height:46px;border:1px solid #d7dee8;border-radius:14px;background:rgba(255,255,255,.96);box-shadow:0 5px 20px rgba(15,23,42,.18);font-size:22px;font-weight:900;color:#172033;display:grid;place-items:center}
  .mobile-search-box{height:46px;min-width:0;display:grid;grid-template-columns:28px minmax(0,1fr) 34px;align-items:center;border:1px solid #d7dee8;border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 5px 20px rgba(15,23,42,.18);overflow:hidden}
  .mobile-search-icon{display:grid;place-items:center;color:#64748b;font-size:20px}
  .mobile-search-box input{height:44px;min-height:44px;border:0!important;box-shadow:none!important;padding:0 4px;background:transparent;font-size:16px;color:#0f172a}
  .mobile-search-box input::-webkit-search-cancel-button{display:none}
  .mobile-search-clear{width:34px;height:44px;border:0;background:transparent;color:#64748b;font-size:23px;display:grid;place-items:center}
  .mobile-result-count{min-width:38px;height:38px;padding:0 8px;display:grid;place-items:center;border-radius:12px;background:#111827;color:#fff;font-size:11px;font-weight:900;box-shadow:0 5px 18px rgba(15,23,42,.18)}
  .mobile-search-results.mobile-only{position:absolute;display:grid;top:calc(max(10px,env(safe-area-inset-top)) + 54px);left:64px;right:56px;z-index:949;max-height:min(360px,48vh);overflow:auto;border:1px solid #dbe2ea;border-radius:14px;background:rgba(255,255,255,.98);box-shadow:0 14px 38px rgba(15,23,42,.24);overscroll-behavior:contain}
  .mobile-search-result{appearance:none;width:100%;display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;align-items:center;padding:10px 11px;border:0;border-bottom:1px solid #eef2f7;background:#fff;text-align:left;color:#0f172a}
  .mobile-search-result:last-child{border-bottom:0}.mobile-search-result:active{background:#f1f5f9}
  .mobile-search-result-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0;font-size:16px;white-space:nowrap}
  .mobile-search-result span:last-child{min-width:0;display:grid;gap:3px}.mobile-search-result strong,.mobile-search-result small{min-width:0;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;overflow:visible}.mobile-search-result strong{font-size:12px;line-height:1.3;display:block}.mobile-search-result small{font-size:10px;line-height:1.3;color:#64748b;display:block}.mobile-search-empty{padding:18px;text-align:center;color:#64748b;font-size:12px}
  .map-menu-btn{display:none!important}
  .leaflet-top.leaflet-left{top:64px}
  .map-create-cluster{top:calc(max(10px,env(safe-area-inset-top)) + 58px);right:10px;z-index:900}
  .map-create-btn{min-height:40px;max-width:170px;padding:8px 11px;font-size:12px;border-radius:12px}
  .map-create-menu{max-height:55vh;overflow:auto}
  .placement-hint{top:calc(max(10px,env(safe-area-inset-top)) + 112px);z-index:940}
  .map-error{top:calc(max(10px,env(safe-area-inset-top)) + 60px);width:calc(100% - 24px)}
}

@media(max-width:620px){
  .sidebar{width:100vw;max-width:none}
  .sidebar-head{position:sticky;top:0;z-index:3;background:#fff;padding-left:16px;padding-right:16px;border-bottom:1px solid #f1f5f9}
  .filters{padding:12px 14px}.filters input,.filters select{font-size:16px;min-height:46px}.filter-row{grid-template-columns:1fr 1fr}
  .object-list{padding:0 8px 12px}.object-card{min-height:64px;padding:12px 8px}.object-card-main strong{font-size:14px}.object-card-main small{font-size:11px}.object-list-contact{font-size:11px}
  .footer-actions{display:grid;grid-template-columns:1fr 1fr}.footer-actions>*{min-width:0}.footer-actions .btn{width:100%}.language-form{grid-column:1/-1}

  .leaflet-popup-content-wrapper{border-radius:16px}.leaflet-popup-content{margin:10px;min-width:0!important;max-width:none!important;width:calc(100vw - 58px)}
  .info-card-v22{width:100%;max-height:min(62dvh,560px);padding:0 2px 4px;overflow:auto;-webkit-overflow-scrolling:touch}
  .info-card-v22 .info-title{font-size:18px}.info-card-v22 .info-address{font-size:12px}.popup-contact-rich{padding:10px}.popup-phone{font-size:18px!important;min-height:34px;display:flex;align-items:center}
  .popup-action-section .info-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.info-actions .info-action-button,.info-actions a{min-height:42px;padding:8px 9px!important;border:1px solid #dbe2ea!important;border-radius:10px!important;text-decoration:none!important;background:#fff;font-size:11px;text-align:center}.object-delete-button{grid-column:1/-1;background:#fff1f2!important;border-color:#fecdd3!important;color:#b91c1c!important}.route-actions .route-action{min-height:44px}

  .photo-modal{height:100vh;height:100dvh;background:#fff}.photo-modal-backdrop{display:none}.photo-panel{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;padding:0 14px max(18px,env(safe-area-inset-bottom));box-shadow:none;overflow:auto;-webkit-overflow-scrolling:touch;background:#fff}
  .photo-panel-head{position:sticky;top:0;z-index:10;margin:0 -14px;padding:max(14px,env(safe-area-inset-top)) 14px 12px;background:rgba(255,255,255,.97);backdrop-filter:blur(12px);border-bottom:1px solid #e2e8f0}.photo-panel-head>div{min-width:0;flex:1}.photo-panel-head h2{font-size:clamp(19px,5vw,23px);line-height:1.16;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.photo-address{font-size:12px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.photo-panel-head .icon-btn{flex:0 0 44px;width:44px;height:44px;border-radius:12px;background:#f1f5f9;font-size:28px;display:grid;place-items:center}
  .photo-upload-form{position:static;grid-template-columns:1fr;margin:14px 0 10px;padding:12px;box-shadow:none;border-radius:14px}.photo-file-label{min-height:50px;font-size:13px}.photo-upload-form input,.photo-upload-form button{font-size:16px;min-height:48px}.photo-help{font-size:11px}.photo-message{font-size:12px}
  .photo-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.photo-card{border-radius:12px}.photo-thumb-button{aspect-ratio:1 / 1}.photo-card-body{padding:9px}.photo-caption{font-size:12px}.photo-meta{font-size:9px}.photo-delete{min-height:36px;font-size:12px}
  .plan-list{gap:8px}.plan-card{padding:10px;border-radius:12px}.plan-actions{display:grid;grid-template-columns:1fr 1fr}.plan-actions .btn{min-height:42px}.plan-actions .plan-delete{grid-column:1/-1}
  .secret-form{margin:12px 0;padding:11px}.secret-grid input{font-size:16px}.secret-password-row .btn,.secret-card-actions .btn{min-height:40px}
  .object-create-panel{width:100%}.object-create-form{padding-top:12px}.object-form-grid input,.object-form-grid select,.object-form-grid textarea{font-size:16px}.object-form-grid{gap:10px}.object-create-actions{position:sticky;bottom:0;z-index:9;margin:16px -14px -18px;padding:10px 14px max(12px,env(safe-area-inset-bottom));background:rgba(255,255,255,.97);box-shadow:0 -7px 22px rgba(15,23,42,.08);grid-template-columns:1fr 1fr}.object-create-actions .btn{min-height:46px}.object-create-actions #saveObjectButton,.object-create-actions #saveEditObjectButton{grid-column:1/-1;grid-row:1}
  .category-checks label{min-height:40px}
  .lightbox{padding:max(12px,env(safe-area-inset-top)) 8px max(12px,env(safe-area-inset-bottom))}.lightbox-close{top:max(10px,env(safe-area-inset-top));right:10px}.lightbox-content img{max-height:78dvh;border-radius:10px}
}

@media(max-width:430px){
  .mobile-map-toolbar.mobile-only{grid-template-columns:44px minmax(0,1fr) 34px;gap:6px;left:8px;right:8px}.mobile-toolbar-menu{width:44px;height:44px}.mobile-search-box{height:44px}.mobile-search-box input{height:42px}.mobile-result-count{min-width:34px;height:34px;padding:0 5px}
  .mobile-search-results.mobile-only{left:58px;right:48px;top:calc(max(8px,env(safe-area-inset-top)) + 51px)}
  .map-create-cluster{top:calc(max(8px,env(safe-area-inset-top)) + 54px);right:8px}.map-create-btn{font-size:11px;padding:7px 9px;max-width:150px}
  .filter-row{grid-template-columns:1fr}.photo-gallery{grid-template-columns:1fr 1fr}.popup-action-section .info-actions{grid-template-columns:1fr 1fr}
}

/* v2.5 GPS location + create-point-from-device */
.my-location-btn{position:absolute;right:14px;bottom:24px;z-index:900;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:8px 12px;border:1px solid #cbd5e1;border-radius:12px;background:rgba(255,255,255,.97);color:#0f172a;box-shadow:0 7px 24px rgba(15,23,42,.16);font-weight:800;cursor:pointer;backdrop-filter:blur(10px)}
.my-location-btn:hover{background:#fff}.my-location-btn.is-active{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}.my-location-btn.is-loading{opacity:.72;cursor:progress}.my-location-icon{font-size:22px;line-height:1;color:#2563eb}.my-location-btn.is-loading .my-location-icon{animation:gpsPulse 1s ease-in-out infinite}.my-location-label{font-size:12px;white-space:nowrap}
@keyframes gpsPulse{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.25);opacity:1}}
.user-location-popup{display:grid;gap:4px;min-width:180px}.user-location-popup strong{font-size:13px}.user-location-popup span{font-size:12px;color:#1d4ed8;font-weight:800}.user-location-popup small{font-size:10px;color:#64748b;line-height:1.35}
.gps-create-info{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;align-items:center;padding:10px 12px;border:1px solid #bfdbfe;border-radius:11px;background:#eff6ff;color:#1e3a8a;margin-bottom:8px}.gps-create-info>span{font-size:12px;font-weight:900}.gps-create-info>strong{font-size:12px}.gps-create-info>small{grid-column:1/-1;color:#475569;font-size:10px;line-height:1.4}
.map-create-menu [data-gps-create]{font-weight:850;color:#1d4ed8;background:#eff6ff}

@media(max-width:900px){
  .my-location-btn{left:10px;right:auto;bottom:max(18px,calc(env(safe-area-inset-bottom) + 10px));min-width:46px;width:46px;height:46px;padding:0;justify-content:center;border-radius:14px;z-index:930}
  .my-location-label{display:none}.my-location-icon{font-size:24px}
}
@media(max-width:620px){
  .gps-create-info{padding:10px;margin-bottom:4px}.gps-create-info>small{font-size:11px}
}

/* v2.6 desktop/mobile list scrolling, equipment and media UX */
.app-shell{height:100vh;height:100dvh;min-height:0}
.sidebar{height:100%;min-height:0;overflow:hidden}
.sidebar-head,.filters,.result-summary,.sidebar-footer{flex:0 0 auto}
.object-list{flex:1 1 auto;min-height:0;overflow-y:scroll;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
.object-list::-webkit-scrollbar{width:10px}.object-list::-webkit-scrollbar-track{background:#f8fafc}.object-list::-webkit-scrollbar-thumb{background:#cbd5e1;border:2px solid #f8fafc;border-radius:999px}.object-list::-webkit-scrollbar-thumb:hover{background:#94a3b8}
.object-list{scrollbar-width:thin;scrollbar-color:#cbd5e1 #f8fafc}
.object-marker-system{position:relative}.object-marker-system sup{position:absolute;right:-6px;top:-7px;min-width:15px;height:15px;padding:0 3px;border-radius:999px;background:#111827;color:#fff;font-size:9px;line-height:15px;text-align:center;font-weight:900}
.system-mini-icon-wrap{position:relative;display:inline-flex}.system-mini-icon-wrap sup{position:absolute;right:-6px;top:-8px;min-width:14px;height:14px;padding:0 3px;border-radius:99px;background:#111827;color:#fff;font-size:8px;line-height:14px;text-align:center}
.device-form{margin:16px 0;padding:14px;border:1px solid var(--border);border-radius:16px;background:#f8fafc}.device-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.device-grid label{margin:0}.device-grid textarea{width:100%;border:1px solid #cbd5e1;border-radius:11px;padding:9px 12px;resize:vertical;font:inherit}.device-notes-field{grid-column:1/-1}.device-list{display:grid;gap:10px;margin-top:14px}.device-card{padding:13px;border:1px solid var(--border);border-radius:14px;background:#fff}.device-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.device-card-head strong{font-size:14px}.device-card-head span{font-size:10px;font-weight:800;color:#475569}.device-meta{margin-top:6px;color:#64748b;font-size:11px;line-height:1.45;overflow-wrap:anywhere}.device-notes{margin-top:7px;font-size:12px;line-height:1.45}.device-actions{display:flex;gap:7px;margin-top:10px}
.photo-meta-size{font-weight:800;color:#475569}
.lightbox-content img{cursor:zoom-out}
@media(max-width:900px){.sidebar{min-height:0;overflow:hidden}.object-list{min-height:0;overflow-y:auto;touch-action:pan-y}.device-grid{grid-template-columns:1fr}.device-form{margin:12px 0;padding:11px}.device-notes-field{grid-column:auto}}
.plan-card-v26{grid-template-columns:74px minmax(0,1fr) auto;align-items:center}.plan-preview{width:68px;height:82px;object-fit:cover;border-radius:8px;border:1px solid #e2e8f0;background:#f8fafc}.plan-card-v26 .plan-icon{width:68px;height:82px;display:grid;place-items:center}
@media(max-width:620px){.plan-card-v26{grid-template-columns:58px minmax(0,1fr)}.plan-preview,.plan-card-v26 .plan-icon{width:54px;height:68px}.plan-card-v26 .plan-actions{grid-column:1/-1}}


/* v2.6.1 compact object popup */
.object-popup .leaflet-popup-content-wrapper{border-radius:18px;box-shadow:0 18px 48px rgba(15,23,42,.18);border:1px solid rgba(148,163,184,.22)}
.object-popup .leaflet-popup-content{margin:0!important;min-width:0!important;width:310px;max-width:calc(100vw - 42px)!important}
.compact-object-popup{padding:14px 14px 12px;display:grid;gap:11px;color:#0f172a}
.compact-popup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.compact-popup-heading{min-width:0}.compact-popup-number{font-size:10px;font-weight:850;letter-spacing:.07em;text-transform:uppercase;color:#64748b}.compact-popup-title{margin-top:3px;font-size:18px;line-height:1.15;font-weight:900;overflow-wrap:anywhere}
.compact-popup-status{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border-radius:999px;border:1px solid var(--status);background:#fff;font-size:10px;font-weight:900;color:var(--status)}
.compact-popup-systems{display:flex;align-items:center;gap:6px;min-height:29px}.compact-system-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:29px;height:29px;border-radius:9px;background:#f1f5f9;border:1px solid #e2e8f0}.compact-system-emoji{font-size:18px;line-height:1}.compact-system-icon sup{position:absolute;right:-5px;top:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#0f172a;color:white;font-size:9px;display:grid;place-items:center;border:2px solid white}.compact-system-more{font-size:10px;font-weight:900;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:4px 7px}
.compact-popup-contact{display:grid;gap:2px;padding:10px 11px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0}.compact-popup-label{font-size:9px;font-weight:850;letter-spacing:.06em;text-transform:uppercase;color:#64748b}.compact-popup-contact strong{font-size:13px}.compact-popup-contact a{width:max-content;max-width:100%;font-size:15px;font-weight:900;color:#0b63c8;text-decoration:none}.compact-popup-muted{font-size:11px;color:#94a3b8}
.compact-popup-meta{display:flex;align-items:center;justify-content:space-between;padding:0 2px;font-size:11px;color:#64748b}.compact-popup-meta strong{font-size:13px;color:#0f172a}
.compact-popup-actions{display:grid;gap:7px}.compact-primary{display:flex;align-items:center;justify-content:center;min-height:40px;padding:9px 12px;border-radius:11px;background:#0f5fc2;color:#fff!important;font-size:12px;font-weight:900;text-decoration:none!important}.compact-route-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.compact-route-actions a{display:flex;align-items:center;justify-content:center;min-height:36px;padding:8px 9px;border-radius:10px;border:1px solid #dbe2ea;background:#fff;color:#1e293b!important;font-size:11px;font-weight:850;text-decoration:none!important}
.compact-more{border-top:1px solid #e2e8f0;padding-top:8px}.compact-more summary{cursor:pointer;list-style:none;text-align:center;color:#64748b;font-size:11px;font-weight:850;user-select:none}.compact-more summary::-webkit-details-marker{display:none}.compact-more summary::after{content:' ▾'}.compact-more[open] summary::after{content:' ▴'}.compact-more-menu{margin-top:8px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.compact-more-action{display:flex;align-items:center;justify-content:center;min-height:34px;padding:7px 8px;border-radius:9px;border:1px solid #dbe2ea;background:#fff;color:#1e293b!important;font:inherit;font-size:10px;font-weight:800;text-decoration:none!important;cursor:pointer}.compact-danger{grid-column:1/-1;background:#fff1f2!important;border-color:#fecdd3!important;color:#b91c1c!important}
@media(max-width:620px){.object-popup .leaflet-popup-content{width:min(330px,calc(100vw - 54px))}.compact-object-popup{padding:13px}.compact-popup-title{font-size:17px}.compact-primary{min-height:44px}.compact-route-actions a{min-height:40px}.compact-popup-contact a{font-size:16px}.compact-more-action{min-height:40px;font-size:11px}}


/* v2.6.2 interactive full object card */
.full-card-panel{width:min(760px,calc(100vw - 32px));max-height:min(860px,calc(100dvh - 32px));overflow:hidden;display:flex;flex-direction:column}.full-card-panel-head{flex:0 0 auto}.full-card-body{overflow-y:auto;padding:0 22px 24px;-webkit-overflow-scrolling:touch}.full-card-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:4px 0 18px;border-bottom:1px solid #e5eaf1}.full-card-number{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#64748b;font-weight:800}.full-card-hero h2{font-size:28px;line-height:1.1;margin:4px 0 8px}.full-card-address{color:#64748b;font-size:14px}.full-card-status{flex:0 0 auto;border:1px solid var(--status);color:var(--status);font-weight:800;border-radius:999px;padding:7px 11px;background:#fff}.full-card-section{padding:18px 0;border-bottom:1px solid #edf1f5}.full-card-section h3{font-size:13px;text-transform:uppercase;letter-spacing:.055em;color:#64748b;margin:0 0 10px}.full-card-section p{white-space:pre-wrap;margin:0;line-height:1.5}.full-card-chips{display:flex;gap:7px;flex-wrap:wrap}.full-card-chip{display:inline-flex;align-items:center;gap:6px;background:#f2f6fb;border:1px solid #e2e8f0;border-radius:999px;padding:7px 10px;font-size:13px;font-weight:700}.full-card-chip-icon{display:inline-flex}.full-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.full-card-info{background:#f7f9fc;border:1px solid #e5eaf1;border-radius:14px;padding:13px;display:flex;flex-direction:column;gap:4px}.full-card-info>span{font-size:11px;text-transform:uppercase;color:#64748b;font-weight:800;letter-spacing:.04em}.full-card-info>a{color:#1264ce;text-decoration:none;font-weight:700}.full-card-info small{color:#64748b}.full-card-section-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.full-card-link{border:0;background:none;color:#1264ce;font-weight:800;cursor:pointer}.full-card-device{padding:9px 0;display:flex;flex-direction:column;gap:3px;border-top:1px solid #edf1f5}.full-card-device:first-of-type{border-top:0}.full-card-device span,.full-card-empty,.full-card-more-count{color:#64748b;font-size:13px}.full-card-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding-top:18px}.full-card-actions button,.full-card-actions a{min-height:44px;border:1px solid #dce3ec;background:#fff;color:#172033;border-radius:12px;padding:9px 10px;text-decoration:none;font:inherit;font-weight:800;display:flex;align-items:center;justify-content:center;cursor:pointer}.full-card-actions button:hover,.full-card-actions a:hover{background:#f7f9fc}@media(max-width:640px){.full-card-panel{width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.full-card-body{padding:0 16px calc(24px + env(safe-area-inset-bottom))}.full-card-hero h2{font-size:23px}.full-card-grid{grid-template-columns:1fr}.full-card-actions{grid-template-columns:1fr 1fr}.full-card-panel-head{padding-top:calc(14px + env(safe-area-inset-top))}}

/* v2.7 object import */
.map-primary-actions{display:flex;gap:8px;align-items:center}
.map-import-btn{border:1px solid rgba(15,23,42,.12);background:#fff;color:#0f172a;border-radius:14px;padding:13px 16px;font-weight:800;box-shadow:0 10px 30px rgba(15,23,42,.14);cursor:pointer}
.map-import-btn:hover{background:#f8fafc}
.import-panel{width:min(980px,calc(100vw - 28px));max-height:min(90dvh,900px)}
.import-body{padding:20px;overflow:auto}
.import-upload-card{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px;border:1px solid #dbe4ef;border-radius:16px;background:#f8fafc}
.import-file-label{display:grid;gap:7px;font-weight:700;min-width:min(420px,100%)}
.import-file-label input{display:block;width:100%;padding:10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff}
.import-summary{margin:18px 0 10px;font-size:14px;color:#475569}
.import-mapping-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.import-mapping-grid label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#334155}
.import-mapping-grid select{width:100%;min-height:42px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;padding:8px 10px}
.import-categories{margin:16px 0}
.import-preview-wrap{overflow:auto;max-height:300px;border:1px solid #dbe4ef;border-radius:14px;background:#fff}
.import-preview-table{border-collapse:collapse;width:max-content;min-width:100%;font-size:12px}
.import-preview-table th,.import-preview-table td{border-bottom:1px solid #eef2f7;border-right:1px solid #eef2f7;padding:8px 10px;max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.import-preview-table th{position:sticky;top:0;background:#f8fafc;z-index:1;font-weight:800;color:#334155}
.import-actions{display:flex;justify-content:flex-end;margin-top:16px}
.import-result-details{margin-top:12px;padding:12px 14px;border-radius:12px;background:#fff7ed;color:#9a3412;max-height:180px;overflow:auto;font-size:13px}
.import-result-details ul{margin:8px 0 0;padding-left:20px}
@media(max-width:720px){
  .map-primary-actions{flex-direction:column;align-items:stretch;gap:6px}
  .map-import-btn,.map-create-btn{width:100%}
  .import-panel{width:100vw;max-width:none;height:100dvh;max-height:100dvh;border-radius:0}
  .import-body{padding:14px;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  .import-mapping-grid{grid-template-columns:1fr}
  .import-upload-card{align-items:stretch}
  .import-file-label{min-width:100%}
  .import-actions .btn{width:100%}
}


/* v2.7.1 import status */
.import-fixed-status{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #d8dee9;border-radius:12px;background:#f6f8fb;min-height:44px}.import-fixed-status span{font-size:12px;color:#667085}.import-fixed-status strong{font-size:15px;color:#667085}.import-fixed-status small{font-size:11px;line-height:1.35;color:#8a94a6}

/* v2.7.2 import reliability */
.import-message-visible{margin-top:14px}
.import-actions-always{display:flex;justify-content:flex-end;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid #e2e8f0}
.import-actions-always .btn[disabled]{opacity:.48;cursor:not-allowed}
@media(max-width:760px){.import-actions-always{position:sticky;bottom:0;background:#fff;padding-bottom:calc(8px + env(safe-area-inset-bottom));z-index:4}.import-actions-always .btn{width:100%}}


/* v2.7.6 — temporary emphasis after opening an object through its QR code. */
.object-marker-shell.qr-focus-marker .object-marker-cluster,
.qr-focus-marker .object-marker-cluster {
  animation: qrFocusPulse 0.75s ease-in-out 3;
}
@keyframes qrFocusPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37,99,235,0)); }
  50% { transform: scale(1.13); filter: drop-shadow(0 0 8px rgba(37,99,235,.65)); }
}

/* v2.7.10 redesigned map popup */
.object-popup .leaflet-popup-content-wrapper{border-radius:20px;overflow:hidden;border:1px solid rgba(15,23,42,.08);box-shadow:0 22px 56px rgba(15,23,42,.22)}
.object-popup .leaflet-popup-content{margin:0!important;width:340px!important;max-width:calc(100vw - 44px)!important}
.compact-object-popup-v2710{position:relative;padding:18px 18px 15px;display:grid;gap:13px;background:#fff;color:#0f172a}
.compact-object-popup-v2710::before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:var(--status,#2563eb)}
.compact-object-popup-v2710 .compact-popup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-top:2px}
.compact-object-popup-v2710 .compact-popup-heading{min-width:0;flex:1}
.compact-object-popup-v2710 .compact-popup-number{font-size:10px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:#64748b}
.compact-object-popup-v2710 .compact-popup-title{margin-top:4px;font-size:20px;line-height:1.12;font-weight:900;letter-spacing:-.015em;color:#111827;overflow-wrap:anywhere}
.compact-popup-address{margin-top:6px;font-size:11px;line-height:1.35;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.compact-object-popup-v2710 .compact-popup-status{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;border:1px solid color-mix(in srgb,var(--status) 35%,#fff);background:color-mix(in srgb,var(--status) 9%,#fff);font-size:10px;font-weight:900;color:var(--status)}
.compact-object-popup-v2710 .compact-popup-status i{width:7px;height:7px;border-radius:50%;background:var(--status);box-shadow:0 0 0 3px color-mix(in srgb,var(--status) 13%,transparent)}
.compact-object-popup-v2710 .compact-popup-systems{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-height:0}
.compact-system-chip{display:inline-flex;align-items:center;gap:6px;min-height:29px;padding:5px 9px;border-radius:9px;border:1px solid #dce5ef;background:#f8fafc;color:#334155;font-size:10px;font-weight:850;line-height:1}
.compact-system-chip-icon{display:inline-flex;font-size:14px;line-height:1}.compact-system-chip sup{display:grid;place-items:center;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#0f172a;color:#fff;font-size:8px;margin-left:1px}
.compact-system-fire{background:#fff5f5;border-color:#fecaca;color:#991b1b}.compact-system-security{background:#eff6ff;border-color:#bfdbfe;color:#1e40af}.compact-system-cctv{background:#f5f3ff;border-color:#ddd6fe;color:#5b21b6}.compact-system-access{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.compact-system-network{background:#ecfeff;border-color:#a5f3fc;color:#155e75}.compact-system-bis{background:#f0fdf4;border-color:#bbf7d0;color:#166534}.compact-system-other{background:#f8fafc;border-color:#e2e8f0;color:#475569}
.compact-object-popup-v2710 .compact-system-more{display:inline-flex;align-items:center;min-height:29px;padding:5px 8px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0;color:#64748b;font-size:10px;font-weight:900}
.compact-popup-contact-v2{padding:11px 12px;border-radius:14px;background:#f8fafc;border:1px solid #e6ebf1;display:grid;gap:5px}
.compact-object-popup-v2710 .compact-popup-label{font-size:9px;font-weight:900;letter-spacing:.065em;text-transform:uppercase;color:#64748b}
.compact-contact-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.compact-contact-copy{display:grid;gap:2px;min-width:0}.compact-contact-copy strong{font-size:13px;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-contact-copy a{font-size:14px;font-weight:900;color:#0b63c8;text-decoration:none;width:max-content;max-width:100%}.compact-call-button{flex:0 0 auto;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#e8f1ff;border:1px solid #c7dcff;color:#0b63c8!important;text-decoration:none!important;font-size:18px;font-weight:900}
.compact-popup-stats{display:grid;grid-template-columns:1fr 1fr;border:1px solid #e6ebf1;border-radius:14px;overflow:hidden;background:#fff}.compact-stat{min-width:0;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:8px;border-right:1px solid #edf1f5;border-bottom:1px solid #edf1f5}.compact-stat:nth-child(2n){border-right:0}.compact-stat:nth-last-child(-n+2){border-bottom:0}.compact-stat span{font-size:9px;font-weight:800;color:#64748b;white-space:nowrap}.compact-stat strong{font-size:11px;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.compact-object-popup-v2710 .compact-primary{width:100%;min-height:44px;border:0;border-radius:12px;background:#0b63c8;color:#fff!important;font-size:12px;font-weight:900;letter-spacing:.01em;box-shadow:0 6px 14px rgba(11,99,200,.18);cursor:pointer}
.compact-popup-bottom-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.compact-action-menu{position:relative;padding:0;border:0}.compact-action-menu>summary{list-style:none;display:flex;align-items:center;justify-content:center;min-height:39px;padding:8px 10px;border-radius:11px;border:1px solid #dbe3ec;background:#fff;color:#334155;font-size:10px;font-weight:850;cursor:pointer;user-select:none}.compact-action-menu>summary::-webkit-details-marker{display:none}.compact-action-menu[open]>summary{background:#f8fafc;border-color:#cbd5e1}.compact-action-menu>summary::after{content:' ▾';margin-left:4px}.compact-action-menu[open]>summary::after{content:' ▴'}
.compact-action-menu-list,.compact-more-menu{grid-column:1/-1;margin-top:7px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.compact-action-menu-list a,.compact-more-action{display:flex;align-items:center;justify-content:center;min-height:36px;padding:7px 8px;border-radius:9px;border:1px solid #dbe3ec;background:#fff;color:#1f2937!important;font:inherit;font-size:10px;font-weight:800;text-decoration:none!important;cursor:pointer}.compact-action-menu-list a:hover,.compact-more-action:hover{background:#f8fafc}.compact-danger{grid-column:1/-1;background:#fff1f2!important;border-color:#fecdd3!important;color:#b91c1c!important}
.compact-object-popup-v2710 .compact-more{border-top:0;padding-top:0}.compact-object-popup-v2710 .compact-more summary{text-align:center}
@supports not (color:color-mix(in srgb,red 50%,white)){.compact-object-popup-v2710 .compact-popup-status{background:#f8fafc;border-color:#dbe3ec}.compact-object-popup-v2710 .compact-popup-status i{box-shadow:none}}
@media(max-width:620px){.object-popup .leaflet-popup-content{width:min(346px,calc(100vw - 48px))!important}.compact-object-popup-v2710{padding:16px 15px 14px;gap:11px}.compact-object-popup-v2710 .compact-popup-title{font-size:19px}.compact-popup-address{font-size:11px}.compact-system-chip{min-height:31px}.compact-popup-contact-v2{padding:10px 11px}.compact-call-button{width:40px;height:40px}.compact-object-popup-v2710 .compact-primary{min-height:46px}.compact-action-menu>summary{min-height:42px;font-size:11px}.compact-action-menu-list a,.compact-more-action{min-height:40px;font-size:11px}.compact-stat{padding:9px}.compact-stat span{font-size:8.5px}.compact-stat strong{font-size:10.5px}}
/* v2.7.10 popup dropdown refinement */
.object-popup .leaflet-popup-content-wrapper{overflow:visible}
.compact-object-popup-v2710{border-radius:20px}
.compact-object-popup-v2710 .compact-popup-head{padding-right:32px}
.object-popup .leaflet-popup-close-button{top:7px;right:7px;width:28px;height:28px;line-height:25px;border-radius:50%;color:#64748b!important;font-size:19px;font-weight:500;z-index:20}
.object-popup .leaflet-popup-close-button:hover{background:#f1f5f9;color:#0f172a!important}
.compact-popup-bottom-actions{position:relative}
.compact-action-menu{position:static}
.compact-action-menu-list,.compact-action-menu .compact-more-menu{position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:60;margin:0;padding:8px;border:1px solid #dbe3ec;border-radius:12px;background:#fff;box-shadow:0 16px 34px rgba(15,23,42,.16)}

/* v2.8.0 — Excel export, advanced filters, statistics, history, data quality */
.advanced-filter-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:#fff;color:#334155;font:inherit;font-size:11px;font-weight:850;cursor:pointer}
.advanced-filter-toggle:hover{background:#f8fafc}.advanced-filter-toggle span{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#2563eb;color:#fff;font-size:9px}
.advanced-filters-panel{margin-top:8px;padding:10px;border:1px solid #dbe3ec;border-radius:12px;background:#f8fafc;display:grid;gap:9px}.advanced-filters-panel[hidden]{display:none}
.advanced-filter-title{font-size:9px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:#64748b}
.advanced-category-filters,.advanced-quality-filters{display:flex;flex-wrap:wrap;gap:6px}.advanced-category-filters label,.advanced-quality-filters label{display:inline-flex;align-items:center;gap:5px;margin:0;padding:6px 8px;border:1px solid #dbe3ec;border-radius:9px;background:#fff;color:#334155;font-size:10px;font-weight:750;cursor:pointer}.advanced-category-filters input,.advanced-quality-filters input{width:auto;margin:0;accent-color:#2563eb}.advanced-category-filters label:has(input:checked),.advanced-quality-filters label:has(input:checked){border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}.advanced-category-filters label span{display:inline-flex;align-items:center;gap:4px}.advanced-filter-icon{font-size:13px}
.filter-preset-row{display:grid;grid-template-columns:1fr auto auto;gap:6px}.filter-preset-row select{min-width:0;font-size:10px}.filter-preset-row .btn{padding:6px 8px;font-size:9px}

.map-stats-panel{position:absolute;z-index:790;top:12px;left:50%;transform:translateX(-50%);display:flex;gap:6px;padding:6px;border:1px solid rgba(148,163,184,.38);border-radius:14px;background:rgba(255,255,255,.94);box-shadow:0 10px 30px rgba(15,23,42,.14);backdrop-filter:blur(10px);max-width:calc(100% - 430px);overflow-x:auto;scrollbar-width:none}.map-stats-panel::-webkit-scrollbar{display:none}.map-stats-panel button{flex:0 0 auto;min-width:70px;padding:6px 9px;border:0;border-radius:9px;background:transparent;color:#475569;font:inherit;cursor:pointer;display:grid;gap:1px;text-align:left}.map-stats-panel button:hover{background:#f1f5f9}.map-stats-panel button span{font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.045em}.map-stats-panel button strong{font-size:15px;line-height:1.1;color:#0f172a}.map-stats-panel button[data-stat-status="OK"] strong{color:#15803d}.map-stats-panel button[data-stat-status="Problem"] strong{color:#b91c1c}.map-stats-panel button[data-stat-status="Service"] strong{color:#1d4ed8}.map-stats-panel button[data-stat-status="Disabled"] strong{color:#64748b}.map-stats-panel button[data-stat-quality] strong{color:#b45309}

.footer-export-menu{position:relative}.footer-export-menu>summary{list-style:none;cursor:pointer}.footer-export-menu>summary::-webkit-details-marker{display:none}.footer-export-list{position:absolute;left:0;bottom:calc(100% + 6px);z-index:1100;display:grid;min-width:165px;padding:6px;border:1px solid #dbe3ec;border-radius:10px;background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.18)}.footer-export-list button{border:0;border-radius:7px;background:#fff;padding:8px 9px;text-align:left;color:#334155;font:inherit;font-size:10px;font-weight:800;cursor:pointer}.footer-export-list button:hover{background:#f1f5f9}

.object-card.has-data-issues{box-shadow:inset 3px 0 0 #f59e0b}.object-quality-mini{display:inline-flex;align-items:center;gap:2px;margin-left:5px;padding:2px 5px;border-radius:999px;background:#fff7ed;color:#b45309;font-size:8px;font-weight:900;vertical-align:middle}
.compact-quality-alert{display:flex;align-items:center;min-height:30px;padding:7px 9px;border:1px solid #fed7aa;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:10px;font-weight:850}
.full-card-quality{border-color:#fed7aa!important;background:#fffaf3!important}.full-card-quality .full-card-section-head>span{display:grid;place-items:center;min-width:24px;height:24px;border-radius:999px;background:#f59e0b;color:#fff;font-size:10px;font-weight:900}.full-card-quality-list{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.full-card-quality-list span{padding:6px 8px;border:1px solid #fed7aa;border-radius:9px;background:#fff;color:#9a3412;font-size:10px;font-weight:800}
.object-history{display:grid;gap:0;margin-top:4px}.history-item{position:relative;display:grid;grid-template-columns:14px 1fr;gap:8px;padding:8px 0}.history-item:not(:last-child){border-bottom:1px solid #eef2f6}.history-dot{width:8px;height:8px;margin-top:4px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px #dcfce7}.history-item.history-failure .history-dot{background:#ef4444;box-shadow:0 0 0 3px #fee2e2}.history-item.history-blocked .history-dot{background:#f59e0b;box-shadow:0 0 0 3px #fef3c7}.history-item>div{min-width:0;display:grid;gap:2px}.history-item strong{font-size:11px;color:#1e293b}.history-item small{font-size:9px;color:#64748b}.full-card-empty.is-error{color:#b91c1c}

@media(max-width:1100px){.map-stats-panel{left:12px;right:12px;transform:none;max-width:none;top:64px}.map-create-cluster{top:12px}}
@media(max-width:900px){.map-stats-panel{top:64px;left:10px;right:10px}.map-stats-panel button{min-width:64px}.map-stats-panel button span{font-size:7.5px}.map-stats-panel button strong{font-size:14px}}
@media(max-width:620px){.advanced-filters-panel{padding:9px}.filter-preset-row{grid-template-columns:1fr 1fr}.filter-preset-row select{grid-column:1/-1}.map-stats-panel{top:66px;left:8px;right:8px;padding:5px}.map-stats-panel button{min-width:62px;padding:5px 7px}.footer-export-list{position:fixed;left:12px;right:12px;bottom:76px;min-width:0}.compact-quality-alert{font-size:9.5px}}

/* v2.8.1 — stable popup layout after status/quality filtering */
.object-popup .leaflet-popup-content{
  width:min(360px,calc(100vw - 44px))!important;
  max-width:none!important;
  box-sizing:border-box;
}
.compact-object-popup-v2710{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  grid-auto-flow:row;
  grid-auto-rows:max-content;
}
.compact-object-popup-v2710>*{min-width:0;box-sizing:border-box}
.compact-object-popup-v2710 .compact-popup-head,
.compact-object-popup-v2710 .compact-contact-row,
.compact-object-popup-v2710 .compact-popup-bottom-actions{min-width:0}

/* Keep the phone action perfectly circular. Older generic link rules used
   width:max-content, which could squeeze it into a narrow vertical pill. */
.compact-popup-contact-v2 .compact-call-button{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  aspect-ratio:1/1;
  border-radius:50%!important;
  flex:0 0 38px!important;
  line-height:1;
}

/* Stable 2×2 info grid. The value (especially the service date) always gets
   enough room; the label yields first instead of clipping the date. */
.compact-popup-stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.compact-stat{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;
  column-gap:7px;
}
.compact-stat .compact-stat-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.compact-stat .compact-stat-value{
  min-width:max-content;
  max-width:none;
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.compact-stat-service .compact-stat-value{font-size:10.5px}

/* Optional data-quality row must not alter the geometry of neighbouring
   sections when it appears/disappears after filtering. */
.compact-quality-alert{
  width:100%;
  box-sizing:border-box;
  margin:0;
}

@media(max-width:620px){
  .object-popup .leaflet-popup-content{
    width:min(356px,calc(100vw - 36px))!important;
    max-width:none!important;
  }
  .compact-object-popup-v2710{padding:15px 14px 13px;gap:10px}
  .compact-popup-contact-v2 .compact-call-button{
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    flex-basis:40px!important;
  }
  .compact-stat{padding:9px 8px;column-gap:5px}
  .compact-stat .compact-stat-label{font-size:8.5px}
  .compact-stat .compact-stat-value{font-size:10.5px}
  .compact-stat-service .compact-stat-value{font-size:10px}
}

@media(max-width:360px){
  .object-popup .leaflet-popup-content{width:calc(100vw - 28px)!important}
  .compact-popup-stats{grid-template-columns:1fr}
  .compact-stat,.compact-stat:nth-child(2n),.compact-stat:nth-last-child(-n+2){border-right:0;border-bottom:1px solid #edf1f5}
  .compact-stat:last-child{border-bottom:0}
}

/* v2.8.2 — mobile map header: three clean non-overlapping rows */
@media(max-width:900px){
  /* Row 1: menu + search + result count */
  .mobile-map-toolbar.mobile-only{
    top:max(8px,env(safe-area-inset-top));
    left:8px;
    right:8px;
    gap:7px;
    z-index:980;
  }
  .mobile-toolbar-menu,
  .mobile-search-box,
  .mobile-result-count{
    box-shadow:0 5px 18px rgba(15,23,42,.14);
  }

  /* Row 2: horizontally scrollable statistics */
  .map-stats-panel{
    top:calc(max(8px,env(safe-area-inset-top)) + 54px);
    left:8px;
    right:8px;
    transform:none;
    max-width:none;
    min-height:46px;
    padding:5px;
    gap:3px;
    border-radius:13px;
    z-index:970;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
  }
  .map-stats-panel button{
    min-width:61px;
    padding:5px 7px;
    border-radius:9px;
  }
  .map-stats-panel button span{font-size:7.5px}
  .map-stats-panel button strong{font-size:14px}

  /* Row 3: Leaflet controls on the left, object actions on the right. */
  .map-create-cluster{
    top:calc(max(8px,env(safe-area-inset-top)) + 106px);
    left:auto;
    right:8px;
    z-index:960;
    gap:6px;
  }
  .map-primary-actions{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-end;
    gap:6px!important;
  }
  .map-primary-actions .map-create-btn,
  .map-primary-actions .map-import-btn{
    width:auto!important;
    max-width:none!important;
    min-height:38px;
    padding:7px 10px;
    border-radius:11px;
    font-size:11px;
    line-height:1.1;
    white-space:nowrap;
  }
  .map-primary-actions .map-create-btn{background:#111827}
  .map-primary-actions .map-import-btn{background:rgba(255,255,255,.97)}

  .leaflet-top.leaflet-left{
    top:calc(max(8px,env(safe-area-inset-top)) + 106px);
    left:2px;
  }

  /* Hints/errors begin below the three-row mobile header. */
  .placement-hint{
    top:calc(max(8px,env(safe-area-inset-top)) + 154px);
  }
  .map-error{
    top:calc(max(8px,env(safe-area-inset-top)) + 154px);
  }
}

@media(max-width:430px){
  .mobile-map-toolbar.mobile-only{
    grid-template-columns:44px minmax(0,1fr) 36px;
    left:7px;
    right:7px;
    gap:6px;
  }
  .mobile-search-box{border-radius:13px}
  .mobile-result-count{min-width:36px;width:36px;padding:0;font-size:10px}
  .map-stats-panel{
    top:calc(max(8px,env(safe-area-inset-top)) + 52px);
    left:7px;
    right:7px;
  }
  .map-stats-panel button{min-width:59px;padding:5px 6px}
  .map-create-cluster{
    top:calc(max(8px,env(safe-area-inset-top)) + 103px);
    right:7px;
  }
  .map-primary-actions .map-create-btn,
  .map-primary-actions .map-import-btn{
    min-height:37px;
    padding:7px 9px;
    font-size:10.5px;
  }
  .leaflet-top.leaflet-left{
    top:calc(max(8px,env(safe-area-inset-top)) + 103px);
  }
  .placement-hint,.map-error{
    top:calc(max(8px,env(safe-area-inset-top)) + 150px);
  }
}

@media(max-width:360px){
  .map-primary-actions .map-create-btn,
  .map-primary-actions .map-import-btn{
    padding-left:7px;
    padding-right:7px;
    font-size:10px;
  }
}

/* v2.8.3 — centered mobile object card.
   On phones/tablets the object summary opens inside the free map viewport,
   below the three-row header, instead of being anchored to the marker. */
.mobile-object-card-overlay{display:none}

@media(max-width:900px){
  .mobile-object-card-overlay:not([hidden]){
    position:absolute;
    z-index:1450;
    left:0;
    right:0;
    top:calc(max(8px,env(safe-area-inset-top)) + 154px);
    bottom:max(38px,env(safe-area-inset-bottom));
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px 10px;
    box-sizing:border-box;
    background:rgba(15,23,42,.055);
    backdrop-filter:blur(1.2px);
    -webkit-backdrop-filter:blur(1.2px);
    overscroll-behavior:contain;
  }
  .mobile-object-card-shell{
    position:relative;
    width:min(390px,100%);
    max-width:100%;
    max-height:100%;
    overflow:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    border:1px solid rgba(15,23,42,.09);
    border-radius:20px;
    background:#fff;
    box-shadow:0 22px 60px rgba(15,23,42,.28);
  }
  .mobile-object-card-body{width:100%;min-width:0}
  .mobile-object-card-body .compact-object-popup-v2710{
    width:100%;
    min-width:0;
    border-radius:20px;
    box-shadow:none;
  }
  .mobile-object-card-close{
    position:absolute;
    z-index:80;
    top:8px;
    right:8px;
    width:31px;
    height:31px;
    padding:0;
    display:grid;
    place-items:center;
    border:0;
    border-radius:50%;
    background:rgba(248,250,252,.96);
    color:#64748b;
    font:500 22px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    box-shadow:0 1px 4px rgba(15,23,42,.08);
    cursor:pointer;
  }
  .mobile-object-card-close:active{background:#e2e8f0;color:#0f172a}

  /* Menus expand inside the centered card, never outside the visible area. */
  .mobile-object-card-body .compact-action-menu[open]{grid-column:1/-1}
  .mobile-object-card-body .compact-action-menu-list,
  .mobile-object-card-body .compact-action-menu .compact-more-menu{
    position:static!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    margin-top:7px;
    box-shadow:none;
  }
}

@media(max-width:430px){
  .mobile-object-card-overlay:not([hidden]){
    top:calc(max(8px,env(safe-area-inset-top)) + 150px);
    left:0;
    right:0;
    padding:7px 8px;
  }
  .mobile-object-card-shell{width:min(382px,100%);border-radius:18px}
  .mobile-object-card-body .compact-object-popup-v2710{border-radius:18px}
}

@media(max-width:900px) and (max-height:760px){
  .mobile-object-card-overlay:not([hidden]){
    align-items:flex-start;
    bottom:max(8px,env(safe-area-inset-bottom));
  }
  .mobile-object-card-body .compact-object-popup-v2710{padding-top:14px;padding-bottom:12px;gap:9px}
}

/* v2.9.1 cluster settings */
.work-map-link{margin:0 14px 10px;flex-shrink:0;font-size:13px}
.cluster-settings{position:relative;margin:0 14px 6px;border:1px solid var(--border);border-radius:11px;background:#f8fafc;flex-shrink:0}
.cluster-settings summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;cursor:pointer;font-size:12px;font-weight:700;list-style:none}
.cluster-settings summary::-webkit-details-marker{display:none}
.cluster-settings summary::after{content:'⌄';color:var(--muted)}
.cluster-settings[open] summary::after{content:'⌃'}
.cluster-settings summary strong{margin-left:auto;white-space:nowrap;color:#2563eb;font-size:11px}
.cluster-settings summary:focus-visible{outline:2px solid #2563eb;outline-offset:2px;border-radius:10px}
.cluster-settings-body{position:absolute;top:calc(100% + 4px);left:-1px;right:-1px;z-index:10;padding:12px;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:var(--shadow);max-height:45dvh;overflow-y:auto}
.cluster-settings-body label{margin:0 0 6px;font-size:12px}
.cluster-settings-body select{max-width:100%;min-height:44px;font-size:12px}
.cluster-settings-hint,.cluster-settings-note{margin:8px 0 0;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.cluster-settings-hint{color:#334155}
.cluster-settings-note{color:var(--muted)}
@media(max-width:620px){.cluster-settings-body select{font-size:16px}}
/* v2.9.0 operational tools */
.sidebar-quick-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 14px 10px}
.sidebar-quick-tools .btn{min-height:38px;font-size:13px;padding:8px 10px}
.bulk-action-bar{margin:0 14px 10px;padding:9px 10px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;display:flex;align-items:center;gap:8px;justify-content:space-between}
.bulk-action-bar[hidden]{display:none!important}.bulk-action-bar span{font-size:13px;color:#475569}.bulk-action-bar strong{color:#0f172a}
.object-card.bulk-selected{outline:2px solid #2563eb;background:#eff6ff}.bulk-select-dot{flex:0 0 22px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#dbeafe;color:#1d4ed8;font-weight:800}
#bulkModeButton.active{background:#dbeafe;border-color:#93c5fd;color:#1d4ed8}
.simple-map-cluster-shell{background:transparent!important;border:0!important}.simple-map-cluster{width:52px;height:52px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border:4px solid #2563eb;color:#0f172a;box-shadow:0 8px 22px rgba(15,23,42,.28);font-weight:800}.simple-map-cluster strong{font-size:17px;line-height:1}.simple-map-cluster small{font-size:10px;line-height:1.2;color:#64748b;margin-top:3px}.simple-map-cluster.has-problem{border-color:#dc2626}
.utility-panel{width:min(720px,calc(100vw - 28px));max-height:min(82vh,820px)}.utility-list{padding:12px 18px 20px;display:flex;flex-direction:column;gap:9px;overflow:auto}.utility-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;border:1px solid #e2e8f0;border-radius:13px;background:#fff}.utility-row>div:first-child{min-width:0}.utility-row strong{display:block;color:#0f172a}.utility-row small{display:block;color:#64748b;margin-top:3px;white-space:normal}.utility-row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.utility-object-button{width:100%;text-align:left;cursor:pointer;font:inherit}.utility-object-button>span{font-size:28px;color:#94a3b8}.problem-tabs{padding:10px 18px 0;display:flex;gap:7px;flex-wrap:wrap}.problem-tabs button{border:1px solid #d8e0ea;background:#fff;border-radius:999px;padding:7px 11px;font-weight:700;color:#475569}.problem-tabs button.active{background:#e8f1ff;border-color:#93c5fd;color:#1d4ed8}
.history-diff{margin-top:8px;display:grid;gap:6px}.history-diff>div{padding:7px 8px;border-radius:9px;background:#f8fafc}.history-diff b{font-size:11px;color:#64748b;display:block;margin-bottom:3px}.history-diff span{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:12px}.history-diff del{color:#991b1b;background:#fee2e2;text-decoration:none;padding:2px 5px;border-radius:5px}.history-diff ins{color:#166534;background:#dcfce7;text-decoration:none;padding:2px 5px;border-radius:5px}.history-diff i{font-style:normal;color:#94a3b8}
.import-change-list{margin-top:10px;display:grid;gap:8px;max-height:280px;overflow:auto}.import-change-item{border:1px solid #dbe4ef;border-radius:10px;padding:10px;background:#fff}.import-change-item>b{display:block;margin-bottom:6px}.import-change-item span{display:block;font-size:12px;margin:4px 0}.import-change-item em{font-style:normal;color:#64748b}.import-change-item del,.import-change-item ins{text-decoration:none;padding:1px 4px;border-radius:4px}.import-change-item del{background:#fee2e2;color:#991b1b}.import-change-item ins{background:#dcfce7;color:#166534}
.backup-list{display:grid;gap:9px}.backup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e2e8f0;border-radius:12px}.backup-row small{display:block;color:#64748b;margin-top:3px}
.btn-danger{border-color:#fecaca!important;color:#b91c1c!important;background:#fff1f2!important}
@media(max-width:900px){.sidebar-quick-tools{grid-template-columns:1fr 1fr;padding-left:12px;padding-right:12px}.utility-panel{width:calc(100vw - 18px);max-height:calc(100dvh - 34px)}.utility-row{align-items:flex-start;flex-direction:column}.utility-row-actions{width:100%;justify-content:stretch}.utility-row-actions .btn{flex:1}.problem-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.bulk-action-bar{position:sticky;bottom:0;z-index:4;background:rgba(248,250,252,.96);backdrop-filter:blur(10px)}}


/* v3.0.2 — nearby search radius and result limit */
.nearby-panel{display:flex;flex-direction:column;overflow:hidden}
.nearby-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 18px 8px;border-top:1px solid #eef2f7;border-bottom:1px solid #eef2f7;background:#f8fafc}
.nearby-control{display:flex;flex-direction:column;gap:6px;min-width:0}
.nearby-control>span{font-size:12px;font-weight:800;letter-spacing:.02em;color:#64748b}
.nearby-control select{width:100%;min-height:42px;border:1px solid #d8e0ea;border-radius:12px;background:#fff;padding:0 38px 0 12px;font:inherit;font-weight:750;color:#0f172a;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.nearby-control select:focus{outline:3px solid rgba(59,130,246,.15);border-color:#60a5fa}
.nearby-summary{padding:10px 18px 4px;font-size:13px;font-weight:700;color:#64748b;background:#fff}
.nearby-list{padding-top:8px;min-height:0;flex:1}
.nearby-row strong{font-size:16px;line-height:1.28}
.nearby-row small{font-size:14px;line-height:1.35}
.nearby-loading{min-height:160px;display:flex;align-items:center;justify-content:center;gap:10px;color:#64748b;font-weight:700}
.nearby-spinner{width:18px;height:18px;border:2px solid #cbd5e1;border-top-color:#3b82f6;border-radius:50%;animation:nearby-spin .7s linear infinite}
@keyframes nearby-spin{to{transform:rotate(360deg)}}
.nearby-empty{margin:6px 0;padding:20px 16px;border:1px dashed #cbd5e1;border-radius:14px;background:#f8fafc;text-align:center;color:#64748b}
.nearby-empty strong{display:block;color:#334155;margin-bottom:4px}.nearby-empty span{font-size:13px}
@media(max-width:900px){
  .nearby-panel{width:100%;max-height:none;height:100dvh;padding-bottom:max(16px,env(safe-area-inset-bottom))}
  .nearby-toolbar{grid-template-columns:1fr 1fr;gap:8px;padding:10px 14px 8px;position:sticky;top:0;z-index:2}
  .nearby-summary{padding:9px 14px 4px;position:sticky;top:70px;z-index:2}
  .nearby-list{padding:8px 14px max(24px,env(safe-area-inset-bottom));overflow:auto;-webkit-overflow-scrolling:touch}
  .nearby-control>span{font-size:11px}.nearby-control select{min-height:44px;padding-left:10px;font-size:15px}
  .nearby-row{padding:14px 13px;gap:12px}.nearby-row strong{font-size:17px}.nearby-row small{font-size:14px}
  .nearby-row .utility-row-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.nearby-row .utility-row-actions .btn{width:100%;min-height:42px}
}
@media(max-width:360px){.nearby-toolbar{grid-template-columns:1fr}.nearby-summary{position:static}.nearby-control{display:grid;grid-template-columns:92px 1fr;align-items:center}.nearby-control>span{font-size:11px}}

/* v3.0.4 — drafts, timeline, data quality, diagnostics */
.draft-notice{display:flex;gap:14px;align-items:center;justify-content:space-between;margin:0 0 14px;padding:12px 14px;border:1px solid #f59e0b55;border-radius:14px;background:#fffbeb;color:#92400e}.draft-notice>div:first-child{display:flex;flex-direction:column;gap:3px}.draft-notice strong{font-size:14px}.draft-notice span{font-size:12px;opacity:.8}.draft-notice-actions{display:flex;gap:8px;flex-wrap:wrap}
.object-timeline{position:relative;display:flex;flex-direction:column;gap:0}.timeline-item{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;padding:0 0 16px}.timeline-item:not(:last-child)::before{content:"";position:absolute;left:16px;top:31px;bottom:0;width:2px;background:#e2e8f0}.timeline-marker{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#eff6ff;border:1px solid #bfdbfe;font-size:15px}.timeline-content{min-width:0;padding:4px 0}.timeline-head{display:flex;gap:10px;justify-content:space-between;align-items:flex-start}.timeline-head strong{font-size:14px}.timeline-head time{font-size:11px;color:#64748b;white-space:nowrap}.timeline-content p{margin:6px 0 0;color:#475569;white-space:pre-wrap}.timeline-content small{display:block;margin-top:5px;color:#64748b}.timeline-status{display:inline-block;margin-top:5px;padding:2px 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:11px}.timeline-change-count{margin-top:5px;font-size:11px;color:#2563eb}
.quality-admin-summary,.system-health-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.quality-admin-summary>div,.system-health-card{padding:16px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.quality-admin-summary strong,.system-health-card strong{display:block;font-size:28px}.quality-admin-summary span,.system-health-card span,.system-health-card small{display:block;color:#64748b;font-size:12px}.quality-admin-filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:16px}.quality-admin-filters label{min-width:200px;display:grid;gap:5px}.quality-admin-list{display:grid;gap:10px}.quality-admin-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.quality-admin-main{min-width:0;display:grid;gap:5px}.quality-admin-main>span{color:#64748b;font-size:13px}.quality-admin-chips{display:flex;gap:6px;flex-wrap:wrap}.quality-admin-chips span{padding:3px 8px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:11px}.quality-admin-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.system-health-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.system-health-card{background:#f8fafc}.system-health-card.is-ok{border-color:#86efac;background:#f0fdf4}.system-health-card.is-bad{border-color:#fecaca;background:#fef2f2}.system-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.system-info-grid>div{padding:12px;border:1px solid #e2e8f0;border-radius:12px}.system-info-grid span{display:block;color:#64748b;font-size:12px}.system-info-grid strong{display:block;margin-top:3px}.system-live-test{display:flex;align-items:center;gap:12px;margin-top:16px}.system-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.system-log-list{display:grid;gap:8px}.system-log-item{border:1px solid #e2e8f0;border-radius:12px;background:#fff}.system-log-item summary{display:grid;grid-template-columns:145px 220px minmax(0,1fr);gap:10px;padding:12px;cursor:pointer}.system-log-item summary span,.system-log-item summary small{color:#64748b;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.system-log-item>div{padding:0 12px 12px}.system-log-item pre{max-height:260px;overflow:auto;background:#0f172a;color:#e2e8f0;padding:10px;border-radius:10px;font-size:11px;white-space:pre-wrap}
@media(max-width:760px){.draft-notice,.quality-admin-row{align-items:stretch;flex-direction:column}.quality-admin-summary,.system-health-grid,.system-info-grid{grid-template-columns:1fr 1fr}.system-log-item summary{grid-template-columns:1fr}.timeline-head{display:block}.timeline-head time{display:block;margin-top:3px}.quality-admin-actions{justify-content:flex-start}}
@media(max-width:460px){.quality-admin-summary,.system-health-grid,.system-info-grid{grid-template-columns:1fr}}
.system-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:-2px 0 16px}.system-tabs a{padding:9px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#334155;text-decoration:none;font-weight:700;font-size:13px}.system-tabs a.active{background:#0f172a;color:#fff;border-color:#0f172a}.history-admin-list{display:grid;gap:10px}.history-admin-row{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;padding:14px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.history-admin-meta{display:grid;gap:3px}.history-admin-meta time,.history-admin-meta span{font-size:12px;color:#64748b}.history-admin-object>a{font-weight:800}.history-admin-changes{display:grid;gap:6px;margin-top:8px}.history-admin-changes>div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:8px;font-size:12px}.history-admin-changes del{color:#991b1b}.history-admin-changes ins{color:#166534;text-decoration:none}@media(max-width:760px){.history-admin-row{grid-template-columns:1fr}.history-admin-changes>div{grid-template-columns:1fr}}

/* v3.0.11 — configurable data-quality requirements */
.quality-required-panel{display:grid;gap:14px}
.quality-required-panel .system-section-head{align-items:flex-start}
.quality-required-panel .system-section-head h2{margin:0 0 5px}
.quality-required-panel .system-section-head p{margin:0;max-width:760px}
.quality-required-form{display:grid;gap:16px}
.quality-required-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.quality-required-group-title{grid-column:1/-1;margin-top:6px;padding-top:8px;border-top:1px solid #e2e8f0;font-weight:800;font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:#64748b}
.quality-required-group-title:first-child{margin-top:0;padding-top:0;border-top:0}
.quality-required-item{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #dbe3ef;border-radius:13px;background:#fff;cursor:pointer;min-width:0}
.quality-required-item:hover{border-color:#94a3b8}
.quality-required-item input{width:20px;height:20px;flex:0 0 auto;margin-top:1px}
.quality-required-item span{display:grid;gap:2px;min-width:0}
.quality-required-item strong{font-size:14px;color:#0f172a}
.quality-required-item small{font-size:11px;color:#64748b}
.quality-required-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.quality-required-actions .muted{font-size:12px}
.system-perf-phases{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.system-perf-phase{display:inline-flex;gap:5px;align-items:center;padding:4px 7px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:11px}
.system-perf-phase.is-slowest{background:#fff7ed;color:#9a3412;font-weight:700}
@media(max-width:900px){.quality-required-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.quality-required-grid{grid-template-columns:1fr}.quality-required-actions{align-items:stretch}.quality-required-actions .btn{width:100%}}

/* v3.0.14 — deterministic popup action menus (no native <details>) */
/* v3.0.16 — keep popup action clicks bubbling to delegated handlers */
.compact-action-menu-toggle{list-style:none;display:flex;align-items:center;justify-content:center;width:100%;min-height:39px;padding:8px 10px;border-radius:11px;border:1px solid #dbe3ec;background:#fff;color:#334155;font:inherit;font-size:10px;font-weight:850;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
.compact-action-menu-toggle::after{content:' ▾';margin-left:4px}
.compact-action-menu.is-open>.compact-action-menu-toggle{background:#f8fafc;border-color:#cbd5e1}
.compact-action-menu.is-open>.compact-action-menu-toggle::after{content:' ▴'}
.compact-action-menu [data-popup-menu-panel][hidden]{display:none!important}
.compact-action-menu [data-popup-menu-panel]{display:grid}
@media(max-width:620px){.compact-action-menu-toggle{min-height:42px;font-size:11px}}
.mobile-object-card-body .compact-action-menu-toggle{min-height:44px;font-size:11px}

/* v3.0.18 diagnostics */
.system-test-result{display:inline-block;max-width:100%;line-height:1.45;overflow-wrap:anywhere}
.system-perf-row{padding:12px 14px}
.system-perf-head{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.system-perf-head small{color:#64748b}
.system-perf-phase.is-summary{background:#eef2ff;color:#3730a3}
.system-perf-phase.is-unexplained{background:#fef2f2;color:#b91c1c;font-weight:800}
@media(max-width:760px){.system-live-test{align-items:flex-start;flex-direction:column}.system-perf-head{display:grid;grid-template-columns:1fr auto}.system-perf-head small{grid-column:1/-1}}
