/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100vh;
    width: 100vw;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0c1a2d;
    color: #e0e0e0;
    overflow: hidden;
}

#root {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Main Layout */
.page-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Side Panel - 20% width */
.side-panel {
    width: 20%;
    min-width: 300px;
    max-width: 400px;
    height: 100vh;
    background: rgba(15, 25, 45, 0.95);
    border-right: 1px solid rgba(64, 156, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000;
    overflow: hidden;
}

/* Panel Header */
.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    flex-shrink: 0;
}

.panel-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.0rem;
    margin-bottom: 0.5rem;
}

.logo-image {
    height: 2.5rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 1;
    display: block;
}

.logo-image--login {
    height: 3rem;
    width: auto;
    max-width: 100%;
}

.logo-icon {
    font-size: 2rem;
    color: #4CAF50;
    filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.3));
}

.app-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-subtitle {
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 300;
}

/* EO Browser Button */
.eo-browser-btn {
    margin: 1rem 1.5rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
    flex-shrink: 0;
}

.eo-browser-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}

.eo-browser-btn i {
    font-size: 1.1rem;
}

/* EO Browser Panel */
.eo-browser-panel,
.eo-step2-panel,
.task-details-panel,
.create-task-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 25, 45, 0.98);
    backdrop-filter: blur(10px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(64, 156, 255, 0.2);
}

.create-task-draw-hint {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(207, 232, 255, 0.88);
    margin: 0.35rem 0 0.65rem;
}

.create-task-draw-hint strong,
.create-task-draw-hint .fa-pencil-alt {
    color: #90caf9;
}

.create-task-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    padding: 0.25rem;
    background: rgba(20, 30, 48, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.create-task-tab {
    flex: 1;
    padding: 0.65rem 0.85rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #b8d4f0;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.create-task-tab:hover {
    background: rgba(76, 175, 80, 0.12);
    color: #e6f2ff;
}

.create-task-tab.active {
    background: rgba(76, 175, 80, 0.22);
    border-color: rgba(76, 175, 80, 0.5);
    color: #ffffff;
}

.create-task-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.create-task-tab-panel[hidden] {
    display: none !important;
}

.create-task-geometry-group .form-group {
    margin-bottom: 0.75rem;
}

.create-task-cad-search .styled-input {
    width: 100%;
}

.cad-search-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.cad-search-input-wrap .styled-input {
    padding-right: 2.1rem;
}

.cad-search-clear {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.55rem;
    height: 1.55rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #c5d6ea;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
}

.cad-search-clear:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.cad-search-clear[hidden] {
    display: none !important;
}

.create-task-fields-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(20, 30, 48, 0.55);
    padding: 0.4rem;
}

.create-task-fields-empty {
    color: #9db0c6;
    font-size: 0.86rem;
    padding: 0.55rem;
}

.create-task-field-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e6f2ff;
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    margin: 0.3rem 0;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.create-task-field-item:hover {
    background: rgba(33, 150, 243, 0.14);
    border-color: rgba(33, 150, 243, 0.4);
}

.create-task-field-item.focused {
    background: rgba(255, 213, 79, 0.14);
    border-color: rgba(255, 213, 79, 0.55);
}

.create-task-field-item.is-checked {
    background: rgba(102, 255, 51, 0.12);
    border-color: rgba(102, 255, 51, 0.45);
}

.create-task-field-item.is-checked.focused {
    background: rgba(255, 213, 79, 0.14);
    border-color: rgba(255, 213, 79, 0.55);
}

.create-task-field-checkbox {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: #66ff33;
    cursor: pointer;
    margin: 0;
}

.create-task-field-cad {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    cursor: pointer;
}

.back-btn {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196F3;
}

.eo-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
    flex: 1;
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.50rem;
    margin-bottom: 0.80rem;
}

.sidebar-flash-wrap {
    margin: 0 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-flash {
    font-size: 0.8rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    line-height: 1.35;
}

.sidebar-flash.error {
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid rgba(229, 57, 53, 0.45);
    color: #ff8a80;
}

.sidebar-flash.success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #a5d6a7;
}

.tasks-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
    font-size: 0.88rem;
    color: #7a8a9e;
    line-height: 1.45;
}

.task-details-readonly .task-detail-value {
    color: #e2eaf5;
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 0.5rem 0.65rem;
    background: rgba(20, 30, 48, 0.65);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.task-report-link {
    color: #90caf9;
    font-weight: 600;
    text-decoration: none;
}

.task-report-link:hover {
    text-decoration: underline;
    color: #bbdefb;
}

.task-report-missing {
    color: #8a9bb0;
    font-style: italic;
}

.td-period-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(20, 30, 48, 0.55);
    padding: 0.4rem;
}

