* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
}

body {
    background: #eef2f5;
    font-family: Arial, sans-serif;
    color: #1f2937;
    height: 100vh;
    overflow: hidden;
}

.topbar {
    height: 62px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 3px 18px rgba(0,0,0,.12);
    position: relative;
    z-index: 10;
}

.crest img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.title {
    margin-left: 16px;
    font-size: 16px;
    color: #4b5563;
}

.title b {
    color: #374151;
}

.topbar .title a,
.topbar .title a:link,
.topbar .title a:visited,
.topbar .title a:hover,
.topbar .title a:active,
.topbar .title a:focus {
    color: #4b5563 !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.topbar .title a:hover {
    color: #1d4ed8 !important;
}

.lock {
    margin-left: auto;
    width: 38px;
    height: 38px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    background: white;
}

.page {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 8px;
    padding: 6px 10px 8px 10px;
    height: calc(100vh - 62px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    min-height: 0;
}

.tabs {
    height: 54px;
    background: #fff;
    display: flex;
    align-items: flex-end;
    padding-left: 28px;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    flex-shrink: 0;
}

.tabs button {
    border: none;
    background: transparent;
    padding: 15px 16px 12px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.tabs button.active {
    color: #2563eb;
    border-bottom: 4px solid #3b63df;
}

.panel {
    background: white;
    padding: 14px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.13);
    border-radius: 3px;
}

.panel h2 {
    text-align: center;
    font-size: 17px;
    margin: 0 0 12px;
    color: #475569;
}

label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-top: 9px;
}

input {
    width: 100%;
    height: 31px;
    margin-top: 5px;
    border: 1px solid #aeb7c2;
    padding: 5px 8px;
    background: white;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.actions button {
    padding: 8px 13px;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.btn-search {
    border: 1px solid #22c55e;
    color: #22c55e;
}

.btn-reset {
    border: 1px solid #94a3b8;
    color: #475569;
}

#searchBlock {
    flex-shrink: 0;
}

#descriptionBlock {
    padding: 14px 16px;
    flex-shrink: 1;
}

#descriptionBlock h2 {
    margin-bottom: 10px;
}

#descriptionBlock p {
    line-height: 1.35;
    text-align: justify;
    margin: 0;
    font-size: 12px;
}

#dataBlock {
    flex-shrink: 0;
}

#dataBlock p {
    margin: 6px 0;
    font-size: 14px;
}

#photoBlock {
    flex-shrink: 0;
}

.green-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    background: green;
    border-radius: 50%;
    margin-left: 5px;
}

.yellow-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    background: #facc15;
    border-radius: 50%;
    margin-left: 5px;
}

.link {
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
}

.link:hover {
    text-decoration: underline;
}

.hint {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.photo-placeholder {
    height: 235px;
    border: 1px solid #9ca3af;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.object-photo {
    width: 100%;
    max-height: 235px;
    object-fit: cover;
    border: 1px solid #9ca3af;
    display: block;
}

.note {
    color: #0f172a;
    font-size: 11px;
    font-style: italic;
    padding-left: 8px;
    flex-shrink: 0;
}

.note span {
    color: red;
}

.map-card {
    background: white;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 7px 20px rgba(0,0,0,.14);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.map-card h1 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 16px;
    color: #475569;
    font-weight: bold;
    flex-shrink: 0;
}

.map-card h1 span {
    font-size: 12px;
    color: #64748b;
}

#map {
    flex: 1;
    width: 100%;
    min-height: 0;
}

.hidden {
    display: none;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    font-size: 13px;
}

.popup-title {
    font-weight: normal;
    margin-bottom: 0;
    font-size: 13px;
}