body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f6f8fa;
}
.container {
    display: flex;
    height: 100vh;
}
.left-panel {
    flex: 1.4;
    background: #e3e6ec;
    min-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0,0,0,0.07);
}
#map {
    width: 98%;
    height: 94vh;
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(0,0,0,0.12);
    border: 2px solid #d8dce2;
}
.right-panel {
    flex: 1;
    background: #fff;
    padding: 10px 18px 0 24px;
    box-shadow: -2px 0 12px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}
h2 {
    margin-top: 0;
    color: #2351a0;
    letter-spacing: 1px;
}
#locations-list {
    margin-bottom: 28px;
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
    padding-bottom: 8px;
}
.sticky-btn-container {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-bottom: 14px;
    padding-top: 7px;
    border-top: 1.5px solid #e3e6ec;
    display: flex;
    justify-content: flex-end;
    z-index: 2;
}
.location-entry {
    position: relative;
}
.location-entry.collapsed {
    background: #f4f6fc;
    box-shadow: 0 2px 6px rgba(100,110,170,0.08);
    min-height: 48px;
    max-height: 75px;
    padding-bottom: 8px;
    padding-top: 10px;
    overflow: hidden;
}
.location-entry.collapsed .location-row:not(.top-row) {
    display: none !important;
}
.location-entry.collapsed input:not([data-field="name"]),
.location-entry.collapsed select:not(.type-select) {
    display: none !important;
}
.location-entry.collapsed .parent-select-holder,
.location-entry.collapsed .main-alt-holder {
    display: inline-block !important;
}

.expand-collapse-btn-holder {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 6px;
    margin-bottom: -6px;
}
.expand-collapse-btn {
    background: #e7ecfa;
    border: none;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(60,90,180,0.07);
    cursor: pointer;
    font-size: 1.26em;
    color: #6687c2;
    padding: 0.18em 0.32em;
    opacity: 0.82;
    transition: background .15s, color .15s, opacity .13s;
    outline: none;
}
.expand-collapse-btn:hover {
    background: #e1e8f5;
    color: #2351a0;
    opacity: 1;
}

.location-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}
.location-entry label {
    margin-right: 4px;
    font-size: 0.99em;
    color: #2b4268;
    font-weight: 500;
}
.location-entry input[type='text'] {
    padding: 2px 8px;
    font-size: 1em;
    border: 1px solid #c7d2e6;
    border-radius: 5px;
    width: 150px;
    margin-right: 8px;
    background: #fff;
}
.location-entry input[type='text'].short {
    width: 70px;
}
.location-entry select {
    padding: 2.5px 6px;
    font-size: 0.97em;
    border-radius: 5px;
    border: 1px solid #b1b8c6;
    margin-right: 8px;
    background: #f1f5fb;
}
.location-id-tag {
    background: #e5e9f6;
    color: #274076;
    font-size: 0.92em;
    padding: 2.5px 7px;
    border-radius: 10px;
    margin-right: 7px;
    font-family: 'Consolas', monospace;
    font-weight: 600;
}
.remove-btn {
    position: absolute;
    right: 18px;
    top: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: #b81717;
    opacity: 0.7;
    z-index: 2;
    padding: 2px;
    transition: color .15s, background .15s;
}
.remove-btn:hover {
    opacity: 1;
    color: #e63946;
    background: #f5cccc;
    border-radius: 6px;
}
#export-btn {
    background: linear-gradient(90deg, #146ae4 70%, #4681e5 100%);
    color: #fff;
    border: none;
    padding: 13px 26px;
    border-radius: 7px;
    font-size: 1.08rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.18s;
    box-shadow: 0 2px 9px rgba(20,80,220,0.07);
}
#export-btn:hover {
    background: linear-gradient(90deg, #255ea8 75%, #2b75e3 100%);
}
.modal-backdrop {
    position: fixed;
    left:0; top:0; right:0; bottom:0;
    background: rgba(50,60,70,0.23);
    z-index: 1001;
}
.modal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}
.modal-content {
    background: #fff;
    padding: 32px 30px 26px 30px;
    border-radius: 13px;
    box-shadow: 0 0 25px rgba(20,50,100,0.13);
    min-width: 340px;
    text-align: center;
}
.modal-content input {
    width: 85%;
    padding: 8px;
    margin-top: 12px;
    margin-bottom: 8px;
    border: 1px solid #b0bbd9;
    border-radius: 5px;
    font-size: 1.08em;
}
.modal-btns {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 9px;
}
.modal-btns button {
    padding: 7px 23px;
    border-radius: 6px;
    border: none;
    background: #215cd2;
    color: #fff;
    font-weight: 500;
    font-size: 1.05em;
    cursor: pointer;
    transition: background 0.17s;
}
.modal-btns button:hover {
    background: #112d68;
}
.modal-btns button:last-child {
    background: #e84747;
}
.modal-btns button:last-child:hover {
    background: #9e2424;
}
.list-index-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    margin-right: 12px;
    background: linear-gradient(120deg, #4681e5 40%, #6bb0e6 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 1.21em;
    font-weight: 800;
    box-shadow: 0 1.5px 8px rgba(80,110,210,0.08);
    border: 2.5px solid #e1e8f5;
    letter-spacing: 1px;
}
#import-btn {
    background: linear-gradient(90deg, #e6ba17 70%, #eedf61 100%);
    color: #444;
    border: none;
    padding: 13px 20px;
    border-radius: 7px;
    font-size: 1.08rem;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
    transition: background 0.18s;
    box-shadow: 0 2px 9px rgba(224,200,20,0.07);
}
#import-btn:hover {
    background: linear-gradient(90deg, #ebca2b 70%, #f5ec8b 100%);
}

.trip-inputs-box {
    background: #bfc3c9;
    padding: 10px 10px 10px 10px;
    border-radius: 13px;
    margin-bottom: 22px;
    box-shadow: 0 2px 7px rgba(60,90,170,0.08);
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.input-group label {
    font-weight: 600;
    color: #2351a0;
    margin-bottom: 6px;
    font-size: 1.02em;
    letter-spacing: 0.3px;
}

.input-group input,
.input-group textarea {
    border: 1.2px solid #b6c3db;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 1em;
    margin-bottom: 0;
    margin-top: 1px;
    background: #fff;
    outline: none;
    transition: border .16s;
}

.input-group input:focus,
.input-group textarea:focus {
    border: 1.5px solid #376fe2;
}

.input-group textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    line-height: 1.36;
}

.flex-row {
    display: flex;
    gap: 15px;
}
.flex-half {
    flex: 1 1 0;
}

@media (max-width: 600px) {
    .flex-row { flex-direction: column; gap: 0; }
    .flex-half { width: 100%; }
    .trip-inputs-box { padding: 14px 7px 4px 7px; }
}

#export-json-btn {
    background: linear-gradient(90deg, #21a38b 70%, #69e3b6 100%);
    color: #fff;
    border: none;
    padding: 13px 20px;
    border-radius: 7px;
    font-size: 1.08rem;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
    transition: background 0.18s;
    box-shadow: 0 2px 9px rgba(33,163,139,0.11);
}
#export-json-btn:hover {
    background: linear-gradient(90deg, #16b286 70%, #b8f1d7 100%);
}

#passcode-backdrop {
    position: fixed;
    left:0;top:0;right:0;bottom:0;
    z-index: 9999;
    background: rgba(30,40,70,0.30);
    backdrop-filter: blur(5px);
}
#passcode-modal {
    z-index: 10000;
}
