:root {
    --bg-main: #f3f7fd;
    --text-main: #0f172a;
    --panel-bg: #ffffff;
    --panel-border: #dbe6f2;
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --secondary-bg: #eef6ff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    color: var(--text-main);
    background: radial-gradient(1000px 420px at 10% -15%, rgba(14, 165, 233, 0.18), transparent 42%),
                radial-gradient(860px 420px at 90% 0%, rgba(59, 130, 246, 0.14), transparent 48%),
                var(--bg-main);
}

.app-shell {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.36;
}

.bg-orb-one {
    width: 360px;
    height: 360px;
    top: -120px;
    left: -90px;
    background: rgba(6, 182, 212, 0.44);
}

.bg-orb-two {
    width: 440px;
    height: 440px;
    top: -180px;
    right: -120px;
    background: rgba(59, 130, 246, 0.34);
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.panel-sub {
    background: #f8fbff;
    border: 1px solid #dce8f5;
    border-radius: 12px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
}

.brand-logo-login {
    height: 34px;
}

.brand-mark-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: block;
}

.admin-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.52rem;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: #0f172a;
    border-color: #cfe1f5;
}

.btn-secondary:hover {
    background: #e1efff;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

.form-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 0.56rem 0.76rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.form-grid {
    display: grid;
    gap: 0.55rem;
}

.alert-success,
.alert-error {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 0.55rem 0.8rem;
    font-size: 0.85rem;
}

.alert-success {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
}

.alert-error {
    background: #fff1f2;
    border-color: #fda4af;
    color: #9f1239;
}

.redirect-bridge-card {
    position: relative;
    overflow: hidden;
    border-color: #cfe1f5;
}

.redirect-bridge-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(14, 165, 233, 0.1), rgba(59, 130, 246, 0.04) 48%, rgba(255, 255, 255, 0));
    pointer-events: none;
}

.redirect-bridge-title,
.redirect-bridge-text,
.redirect-progress,
.redirect-actions {
    position: relative;
    z-index: 1;
}

.redirect-bridge-title {
    font-size: 1.65rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.redirect-bridge-text {
    margin: 0.6rem auto 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #475569;
}

.redirect-progress {
    margin: 0.9rem auto 0;
    width: min(100%, 240px);
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(203, 213, 225, 0.5);
}

.redirect-progress-bar {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
    animation: redirect-progress 1.15s ease-in-out infinite;
}

.redirect-actions {
    margin-top: 1rem;
    display: grid;
    justify-items: center;
    gap: 0.5rem;
}

@keyframes redirect-progress {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(320%);
    }
}

.admin-header-row {
    display: grid;
    gap: 0.45rem;
}

.admin-header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.admin-header-line-utility {
    justify-content: space-between;
}

.admin-header-line-main {
    justify-content: space-between;
}

.admin-header-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    color: #0f172a;
    background: var(--secondary-bg);
    border: 1px solid #cfe1f5;
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    height: 40px;
    min-height: 40px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: -0.03em;
    line-height: 1;
    text-align: left;
}

.admin-header-title::before {
    content: none;
}

.admin-header-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(207, 225, 245, 0), rgba(207, 225, 245, 0.95), rgba(207, 225, 245, 0));
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.header-day-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.header-day-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 40px;
    padding: 0.42rem 0.62rem;
    border: 1px solid #cfe1f5;
    border-radius: 10px;
    background: #f8fbff;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.header-day-label-button {
    cursor: pointer;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
}

.header-range-picker {
    position: absolute;
    top: calc(100% + 8px);
    left: 44px;
    z-index: 6;
    display: grid;
    gap: 0.58rem;
    min-width: 240px;
    padding: 0.78rem;
    border: 1px solid #d6e5f6;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.header-range-picker[hidden] {
    display: none !important;
}

.header-range-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.header-shortcut-button {
    min-width: 0;
    padding-left: 0.62rem;
    padding-right: 0.62rem;
}

