:root {
    --bg: #eff3f8;
    --surface: #fffdf8;
    --surface-alt: #efe7d8;
    --text: #1d1b18;
    --muted: #6c6458;
    --line: #d7cab3;
    --accent: #1f6f5f;
    --accent-dark: #184f45;
    --blue: #3890d8;
    --teal: #27b7a3;
    --purple: #8c5bff;
    --orange: #ef8a1d;
    --lime: #9ad96f;
    --gray: #b8c2cc;
    --gold: #ffc53a;
    --danger: #b5493c;
    --warning: #b37a23;
    --shadow: 0 18px 40px rgba(29, 27, 24, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(56, 144, 216, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(39, 183, 163, 0.1), transparent 22%),
        linear-gradient(180deg, #f4f7fb 0%, #edf2f8 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: calc(100% - 24px);
    margin: 0 auto;
    padding: 20px 0 40px;
}

.app-shell {
    display: grid;
    grid-template-columns: 204px minmax(0, 1fr);
    gap: 12px;
    min-height: 100vh;
    padding: 10px;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: 68px minmax(0, 1fr);
}

.app-sidebar,
.app-topbar {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(216, 224, 234, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgba(29, 27, 24, 0.07);
    border-radius: 20px;
}

.app-sidebar {
    position: sticky;
    top: 10px;
    height: calc(100vh - 20px);
    padding: 12px 10px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    overflow: hidden;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-brand__toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    background: #edf4fb;
    color: #496179;
    border: 1px solid #dce6f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.app-brand__toggle svg {
    display: block;
    width: 16px;
    height: 16px;
    transition: transform 0.18s ease;
}

.app-brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex: 0 0 auto;
}

.app-brand__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.app-brand__text strong {
    font-size: 15px;
}

.app-brand__text span {
    color: #728099;
    font-size: 12px;
}

.app-brand__mark svg,
.sidebar-link__icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.app-brand__mark svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    align-content: start;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 7px 9px;
    border-radius: 13px;
    color: #3a495d;
    text-decoration: none;
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background: #f5f8fc;
    border-color: #e0e8f2;
}

.sidebar-link.active {
    background: #edf4fb;
    border-color: #d6e4f3;
    color: #1f4d7a;
}

.sidebar-link__icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #edf4fb;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
}

.sidebar-link.active .sidebar-link__icon {
    background: var(--blue);
    color: #fff;
}

.sidebar-link__label {
    white-space: nowrap;
}

.sidebar-context {
    padding: 12px;
    border-radius: 16px;
    background: #f5f8fc;
    border: 1px solid #e0e8f2;
    display: grid;
    gap: 4px;
}

.sidebar-context span {
    color: #728099;
    font-size: 13px;
}

body.sidebar-collapsed .app-brand__text,
body.sidebar-collapsed .sidebar-link__label,
body.sidebar-collapsed .sidebar-context {
    display: none;
}

body.sidebar-collapsed .app-brand {
    justify-content: center;
    flex-wrap: wrap;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-inline: 8px;
}

body.sidebar-collapsed .app-brand__toggle svg {
    transform: rotate(180deg);
}

.app-main {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 2px 8px 20px 0;
    overflow-x: hidden;
}

.app-topbar {
    padding: 10px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border-radius: 18px;
    min-width: 0;
}

.app-topbar__title {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-topbar__title .eyebrow {
    display: none;
}

.app-topbar__title h1 {
    margin: 0;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.1;
}

.app-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 auto;
    min-width: 0;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dce4ef;
    background: rgba(246, 249, 252, 0.95);
    color: #354254;
    text-decoration: none;
    white-space: nowrap;
}

.page-content {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.app-topbar__site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f5f8fc;
    border: 1px solid #e0e8f2;
}

.app-topbar__site strong {
    font-size: 12px;
    color: #2f4258;
}

.app-topbar__site span {
    font-size: 12px;
    color: #728099;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.app-topbar .user-chip {
    min-width: 0;
    width: auto;
    max-width: min(240px, 100%);
    padding: 6px 10px;
    border-radius: 12px;
}

.app-topbar .user-chip strong {
    font-size: 13px;
}

.app-topbar .user-chip span {
    font-size: 11px;
}

body.sidebar-collapsed .app-sidebar {
    padding-inline: 8px;
}

body.sidebar-collapsed .app-brand__mark {
    display: none;
}

body.sidebar-collapsed .app-brand {
    flex-direction: column;
    gap: 6px;
}

body.sidebar-collapsed .sidebar-link__icon {
    width: 32px;
    height: 32px;
}

.hero {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-card,
.panel,
.stat-card,
.subpanel,
.summary-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(216, 224, 234, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    border-radius: 24px;
}

.hero-card {
    padding: 22px 24px;
}

.hero-topline {
    display: flex;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
}

.hero-topline > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 860px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: var(--blue);
    margin: 0 0 10px;
    font-weight: 700;
}

h1, h2, h3 {
    margin: 0 0 10px;
}

.hero h1 {
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1;
    max-width: none;
    margin-bottom: 12px;
}

.hero p,
.muted {
    color: #6d7788;
}

.hero .hero-card > .eyebrow + .hero-topline p {
    max-width: 34ch;
    margin: 0;
    line-height: 1.35;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid #dce4ef;
    color: #354254;
    text-decoration: none;
    background: rgba(246, 249, 252, 0.95);
    white-space: nowrap;
}

.nav-tab.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
}

.stat-card-overview {
    display: grid;
    gap: 14px;
}

.stat-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #edf4fb;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.stat-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.stat-label {
    display: block;
    color: #7a8699;
    margin-bottom: 0;
    font-size: 14px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    min-width: 0;
}

.grid > *,
.stack,
.stack > *,
.site-summary > *,
.summary-charts > *,
.summary-buckets > * {
    min-width: 0;
}

.stats-bottom-grid {
    margin-top: 20px;
}

.overview-projects-panel {
    margin-bottom: 20px;
}

.overview-projects-head {
    align-items: end;
}

.overview-project-tools {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(180px, 220px);
    gap: 12px;
}

.overview-empty-state {
    display: grid;
    gap: 18px;
    padding: 8px 0 4px;
}

.overview-empty-state__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.overview-empty-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f5f8fc;
    border: 1px solid #e0e8f2;
    border-radius: 16px;
    padding: 14px;
}

