:root {
  --navy: #14243b;
  --navy-2: #1d3858;
  --cream: #f6f0e5;
  --paper: #fffdf8;
  --line: #ded6c9;
  --muted: #6c7480;
  --blue: #1475c9;
  --green: #43836b;
  --red: #b04e4e;
  --gold: #c4953f;
  --shadow: 0 14px 40px rgba(23, 34, 50, .10);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 1180px; min-height: 720px; height: 100%; }
body { font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--navy); background: #e9eef2; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }
.desktop-app { height: 100vh; display: grid; grid-template-rows: 72px 76px minmax(0, 1fr); overflow: hidden; }
.desktop-header { display: flex; align-items: center; gap: 28px; padding: 0 24px; background: var(--navy); color: white; box-shadow: 0 4px 18px rgba(8, 19, 33, .24); z-index: 10; }
.brand { min-width: 325px; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 14px; font: 700 16px Georgia, serif; background: rgba(255,255,255,.08); }
.brand span { display: block; margin-bottom: 1px; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; opacity: .74; }
.brand h1 { margin: 0; font: 700 25px Georgia, serif; }
.top-nav { align-self: stretch; display: flex; align-items: stretch; gap: 2px; }
.top-nav-button { min-width: 108px; padding: 0 17px; border: 0; border-bottom: 3px solid transparent; color: rgba(255,255,255,.72); background: transparent; font-weight: 700; }
.top-nav-button:hover { color: white; background: rgba(255,255,255,.05); }
.top-nav-button.active { color: white; border-bottom-color: #e7bb64; background: rgba(255,255,255,.07); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync-label { display: flex; align-items: center; gap: 7px; margin-right: 4px; font-size: 12px; color: rgba(255,255,255,.76); }
.sync-label span { width: 9px; height: 9px; border-radius: 50%; background: #d1a64a; box-shadow: 0 0 0 3px rgba(209,166,74,.18); }
.sync-label.synced span { background: #65c997; box-shadow: 0 0 0 3px rgba(101,201,151,.18); }
.sync-label.syncing span { background: #64b8ff; animation: pulse 1s infinite; }
.sync-label.error span { background: #e07070; }
@keyframes pulse { 50% { opacity: .35; } }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 15px; border-radius: 11px; border: 1px solid transparent; text-decoration: none; font-weight: 700; transition: .16s ease; }
.button.primary { color: white; background: var(--navy-2); }
.button.primary:hover { background: #274e78; }
.button.secondary { color: var(--navy); border-color: var(--line); background: white; }
.button.secondary:hover { background: #f8f5ef; }
.desktop-header .button.secondary { color: white; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); }
.desktop-header .button.ghost { color: rgba(255,255,255,.82); border-color: transparent; background: transparent; }
.button.danger { color: white; background: var(--red); }
.stats-strip { position: relative; display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.stats-strip article { padding: 13px 22px 14px; background: var(--paper); }
.stats-strip article span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.stats-strip article strong { font: 700 26px Georgia, serif; }
.progress-track { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: #e5ddd0; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #c79a47, #5a9a7f); transition: width .3s ease; }
.desktop-main { min-height: 0; display: grid; grid-template-columns: 390px minmax(520px, 1fr) 340px; gap: 1px; background: #cfd6dc; }
.places-panel, .details-panel, .workspace { min-height: 0; background: var(--paper); }
.places-panel { display: flex; flex-direction: column; padding: 18px 16px 0; border-right: 1px solid var(--line); }
.panel-heading, .content-head, .admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-heading { margin-bottom: 14px; }
.eyebrow { display: block; color: #7a8290; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h2, h3 { margin: 0; }
.panel-heading h2, .content-head h2 { margin-top: 2px; font: 700 26px Georgia, serif; }
.count-pill, .status-badge { padding: 6px 10px; border-radius: 999px; color: var(--navy); background: #eee7db; font-size: 12px; font-weight: 800; }
.search-field { height: 44px; display: grid; grid-template-columns: 22px 1fr 28px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.search-field:focus-within { border-color: #8aa7c5; box-shadow: 0 0 0 3px rgba(63,111,160,.10); }
.search-field svg { width: 19px; fill: none; stroke: #808996; stroke-width: 1.7; }
.search-field input { min-width: 0; border: 0; outline: 0; color: var(--navy); background: transparent; }
.search-field button { border: 0; background: transparent; color: #8a9098; font-size: 22px; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.filter-grid label > span { display: block; margin: 0 0 5px 2px; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-grid select, .list-toolbar select, .admin-section input, .admin-login-card input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: white; outline: 0; }
.wide-filter { grid-column: 1 / -1; }
.check-filter { display: flex; align-items: center; gap: 9px; padding: 2px 3px; }
.check-filter input { width: 17px; height: 17px; }
.check-filter span { margin: 0 !important; }
.list-toolbar { display: flex; align-items: center; gap: 10px; margin: 11px 0 10px; }
.list-toolbar select { width: 150px; height: 34px; font-size: 12px; }
.text-button { margin-left: auto; border: 0; color: #53708d; background: transparent; font-size: 12px; font-weight: 700; }
.places-list { min-height: 0; overflow: auto; margin: 0 -8px; padding: 0 8px 18px; scrollbar-gutter: stable; }
.place-row { width: 100%; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: start; margin-bottom: 7px; padding: 12px; border: 1px solid transparent; border-radius: 13px; text-align: left; color: inherit; background: #f8f5ef; }
.place-row:hover { border-color: #c7d4df; background: white; }
.place-row.active { border-color: #6c93b6; background: #eef6fc; box-shadow: 0 5px 18px rgba(35,78,116,.10); }
.place-row.received { opacity: .72; }
.place-index { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: white; background: #687b90; font-size: 11px; font-weight: 800; }
.place-row.official .place-index { background: #b8832a; }
.place-row.partner .place-index { background: #7c5a9c; }
.place-row.unofficial .place-index { background: #d44747; box-shadow: 0 0 0 3px rgba(212,71,71,.13); }
.place-row.received .place-index { background: var(--green); box-shadow: none; }
.place-row h3 { margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.place-row p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.row-state { min-width: 65px; padding-top: 2px; color: #687382; font-size: 10px; font-weight: 800; text-align: right; text-transform: uppercase; }
.row-state.received { color: var(--green); }
.workspace { position: relative; overflow: hidden; }
.workspace-view { display: none; width: 100%; height: 100%; }
.workspace-view.active { display: block; }
.desktop-map { width: 100%; height: 100%; }
.map-fallback { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; background: #edf2f5; }
.map-actions { position: absolute; top: 15px; left: 50%; right: auto; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; pointer-events: none; }
.map-button { height: 38px; padding: 0 13px; border: 1px solid #cbd4dc; border-radius: 11px; color: var(--navy); background: rgba(255,255,255,.96); box-shadow: 0 5px 16px rgba(29,45,65,.13); font-weight: 700; pointer-events: auto; }
.content-view { overflow: auto; padding: 24px; background: #f3f1ed; }
.content-view.active { display: block; }
.content-head { margin-bottom: 18px; }
.content-actions { display: flex; gap: 9px; }
.file-button input { display: none; }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid #eee8df; text-align: left; vertical-align: middle; font-size: 13px; }
th { position: sticky; top: 0; z-index: 1; color: #717987; background: #f7f4ee; font-size: 11px; text-transform: uppercase; }
tbody tr:hover { background: #fbfaf7; }
td strong { display: block; margin-bottom: 2px; }
td small { color: var(--muted); }
.table-action { border: 0; color: #3c668d; background: transparent; font-weight: 700; }
.achievement-summary { display: flex; align-items: baseline; gap: 5px; padding: 10px 16px; border-radius: 14px; background: white; box-shadow: var(--shadow); }
.achievement-summary strong { font: 700 25px Georgia, serif; }
.achievement-summary span { color: var(--muted); font-size: 12px; }
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }
.achievement-card { position: relative; min-height: 164px; padding: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(37,49,63,.07); }
.achievement-card.locked { filter: grayscale(.45); opacity: .66; }
.achievement-emoji { font-size: 35px; }
.achievement-card h3 { margin: 9px 0 5px; font: 700 18px Georgia, serif; }
.achievement-card p { min-height: 34px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.achievement-progress { height: 7px; margin: 13px 0 6px; overflow: hidden; border-radius: 999px; background: #ebe6dd; }
.achievement-progress span { display: block; height: 100%; background: linear-gradient(90deg, #c39747, #7da38d); }
.achievement-meta { color: #69727e; font-size: 11px; }
.details-panel { overflow: auto; padding: 20px; border-left: 1px solid var(--line); }
.empty-details { height: 100%; display: grid; place-content: center; justify-items: center; padding: 25px; text-align: center; color: var(--muted); }
.empty-illustration { width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 14px; border: 1px dashed #aeb8c2; border-radius: 24px; font-size: 35px; }
.empty-details h2 { color: var(--navy); font: 700 22px Georgia, serif; }
.empty-details p { max-width: 230px; line-height: 1.5; }
.place-details .detail-kicker { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 999px; background: #ebe8e1; color: #56616e; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.badge.official { color: #77551c; background: #f6e3b9; }
.badge.partner { color: #654a7e; background: #eadff3; }
.badge.unofficial { color: #8d2c2c; background: #ffe0dc; }
.badge.received { color: #2f6b54; background: #dceee5; }
.place-details h2 { margin: 0 0 8px; font: 700 26px/1.15 Georgia, serif; }
.detail-address { margin: 0 0 15px; color: var(--muted); line-height: 1.45; }
.detail-section { padding: 14px 0; border-top: 1px solid #ebe5dc; }
.detail-section h3 { margin-bottom: 8px; color: #69717c; font-size: 11px; text-transform: uppercase; }
.category-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.category-chips span { padding: 5px 8px; border-radius: 8px; background: #f0ece5; font-size: 11px; }
.detail-note { margin: 0; padding: 11px; border-radius: 11px; color: #655322; background: #fff3d6; line-height: 1.45; font-size: 12px; }
.detail-actions { display: grid; gap: 9px; margin-top: 18px; }
.detail-actions .button { width: 100%; }
.admin-login-card { max-width: 460px; margin: 55px auto; padding: 30px; border: 1px solid var(--line); border-radius: 20px; text-align: center; background: white; box-shadow: var(--shadow); }
.admin-lock { font-size: 42px; }
.admin-login-card h3 { margin-top: 12px; font: 700 22px Georgia, serif; }
.admin-login-card p { color: var(--muted); line-height: 1.5; }
.admin-login-card form { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 18px; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-height: 0; }
.admin-section { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.admin-section-head { padding: 14px; border-bottom: 1px solid #eee8df; }
.admin-section-head input { width: 190px; height: 35px; }
.admin-list { max-height: calc(100vh - 265px); overflow: auto; padding: 8px; }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 8px; align-items: center; padding: 9px; border-bottom: 1px solid #f0ebe3; }
.admin-row h4 { margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.admin-row small { color: var(--muted); }
.admin-row input { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; }
.admin-row button { height: 34px; border: 0; border-radius: 9px; color: white; background: var(--navy-2); font-weight: 700; }
.status-badge.ok { color: #2f6b54; background: #dceee5; }
.dialog { padding: 0; border: 0; border-radius: 20px; color: var(--navy); box-shadow: 0 24px 80px rgba(15,28,44,.30); }
.dialog::backdrop { background: rgba(15,27,42,.55); backdrop-filter: blur(3px); }
.dialog-card { width: 430px; padding: 25px; }
.dialog-card h2 { margin-top: 3px; font: 700 25px Georgia, serif; }
.dialog-card p { color: var(--muted); line-height: 1.5; }
.dialog-card input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.form-error { margin-top: 8px; color: var(--red); font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 50; transform: translateX(-50%); padding: 11px 17px; border-radius: 12px; color: white; background: rgba(20,36,59,.94); box-shadow: var(--shadow); font-weight: 700; }
@media (min-width: 1600px) { .desktop-main { grid-template-columns: 430px minmax(650px, 1fr) 390px; } }


/* Улучшения карты ПК v3.3.1 */
.map-balloon-card { min-width: 235px; max-width: 310px; color: #14243b; font: 13px/1.45 Inter, "Segoe UI", Arial, sans-serif; }
.map-balloon-address { margin-bottom: 7px; color: #596575; font-weight: 600; }
.map-balloon-meta { margin-bottom: 6px; color: #263c57; }
.map-balloon-categories { margin-bottom: 12px; color: #465365; }
.map-balloon-categories span { color: #7a8390; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.map-balloon-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border-radius: 10px; color: white !important; background: #d44747; text-decoration: none; font-weight: 800; box-shadow: 0 5px 14px rgba(212,71,71,.22); }
.map-balloon-link:hover { background: #bc3939; }