.header-range-field {
    display: grid;
    gap: 0.22rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
}

.header-range-field input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d6e5f6;
    border-radius: 10px;
    background: #f8fbff;
    padding: 0.42rem 0.55rem;
    color: #0f172a;
}

.header-range-actions {
    display: flex;
    align-items: center;
    gap: 0.42rem;
}

.header-day-button {
    min-width: 40px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
}

.header-day-button-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.btn-compact {
    min-height: 38px;
    padding: 0.45rem 0.78rem;
    font-size: 0.82rem;
}

.icon-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
}

.icon-logout {
    width: 19px;
    height: 19px;
    display: block;
    color: #64748b;
}

.icon-stats {
    width: 18px;
    height: 18px;
    display: block;
    color: #64748b;
}

.icon-settings {
    width: 18px;
    height: 18px;
    display: block;
    color: #64748b;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
    max-width: 560px;
}

.admin-kpi-stack {
    display: grid;
    gap: 0.42rem;
}

.admin-kpi-grid-postbacks {
    max-width: 420px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-kpi-grid-core {
    max-width: 560px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-kpi {
    position: relative;
    overflow: hidden;
    border: 1px solid #d6e5f6;
    background: #f8fbff;
    border-radius: 10px;
    padding: 0.3rem 0.48rem;
    min-width: 0;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-kpi-goal::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: var(--goal-progress, 0%);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.14) 0%, rgba(14, 116, 144, 0.22) 100%);
    pointer-events: none;
}

.mini-kpi-goal > * {
    position: relative;
    z-index: 1;
}

.mini-kpi-goal-note {
    margin-top: 0.12rem;
    font-size: 0.62rem;
    line-height: 1.1;
    font-weight: 700;
    color: #64748b;
}

.mini-kpi-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    line-height: 1;
}

.mini-kpi-value {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0.14rem;
    color: #0f172a;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.08rem 0.2rem;
}

.mini-kpi-value .js-stat-main {
    line-height: 1;
}

.mini-kpi-value-nowrap {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 0.08rem;
}

.mini-kpi-value-accent {
    color: #0e7490;
}

.sync-refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 0.74rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
    height: 40px;
    min-height: 40px;
    padding: 0.44rem 0.58rem;
}

.sync-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex: 0 0 auto;
}

.sync-copy {
    display: none;
    line-height: 1;
    white-space: nowrap;
}

.sync-refresh.is-syncing .sync-icon {
    animation: sync-spin 0.85s linear infinite;
}

.sync-refresh.is-stale {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.sync-refresh.is-stale:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

.sync-refresh {
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sync-refresh:hover {
    background: #eef6ff;
    border-color: #bcd8f2;
}

.sync-refresh:active {
    background: #e2efff;
}

@keyframes sync-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.debug-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 0 24px;
}

.debug-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.debug-panel {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100% - 24px));
    margin: 8vh auto 0;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.settings-panel {
    width: min(960px, calc(100% - 20px));
}

body.admin-overlay-open {
    overflow: hidden;
}

.debug-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.settings-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
}

.settings-head > div:first-child {
    padding-right: 52px;
}

.debug-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #be123c;
}

.debug-title {
    margin-top: 0.22rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.debug-grid {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.debug-grid form {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.82rem;
    background: #f8fbff;
}

.debug-label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
}

.debug-inline-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.debug-action {
    min-width: 150px;
}

.debug-note {
    margin-top: 0.55rem;
    font-size: 0.76rem;
    line-height: 1.35;
    color: #64748b;
}

.debug-blocklist-grid {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.debug-blocklist-card {
    border: 1px solid #dce8f5;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.72rem;
}

.debug-blocklist-title {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
}

.debug-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem 0.7rem;
    margin-top: 0.65rem;
}

.debug-check-item {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 600;
    color: #334155;
}

.debug-check-item input {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    accent-color: #0e7490;
}

.debug-check-item span {
    min-width: 0;
}

.debug-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    line-height: 1.25;
    font-weight: 700;
    color: #334155;
}

