:root {
    --sber-green: #21a038;
    --sber-green-dark: #107f3e;
    --sber-green-deep: #0b6b35;
    --sber-mint: #e8f7ee;
    --sber-mint-strong: #c9efd6;
    --sber-teal: #00a884;
    --sber-ink: #10231a;
    --sber-muted: #5d7166;
    --sber-border: #d7eadc;
}

a {
    color: var(--sber-green-dark);
}

a:hover {
    color: var(--sber-green-deep);
}

.btn-primary,
.fi-btn-color-primary,
button[type="submit"] {
    background-color: var(--sber-green) !important;
    border-color: var(--sber-green) !important;
    color: #fff !important;
}

.btn-primary:hover,
.fi-btn-color-primary:hover,
button[type="submit"]:hover {
    background-color: var(--sber-green-dark) !important;
    border-color: var(--sber-green-dark) !important;
}

.bg-primary,
.bg-theme,
.bg-gradient-custom-blue,
.bg-gradient-custom-teal,
.bg-gradient-custom-orange,
.bg-gradient-custom-pink,
.bg-gradient-custom-indigo {
    background: linear-gradient(135deg, var(--sber-green), var(--sber-teal)) !important;
}

.text-primary,
.text-theme,
.page-header,
.fi-logo,
.fi-sidebar-item-active .fi-sidebar-item-label {
    color: var(--sber-green-dark) !important;
}

.app-header,
.app-sidebar,
.fi-topbar,
.fi-sidebar-header {
    border-color: var(--sber-border) !important;
}

.app-sidebar .menu .menu-item.active > .menu-link,
.app-sidebar .menu .menu-item .menu-link:hover {
    background: var(--sber-mint) !important;
    color: var(--sber-green-dark) !important;
}

.app-sidebar .menu .menu-icon,
.app-sidebar .menu .menu-caret,
.fi-sidebar-item-icon {
    color: var(--sber-green) !important;
}

.card,
.fi-section,
.fi-ta-ctn {
    border-color: var(--sber-border) !important;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(33, 160, 56, 0.12);
}

.form-control:focus,
textarea:focus,
input:focus,
.fi-input:focus-within {
    border-color: var(--sber-green) !important;
    box-shadow: 0 0 0 0.2rem rgba(33, 160, 56, 0.15) !important;
}

.badge.bg-success,
.fi-badge-color-success {
    background-color: var(--sber-mint-strong) !important;
    color: var(--sber-green-deep) !important;
}

.progress-bar {
    background-color: var(--sber-green) !important;
}

body {
    color: var(--sber-ink);
}

.text-body.text-opacity-50,
.fs-13px,
.text-muted {
    color: var(--sber-muted) !important;
}

.fi-sidebar-nav-groups {
    row-gap: 0.35rem !important;
}

.fi-sidebar-group {
    gap: 0.2rem !important;
}

.fi-sidebar-group-items {
    gap: 0.08rem !important;
}

.tool-results-toolbar {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tool-results-title {
    color: var(--sber-ink);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
}

.tool-results-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.tool-results-actions .fi-icon-btn {
    height: 38px !important;
    width: 38px !important;
}

.tool-results-actions .fi-icon-btn-icon {
    height: 20px !important;
    width: 20px !important;
}

.tool-description-row {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 4px;
}

.tool-description-row > p {
    margin: 0;
    min-width: 0;
}

.fi-page:has(.tool-description-row) .fi-header {
    margin-bottom: 0.35rem !important;
}

.fi-page:has(.tool-description-row) .fi-header-heading {
    line-height: 1.18 !important;
    margin-bottom: 0 !important;
}

.fi-page:has(.tool-description-row) .fi-main-ctn,
.fi-page:has(.tool-description-row) .fi-page-content {
    row-gap: 0.5rem !important;
}

.tool-page-actions {
    align-items: center;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    flex-shrink: 0;
    justify-content: flex-end;
    margin: 0;
    padding-top: 10px;
    min-height: 40px;
    position: relative;
    z-index: 20;
}

.tool-page-actions .fi-icon-btn {
    height: 40px !important;
    width: 40px !important;
}

.tool-page-actions .fi-icon-btn-icon {
    height: 21px !important;
    width: 21px !important;
}

@media (max-width: 768px) {
    .tool-description-row {
        flex-direction: column;
    }

    .tool-page-actions {
        justify-content: flex-start;
    }
}

.fi-btn:disabled,
.fi-btn[disabled],
button:disabled,
button[disabled] {
    cursor: not-allowed !important;
    filter: grayscale(0.25) !important;
    opacity: 0.42 !important;
}

.tool-run-actions {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px !important;
    margin-top: 40px !important;
}

.tool-run-actions .fi-btn {
    align-self: center !important;
    display: inline-flex !important;
    height: 36px !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    min-width: 122px !important;
    min-height: 36px !important;
    transform: none !important;
    vertical-align: middle !important;
}

.tool-run-actions .fi-btn-icon,
.tool-run-actions .fi-btn-label,
.tool-run-actions .fi-loading-indicator {
    align-self: center !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

.tool-url-count {
    color: #4b5563;
    font-size: 11px;
    line-height: 1.35;
    margin-top: 10px;
}

.dark .tool-url-count {
    color: #9ca3af;
}

.tool-two-column-layout {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tool-left-pane {
    min-width: 0;
    order: 1;
}

.tool-right-pane {
    min-width: 0;
    order: 2;
    width: 100%;
}

.tool-right-pane .fi-section {
    height: 100%;
    width: 100%;
}

.tool-left-pane .fi-section {
    height: auto;
}

.tool-left-pane textarea {
    display: block;
    margin-bottom: 0 !important;
}

.tool-right-pane .fi-section-content,
.tool-right-pane .fi-section-content-ctn {
    display: block;
    max-width: none;
    overflow-x: auto;
    width: 100%;
}

.tool-right-pane table[id$="-results-table"] {
    display: table;
    table-layout: auto;
    min-width: 100%;
    width: 100% !important;
}

@media (max-width: 1024px) {
    .tool-two-column-layout {
        grid-template-columns: 1fr;
    }

    .tool-right-pane {
        order: 3;
    }
}
