body, html {
    height: 100%;
    margin: 0;
}

:root {
    --bs-border-color: #e5e7eb;
    --bs-border-color-translucent: rgba(17, 24, 39, 0.12);
}

body {
    min-width: 1280px;
    margin: 0 auto;
    background-color: #f8f9fa;
}
body.semantic-sidebar-collapsed {
    min-width: 1000px;
}

/* Shared Bootstrap overrides */
.page-surface {
    min-height: calc(100vh - 111px);
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

.page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-description {
    margin-top: 7px;
    font-size: 16px;
    line-height: 1.4;
}

.page-surface .nav-link,
.page-surface .form-control,
.page-surface .input-group-text,
.page-surface .dropdown-toggle,
.content-page .nav-link,
.content-page .form-control,
.content-page .input-group-text,
.content-page .dropdown-toggle {
    font-size: 15px;
    line-height: 1.4;
}

.nav-pills {
    gap: 0.5rem;
}

.nav-pills .nav-link {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    color: #2f343a;
    background-color: #f1f3f5;
    font-weight: 500;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link:focus {
    color: #111827;
    background-color: #e9ecef;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #1d66d2;
    background-color: #e7f0ff;
}

.form-control:focus,
.form-select:focus {
    border-color: #9ab8ed;
    box-shadow: 0 0 0 0.2rem rgba(49, 95, 189, 0.1);
}

.search-field {
    position: relative;
}

.search-field__icon,
.search-field__clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.search-field__icon {
    left: 12px;
    color: #8c95a1;
    font-size: 13px;
    pointer-events: none;
}

.search-field__input {
    padding-left: 36px;
    padding-right: 36px;
}

.search-field__clear {
    right: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--bs-secondary-color);
    text-decoration: none;
    border-radius: 50%;
}

.search-field__clear:hover,
.search-field__clear:focus {
    color: var(--bs-body-color);
    background-color: #f1f3f5;
}

.table-hover {
    --bs-table-hover-bg: #fafbfc;
}

.table-light {
    --bs-table-border-color: var(--bs-border-color);
}

.pull-left {
    float: left !important;
}

.pull-right {
    float: right !important;
}

.navbar-menu {
    background-color: transparent;
    box-shadow: 0px 1px 11px -4px #bfcfdf;
    height: 50px !important;
    /* background: rgb(194,247,255); */
    /* background: linear-gradient(90deg, rgba(194,247,255,1) 0%, rgba(255,252,166,1) 30%, rgba(0,212,255,0.8337928921568627) 100%); */
    /* background: #e3f2fd; */
}

.navbar-brand__description {
    display: block;
    font-size: 12px;
    text-align: left;
}

.navbar__container {
    max-width: 1700px;
}

/* Скрываем каретку */
    .no-caret::after {
    display: none;
}

.body-container__wrapper {
    min-width: 1260px;
    max-width: 1700px;
    margin: 10px auto 15px auto;
    padding-bottom: 30px;
}

.body-container {
    margin: 10px 10px 15px 10px;
    font-size: 15px;
}

.traffic-metric-column {
    min-width: 100px;
}

.traffic-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    line-height: 1.2;
}

.traffic-metric__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.traffic-metric__value {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    min-width: 48px;
    text-align: left;
}

.traffic-metric__bar {
    display: flex;
    width: 100%;
    height: 5px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f1f3f5;
}

.traffic-metric__bar--empty {
    background-color: #f1f3f5;
}

.traffic-metric__segment {
    height: 100%;
}

.traffic-metric__segment--organic {
    background-color: #4caf50;
}

.traffic-metric__segment--other {
    background-color: #90caf9;
}

.traffic-metric__organic {
    color: #6c757d;
    font-size: 11px;
}

.traffic-sparkline {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 1px;
    height: 18px;
    line-height: 0;
    width: 48px;
    max-width: 100%;
    margin-left: auto;
}

.traffic-sparkline--empty {
    opacity: 0.35;
}

.traffic-sparkline__bar {
    width: 3px;
    background-color: #b0bec5;
    border-radius: 2px 2px 0 0;
    min-height: 1px;
    flex: 0 0 auto;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.traffic-sparkline__bar:hover,
.traffic-sparkline__bar.is-active {
    background-color: #4c6ef5;
    box-shadow: 0 0 0 1px rgba(76, 110, 245, 0.35);
}

/* Project navigation */
.navbar .project-switcher__toggle {
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 10px;
    color: #f8f9fa;
    max-width: 250px; font-size: 14px;
}
.project-switcher__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar .project-switcher__toggle:hover,
.navbar .project-switcher__toggle[aria-expanded="true"] { border-color: transparent; background: rgba(255, 255, 255, 0.13); }
.project-switcher .project-switcher__menu { width: 380px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 80px); overflow-y: auto; padding: 0; }
.project-switcher__current { padding: 16px; border-bottom: 1px solid #e9ecef; background: #f8f9fa; border-radius: 8px 8px 0 0; }
.project-switcher__actions { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.project-switcher__actions a { color: #495057; text-decoration: none; border: 1px solid #dbe2ea; border-radius: 6px; padding: 6px 10px; background: #fff; }
.project-switcher__actions a:hover,
.project-switcher__actions a[aria-current="page"] { color: #212529; background: #eef2f6; border-color: #cbd3dc; }
.project-switcher__list { max-height: min(300px, 35vh); overflow-y: auto; padding: 4px 8px 8px; }
.project-switcher__project { padding: 10px; border-bottom: 1px solid #eef0f3; border-radius: 4px; white-space: normal; }
.project-switcher__name { overflow-wrap: anywhere; font-weight: 500; }
.project-switcher__domain { display: block; margin-left: 38px; color: #6c757d; overflow-wrap: anywhere; }
.project-switcher__project.active { background: #eef2f6; color: #212529; }
.project-switcher__project[hidden] { display: none; }
.project-switcher__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #e9ecef; background: #f8f9fa; border-radius: 0 0 8px 8px; }

.project-switcher__avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; background: #e9ecef; color: #495057; font-size: 14px; font-weight: 600; }
.project-switcher__toggle .project-switcher__avatar { margin-right: 8px; width: 24px; height: 24px; }
.project-switcher__avatar--large { width: 40px; height: 40px; font-size: 22px; }

.project-switcher__heading { display: flex; align-items: center; gap: 12px; }
.project-switcher__identity,
.project-switcher__search { flex: 1; min-width: 0; }
.project-switcher__settings { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; color: #6c757d; border-radius: 6px; }
.project-switcher__settings:hover { background: #e9ecef; color: #212529; }
.project-switcher__filters { display: flex; gap: 8px; padding: 12px 16px 8px; align-items: center; }
.project-switcher__tag { width: 110px; flex-shrink: 0; height: 38px; font-size: 14px; text-overflow: ellipsis; }
.project-switcher__avatar img { position: absolute; width: 20px; height: 20px; object-fit: contain; opacity: 0; }
.project-switcher__avatar--large img { width: 28px; height: 28px; }

.project-switcher__title { font-size: 18px; line-height: 1.35; }
.project-switcher__website { text-decoration: none; }
.project-switcher__website:hover { text-decoration: underline; }

@media (min-width: 992px) {
    .navbar .project-switcher { align-self: center; }
}

.semantic-empty { border: 1px dashed #dee2e6; border-radius: 12px; padding-inline: 16px; }
.semantic-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 12px; background: #f1f3f5; color: #6c757d; font-size: 20px; }