.debug-toggle-row input {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    accent-color: #0e7490;
}

.visits-panel {
    width: min(960px, calc(100% - 20px));
}

.visits-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
}

.visits-head > div:first-child {
    padding-right: 52px;
}

.visits-head-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
}

.visits-close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #94a3b8;
    transition: color 0.18s ease, transform 0.18s ease;
}

.visits-close-button:hover {
    color: #334155;
    transform: scale(1.04);
}

.visits-close-button:focus-visible {
    outline: 2px solid rgba(14, 116, 144, 0.28);
    outline-offset: 3px;
    border-radius: 999px;
}

.icon-close {
    width: 16px;
    height: 16px;
    display: block;
    color: currentColor;
}

.visits-head-actions .icon-button.is-active {
    background: #e1efff;
    border-color: #93c5fd;
    color: #0e7490;
}

.visits-head-actions .icon-button.is-syncing .sync-icon {
    animation: sync-spin 0.85s linear infinite;
}

.visits-day-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: stretch;
    gap: 0.38rem;
    width: 100%;
}

.visits-day-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 34px;
    padding: 0.32rem 0.55rem;
    border: 1px solid #cfe1f5;
    border-radius: 10px;
    background: #f8fbff;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.visits-day-nav .btn-secondary,
.visits-head-actions .icon-button {
    width: 100%;
    min-width: 0;
}

.visits-breakdown,
.visits-insights {
    position: relative;
    margin-top: 0.9rem;
}

.visits-insights.is-loading::before,
.visits-insights.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
}

.visits-insights.is-loading::before {
    background: rgba(248, 251, 255, 0.56);
    z-index: 1;
}

.visits-insights.is-loading::after {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-radius: 999px;
    border: 2px solid rgba(14, 116, 144, 0.18);
    border-top-color: #0e7490;
    animation: sync-spin 0.8s linear infinite;
    z-index: 2;
}

.visits-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.visits-breakdown-card {
    border: 1px solid #dce8f5;
    border-radius: 14px;
    background: #f8fbff;
    padding: 0.8rem;
}

.visits-breakdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.visits-breakdown-title {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.visits-breakdown-total {
    flex: 0 0 auto;
    border: 1px solid #cfe1f5;
    border-radius: 999px;
    background: #ffffff;
    color: #0e7490;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.28rem 0.46rem;
}

.visits-breakdown-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.72rem;
}

.visits-breakdown-item {
    display: grid;
    gap: 0.22rem;
}

.visits-breakdown-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
}

.visits-breakdown-label {
    min-width: 0;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visits-breakdown-value {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    color: #64748b;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.visits-breakdown-bar {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.visits-breakdown-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22d3ee 0%, #3b82f6 100%);
}

.visits-breakdown-empty {
    margin-top: 0.65rem;
    font-size: 0.74rem;
    line-height: 1.35;
    color: #64748b;
}

.visits-insight-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.62rem;
}

.visits-insight-metric {
    display: grid;
    gap: 0.24rem;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    background: #f8fbff;
    padding: 0.74rem 0.8rem;
}

.visits-insight-metric.is-accent .visits-insight-metric-value {
    color: #0e7490;
}