.td-period-empty {
    color: #9db0c6;
    font-size: 0.86rem;
    padding: 0.55rem;
}

.td-period-item {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e6f2ff;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    margin: 0.3rem 0;
    font-size: 0.86rem;
    cursor: pointer;
}

.td-period-item:hover {
    background: rgba(33, 150, 243, 0.14);
    border-color: rgba(33, 150, 243, 0.4);
}

.td-period-item.active {
    background: rgba(76, 175, 80, 0.16);
    border-color: rgba(76, 175, 80, 0.5);
}

.eo-date-from-group {
    margin-bottom: 0.6rem;
}

.eo-area-warning {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #ff8a80;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    background: rgba(229, 57, 53, 0.12);
    border: 1px solid rgba(229, 57, 53, 0.45);
    border-radius: 8px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    color: #b0b0b0;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #2196F3;
}

/* Date Input with Icon */
.input-with-icon {
    position: relative;
}

.calendar-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-size: 1.1rem;
    pointer-events: none;
}

/* Native date picker popup: dark theme (browser-controlled UI) */
.styled-input[type="date"] {
    color-scheme: dark;
}

.styled-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.8;
    filter: invert(0.85);
}

.styled-input,
.styled-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(20, 30, 48, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: inherit;
}

.styled-input:focus,
.styled-textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.styled-input:-webkit-autofill,
.styled-input:-webkit-autofill:hover,
.styled-input:-webkit-autofill:focus,
.styled-input:-webkit-autofill:active,
.styled-textarea:-webkit-autofill,
.styled-textarea:-webkit-autofill:hover,
.styled-textarea:-webkit-autofill:focus,
.styled-textarea:-webkit-autofill:active,
.styled-input:autofill,
.styled-textarea:autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 30, 48, 0.9) inset !important;
    box-shadow: 0 0 0 1000px rgba(20, 30, 48, 0.9) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 99999s ease-out 0s;
}

.styled-input:-webkit-autofill:focus,
.styled-textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 30, 48, 0.9) inset, 0 0 0 3px rgba(33, 150, 243, 0.2) !important;
    box-shadow: 0 0 0 1000px rgba(20, 30, 48, 0.9) inset, 0 0 0 3px rgba(33, 150, 243, 0.2) !important;
}

.styled-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Task Name Input - предотвращаем автозаполнение стилей браузера */
.task-name-input {
    background: rgba(20, 30, 48, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-option:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-checkmark {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.radio-option input[type="radio"]:checked + .radio-checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
}

.radio-text {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Slider Styles */
.slider-container {
    padding: 0.25rem 0;
}

.styled-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    margin: 0.5rem 0;
}

.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.styled-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid #ffffff;
}

.slider-value {
    margin-left: auto;
    color: #4CAF50;
    font-weight: 600;
    font-size: 0.95rem;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    color: #a0a0a0;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed rgba(64, 156, 255, 0.3);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    background: rgba(20, 30, 48, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}

.file-upload-area.drag-over {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

.file-upload-content {
    text-align: center;
    color: #a0a0a0;
}

.file-upload-content > i {
    font-size: 2.5rem;
    color: #2196F3;
    margin-bottom: 0.75rem;
}

.file-upload-content > p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.file-hint {
    font-size: 0.85rem !important;
    color: #888;
}

/* Compact layout: geo monitoring + create task */
.file-upload-area:has(.file-upload-main) {
    padding: 0.75rem 1rem;
}

.file-upload-content:has(.file-upload-main) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    text-align: left;
}

.file-upload-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* Align cloud with centered hint line below */
    padding-left: 1.75rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
}

.file-upload-main i {
    font-size: 1.75rem;
    color: #2196F3;
    margin: 0;
    flex-shrink: 0;
}

.file-upload-title {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    text-align: left;
    color: #a0a0a0;
}

.file-upload-content:has(.file-upload-main) .file-hint {
    margin: 0;
    font-size: 0.8rem !important;
    text-align: center;
    line-height: 1.3;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.file-info i {
    font-size: 1.5rem;
    color: #2196F3;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.file-size {
    color: #a0a0a0;
    font-size: 0.85rem;
}

.remove-file-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 87, 87, 0.1);
    border: 1px solid rgba(255, 87, 87, 0.3);
    border-radius: 6px;
    color: #ff5757;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: rgba(255, 87, 87, 0.2);
    border-color: #ff5757;
}

