﻿{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 12px;
    background-color: #F0F0F0;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    user-select: none;
}

.window {
    width: 460px;
    height: 420px;
    background-color: #F0F0F0;
    border: 1px solid #A0A0A0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.window-title {
    background: linear-gradient(to bottom, #FDFDFD, #E4E4E4);
    border-bottom: 1px solid #B0B0B0;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.window-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.window-logo {
    height: 20px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.window-title-text {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-close {
    width: 22px;
    height: 20px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    line-height: 1;
    border-radius: 2px;
    flex-shrink: 0;
}

.window-close:hover {
    background-color: #E81123;
    color: #FFF;
    border-color: #E81123;
}

.window-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px;
    min-height: 0;
}

.panel-label {
    color: #1F6B1F;
    font-size: 12px;
    margin-bottom: 6px;
    padding-left: 2px;
}

.bases-list-wrapper {
    flex: 1;
    background-color: #FFFFFF;
    border: 1px solid #A0A0A0;
    overflow: auto;
    min-height: 0;
}

.bases-list {
    list-style: none;
    padding: 2px 0;
    margin: 0;
    font-size: 12px;
}

.bases-list li {
    padding: 2px 6px 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    color: #000;
}

.bases-list li:hover {
    background-color: #EAF2FB;
}

.bases-list li.selected {
    background-color: #FFE9A8;
    outline: 1px solid #E0C97A;
}

/* Иконка группы (папка) */
.folder-icon {
    width: 16px;
    height: 16px;
    background-color: #F5C842;
    border: 1px solid #B8911F;
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.folder-icon::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 1px;
    width: 7px;
    height: 4px;
    background-color: #F5C842;
    border: 1px solid #B8911F;
    border-bottom: none;
    border-radius: 2px 2px 0 0;
}

/* Иконка базы */
.base-icon {
    width: 16px;
    height: 16px;
    background-color: #FFFFFF;
    border: 1px solid #7A7A7A;
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
}

.base-icon::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 4px;
    background: linear-gradient(to right, #4A90E2 0 33%, transparent 33% 66%, #E8B60F 66% 100%);
}

.base-icon::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 6px;
    border: 1px solid #A0A0A0;
    background-color: #FAFAFA;
}

.bases-list li.nested {
    padding-left: 24px;
}

.window-footer {
    padding: 10px 12px 12px 12px;
    border-top: 1px solid #D0D0D0;
    background-color: #F0F0F0;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.enter-btn {
    padding: 6px 28px;
    background: linear-gradient(to bottom, #FDFDFD, #E8E8E8);
    border: 1px solid #A0A0A0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 12px;
    color: #000;
    cursor: pointer;
}

.enter-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #F0F6FD, #D8E6F5);
    border-color: #5A9BD5;
}

.enter-btn:active:not(:disabled) {
    background: linear-gradient(to bottom, #D8E6F5, #C4DAF0);
}

.enter-btn:disabled {
    color: #999;
    cursor: default;
    background: #ECECEC;
    border-color: #C0C0C0;
}