.visits-insight-metric-label {
    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.visits-insight-metric-value {
    font-size: 1rem;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.visits-insight-grid {
    margin-top: 0.78rem;
}

.visits-route-link {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0e7490;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.visits-route-link:hover {
    color: #0369a1;
}

.visits-route-link:focus-visible {
    outline: 2px solid rgba(14, 116, 144, 0.22);
    outline-offset: 2px;
    border-radius: 6px;
}

.visits-route-detail {
    position: relative;
    margin-top: 0.78rem;
}

.visits-route-detail.is-loading::before,
.visits-route-detail.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
}

.visits-route-detail.is-loading::before {
    background: rgba(248, 251, 255, 0.56);
    z-index: 1;
}

.visits-route-detail.is-loading::after {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-radius: 999px;
    border: 2px solid rgba(14, 116, 144, 0.18);
    border-top-color: #0e7490;
    animation: sync-spin 0.8s linear infinite;
    z-index: 2;
}

.visits-route-detail-card .visits-breakdown-total {
    max-width: 44%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visits-route-detail-summary {
    margin-top: 0.72rem;
}

.visits-route-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
    margin-top: 0.72rem;
}

.visits-route-detail-meta div {
    display: grid;
    gap: 0.18rem;
    border: 1px solid #dce8f5;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.66rem 0.72rem;
}

.visits-route-detail-meta span {
    font-size: 0.66rem;
    line-height: 1.15;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.visits-route-detail-meta strong {
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.visits-route-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.72rem;
}

.visits-route-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.34rem 0.46rem;
    border: 1px solid #dce8f5;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
}

.visits-route-tag strong {
    font-weight: 800;
    color: #0f172a;
}

.visits-list {
    position: relative;
    margin-top: 0.9rem;
    min-height: 0;
    transition: opacity 0.18s ease;
}

.visits-list.is-loading > * {
    opacity: 0.38;
    transition: opacity 0.18s ease;
}

.visits-list.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: rgba(248, 251, 255, 0.48);
    border-radius: 16px;
}

.visits-list.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-radius: 999px;
    border: 2px solid rgba(14, 116, 144, 0.18);
    border-top-color: #0e7490;
    animation: sync-spin 0.8s linear infinite;
}

.visit-log-card,
.visit-log-empty-card {
    border: 1px solid #dce8f5;
    border-radius: 14px;
    background: #f8fbff;
    padding: 0.82rem;
}

.visit-log-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.visit-log-route {
    font-size: 0.96rem;
    font-weight: 800;
    color: #0e7490;
    line-height: 1.1;
    word-break: break-word;
}

.visit-log-time {
    margin-top: 0.2rem;
    font-size: 0.76rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.visit-log-subid {
    flex: 0 0 auto;
    border: 1px solid #cfe1f5;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.26rem 0.52rem;
    line-height: 1;
    white-space: nowrap;
}

.visit-log-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.visit-log-row {
    display: grid;
    gap: 0.1rem;
}

.visit-log-key {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    line-height: 1;
}

.visit-log-value {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

.visit-log-value-wrap {
    word-break: break-word;
}

.visit-log-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.visit-log-tag {
    border: 1px solid #cfe1f5;
    background: #ffffff;
    color: #475569;
    border-radius: 999px;
    padding: 0.2rem 0.46rem;
    font-size: 0.72rem;
    line-height: 1.15;
    word-break: break-all;
}

.visit-log-empty {
    font-size: 0.74rem;
    color: #64748b;
}

.visits-table-wrap {
    max-height: 72vh;
    overflow: auto;
    border: 1px solid #dce8f5;
    border-radius: 16px;
    background: #f8fbff;
}

.visits-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.74rem;
    color: #0f172a;
}

.visits-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef6ff;
    color: #475569;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid #dce8f5;
    white-space: nowrap;
}

.visits-table tbody td {
    padding: 0.48rem 0.6rem;
    border-bottom: 1px solid #e6eef8;
    vertical-align: middle;
    line-height: 1.3;
}

.visits-table tbody tr:last-child td {
    border-bottom: 0;
}

.visits-table tbody tr:nth-child(2n) td {
    background: rgba(255, 255, 255, 0.72);
}