/* Task File Upload Area */
.task-file-upload-area {
    margin-top: 0.5rem;
}

/* Apply Button for EO Browser */
.apply-eo-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.apply-eo-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.apply-eo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #666 0%, #555 100%);
}

/* Create Task Button */
.create-task-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
}

.create-task-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

.create-task-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #666 0%, #555 100%);
}

/* Tasks Section */
.tasks-section {
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.tasks-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.tasks-header h3 {
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.tasks-header h3 i {
    color: #2196F3;
}

.add-task-btn {
    width: 36px;
    height: 36px;
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    color: #2196F3;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-task-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: scale(1.05);
}

/* Tasks List Container */
.tasks-list-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 1rem;
}

.tasks-list {
    padding: 0.5rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.task-item:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
}

.task-item.active {
    background: rgba(33, 150, 243, 0.15);
    border-color: #2196F3;
}

.task-info {
    flex: 1;
}

.task-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.task-date {
    color: #a0a0a0;
    font-size: 0.8rem;
}

.task-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

.status-completed {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.status-in-progress {
    color: #FFC107;
    background: rgba(255, 193, 7, 0.1);
}

.status-error {
    color: #F44336;
    background: rgba(244, 67, 54, 0.1);
}

.task-status i {
    font-size: 0.9rem;
}

/* Task Details Content */
.task-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.task-apply-btn {
    padding: 1rem 1.5rem;
    background: rgba(33, 150, 243, 0.1);
    border: 2px solid rgba(33, 150, 243, 0.3);
    color: #2196F3;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.task-apply-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196F3;
}

/* Task actions (delete) */
.task-actions-section {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
    background: rgba(15, 25, 45, 0.95);
}

.task-delete-btn {
    width: 100%;
}

/* User Section (fixed at bottom) */
.user-section {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
    background: rgba(15, 25, 45, 0.95);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.user-icon {
    font-size: 2rem;
    color: #2196F3;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.user-role {
    color: #a0a0a0;
    font-size: 0.8rem;
}

.logout-form {
    width: 100%;
    margin: 0;
}

.logout-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 87, 87, 0.1);
    border: 1px solid rgba(255, 87, 87, 0.3);
    color: #ff5757;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-sizing: border-box;
    font-family: inherit;
}

.logout-btn:hover {
    background: rgba(255, 87, 87, 0.2);
    border-color: #ff5757;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.styled-select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(20, 30, 48, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.styled-select option {
    background: rgba(15, 25, 45, 0.95);
    color: #ffffff;
    padding: 0.75rem;
}

.eo-calendar {
    width: 100%;
    background: rgba(20, 30, 48, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0.9rem;
}

.eo-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.eo-cal-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    flex: 1;
}

.eo-cal-nav {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.eo-cal-nav:hover {
    background: rgba(33, 150, 243, 0.18);
    border-color: rgba(33, 150, 243, 0.45);
}

.eo-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.eo-cal-weekdays > div {
    color: #A0A0A0;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    padding: 0.25rem 0;
}

.eo-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.eo-cal-day {
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.eo-cal-day.muted {
    opacity: 0.35;
}

.eo-cal-day.available {
    cursor: pointer;
    color: #ffffff;
    border-color: rgba(33, 150, 243, 0.55);
    background: rgba(33, 150, 243, 0.14);
}

.eo-cal-day.available:hover {
    transform: translateY(-1px);
    background: rgba(33, 150, 243, 0.22);
}

.eo-cal-day.selected {
    border-color: rgba(76, 175, 80, 0.85);
    background: rgba(76, 175, 80, 0.18);
}

.eo-cal-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.eo-cal-selected-label {
    color: #A0A0A0;
    font-size: 0.85rem;
    font-weight: 600;
}

.eo-cal-selected {
    color: #4CAF50;
    font-size: 0.9rem;
    font-weight: 700;
}

.styled-select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    pointer-events: none;
}

/* Map Container - 80% width, 100% height */
.map-container {
    width: 80%;
    height: 100vh;
    position: relative;
    background: #0c1a2d;
}

.map-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.map-wrapper .leaflet-container,
.map-wrapper .geobi-leaflet-map {
    width: 100%;
    height: 100% !important;
    background: #0c1a2d;
}

.eo-measure-toolbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.eo-info-toolbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.eo-swipe-toolbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.eo-info-btn--active {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.45);
}

.eo-swipe-btn--active {
    box-shadow: 0 0 0 2px rgba(77, 208, 225, 0.45);
}

.eo-measure-btn--active {
    box-shadow: 0 0 0 2px rgba(186, 104, 200, 0.45);
}

.eo-measure-area-label {
    background: transparent !important;
    border: none !important;
}

.eo-measure-area-label__inner {
    display: inline-block;
    padding: 0 2px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #e040fb;
    background: transparent;
    border: none;
    border-radius: 0;
    white-space: nowrap;
    pointer-events: none;
    transform: translate(-50%, -50%);
    -webkit-text-stroke: 1px #000;
    paint-order: stroke fill;
    text-shadow:
        1px 0 0 #000,
        -1px 0 0 #000,
        0 1px 0 #000,
        0 -1px 0 #000,
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 5px #000,
        0 0 10px rgba(0, 0, 0, 0.9);
}

/* Fix for Leaflet map height */
.leaflet-container {
    height: 100vh !important;
}

.leaflet-attribution-flag,
.leaflet-control-attribution svg.leaflet-attribution-flag,
.leaflet-control-attribution > svg {
    display: none !important;
}

/* Компактная подпись в 1 строку (правый нижний угол) */
.leaflet-control-attribution {
    font-size: 10px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    max-width: none !important;
    padding: 2px 6px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    color: #333 !important;
}

.leaflet-control-attribution a {
    font-size: inherit !important;
    color: #0078a8 !important;
}

.leaflet-control-layers-section-title {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
    margin: 2px 0 4px;
    color: #222;
    pointer-events: none;
}

.leaflet-control-layers-overlays {
    border-top: 1px solid #ddd;
    margin-top: 4px;
    padding-top: 4px;
}

/* Поиск населённого пункта слева от выбора слоёв/подложек */
.leaflet-top.leaflet-right {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

.leaflet-top.leaflet-right > .leaflet-control {
    float: none;
    clear: none;
    margin: 10px 0 0 0;
    pointer-events: auto;
}

.leaflet-top.leaflet-right > .leaflet-control:last-child {
    margin-right: 10px;
}

.geobi-place-search {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    position: relative;
}

.geobi-place-search-form {
    margin: 0;
}

.geobi-place-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    max-width: 280px;
    height: 34px;
    box-sizing: border-box;
    padding: 0 10px;
    border-radius: 4px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.geobi-place-search-icon {
    color: #555;
    font-size: 13px;
    flex-shrink: 0;
}

.geobi-place-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #222;
    font-size: 13px;
    line-height: 1.3;
    padding: 0;
    box-shadow: none !important;
    -webkit-text-fill-color: #222;
}

.geobi-place-search-input::placeholder {
    color: #888;
    -webkit-text-fill-color: #888;
}

.geobi-place-search-results {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    max-height: 240px;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 1000;
}

.geobi-place-search-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: #fff;
    color: #222;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.geobi-place-search-item:last-child {
    border-bottom: none;
}

