.panel {
    background: #ffffff08;
    border: 1px solid #ffffff22;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.seg {
    display: flex;
    background: #ffffff0a;
    border: 1px solid #ffffff18;
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}
.seg-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted, #888);
    transition: all 0.15s;
    font-family: inherit;
}
.seg-btn.active {
    background: #ffffff14;
    color: var(--text-main);
    border: 1px solid #ffffff28;
}
.seg-btn:hover:not(.active) {
    background: #ffffff08;
    color: var(--text-main);
}

.drop-zone {
    border: 1.5px dashed #ffffff28;
    border-radius: 14px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    background: transparent;
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}
.drop-zone.has-files {
    border-style: solid;
    border-color: #ffffff30;
    padding: 1.5rem;
}
.drop-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    color: #ffffff55;
}
.drop-icon svg {
    width: 100%;
    height: 100%;
}
.drop-zone.has-files .drop-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
}
.drop-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}
.drop-sub {
    font-size: 12px;
    color: var(--text-muted, #888);
}
.drop-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff0e;
    border: 1px solid #ffffff20;
    border-radius: 100px;
    padding: 4px 8px 4px 10px;
    font-size: 12px;
    color: var(--text-main);
}
.pill svg {
    flex-shrink: 0;
    opacity: 0.5;
}
.pill-x {
    cursor: pointer;
    color: #ffffff55;
    font-size: 16px;
    line-height: 1;
    border: none;
    background: none;
    padding: 0 2px;
    font-family: inherit;
    display: flex;
    align-items: center;
}
.pill-x:hover {
    color: var(--text-main);
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.cols-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cols-header .field-label {
    margin-bottom: 0;
}
.sel-actions {
    display: flex;
    gap: 10px;
}
.sel-all {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-weight: 500;
}
.sel-all:hover {
    text-decoration: underline;
}
.col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #ffffff18;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    transition: all 0.12s;
    color: var(--text-main);
}
.col-item:hover {
    border-color: #ffffff30;
    background: #ffffff08;
}
.col-item.selected {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb, 100, 149, 237), 0.1);
}
.col-check {
    width: 15px;
    height: 15px;
    border: 1.5px solid #ffffff30;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}
.col-item.selected .col-check {
    background: var(--accent);
    border-color: var(--accent);
}
.col-item.selected .col-check::after {
    content: "";
    display: block;
    width: 8px;
    height: 5px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.divider {
    border: none;
    border-top: 1px solid #ffffff12;
    margin: 0;
}

.field-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.custom-select {
    position: relative;
}
.custom-select select {
    width: 100%;
    padding: 9px 32px 9px 12px;
    border: 1px solid #ffffff20;
    border-radius: 10px;
    font-size: 13px;
    appearance: none;
    background: #ffffff0a;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.12s;
}
.custom-select select:hover {
    border-color: #ffffff35;
}
.custom-select select:focus {
    outline: none;
    border-color: var(--accent);
}
.custom-select::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #ffffff55;
    pointer-events: none;
}

.text-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ffffff20;
    border-radius: 10px;
    font-size: 13px;
    background: #ffffff0a;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.12s;
}
.text-input:hover {
    border-color: #ffffff35;
}
.text-input:focus {
    outline: none;
    border-color: var(--accent);
}

.run-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: all 0.15s;
}
.run-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.run-btn:active:not(:disabled) {
    transform: scale(0.98);
}
.run-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hidden {
    display: none;
}
.result-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.result-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.result-icon.ok {
    background: rgba(72, 199, 142, 0.15);
    color: #48c78e;
}
.result-icon.warn {
    background: rgba(255, 183, 77, 0.15);
    color: #ffb74d;
}
.result-icon svg {
    width: 16px;
    height: 16px;
}
.result-heading {
    font-size: 15px;
    font-weight: 600;
}
.stat-row {
    display: flex;
    gap: 10px;
}
.stat {
    flex: 1;
    background: #ffffff08;
    border: 1px solid #ffffff14;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.stat-n {
    font-size: 22px;
    font-weight: 600;
}
.stat-l {
    font-size: 11px;
    color: var(--text-muted, #888);
    margin-top: 2px;
}
.groups-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.group-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}
.group-item {
    background: #ffffff08;
    border: 1px solid #ffffff14;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
}
.group-key {
    font-weight: 600;
    margin-bottom: 3px;
}
.group-rows {
    color: var(--text-muted, #888);
    line-height: 1.5;
}