.visit-cell-os,
.visit-cell-time,
.visit-cell-route,
.visit-cell-subid,
.visit-cell-ip,
.visit-cell-unique {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.visit-cell-route,
.visit-cell-subid {
    color: #0e7490;
    font-weight: 700;
}

.visit-cell-unique {
    font-weight: 700;
}

.visit-cell-os {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.visit-cell-wrap {
    min-width: 190px;
    max-width: 260px;
    word-break: break-word;
    color: #334155;
}

.visit-cell-ua {
    min-width: 220px;
    max-width: 280px;
    color: #334155;
}

.visit-inline-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    word-break: normal;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.visit-country-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    min-width: 0;
}

.visit-country-text {
    color: #334155;
    white-space: nowrap;
}

.visit-country-scroll {
    display: inline-block;
    min-width: 0;
}

.visit-flag {
    flex: 0 0 auto;
    font-size: 0.95rem;
    line-height: 1;
}

.visit-os-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid #d6e5f6;
    border-radius: 999px;
    background: #f8fbff;
    color: #64748b;
}

.visit-os-icon {
    width: 12px;
    height: 12px;
    display: block;
    color: inherit;
}

.visit-os-icon-image {
    width: 12px;
    height: 12px;
    display: block;
    object-fit: contain;
}

.visit-log-empty-card {
    font-size: 0.8rem;
}

.routes-list-shell {
    display: grid;
    gap: 0.82rem;
}

.routes-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.routes-section-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0e7490;
}