.geobi-place-search-item:hover,
.geobi-place-search-item.is-active {
    background: #e8f4fc;
}

.geobi-place-search-status {
    margin-top: 4px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.3;
    color: #444;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.geobi-place-search-status.is-error {
    color: #a40000;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Additional CSS for autocomplete prevention */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
input:autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 30, 48, 0.9) inset !important;
    box-shadow: 0 0 0 1000px rgba(20, 30, 48, 0.9) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
    transition: background-color 99999s ease-out 0s;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.5);
}

/* User info trigger */
.user-info#user-info-trigger {
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.user-info#user-info-trigger:hover,
.user-info#user-info-trigger:focus-visible {
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.35);
    outline: none;
}

/* User settings modal */
.user-settings-modal {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.user-settings-modal[hidden] {
    display: none !important;
}

.user-settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 24, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.user-settings-dialog {
    position: relative;
    width: min(80vw, 1100px);
    height: min(80vh, 760px);
    max-height: 90vh;
    background: linear-gradient(145deg, rgba(18, 28, 48, 0.98) 0%, rgba(12, 22, 38, 0.98) 100%);
    border: 1px solid rgba(100, 160, 255, 0.28);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.user-settings-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #e6f2ff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-settings-close:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: rgba(244, 67, 54, 0.45);
}

.user-settings-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.user-settings-nav {
    flex: 0 0 25%;
    max-width: 25%;
    min-width: 180px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 16, 30, 0.65);
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-sizing: border-box;
}