.overview-empty-step strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    flex: 0 0 auto;
}

.overview-empty-step span {
    color: #425269;
    font-size: 14px;
    line-height: 1.35;
}

.overview-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.overview-project-card {
    border: 1px solid rgba(216, 224, 234, 0.95);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
    padding: 20px;
    display: grid;
    gap: 16px;
}

.overview-project-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.overview-project-card__head h3 {
    margin-bottom: 6px;
}

.overview-project-card__chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.project-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #3890d8;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.project-chip--soft {
    background: #edf4fb;
    color: #506178;
}

.overview-project-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.project-metric {
    background: #f5f8fc;
    border: 1px solid #e0e8f2;
    border-radius: 16px;
    padding: 12px 14px;
    display: grid;
    gap: 6px;
}

.project-metric span {
    color: #708099;
    font-size: 12px;
}

.project-metric strong {
    font-size: 20px;
    color: #253141;
}

.overview-project-card__meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
}

.overview-project-card__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.overview-project-run-form {
    display: inline-flex;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.button-link:hover {
    background: #2d78b7;
}

.button-link--secondary {
    background: #edf4fb;
    color: #314153;
}

.button-link--secondary:hover {
    background: #dfeaf6;
}

.button-link--accent {
    background: #1f9f7a;
}

.button-link--accent:hover {
    background: #17785c;
}

.button-link[disabled],
.button-link--accent[disabled] {
    background: #d7e1ec;
    color: #7a8699;
    cursor: not-allowed;
    transform: none;
}

.stack {
    display: grid;
    gap: 20px;
}

.panel,
.subpanel,
.summary-card {
    padding: 22px;
}

.panel-wide {
    margin-bottom: 20px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

form {
    display: grid;
    gap: 14px;
}

.inline-form {
    display: block;
}

.field-grid,
.toolbar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.toolbar-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.65fr) minmax(0, 1.05fr) auto;
    align-items: end;
}

.stats-toolbar .toolbar-grid {
    grid-template-columns: minmax(220px, 0.9fr) minmax(160px, 0.6fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr) auto;
}

.toolbar-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    min-width: 0;
}

.toolbar-range-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.toolbar-range-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: #eef4fb;
    color: #4f6480;
    text-decoration: none;
    font-weight: 600;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.toolbar-range-link:hover {
    background: #dde9f7;
    color: #2d4a6f;
}

.toolbar-range-link.is-active {
    background: #3d8fdb;
    color: #fff;
}

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    color: #6d7788;
}

input,
select,
button,
textarea {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d7e1ec;
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    color: #2d3848;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(56, 144, 216, 0.16);
    border-color: var(--blue);
}

button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

button:hover {
    transform: translateY(-1px);
    background: #2d78b7;
}

