/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.header {
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    z-index: 10;
}

.user-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    background: #334155;
    padding: 6px 15px;
    border-radius: 30px;
}

.user-info .label {
    font-weight: 600;
    color: #94a3b8;
    margin-right: 5px;
}

.user-info span:not(.label) {
    font-weight: 500;
    color: #f1f5f9;
}

.user-info .editable {
    cursor: pointer;
    border-bottom: 1px dashed #facc15;
    color: #facc15;
}

.search-area {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 8px 15px;
    border-radius: 30px;
    border: none;
    width: 260px;
    font-size: 14px;
    outline: none;
}

.search-btn, .clear-btn {
    background: #facc15;
    border: none;
    padding: 0 18px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
}

.clear-btn {
    background: #94a3b8;
    color: white;
}

.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.map-column {
    flex: 3;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.list-column {
    flex: 1.2;
    background: white;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-header {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
}

.update-time {
    font-size: 11px;
    color: #64748b;
}

.couriers-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.courier-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
    border-left: 5px solid #22c55e;
}

.courier-item.red {
    border-left-color: #ef4444;
}

.courier-item.gray {
    border-left-color: #9ca3af;
    opacity: 0.7;
}

.courier-name {
    font-weight: 600;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 24px;
    width: 450px;
    max-width: 90%;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}

.division-btn {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 12px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.warning-note {
    font-size: 12px;
    color: #ef4444;
    margin-top: 15px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #64748b;
}

.logout-btn {
    background: #ef4444;
    border: none;
    padding: 6px 15px;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    margin-left: 15px;
}

.logout-btn:hover {
    background: #dc2626;
}

#divisionName.editable {
    border-bottom: 1px dashed #facc15;
    cursor: pointer;
}

#divisionName {
    cursor: default;
}

/* Индикатор обновления */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.update-container {
    position: relative;
	display: inline-block;
    cursor: pointer;
    background: rgba(0,0,0,0.7);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: monospace;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

.update-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: #4caf50;
    width: 100%;
    transition: width linear;
}

.update-text {
    position: relative;
    z-index: 1;
    color: #fff;
}

.update-container:hover {
    background: rgba(0,0,0,0.85);
}