.user-settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #b8d4f0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.user-settings-nav-item:hover {
    background: rgba(76, 175, 80, 0.1);
    color: #e6f2ff;
}

.user-settings-nav-item.active {
    background: rgba(76, 175, 80, 0.22);
    border-color: rgba(76, 175, 80, 0.45);
    color: #ffffff;
}

.user-settings-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 1.5rem 1.75rem;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.user-settings-panel {
    display: none;
    flex-direction: column;
    gap: 0.85rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.user-settings-panel.active {
    display: flex;
}

.user-settings-panel-title {
    margin: 0;
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 700;
    flex-shrink: 0;
}

.user-settings-panel-hint {
    margin: 0;
    color: #9fb6d4;
    font-size: 0.9rem;
    line-height: 1.45;
    flex-shrink: 0;
}

.user-settings-upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b8d4f0;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-vector-file-upload-area {
    margin-top: 0.25rem;
}

.user-vector-upload-btn {
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    min-width: 180px;
}

.user-vector-upload-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.35);
}

.user-vector-upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #666 0%, #555 100%);
}

.user-vector-list-wrap {
    margin-top: 1.25rem;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.user-vector-list-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #e6f2ff;
    font-weight: 700;
}

.user-vector-list {
    flex: 1;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(8, 16, 30, 0.55);
}

.user-vector-list-empty {
    padding: 1rem;
    color: #8fa8c8;
    font-size: 0.9rem;
    text-align: center;
}

.user-vector-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.user-vector-table th,
.user-vector-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    color: #d8ebff;
}

.user-vector-table th {
    color: #90caf9;
    font-weight: 700;
    background: #0c1626;
    position: sticky;
    top: 0;
    z-index: 1;
}

.user-vector-table tr:last-child td {
    border-bottom: none;
}

.user-vector-delete-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(244, 67, 54, 0.45);
    border-radius: 8px;
    background: rgba(244, 67, 54, 0.12);
    color: #ff8a80;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-vector-delete-btn:hover {
    background: rgba(244, 67, 54, 0.28);
}

.user-settings-stub {
    margin: auto;
    text-align: center;
    color: #8a96a8;
    font-size: 1rem;
}

.admin-users-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(8, 16, 30, 0.55);
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-users-table th,
.admin-users-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    color: #d8ebff;
    vertical-align: middle;
}

.admin-users-table th {
    color: #90caf9;
    font-weight: 700;
    background: #101b2c;
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-users-table tr:last-child td {
    border-bottom: none;
}

.admin-users-table .admin-users-col-num {
    width: 56px;
    text-align: center;
    color: #8fa8c8;
}

.admin-users-table .admin-users-col-actions {
    width: 132px;
    text-align: right;
    white-space: nowrap;
}

.admin-users-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.admin-users-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(100, 160, 255, 0.35);
    background: rgba(12, 26, 45, 0.92);
    color: #90caf9;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.admin-users-icon-btn:hover {
    background: rgba(33, 150, 243, 0.22);
    border-color: rgba(100, 160, 255, 0.55);
    color: #e3f2fd;
}

.admin-users-icon-btn--danger {
    border-color: rgba(244, 67, 54, 0.45);
    color: #ff8a80;
}

.admin-users-icon-btn--danger:hover {
    background: rgba(244, 67, 54, 0.22);
    border-color: rgba(244, 67, 54, 0.65);
    color: #ffcdd2;
}

.admin-users-icon-btn--success {
    border-color: rgba(76, 175, 80, 0.45);
    color: #81c784;
}

.admin-users-icon-btn--success:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.65);
    color: #c8e6c9;
}

.admin-users-add-btn {
    margin-top: 0.25rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    min-width: 220px;
    flex-shrink: 0;
}

.admin-users-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.35);
}

.user-settings-submodal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.user-settings-submodal[hidden] {
    display: none !important;
}

.user-settings-submodal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 24, 0.55);
}

.user-settings-submodal-dialog {
    position: relative;
    width: min(100%, 420px);
    max-height: calc(100% - 2rem);
    overflow: auto;
    background: linear-gradient(145deg, rgba(18, 28, 48, 0.99) 0%, rgba(12, 22, 38, 0.99) 100%);
    border: 1px solid rgba(100, 160, 255, 0.28);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    padding: 1.25rem 1.35rem 1.35rem;
    box-sizing: border-box;
}