.flash {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.flash.success {
    background: rgba(39, 183, 163, 0.12);
    border: 1px solid rgba(39, 183, 163, 0.2);
}

.flash.error {
    background: rgba(181, 73, 60, 0.12);
    border: 1px solid rgba(181, 73, 60, 0.2);
}

.site-summary {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(320px, 1.45fr) minmax(260px, 0.95fr);
    gap: 14px;
    margin-bottom: 20px;
    min-width: 0;
}

.summary-head h2 {
    margin-bottom: 6px;
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.donut {
    --value: 50;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(var(--teal) calc(var(--value) * 1%), #ff5a4a 0);
    display: grid;
    place-items: center;
    position: relative;
}

.donut::before {
    content: '';
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: white;
}

.donut span {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 700;
}

.donut-legend {
    display: grid;
    gap: 12px;
}

.donut-legend div {
    display: grid;
    gap: 4px;
}

.donut-legend strong {
    font-size: 28px;
}

.summary-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mini-metric {
    padding-right: 0;
}

.mini-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 10px;
}

.mini-head strong {
    font-size: 30px;
    white-space: nowrap;
}

.sparkline.bars {
    height: 72px;
    display: flex;
    align-items: end;
    gap: 4px;
}

.sparkline.bars span {
    display: block;
    flex: 1;
    border-radius: 999px 999px 6px 6px;
    background: #d8e2ee;
}

.sparkline.bars.purple span {
    background: linear-gradient(180deg, #985df8 0%, #7e52ff 100%);
}

.sparkline.bars.blue span {
    background: linear-gradient(180deg, #4a9dff 0%, #3681db 100%);
}

.sparkline.bars.orange span {
    background: linear-gradient(180deg, #ffb14b 0%, #ef8a1d 100%);
}

.summary-buckets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
}

.bucket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 16px;
    background: #f5f8fc;
}

.bucket-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 7px 11px;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
}

.bucket-pill.blue { background: var(--matrix-top-3, #3890d8); }
.bucket-pill.green { background: var(--matrix-top-5, #1f9f7a); }
.bucket-pill.teal { background: var(--matrix-top-10, #27b7a3); }
.bucket-pill.lime { background: var(--matrix-top-30, #89d36b); }
.bucket-pill.mint { background: var(--matrix-top-50, #66c8a4); }
.bucket-pill.gray { background: var(--matrix-top-100, #b8c2cc); }
.bucket-pill.gold { background: var(--matrix-top-100-plus, #ffc53a); color: #6b5500; }

.matrix-scroll {
    overflow-x: auto;
    padding-bottom: 10px;
}


.history-top-summary-wrap {
    margin-top: 14px;
    overflow-x: auto;
}

.history-top-summary {
    width: max(100%, 980px);
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    overflow: hidden;
}

.history-top-summary th,
.history-top-summary td {
    padding: 8px 10px;
    border: 1px solid #dbe4ef;
    vertical-align: middle;
    white-space: nowrap;
}

.history-top-summary thead th {
    background: #f7fafd;
    color: #516073;
    font-weight: 700;
}

.history-top-summary tbody th {
    background: #fbfdff;
    color: #2a3444;
    font-weight: 700;
    text-align: left;
}

.history-top-summary-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 7px 12px;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
}

.history-top-summary-date {
    display: grid;
    gap: 2px;
    justify-items: center;
}

.history-top-summary-date small {
    color: #7f8a9b;
    font-size: 12px;
    font-weight: 600;
}

.history-top-summary-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.history-top-summary-cell strong {
    color: #253141;
}

.history-top-summary-delta {
    font-size: 13px;
    font-weight: 700;
}

.history-top-summary-delta.up {
    color: #20a562;
}

.history-top-summary-delta.down {
    color: #ef4b4b;
}

.history-top-summary-delta.flat {
    color: #7e8c9e;
}

.history-matrix {
    width: max(100%, 1200px);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.history-col-query {
    width: var(--query-col-width, 300px);
}

.history-col-frequency {
    width: var(--frequency-col-width, 120px);
}

.history-col-date {
    width: 96px;
}

.history-matrix th,
.history-matrix td {
    box-sizing: border-box;
    border: 1px solid #dbe4ef;
    padding: 0;
    min-width: 96px;
    background: #fff;
}

.history-matrix th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7fafd;
}

.sticky-col {
    position: sticky;
    z-index: 2;
    background: #fff;
    padding: 7px 12px !important;
}

.sticky-col-query {
    left: 0;
    min-width: 300px;
    max-width: 300px;
    z-index: 4;
}

.sticky-col-frequency {
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

.sticky-col-head {
    z-index: 6;
    background: #f7fafd;
}

.matrix-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.matrix-head-frequency {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    text-align: center;
}

.matrix-head-frequency small {
    display: block;
    max-width: 100%;
    font-size: 9px;
    line-height: 1.2;
    color: #7b8798;
    font-weight: 600;
    text-align: center;
}

.matrix-sort-trigger {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.matrix-sort-trigger:hover,
.matrix-toggle-details:hover {
    transform: none;
    background: transparent;
}

.matrix-sort-trigger-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.history-sortable {
    cursor: pointer;
}

.history-sortable[data-direction='asc'] .matrix-sort-trigger,
.history-sortable[data-direction='desc'] .matrix-sort-trigger {
    color: #24496f;
}

.history-sortable[data-direction='asc'] .matrix-sort-trigger::after {
    content: ' \2191';
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #3890d8;
    vertical-align: baseline;
}

.history-sortable[data-direction='desc'] .matrix-sort-trigger::after {
    content: ' \2193';
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #3890d8;
    vertical-align: baseline;
}

.matrix-toggle-details {
    padding: 0;
    border: 0;
    background: transparent;
    color: #5a6f89;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.18s ease, color 0.18s ease;
}

.matrix-toggle-details.is-open {
    transform: rotate(90deg);
    color: #24496f;
}

.date-head {
    padding: 8px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #516073;
    text-align: center;
    display: inline-grid;
    gap: 4px;
    justify-items: center;
}

.query-title {
    font-size: 14px;
    font-weight: 600;
    color: #2a3444;
    line-height: 1.15;
    min-width: 0;
}

.query-details-spoiler {
    margin-top: 0;
}

.query-details-spoiler summary {
    display: block;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.query-summary-row {
    position: relative;
    padding-right: 16px;
}

.query-details-spoiler summary::-webkit-details-marker {
    display: none;
}

.query-details-spoiler summary::before {
    content: '\25B8';
    position: absolute;
    right: 0;
    top: 1px;
    font-size: 10px;
    color: #5a6f89;
    transition: transform 0.18s ease;
}

.query-details-spoiler[open] summary::before {
    transform: rotate(90deg);
}

.query-details-body {
    display: grid;
    gap: 3px;
    margin-top: 4px;
}

.query-meta {
    font-size: 10px;
    color: #7f8a9b;
    text-transform: uppercase;
}

.history-frequency-cell {
    position: relative;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #314155;
    vertical-align: middle;
    cursor: pointer;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

.history-frequency-cell .frequency-main {
    width: 100%;
    justify-content: center;
}

.history-frequency-head {
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
    vertical-align: middle;
}

.history-frequency-head .matrix-head-frequency {
    width: 100%;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
}

.history-frequency-head .matrix-sort-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.history-frequency-cell:hover {
    outline: 2px solid rgba(56, 144, 216, 0.18);
    outline-offset: -2px;
}

.frequency-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
}

.history-cell {
    height: 50px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
}

.history-cell:hover {
    outline: 2px solid rgba(56, 144, 216, 0.18);
    outline-offset: -2px;
}

.history-cell--has-metrica {
    box-shadow: inset 0 0 0 4px #7dff4d, inset 0 0 20px rgba(125, 255, 77, 0.34), 0 0 0 1px rgba(125, 255, 77, 0.42);
}

.history-cell--has-metrica:hover {
    outline-color: rgba(125, 255, 77, 0.58);
}

.history-cell.top-3 {
    background: var(--matrix-top-3, #3890d8);
}

.history-cell.top-5 {
    background: var(--matrix-top-5, #1f9f7a);
}

.history-cell.top-10 {
    background: var(--matrix-top-10, #27b7a3);
}

.history-cell.top-30 {
    background: var(--matrix-top-30, #89d36b);
}

.history-cell.top-50 {
    background: var(--matrix-top-50, #66c8a4);
}

.history-cell.top-100 {
    background: var(--matrix-top-100, #b8c2cc);
}

.history-cell.top-100-plus {
    background: var(--matrix-top-100-plus, #ffc53a);
}

.history-cell.empty {
    background: #fff9d8;
}

.history-cell.top-3,
.history-cell.top-5,
.history-cell.top-10 {
    color: #ffffff;
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-3,
.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-5,
.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-10 {
    color: #ffffff;
}

.history-cell.top-30,
.history-cell.top-50,
.history-cell.top-100,
.history-cell.top-100-plus,
.history-cell.empty,
.history-cell.pending,
.metrica-cell {
    color: #253141;
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-30,
.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-50,
.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-100,
.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-100-plus,
.history-matrix--metrica.metrica-matrix--colorized .metrica-cell.empty {
    color: #253141;
}

.history-cell.top-3 .cell-main,
.history-cell.top-5 .cell-main,
.history-cell.top-10 .cell-main {
    color: #ffffff;
}

.history-cell.top-30 .cell-main,
.history-cell.top-50 .cell-main,
.history-cell.top-100 .cell-main,
.history-cell.top-100-plus .cell-main,
.history-cell.empty .cell-main,
.history-cell.pending .cell-main {
    color: #253141;
}

.cell-main {
    font-size: 16px;
    font-weight: 700;
    color: inherit;
    margin-top: 0;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    line-height: 1;
}

.cell-position-value {
    display: inline-flex;
    align-items: center;
}

.cell-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #d83a32;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(216, 58, 50, 0.24);
}

.cell-delta {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.cell-delta.up {
    color: #20a562;
}

.cell-delta.down {
    color: #ef4b4b;
}

.cell-delta.flat {
    color: #7e8c9e;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(216, 224, 234, 0.8);
    vertical-align: top;
    font-size: 14px;
}

th {
    color: #7a8699;
    font-weight: 600;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    background: #edf3f9;
}

.pill.success {
    background: rgba(39, 183, 163, 0.14);
    color: #15745f;
}

.pill.warning {
    background: rgba(239, 138, 29, 0.14);
    color: #9a5f0d;
}

.pill.error {
    background: rgba(181, 73, 60, 0.14);
    color: #8e2e24;
}

.empty {
    padding: 18px;
    border: 1px dashed #d7e1ec;
    border-radius: 16px;
    color: #7f8a9b;
    background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 1500px) {
    .toolbar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .toolbar-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 1360px) {
    .project-summary-banner__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-keywords-tools {
        grid-template-columns: 1fr;
    }

    .bulk-form {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .project-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .app-shell,
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .app-sidebar {
        position: static;
        height: auto;
        grid-template-rows: auto auto;
    }

    .sidebar-context {
        display: none;
    }

    .sidebar-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sidebar-link,
    body.sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
    }

    body.sidebar-collapsed .app-brand__text,
    body.sidebar-collapsed .sidebar-link__label {
        display: initial;
    }

    body.sidebar-collapsed .app-brand {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .app-main {
        padding: 0 0 24px;
    }

    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-summary,
    .summary-charts,
    .summary-buckets,
    .grid,
    .toolbar-grid,
    .hero-topline {
        grid-template-columns: 1fr;
        display: grid;
    }

    .nav-tabs {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nav-area {
        justify-items: stretch;
    }

    .user-chip-wrap {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .user-chip {
        min-width: 0;
        width: 100%;
    }

    .sticky-col-query,
    .sticky-col-head.sticky-col-query {
        min-width: 220px;
        max-width: 220px;
    }

    .sticky-col-frequency,
    .history-frequency-head {
        min-width: 96px;
        max-width: 96px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 16px, 1440px);
        padding-top: 16px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-brand__text {
        display: none;
    }

    .app-topbar {
        padding: 14px 16px;
    }

    .topbar-logout,
    .app-topbar__actions .user-chip {
        width: 100%;
    }

    .field-grid,
    .toolbar-grid,
    .summary-charts {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .panel,
    .stat-card,
    .subpanel,
    .summary-card {
        border-radius: 18px;
    }

    .hero h1 {
        max-width: none;
        font-size: 32px;
    }

    .hero-card {
        padding: 18px 18px;
    }

    .nav-tab {
        width: 100%;
    }

    .user-chip-wrap {
        width: 100%;
    }

    .sticky-col-query,
    .sticky-col-head.sticky-col-query {
        min-width: 180px;
        max-width: 180px;
    }

    .sticky-col-frequency,
    .history-frequency-head {
        min-width: 88px;
        max-width: 88px;
    }
}
.date-head small {
    font-size: 12px;
    color: #7f8a9b;
    font-weight: 600;
}
.toolbar-grid-project {
    grid-template-columns: minmax(320px, 520px);
}

.field-grid-group {
    grid-template-columns: 1fr auto;
    align-items: end;
    margin-bottom: 16px;
}

.group-list {
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

.group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #f8fbff;
}

.group-item .inline-action-form {
    flex: 0 0 auto;
}

.inline-action-form {
    display: block;
}

.button-danger {
    background: #d9554d;
}

.button-danger:hover {
    background: #bd433c;
}

.panel-keywords {
    min-height: 100%;
}

.keyword-edit-list {
    display: grid;
    gap: 16px;
}

.keyword-edit-card {
    padding: 18px;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #fbfdff;
}

.keyword-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.keyword-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.table-scroll {
    overflow-x: auto;
}

.edit-table {
    width: 100%;
    min-width: 1040px;
    table-layout: fixed;
}

.edit-table-form {
    display: block;
}

.edit-table-grid {
    display: grid;
    grid-template-columns: 180px minmax(220px, 1.2fr) 120px minmax(260px, 1.4fr) auto;
    gap: 10px;
    align-items: center;
}

.edit-table-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
}

.row-save-status {
    width: 18px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: #8ea0b6;
}

.row-save-status[data-state='dirty'] {
    color: #ef8a1d;
}

.row-save-status[data-state='saving'] {
    color: var(--blue);
    animation: addok-pulse 1.2s ease-in-out infinite;
}

.row-save-status[data-state='saved'] {
    color: #20a562;
}

.row-save-status[data-state='error'] {
    color: #ef4b4b;
}

.edit-table td {
    vertical-align: middle;
}

@media (max-width: 1100px) {
    .edit-table-grid {
        grid-template-columns: 1fr;
    }

    .edit-table-actions {
        justify-content: flex-start;
    }
}
.keywords-tools {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.table-filter-input {
    width: 100%;
    max-width: none;
}

.bulk-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
    justify-content: stretch;
}

.bulk-bar {
    min-width: 0;
}

.bulk-form select {
    min-width: 0;
}

.bulk-form button {
    white-space: nowrap;
}

.bulk-form button,
.edit-table-actions button,
.project-settings-actions button,
.project-summary-actions button,
.toolbar-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.button-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.icon-action-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
}

.edit-table-actions .icon-action-button {
    flex: 0 0 auto;
}

.edit-table-actions {
    justify-content: flex-end;
    gap: 8px;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable::after {
    content: ' \2195';
    color: #9aa7b8;
    font-size: 12px;
}

.sortable[data-direction='asc']::after {
    content: ' \2191';
    color: var(--blue);
}

.sortable[data-direction='desc']::after {
    content: ' \2193';
    color: var(--blue);
}

.edit-table-grid-project {
    grid-template-columns: 180px minmax(220px, 1.2fr) 120px minmax(260px, 1.4fr) auto;
}

@media (max-width: 1350px) {
    .project-summary-banner__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-layout__content-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .project-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .project-drawer {
        width: 100vw;
    }

    .project-drawer__panel {
        padding: 18px 16px 24px;
    }
}

@media (max-width: 1100px) {
    .bulk-form,
    .edit-table-grid-project {
        grid-template-columns: 1fr;
        display: grid;
    }
}
.edit-table-head-row th {
    vertical-align: middle;
}

.col-check {
    width: 48px;
    min-width: 48px;
    text-align: center;
}

.col-id {
    width: 90px;
    min-width: 90px;
}

.col-group {
    width: 180px;
    min-width: 180px;
}

.col-phrase {
    width: 260px;
    min-width: 260px;
}

.col-url {
    width: 320px;
    min-width: 320px;
}

.col-pf-clicks {
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.col-actions {
    width: 108px;
    min-width: 108px;
}

.edit-table .col-group select,
.edit-table .col-phrase input,
.edit-table .col-url input,
.edit-table .col-pf-clicks input {
    width: 100%;
    min-width: 0;
}

.edit-table .col-url input {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-table .col-pf-clicks input {
    text-align: center;
}

.edit-table .col-actions {
    text-align: center;
}
.project-summary-banner {
    display: grid;
    gap: 18px;
    padding: 24px 26px;
}

.project-summary-banner__identity {
    display: grid;
    gap: 6px;
}

.project-summary-banner__main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.panel-head--project {
    align-items: center;
}

.panel-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #edf4fb;
    border: 1px solid #d8e6f4;
    color: #315270;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.panel-count-badge--wide {
    min-width: 56px;
}

.project-summary-banner__main h2 {
    margin-bottom: 6px;
    font-size: clamp(28px, 3vw, 40px);
}

.project-summary-banner__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: 720px;
}

.project-summary-banner__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.project-summary-banner__meta .project-summary-stat strong {
    line-height: 1.15;
}

.project-summary-stat {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f5f8fc;
    border: 1px solid #e0e8f2;
    display: grid;
    gap: 8px;
}

.project-summary-stat span {
    color: #708099;
    font-size: 12px;
}

.project-summary-stat strong {
    font-size: 24px;
    color: #253141;
}

.project-summary-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.project-summary-actions .button-link,
.project-summary-actions button {
    min-height: 44px;
}

.project-summary-notes {
    display: grid;
    gap: 6px;
}

.project-summary-notes p {
    margin: 0;
}

.project-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
    gap: 20px;
    align-items: start;
    min-width: 0;
}

.project-layout__sidebar,
.project-layout__content {
    min-width: 0;
    display: grid;
    gap: 20px;
    align-content: start;
}

.project-layout__content-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    min-width: 0;
    align-items: start;
}

.project-keywords-full {
    min-width: 0;
}

.project-settings-panel,
.project-groups-panel,
.project-keyword-entry-panel {
    min-width: 0;
}

.project-form-section {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.project-settings-panel,
.project-groups-panel,
.project-keyword-entry-panel,
.project-keywords-full {
    position: relative;
    overflow: hidden;
}

.project-settings-panel::before,
.project-groups-panel::before,
.project-keyword-entry-panel::before,
.project-keywords-full::before {
    content: '';
    position: absolute;
    left: 22px;
    right: 22px;
    top: 0;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(56, 144, 216, 0.9), rgba(39, 183, 163, 0.72));
    opacity: 0.65;
}

.project-advanced-details {
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #fbfdff;
    margin-bottom: 16px;
}

.project-advanced-details[open] {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.project-advanced-details summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    font-weight: 700;
    color: #314153;
}

.project-advanced-details summary::-webkit-details-marker {
    display: none;
}

.project-form-section-advanced {
    padding: 0 16px 16px;
}

.project-help-list {
    display: grid;
    gap: 6px;
}

.project-help-list p {
    margin: 0;
}

.project-settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.project-keyword-entry-panel textarea {
    min-height: 180px;
}
.project-keyword-entry-card__body {
    display: grid;
    gap: 14px;
}

.project-keyword-entry-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-keyword-entry-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.project-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 30, 45, 0.34);
    backdrop-filter: blur(6px);
    z-index: 90;
}

.project-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, calc(100vw - 24px));
    z-index: 91;
    display: flex;
    justify-content: flex-end;
}

.project-drawer[hidden],
.project-drawer-backdrop[hidden] {
    display: none !important;
}

.project-drawer__panel {
    width: 100%;
    height: 100%;
    padding: 24px 22px 28px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(216, 224, 234, 0.95);
    box-shadow: -18px 0 40px rgba(17, 30, 45, 0.16);
    display: grid;
    align-content: start;
    gap: 18px;
    overflow-y: auto;
}

.project-drawer__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.project-drawer__close {
    background: #edf4fb;
    color: #456481;
    border: 1px solid #d7e5f3;
}

.project-drawer__close:hover {
    background: #dfeaf6;
}

.project-drawer__form {
    display: grid;
    gap: 14px;
}

body.project-drawer-open {
    overflow: hidden;
}


.project-keywords-tools {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.5fr);
    align-items: end;
    gap: 16px;
    margin-bottom: 6px;
}

.project-edit-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}


.result-meta {
    display: grid;
    gap: 6px;
}

.result-meta-title,
.query-result-title {
    font-weight: 600;
    color: #233146;
}

.result-meta-url,
.query-result-url {
    font-size: 13px;
    color: #4f6b8b;
}

.query-cell-mismatch {
    background: #fff1f5;
}

.query-cell-has-metrica {
    background: linear-gradient(180deg, #f7fff8 0%, #ffffff 100%);
    box-shadow: inset 4px 0 0 #38c172;
}

.query-cell-has-metrica.query-cell-mismatch {
    background: linear-gradient(180deg, #fff7fa 0%, #ffffff 100%);
    box-shadow: inset 4px 0 0 #38c172, inset -4px 0 0 rgba(159, 48, 85, 0.18);
}

.query-url-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #edf4fb;
    color: #355372;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex: 0 0 auto;
}

.query-result-url {
    display: flex;
    align-items: center;
    gap: 8px;
}

.query-result-url-mismatch .query-url-label {
    background: #ffd7e3;
    color: #9f3055;
}

.result-meta-url a,
.query-result-url a {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta-match {
    font-size: 12px;
    color: #5e7189;
}

.result-meta-snippet {
    font-size: 13px;
    color: #667892;
    line-height: 1.45;
}

.query-result-title,
.query-result-url {
    margin-top: 0;
}


.toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
}

.toast {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 14px 34px rgba(27, 57, 97, 0.16);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(39, 183, 163, 0.28);
    color: #1f5f55;
}

.toast-error {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(181, 73, 60, 0.28);
    color: #8f342b;
}


.nav-area {
    display: grid;
    gap: 12px;
    justify-items: end;
    flex: 0 0 auto;
    min-width: 0;
}

.user-chip-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.user-chip {
    display: grid;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(202, 216, 232, 0.9);
    min-width: 240px;
}

.user-chip span {
    font-size: 13px;
    color: #6d7f96;
}

.auth-shell {
    display: flex;
    justify-content: center;
}

.auth-panel {
    width: min(100%, 540px);
}

.auth-note {
    margin-top: 16px;
}


.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
}

.checkbox-field input[type='checkbox'] {
    width: 18px;
    height: 18px;
    margin: 0;
}


.history-cell.pending {
    background: #eef4ff;
}

.history-cell .history-tooltip,
.metrica-cell .history-tooltip {
    display: none !important;
}

.history-tooltip-portal {
    --history-tooltip-arrow-left: 50%;
    position: fixed;
    left: 0;
    top: 0;
    width: min(340px, calc(100vw - 32px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1200;
}

.history-tooltip-card {
    position: relative;
    text-align: left;
    padding: 12px;
    border-radius: 18px;
    background: rgba(20, 28, 40, 0.96);
    color: #f7fbff;
    border: 1px solid rgba(139, 168, 200, 0.28);
    box-shadow: 0 18px 40px rgba(15, 23, 34, 0.32);
    display: grid;
    gap: 8px;
}

.history-tooltip-card::after {
    content: '';
    position: absolute;
    left: var(--history-tooltip-arrow-left);
    top: -8px;
    width: 14px;
    height: 14px;
    background: rgba(20, 28, 40, 0.96);
    border-left: 1px solid rgba(139, 168, 200, 0.28);
    border-top: 1px solid rgba(139, 168, 200, 0.28);
    transform: translateX(-50%) rotate(45deg);
}

.history-tooltip-portal--above .history-tooltip-card::after {
    top: auto;
    bottom: -8px;
    border-left: 0;
    border-top: 0;
    border-right: 1px solid rgba(139, 168, 200, 0.28);
    border-bottom: 1px solid rgba(139, 168, 200, 0.28);
}

.history-tooltip-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.history-tooltip-head strong {
    font-size: 14px;
    line-height: 1.35;
    color: #ffffff;
}

.history-tooltip-head span {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9bc3ff;
    font-weight: 700;
}

.history-tooltip-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.history-tooltip-note {
    font-size: 12px;
    color: #ffd88c;
    font-weight: 600;
}

.history-tooltip-item {
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
}

.history-tooltip-change {
    display: grid;
    gap: 3px;
}

.history-tooltip-item span,
.history-tooltip-change span,
.history-tooltip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8eb1d9;
    font-weight: 700;
}

.history-tooltip-item strong,
.history-tooltip-change strong,
.history-tooltip-text,
.history-tooltip-link {
    font-size: 13px;
    line-height: 1.4;
    color: #f7fbff;
    word-break: break-word;
}

.history-tooltip-link a,
.history-tooltip-change a {
    color: #7fd3ff;
    text-decoration-color: rgba(127, 211, 255, 0.55);
    word-break: break-word;
}

.history-tooltip-link a:hover,
.history-tooltip-change a:hover {
    color: #b9ecff;
    text-decoration-color: currentColor;
}

.history-tooltip-section {
    display: grid;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid rgba(139, 168, 200, 0.18);
}

.history-tooltip-section-accent {
    background: rgba(216, 58, 50, 0.12);
    border-top-color: rgba(255, 126, 117, 0.35);
    padding: 8px;
    border-radius: 12px;
}

.pending-spinner,
.pending-inline {
    display: inline-block;
    animation: addok-pulse 1.2s ease-in-out infinite;
}

.cell-job-status {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

.cell-job-status[hidden] {
    display: none;
}

.cell-job-status--queued {
    background: rgba(56, 144, 216, 0.14);
    color: #2f6ea8;
}

.cell-job-status--running {
    background: rgba(255, 177, 66, 0.16);
    color: #8f5b00;
}

.cell-job-status--completed {
    background: rgba(45, 179, 122, 0.14);
    color: #1f8a58;
}

.cell-job-status--failed {
    background: rgba(224, 84, 72, 0.14);
    color: #b23b30;
}

.query-row-pending .sticky-col {
    background: #f8fbff;
}

@keyframes addok-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.65;
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}


.process-log-message {
    display: block;
}

.process-log-context {
    margin-top: 0.4rem;
}

.process-log-context summary {
    cursor: pointer;
    color: var(--ink-soft, #6d7c94);
    font-size: 0.8rem;
    font-weight: 700;
}

.process-log-context pre {
    margin: 0.4rem 0 0;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
    color: #24354d;
    font-size: 0.76rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.history-context-menu {
    position: fixed;
    z-index: 50;
    min-width: 180px;
    padding: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(18px);
}

.history-context-menu__item {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #9f2f21;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0.7rem 0.85rem;
    text-align: left;
}

.history-context-menu__item:hover {
    background: rgba(159, 47, 33, 0.08);
}


.history-top-summary-row.top-3 .history-top-summary-label {
    background: var(--matrix-top-3, #3890d8);
}

.history-top-summary-row.top-5 .history-top-summary-label {
    background: var(--matrix-top-5, #1f9f7a);
}

.history-top-summary-row.top-10 .history-top-summary-label {
    background: var(--matrix-top-10, #27b7a3);
}

.history-top-summary-row.top-20 .history-top-summary-label {
    background: var(--matrix-top-30, #89d36b);
}

.history-top-summary-row.top-50 .history-top-summary-label {
    background: var(--matrix-top-100, #b8c2cc);
}

.history-top-summary-row.top-100 .history-top-summary-label {
    background: var(--matrix-top-100-plus, #ffc53a);
    color: #6b5500;
}

.history-top-summary-row.top-3 td {
    background: rgba(56, 144, 216, 0.08);
}

.history-top-summary-row.top-5 td {
    background: rgba(31, 159, 122, 0.08);
}

.history-top-summary-row.top-10 td {
    background: rgba(39, 183, 163, 0.08);
}

.history-top-summary-row.top-20 td {
    background: rgba(137, 211, 107, 0.10);
}

.history-top-summary-row.top-50 td {
    background: rgba(184, 194, 204, 0.16);
}

.history-top-summary-row.top-100 td {
    background: rgba(255, 197, 58, 0.14);
}


.region-autocomplete {
    position: relative;
}

.region-autocomplete-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(29, 27, 24, 0.10);
    padding: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.region-autocomplete-option {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #253141;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-align: left;
}

.region-autocomplete-option:hover {
    background: #f3f8fd;
    transform: none;
}

.region-autocomplete-option strong {
    flex: 1 1 auto;
    display: block;
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
}

.region-autocomplete-option span {
    color: #6d7f96;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    flex: 0 0 auto;
}
.app-shell--guest {
    display: block;
    padding: 24px;
}

.app-main--guest {
    width: min(1680px, calc(100vw - 48px));
    margin: 0 auto;
}

.panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.project-guest-panel {
    margin-top: 20px;
}

.project-guest-link-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.project-guest-link-field span {
    font-size: 0.95rem;
    color: var(--muted);
}

.project-guest-link-field input {
    width: 100%;
}

.project-guest-link-actions {
    display: flex;
    justify-content: flex-start;
}

.history-matrix {
    --query-col-width: 300px;
    --frequency-col-width: 120px;
}

.sticky-col-query {
    width: var(--query-col-width);
    min-width: var(--query-col-width);
    max-width: var(--query-col-width);
}

.sticky-col-frequency,
.history-frequency-head,
.history-frequency-cell {
    width: var(--frequency-col-width);
    min-width: var(--frequency-col-width);
    max-width: var(--frequency-col-width);
}

.matrix-head-query {
    position: relative;
}

.matrix-col-resizer {
    position: absolute;
    top: 0;
    right: -7px;
    width: 14px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
}

.matrix-col-resizer::after {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 6px;
    width: 2px;
    border-radius: 999px;
    background: rgba(80, 110, 145, 0.18);
    transition: background 0.18s ease;
}

.matrix-col-resizer:hover::after,
.matrix-col-resizer.is-dragging::after {
    background: rgba(56, 144, 216, 0.7);
}

.query-result-url a {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 920px) {
    .history-matrix {
        --query-col-width: 220px;
        --frequency-col-width: 96px;
    }
}

@media (max-width: 640px) {
    .history-matrix {
        --query-col-width: 180px;
        --frequency-col-width: 88px;
    }
}
.history-matrix .sticky-col-query,
.history-matrix .sticky-col-head.sticky-col-query {
    width: var(--query-col-width) !important;
    min-width: var(--query-col-width) !important;
    max-width: var(--query-col-width) !important;
}

.site-summary,
.panel-wide,
.panel-wide .panel-head,
.panel-wide .panel-actions,
.panel-wide .matrix-scroll,
.panel-wide .history-top-summary-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.panel-wide,
.summary-card {
    overflow: hidden;
}

.matrix-scroll,
.history-top-summary-wrap {
    overflow-x: auto;
    overflow-y: hidden;
}
.field-grid-colors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid-colors input[type='color'] {
    padding: 6px;
    min-height: 48px;
    cursor: pointer;
}

.panel-actions--report {
    justify-content: flex-end;
}

.report-filter-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.report-filter-form label {
    display: grid;
    gap: 6px;
    min-width: 220px;
}

.report-table {
    min-width: 1100px;
}

.report-table th,
.report-table td {
    vertical-align: top;
}

.report-table td:nth-child(1) {
    min-width: 220px;
    font-weight: 600;
}

.report-table td:nth-child(3),
.report-table td:nth-child(4),
.report-table td:nth-child(6),
.report-table td:nth-child(7) {
    min-width: 220px;
}

.report-table a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.report-sort-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    cursor: pointer;
}

.report-sort-trigger::after {
    content: '';
    font-size: 0.9em;
    opacity: 0.75;
}

.report-sortable[data-direction="asc"] .report-sort-trigger::after {
    content: '\2191';
}

.report-sortable[data-direction="desc"] .report-sort-trigger::after {
    content: '\2193';
}

.report-table tbody tr:hover td {
    background: #fff;
}

.report-table tbody tr.report-row-mismatch td {
    background: #fff4f7;
}

.report-table tbody tr.report-row-mismatch:hover td {
    background: #fff4f7;
}

.report-table td.report-cell-mismatch {
    background: #ffdfe8;
}

.report-table tbody tr.report-row-mismatch:hover td.report-cell-mismatch,
.report-table tbody tr.report-row-mismatch td.report-cell-mismatch {
    background: #ffd8e4;
}

.report-mismatch-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffe1ea;
    color: #9f3055;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.report-sort-trigger:hover,
.report-sort-trigger:focus-visible {
    color: inherit;
    background: transparent;
}

.panel-actions--report {
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-actions--report .button-link {
    align-self: flex-end;
}

.live-check-indicator {
    margin-top: 8px;
    font-weight: 600;
    min-height: 1.4em;
}

.live-check-indicator--idle {
    color: #6f7d95;
}

.live-check-indicator--queued {
    color: #8b6a1a;
}

.live-check-indicator--running {
    color: #2c6ab3;
}

.live-check-indicator--completed {
    color: #237a4f;
}

.live-check-indicator--failed {
    color: #c24d43;
}


.history-cell-updated {
    animation: historyCellUpdatedFlash 1.8s ease;
}

.query-cell-updated {
    animation: historyQueryCellUpdatedFlash 1.8s ease;
}

.query-row-updated .sticky-col-query,
.query-row-updated .query-cell,
.query-row-updated .history-frequency-cell {
    animation: historyRowUpdatedFlash 1.8s ease;
}

@keyframes historyCellUpdatedFlash {
    0% {
        box-shadow: inset 0 0 0 999px rgba(59, 130, 246, 0.18);
    }
    100% {
        box-shadow: inset 0 0 0 999px rgba(59, 130, 246, 0);
    }
}

@keyframes historyQueryCellUpdatedFlash {
    0% {
        background: #eef6ff;
    }
    100% {
        background: inherit;
    }
}

@keyframes historyRowUpdatedFlash {
    0% {
        box-shadow: inset 0 0 0 999px rgba(59, 130, 246, 0.08);
    }
    100% {
        box-shadow: inset 0 0 0 999px rgba(59, 130, 246, 0);
    }
}

.process-log-stage-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.process-log-retry-badge {
    letter-spacing: 0.06em;
}

.query-row-retrying .sticky-col-query {
    background: #fff8e8;
    box-shadow: inset 4px 0 0 #f2a93b;
}

.query-retry-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(242, 169, 59, 0.18);
    color: #9b5f00;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: middle;
}


.pf-hourly-chart {
    display: grid;
    grid-template-columns: repeat(24, minmax(28px, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 220px;
    padding-top: 8px;
}

.pf-hourly-bar {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.pf-hourly-bar__value {
    font-size: 12px;
    font-weight: 700;
    color: #49596f;
    min-height: 16px;
}

.pf-hourly-bar__track {
    width: 100%;
    height: 140px;
    border-radius: 14px;
    background: #edf4fb;
    border: 1px solid #dde7f2;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.pf-hourly-bar__fill {
    display: block;
    width: 100%;
    min-height: 4px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #50b2ff 0%, #3890d8 100%);
}

.pf-hourly-bar__label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7a8e;
}

.report-table--pf-clicks td:nth-child(1) {
    white-space: nowrap;
}

.report-table--pf-clicks td:nth-child(2) {
    min-width: 220px;
}

.report-table--pf-clicks td:nth-child(3),
.report-table--pf-clicks td:nth-child(4) {
    min-width: 260px;
}

@media (max-width: 1200px) {
    .pf-hourly-chart {
        min-width: 900px;
    }
}


.pf-click-row--success td {
    background: rgba(31, 159, 122, 0.08);
}

.pf-click-row--not_found td {
    background: rgba(255, 197, 58, 0.12);
}

.pf-click-row--failed td,
.pf-click-row--error td {
    background: rgba(224, 84, 72, 0.10);
}

.pf-click-row--pending td,
.pf-click-row--queued td,
.pf-click-row--running td {
    background: rgba(56, 144, 216, 0.09);
}


.pf-click-url-mismatch {
    box-shadow: inset 0 0 0 999px rgba(255, 115, 150, 0.14);
}

.pf-click-url-mismatch a {
    color: #9f3055;
    text-decoration-color: rgba(159, 48, 85, 0.4);
}

.pf-click-url-mismatch-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0.45rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(159, 48, 85, 0.12);
    color: #9f3055;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}


.group-item--settings {
    display: grid;
    gap: 14px;
}

.group-item__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.group-item__controls {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.group-settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    flex: 1 1 auto;
}

.group-settings-form .button-link {
    justify-self: flex-start;
}

.group-time-field {
    display: grid;
    gap: 6px;
    color: #708099;
    font-size: 12px;
}

.group-time-field input {
    min-width: 140px;
}

@media (max-width: 900px) {
    .group-item__controls {
        flex-direction: column;
    }

    .group-settings-form {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border: 1px solid #d6e4f3;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: #24517d;
    box-shadow: 0 12px 28px rgba(29, 27, 24, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
    z-index: 1200;
}

.back-to-top:hover {
    background: #edf4fb;
    border-color: #c5d9ee;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top span {
    line-height: 1;
    transform: translateY(-1px);
}

.matrix-query-sort-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.matrix-sort-trigger[data-direction='asc']::after {
    content: ' \2191';
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #3890d8;
    vertical-align: baseline;
}

.matrix-sort-trigger[data-direction='desc']::after {
    content: ' \2193';
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #3890d8;
    vertical-align: baseline;
}

.matrix-sort-chip {
    padding: 2px 8px;
    border: 1px solid #d5dfea;
    border-radius: 999px;
    background: #f6f9fd;
    color: #5f7390;
    font: 600 11px/1.4 "Segoe UI", Tahoma, sans-serif;
    cursor: pointer;
}

.matrix-sort-chip[data-direction='asc'],
.matrix-sort-chip[data-direction='desc'] {
    color: #24496f;
    border-color: #bfd4ea;
    background: #edf4fb;
}

.matrix-sort-chip[data-direction='asc']::after {
    content: ' \2191';
    color: #3890d8;
}

.matrix-sort-chip[data-direction='desc']::after {
    content: ' \2193';
    color: #3890d8;
}


.stats-inline-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stats-inline-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #dbe6f2;
    border-radius: 16px;
    background: #f8fbff;
}

.stats-inline-card span {
    color: #7a8aa3;
    font-size: 13px;
}

.stats-inline-card strong {
    color: #24344d;
    font-size: 28px;
    line-height: 1;
}

.matrix-toggle-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #dbe6f2;
    border-radius: 999px;
    background: #f8fbff;
    color: #5f7390;
    font-size: 13px;
    font-weight: 600;
}

.matrix-toggle-control input {
    margin: 0;
    accent-color: #3890d8;
}

.metrica-inline-summary .stats-inline-card {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}


.history-matrix--metrica td,
.history-matrix--metrica th {
    text-align: center;
}

.history-matrix--metrica .sticky-col-query {
    text-align: left;
}

.metrica-cell {
    min-width: 92px;
    background: #f8fbff;
}

.metrica-cell.empty {
    background: #f8fbff;
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-3 {
    background: var(--matrix-top-3, #3890d8);
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-5 {
    background: var(--matrix-top-5, #1f9f7a);
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-10 {
    background: var(--matrix-top-10, #27b7a3);
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-30 {
    background: var(--matrix-top-30, #89d36b);
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-50 {
    background: var(--matrix-top-50, #66c8a4);
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-100 {
    background: var(--matrix-top-100, #b8c2cc);
}

.history-matrix--metrica.metrica-matrix--colorized .metrica-cell--has-data.top-100-plus {
    background: var(--matrix-top-100-plus, #ffc53a);
}

.metrica-cell strong {
    display: block;
    color: inherit;
    font-size: 18px;
    line-height: 1.1;
}

.metrica-cell small {
    display: block;
    margin-top: 4px;
    color: inherit;
    opacity: 0.82;
    font-size: 11px;
    line-height: 1.2;
}

.metrica-cell-empty {
    color: #9aa9bf;
    font-weight: 600;
}

.metrica-summary-row th {
    background: #eef4fb;
    color: #24344d;
    font-weight: 700;
}

.matrix-sort-trigger--static {
    cursor: default;
}