.routes-section-title {
    margin-top: 0.12rem;
    font-size: 1.04rem;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.routes-section-meta {
    font-size: 0.76rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.routes-section-tools {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.today-filter-form {
    display: flex;
    align-items: center;
}

.today-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.today-filter-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #0e7490;
}

.routes-list-stack {
    display: grid;
    gap: 0.72rem;
}

.routes-zero-wrap {
    display: grid;
    gap: 0.72rem;
}

.routes-zero-wrap[hidden] {
    display: none;
}

.routes-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    justify-self: center;
    min-width: 210px;
    min-height: 42px;
    padding: 0.58rem 0.82rem;
    border: 1px solid #cfe1f5;
    border-radius: 999px;
    background: linear-gradient(180deg, #fbfdff 0%, #eff6ff 100%);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.routes-more-button:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e8f3ff 100%);
    border-color: #bfd8f2;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.96);
    transform: translateY(-1px);
}

.routes-more-copy {
    color: #334155;
}

.routes-more-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 0.42rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d6e5f6;
    color: #0e7490;
    font-size: 0.72rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.routes-more-arrow {
    color: #64748b;
    font-size: 0.8rem;
}

.route-card {
    background: #ffffff;
    border: 1px solid #d9e6f4;
    border-radius: 11px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.route-card-404 {
    border-color: #f8b4be;
    background: #fff8f8;
}

.route-card-404 > summary {
    background: #fff1f2;
}

.route-card-404 .route-name {
    color: #be123c;
}

.route-card > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.5rem 1.65rem 0.5rem 0.64rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.46rem;
    position: relative;
}

.route-card > summary::-webkit-details-marker {
    display: none;
}

.route-card > summary::after {
    content: '▾';
    font-size: 0.7rem;
    color: #64748b;
    position: absolute;
    right: 0.58rem;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}

.route-card[open] > summary::after {
    content: '▴';
}

.route-summary-main {
    min-width: 0;
    flex: 1 1 auto;
}

.route-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0e7490;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-created {
    margin-top: 0.1rem;
    font-size: 0.64rem;
    color: #64748b;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-summary-stats {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    width: auto;
    flex: 0 0 auto;
}

.summary-chip {
    width: auto;
    min-width: 0;
    min-height: 32px;
    padding: 0.14rem 0.22rem;
    border: 1px solid #d6e5f6;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.18rem;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.summary-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #64748b;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}

.summary-icon {
    width: 16px;
    height: 16px;
    display: block;
    color: inherit;
}

.summary-label-postback {
    color: #64748b;
}

.summary-value {
    display: inline-flex;
    margin-top: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-align: right;
    align-items: center;
    justify-content: flex-end;
    gap: 0.1rem;
    width: auto;
    min-width: max-content;
}

.summary-value-accent {
    color: #0e7490;
}

.route-added-at {
    margin-top: 0.32rem;
    font-size: 0.72rem;
    color: #64748b;
    word-break: break-word;
}

.route-postback-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.mini-kpi-inline {
    min-height: 56px;
}

.stat-delta {
    display: none;
    color: #16a34a;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    padding: 0.08rem 0.22rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.stat-delta.is-visible {
    display: inline-flex;
    align-items: center;
}

.stat-delta.is-negative {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.mini-kpi-value .stat-delta {
    font-size: 0.56rem;
    align-self: center;
}

.summary-value .stat-delta {
    font-size: 0.5rem;
    flex: 0 0 auto;
}

.route-body {
    border-top: 1px solid #e1ebf8;
    padding: 0.72rem 0.82rem 0.82rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    width: 100%;
    max-width: 280px;
}

.metric-chip {
    background: #f8fbff;
    border: 1px solid #d6e5f6;
    border-radius: 10px;
    padding: 0.42rem 0.52rem;
}

.metric-label {
    font-size: 0.62rem;
    line-height: 0.9rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.metric-value {
    margin-top: 0.16rem;
    font-size: 0.92rem;
    line-height: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}

.metric-value-accent {
    color: #0e7490;
}

.route-url {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #475569;
    text-decoration: underline;
    word-break: break-all;
}

.route-effective {
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: #64748b;
    word-break: break-all;
}

.route-mode {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
}

.route-mode-404 {
    color: #be123c;
}

.route-actions {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    flex-wrap: nowrap;
}

.route-action-form {
    margin: 0;
    flex: 0 0 auto;
}

.btn-compact-action {
    min-height: 30px;
    padding: 0.34rem 0.58rem;
    font-size: 0.76rem;
    line-height: 1;
}

.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

.chart-head strong {
    color: #0f172a;
    font-weight: 800;
}

.line-chart-shell {
    margin-top: 0.28rem;
    width: 100%;
    overflow: hidden;
}

.line-chart-shell-compact {
    margin-top: 0.2rem;
}

.line-chart {
    width: 100%;
    height: 170px;
    display: block;
}

.line-chart-global {
    height: 128px;
}

.axis-line {
    stroke: #cbd5e1;
    stroke-width: 1;
}

.axis-guide {
    stroke: #e2e8f0;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.axis-guide-mid {
    stroke: #dbeafe;
}

.axis-text {
    fill: #64748b;
    font-size: 10px;
    font-weight: 700;
}

.line-prev-fill {
    fill: rgba(14, 165, 233, 0.11);
}

.line-prev {
    fill: none;
    stroke: rgba(14, 116, 144, 0.32);
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.line-total,
.line-unique {
    fill: none;
    stroke-width: 2.2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.line-total {
    stroke: #0ea5e9;
}

.line-unique {
    stroke: #22d3ee;
}

.line-tip {
    stroke-width: 1.2;
}

.line-tip-total {
    fill: #0ea5e9;
    stroke: #ffffff;
}

.line-tip-unique {
    fill: #22d3ee;
    stroke: #ffffff;
}

.postback-hour-line {
    stroke: rgba(245, 158, 11, 0.34);
    stroke-width: 1.2;
    stroke-linecap: round;
}

.postback-hour-dot {
    fill: #f59e0b;
    stroke: #ffffff;
    stroke-width: 1.2;
}

.daily-chart-shell {
    margin-top: 0.28rem;
    width: 100%;
    overflow: hidden;
}

.daily-line-chart {
    width: 100%;
    height: 150px;
    display: block;
}

.line-axis {
    margin-top: 0.05rem;
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 0;
}

.line-axis span {
    font-size: 8px;
    color: #64748b;
    text-align: center;
    line-height: 1;
}

.line-axis-compact span {
    font-size: 7px;
}

.line-axis-detail {
    grid-template-columns: repeat(24, minmax(0, 1fr));
}

.line-axis-detail span {
    font-size: 7px;
}

.daily-details summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}

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

.daily-details summary::after {
    content: '▼';
    margin-left: 6px;
    font-size: 9px;
    color: #6b7280;
}

.daily-details[open] summary::after {
    content: '▲';
}

.table-wrap {
    margin-top: 0.38rem;
    overflow-x: auto;
}

.daily-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
}

.daily-table th,
.daily-table td {
    border-bottom: 1px solid #dce8f5;
    padding: 0.35rem 0.28rem;
    color: #334155;
    white-space: nowrap;
}

.daily-table thead th {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}

code {
    background: #f1f5f9;
    border: 1px solid #dbe6f2;
    border-radius: 6px;
    padding: 0.1rem 0.36rem;
    font-size: 0.88em;
}

@media (min-width: 768px) {
    .brand-logo {
        height: 40px;
    }

    .brand-logo-login {
        height: 36px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
    }

    .form-grid {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .mini-kpi {
        min-height: 64px;
    }

    .admin-kpi-grid {
        max-width: 560px;
    }

    .admin-kpi-grid-postbacks {
        max-width: 420px;
    }

    .header-day-label {
        min-height: 40px;
    }

    .sync-refresh-button {
        min-height: 40px;
    }

    .debug-inline-form {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .visits-panel {
        width: min(960px, calc(100% - 28px));
    }

    .route-card > summary {
        padding: 0.56rem 1.85rem 0.56rem 0.78rem;
        align-items: center;
    }

    .route-summary-main {
        flex: 1 1 auto;
    }

    .route-summary-stats {
        margin-left: 0;
        width: auto;
        flex: 0 0 auto;
    }

    .route-body {
        padding: 0.84rem 0.88rem 0.92rem;
    }

    .route-name {
        font-size: 0.92rem;
    }

    .summary-chip {
        width: auto;
        min-width: 0;
        min-height: 34px;
        padding: 0.14rem 0.24rem;
    }

    .summary-value {
        font-size: 0.92rem;
    }

    .line-chart {
        height: 185px;
    }

    .line-chart-global {
        height: 142px;
    }

    .daily-line-chart {
        height: 165px;
    }

    .line-axis span {
        font-size: 9px;
    }

}

@media (max-width: 640px) {
    .form-input {
        font-size: 16px;
    }

    .bg-orb {
        filter: blur(62px);
        opacity: 0.28;
    }

    .admin-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 100%;
    }

    .admin-kpi-grid-postbacks {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.28rem;
    }

    .admin-kpi-grid-postbacks .mini-kpi {
        padding: 0.26rem 0.34rem;
        min-height: 54px;
    }

    .admin-kpi-grid-postbacks .mini-kpi-label {
        font-size: 0.5rem;
        letter-spacing: 0.01em;
    }

    .admin-kpi-grid-postbacks .mini-kpi-value {
        font-size: 0.8rem;
    }

    .admin-kpi-grid-postbacks .mini-kpi-value-nowrap {
        gap: 0.05rem;
        letter-spacing: -0.01em;
    }

    .admin-kpi-grid-postbacks .mini-kpi-value .stat-delta {
        font-size: 0.48rem;
        padding: 0.04rem 0.14rem;
    }

    .admin-kpi-grid-core {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.28rem;
    }

    .admin-kpi-grid-core .mini-kpi {
        padding: 0.26rem 0.34rem;
        min-height: 54px;
    }

    .admin-kpi-grid-core .mini-kpi-label {
        font-size: 0.5rem;
        letter-spacing: 0.01em;
    }

    .admin-kpi-grid-core .mini-kpi-value {
        font-size: 0.8rem;
    }

    .admin-kpi-grid-core .mini-kpi-value .stat-delta {
        font-size: 0.48rem;
        padding: 0.05rem 0.16rem;
    }

    .route-card > summary {
        padding: 0.48rem 1.52rem 0.48rem 0.56rem;
        column-gap: 0.34rem;
    }

    .route-summary-stats {
        width: auto;
        flex: 0 0 auto;
    }

    .route-name {
        font-size: 0.82rem;
    }

    .route-created {
        font-size: 0.6rem;
    }

    .summary-chip {
        width: auto;
        min-width: 0;
        min-height: 32px;
        padding: 0.12rem 0.2rem;
        gap: 0.14rem;
    }

    .summary-label {
        width: 15px;
        height: 15px;
    }

    .summary-value {
        font-size: 0.82rem;
        align-items: center;
        gap: 0.08rem;
    }

    .summary-value .stat-delta {
        font-size: 0.42rem;
        padding: 0.03rem 0.12rem;
    }

    .admin-header-row {
        gap: 0.35rem;
    }

    .admin-header-line {
        gap: 0.35rem;
    }

    .admin-header-line-main {
        align-items: flex-start;
    }

    .admin-header-actions {
        gap: 0.35rem;
        flex: 0 0 auto;
    }

    .admin-header-title {
        height: 38px;
        min-height: 38px;
        padding: 0.4rem 0.72rem;
        font-size: 0.92rem;
    }

    .header-day-nav {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-day-label {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 38px;
        font-size: 0.72rem;
        padding-left: 0.42rem;
        padding-right: 0.42rem;
    }

    .header-range-picker {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .header-day-button {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .sync-refresh-button {
        min-height: 38px;
        padding: 0.4rem 0.48rem;
    }

    .btn-compact {
        min-height: 34px;
        padding: 0.4rem 0.65rem;
    }

    .icon-button {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .icon-logout {
        width: 18px;
        height: 18px;
    }

    .icon-stats {
        width: 17px;
        height: 17px;
    }

    .debug-panel {
        width: min(100% - 16px, 560px);
        margin-top: 5vh;
        padding: 0.88rem;
    }

    .debug-head {
        flex-direction: column;
        align-items: stretch;
    }

    .visits-panel {
        width: min(100% - 12px, 960px);
    }

    .settings-panel {
        width: min(100% - 12px, 960px);
    }

    .visits-head-actions {
        width: 100%;
    }

    .visits-day-nav {
        width: 100%;
        grid-template-columns: 38px minmax(0, 1fr) 38px;
    }

    .visits-day-label {
        flex: 1 1 auto;
        min-width: 0;
    }


    .visits-list {
        margin-top: 0.72rem;
    }

    .debug-check-grid {
        grid-template-columns: 1fr;
        gap: 0.42rem;
    }

    .visits-breakdown,
    .visits-insights {
        margin-top: 0.72rem;
    }

    .visits-breakdown-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .visits-insight-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.52rem;
    }

    .visits-insight-metric {
        padding: 0.66rem 0.68rem;
    }

    .visits-insight-metric-label {
        font-size: 0.62rem;
    }

    .visits-insight-metric-value {
        font-size: 0.9rem;
    }

    .visits-route-detail-meta {
        grid-template-columns: 1fr;
    }

    .visits-breakdown-card {
        padding: 0.68rem;
    }

    .visits-breakdown-title {
        font-size: 0.8rem;
    }

    .visits-breakdown-label {
        font-size: 0.72rem;
    }

    .visits-breakdown-value {
        font-size: 0.66rem;
    }

    .visits-table-wrap {
        max-height: 76vh;
        border-radius: 14px;
    }

    .visits-table {
        min-width: 920px;
        font-size: 0.7rem;
    }

    .visits-table thead th {
        font-size: 0.6rem;
        padding: 0.48rem 0.5rem;
    }

    .visits-table tbody td {
        padding: 0.42rem 0.5rem;
    }

    .visit-cell-wrap {
        min-width: 150px;
        max-width: 210px;
    }

    .visit-cell-ua {
        min-width: 170px;
        max-width: 220px;
    }

    .visit-country-cell {
        gap: 0.3rem;
    }

    .visit-country-scroll {
        max-width: 10ch;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .visit-country-text {
        font-size: 0.68rem;
    }

    .routes-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .routes-section-tools {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

}