.user-settings-submodal-dialog--wide {
    width: min(100%, 520px);
}

.user-settings-submodal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #e6f2ff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.user-settings-submodal-close:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: rgba(244, 67, 54, 0.45);
}

.user-settings-submodal-title {
    margin: 0 2rem 0.75rem 0;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
}

.admin-user-edit-login {
    margin: 0 0 1rem;
    color: #9fb6d4;
    font-size: 0.9rem;
}

.admin-user-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.admin-user-form-label {
    color: #b8d4f0;
    font-size: 0.85rem;
    font-weight: 600;
}

#user-settings-panel-add-subgroup .admin-user-form-label {
    margin-top: 0.15rem;
}

#user-settings-panel-add-subgroup .admin-user-form-select {
    margin-bottom: 0.15rem;
}

#user-settings-panel-add-subgroup .admin-subgroup-view-select {
    margin: 0 0 0.75rem;
    flex-shrink: 0;
}

.admin-user-form-input,
.admin-user-form-select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(100, 160, 255, 0.28);
    background: rgba(8, 16, 30, 0.85);
    color: #e6f2ff;
    font-size: 0.92rem;
}

.admin-user-form-select {
    padding-right: 2.35rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(8, 16, 30, 0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239fb6d4' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.75rem 0.5rem;
    cursor: pointer;
}

.admin-user-form-select::-ms-expand {
    display: none;
}

.admin-user-form-select option {
    background: #0c1626;
    color: #e6f2ff;
}

.admin-user-form-input:focus,
.admin-user-form-select:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.55);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

.admin-user-form-input:-webkit-autofill,
.admin-user-form-input:-webkit-autofill:hover,
.admin-user-form-input:-webkit-autofill:focus,
.admin-user-form-input:-webkit-autofill:active,
.admin-user-form-input:autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(8, 16, 30, 0.85) inset !important;
    box-shadow: 0 0 0 1000px rgba(8, 16, 30, 0.85) inset !important;
    -webkit-text-fill-color: #e6f2ff !important;
    caret-color: #e6f2ff;
    transition: background-color 99999s ease-out 0s;
}

.admin-user-form-submit {
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.admin-user-form-submit:hover {
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.admin-user-subgroups-list {
    max-height: min(48vh, 360px);
    overflow: auto;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(8, 16, 30, 0.55);
}

.admin-user-group-node {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-user-group-node:last-child {
    border-bottom: none;
}

.admin-user-group-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem 0.55rem 0.4rem;
    background: rgba(255, 255, 255, 0.03);
}

.admin-user-group-header:hover {
    background: rgba(33, 150, 243, 0.08);
}

.admin-user-group-toggle {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9fb6d4;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-user-group-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e6f2ff;
}

.admin-user-group-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
    color: #e6f2ff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-user-group-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-group-count {
    color: #8fa8c8;
    font-weight: 500;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.admin-user-group-children {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-user-subgroup-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.9rem 0.55rem 2.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #d8ebff;
    font-size: 0.88rem;
    cursor: pointer;
}

.admin-user-subgroup-item:last-child {
    border-bottom: none;
}

.admin-user-subgroup-item:hover {
    background: rgba(33, 150, 243, 0.08);
}

.admin-user-group-cb,
.admin-user-subgroup-cb {
    width: 16px;
    height: 16px;
    accent-color: #4CAF50;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
        height: 400px;
        border-right: none;
        border-bottom: 1px solid rgba(64, 156, 255, 0.2);
    }

    .map-container {
        width: 100%;
        height: calc(100vh - 400px);
    }
}

/* Login page */
body.login-page {
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(33, 150, 243, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(76, 175, 80, 0.06) 0%, transparent 50%),
        #0c1a2d;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem 2rem 1.75rem;
    background: rgba(15, 25, 45, 0.95);
    border: 1px solid rgba(64, 156, 255, 0.22);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-brand .logo-container {
    justify-content: center;
    margin-bottom: 0.35rem;
}

.login-brand .panel-subtitle {
    margin: 0;
}

.login-heading {
    margin: 0 0 1.25rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: #e6f2ff;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.login-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b8d4f0;
}

.login-flash {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.login-flash.error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.35);
    color: #ff8a80;
}

.login-flash.success,
.login-flash.info {
    background: rgba(33, 150, 243, 0.12);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #90caf9;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #a0a0a0;
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    accent-color: #4CAF50;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.login-submit-btn {
    margin-top: 0.35rem;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
}

.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.35);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6a7a8f;
}