@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@500;600;700&display=swap');

:root {
    /* LBoost UI KIT tokens (single source of truth) */
    --bg: #F8FAFC;
    --shell: #ffffff;
    --sidebar: #ffffff;
    --panel: #ffffff;
    --panel-alt: #F8FAFC;
    --text: #0F172A;
    --muted-strong: #475569;
    --muted: #64748B;
    --muted-soft: #94A3B8;
    --line: #E2E8F0;
    --gray-100: #F1F5F9;
    --brand: #2563EB;
    --brand-dark: #1D4ED8;
    --brand-soft: #DBEAFE;
    --ok: #22C55E;
    --ok-soft: #DCFCE7;
    --ok-strong: #15803D;
    --danger: #EF4444;
    --warn: #F59E0B;
    --warn-soft: #FEF3C7;
    --warn-strong: #B45309;
    --status-muted-soft: #F1F5F9;
    --status-muted-strong: #475569;
    --switch-thumb-shadow: 0 1px 3px rgba(15, 23, 42, .22);
    --switch-brand-focus: rgba(37, 99, 235, .22);
    --switch-brand-shadow: rgba(37, 99, 235, .26);
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font: 14px/1.45 "Inter", "Manrope", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 700px at -10% -20%, rgba(76, 111, 255, 0.16), transparent 60%),
        radial-gradient(900px 560px at 110% -10%, rgba(45, 143, 255, 0.14), transparent 62%),
        linear-gradient(180deg, #f4f8ff 0%, #f5f7fb 45%, #eef3fb 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: -20%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(480px 280px at 18% 24%, rgba(67, 139, 255, 0.10), transparent 68%),
        radial-gradient(520px 320px at 76% 26%, rgba(98, 172, 255, 0.08), transparent 70%),
        radial-gradient(580px 360px at 58% 78%, rgba(72, 120, 255, 0.06), transparent 72%);
    animation: panelBlueFlow 16s ease-in-out infinite alternate;
}

@keyframes panelBlueFlow {
    0% { transform: translate3d(-1.5%, -1%, 0) scale(1); }
    100% { transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 650; }
h1 { font-size: 24px; letter-spacing: 0; font-family: "Manrope", "Inter", sans-serif; font-weight: 600; }
h2 { font-size: 20px; font-family: "Manrope", "Inter", sans-serif; font-weight: 600; }
h3 { font-size: 18px; font-family: "Manrope", "Inter", sans-serif; font-weight: 600; }

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 18px 20px;
    min-height: 0;
    line-height: 1.2;
    border: 1px solid #e8eef7;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: var(--shadow);
}

.page-head h1 {
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.page-actions .btn {
    margin: 0;
}

@keyframes dashboardSkeletonPulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.dashboard-skeleton {
    display: block;
    background: linear-gradient(90deg, rgba(226, 232, 240, 0.8) 25%, rgba(241, 245, 249, 0.95) 37%, rgba(226, 232, 240, 0.8) 63%);
    background-size: 400% 100%;
    animation: dashboardSkeletonPulse 1.15s ease-in-out infinite;
    border-radius: 999px;
}

.dashboard-skeleton-line {
    min-height: 14px;
}

.page-preloader {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 24%),
        rgba(248, 250, 252, 0.96);
    backdrop-filter: blur(6px);
    transition: opacity .22s ease, visibility .22s ease;
}

.page-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.page-preloader-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    box-shadow: 0 18px 34px -16px rgba(37, 99, 235, 0.55);
}

.page-preloader-line {
    width: 104px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.18);
    position: relative;
}

.page-preloader-line::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, 0.16) 12%, var(--brand) 48%, rgba(37, 99, 235, 0.16) 84%, transparent 100%);
    animation: pagePreloaderSlide 1.05s ease-in-out infinite;
}

@keyframes pagePreloaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dashboard-stat-skeleton {
    width: 72%;
    height: 28px;
    margin-top: 4px;
    border-radius: 10px;
}

.dashboard-projects-loading {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.keys-shell-loading {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dashboard-projects-skeleton-cards {
    display: grid;
    gap: 12px;
}

.dashboard-projects-skeleton-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.dashboard-projects-skeleton-title {
    width: 28%;
    height: 18px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.dashboard-projects-skeleton-sub {
    width: 42%;
    height: 12px;
    margin-bottom: 14px;
    border-radius: 8px;
}

.dashboard-projects-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-projects-skeleton-grid .dashboard-skeleton-line {
    height: 12px;
}

.dashboard-projects-skeleton-table {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
    padding: 14px 16px 8px;
}

.dashboard-projects-skeleton-row {
    display: grid;
    grid-template-columns: 2.2fr 1fr 0.8fr 0.8fr 0.8fr 0.9fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.dashboard-projects-skeleton-row:last-child {
    border-bottom: none;
}

.dashboard-projects-skeleton-row .dashboard-skeleton-line {
    height: 12px;
}

.dashboard-projects-error {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.06);
    color: var(--danger);
    font-weight: 500;
}

.dashboard-projects-loading[hidden],
#dashboard-projects-content[hidden],
#dashboard-projects-error[hidden] {
    display: none !important;
}

.keys-shell-loading[hidden],
#keys-shell-content[hidden],
#keys-shell-error[hidden] {
    display: none !important;
}

.projects-shell-loading[hidden],
#projects-shell-content[hidden],
#projects-shell-error[hidden] {
    display: none !important;
}

.clicks-shell-loading[hidden],
#clicks-shell-content[hidden],
#clicks-shell-error[hidden] {
    display: none !important;
}

.queue-shell-loading[hidden],
#queue-shell-content[hidden],
#queue-shell-error[hidden] {
    display: none !important;
}

.positions-shell-loading[hidden],
#positions-shell-content[hidden],
#positions-shell-error[hidden] {
    display: none !important;
}

.dashboard-shell {
    position: relative;
    z-index: 1;
    width: calc(100% - 8px);
    margin: 4px auto;
    min-height: calc(100vh - 44px);
    background: var(--shell);
    border: 0;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    background: var(--sidebar);
    border-right: 1px solid #edf2f9;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: width .2s ease, padding .2s ease;
    position: relative;
}

.brand-toggle-btn {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px;
    display: block;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    position: relative;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.brand-toggle-btn:hover {
    border-color: #b9d1f5;
    background: #f0f6ff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.brand-toggle-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.brand-toggle-chevron {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #6b7f9f;
    border-bottom: 2px solid #6b7f9f;
    transform: rotate(135deg);
}

.brand-toggle-btn:hover .brand-toggle-chevron { border-color: #2563eb; }

.brand-block {
    border: 1px solid #edf2f9;
    border-radius: 12px;
    background: #fff;
    padding: 14px;
}
.brand-title { display: block; font-size: 34px; font-weight: 700; line-height: 1; }
.brand-full { display: inline; }
.brand-short { display: none; }
.brand-subtitle { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 500; }

.menu-group-title {
    font-size: 11px;
    color: #9aa8c4;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 8px 6px;
    font-weight: 400;
}

.menu-list { display: grid; gap: 6px; }
.menu-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}
.menu-section-caret {
    display: none;
    color: #8aa1c6;
    font-size: 12px;
    line-height: 1;
}
.menu-link {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 10px;
    color: #324766;
    font-weight: 500;
    position: relative;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.menu-icon {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.menu-link:hover, .menu-link.active {
    background: #eef4ff;
    border-color: #cfe0ff;
    color: #1D4ED8;
}

.menu-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: #2563EB;
}
.menu-text { white-space: nowrap; }

.menu-link-child {
    margin-top: -4px;
    margin-left: 18px;
    padding: 7px 10px;
    font-size: 13px;
    color: #64748b;
}

.menu-link-child .menu-icon,
.menu-link-child .menu-icon svg {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
}

.sidebar-submenu-group {
    display: grid;
    gap: 2px;
}

.menu-link-with-toggle {
    position: relative;
}

.menu-link-with-toggle > .menu-link {
    width: 100%;
    padding-right: 40px;
}

.sidebar-submenu-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.16s ease, background-color 0.16s ease;
}

.sidebar-submenu-toggle:hover,
.sidebar-submenu-toggle:focus-visible {
    color: #1d4ed8;
    background: #dbeafe;
    box-shadow: none;
    outline: none;
    transform: translateY(-50%);
}

.sidebar-submenu-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.16s ease;
}

.sidebar-submenu-group.is-open .sidebar-submenu-toggle {
    color: #1d4ed8;
}

.sidebar-submenu-group.is-open .sidebar-submenu-chevron {
    transform: rotate(45deg);
}

.sidebar-submenu-children[hidden] {
    display: none;
}

.sidebar-collapsed .sidebar {
    width: 76px;
    padding: 12px 8px;
}

.sidebar-collapsed .brand-subtitle,
.sidebar-collapsed .menu-group-title,
.sidebar-collapsed .menu-text {
    display: none;
}

.sidebar-collapsed .brand-block {
    width: 56px;
    height: 56px;
    padding: 0;
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.sidebar-collapsed .brand-title {
    font-size: 20px;
    text-align: center;
}

.sidebar-collapsed .brand-full {
    display: none;
}

.sidebar-collapsed .brand-short {
    display: inline;
}

.sidebar-collapsed .brand-toggle-chevron {
    display: none;
}

.sidebar-collapsed .create-project-big-btn {
    height: 40px;
    padding: 0;
    line-height: 40px;
    display: grid;
    place-items: center;
}

.sidebar-collapsed .create-project-big-btn .menu-text {
    display: none;
}

.sidebar-collapsed .menu-link {
    justify-content: center;
    padding: 9px 6px;
}

.sidebar-collapsed .menu-link-child {
    margin-left: 0;
}

.sidebar-collapsed .sidebar-submenu-toggle,
.sidebar-collapsed .sidebar-submenu-children {
    display: none;
}

.sidebar-collapsed .menu-link-with-toggle > .menu-link {
    padding: 9px 6px;
}

.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    min-height: 56px;
    border-bottom: 1px solid #edf2f9;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mobile-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8fbff;
    color: #425777;
}
.mobile-menu-btn .toggle-bars,
.mobile-menu-btn .toggle-bars::before,
.mobile-menu-btn .toggle-bars::after {
    content: "";
    display: block;
    width: 14px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.mobile-menu-btn .toggle-bars::before { transform: translateY(-4px); }
.mobile-menu-btn .toggle-bars::after { transform: translateY(2px); }
.mobile-menu-label { display: none; }
.mobile-sidebar-overlay {
    display: none;
}
.topbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topbar-right > * { flex: 0 0 auto; }
.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #f8fbff;
    border-radius: 9px;
    height: 32px;
    padding: 0 9px;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.wallet-pill strong { font-weight: 600; }
.wallet-plus { color: #22a34a; font-weight: 700; }
.wallet-pill:hover {
    transform: translateY(-1px);
    border-color: #b9d1f5;
    background: #f0f6ff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}
.wallet-pill:active { transform: translateY(0); }

.user-pill {
    border: 1px solid var(--line);
    background: #f8fbff;
    border-radius: 10px;
    padding: 6px 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 400;
}

.user-menu-wrap {
    position: relative;
}

.notif-wrap {
    position: relative;
}

.notif-btn {
    border: 1px solid var(--line);
    background: #f8fbff;
    color: #425777;
    border-radius: 10px;
    height: 32px;
    min-width: 36px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.notif-btn:hover {
    transform: translateY(-1px);
    border-color: #b9d1f5;
    background: #f0f6ff;
    box-shadow: 0 6px 14px rgba(47, 128, 237, 0.12);
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notif-dropdown {
    position: absolute;
    right: 0;
    top: 38px;
    width: 360px;
    max-width: min(92vw, 360px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(30, 48, 90, 0.16);
    z-index: 40;
    overflow: hidden;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f9;
}

.notif-read-all {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
}

.notif-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    gap: 8px;
}

.notif-item {
    border: 1px solid #e5eaf3;
    border-radius: 10px;
    padding: 9px 10px;
    background: #fff;
}

.notif-item-unread {
    border-color: #c8dafd;
    background: #f5f9ff;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.notif-msg {
    font-size: 12px;
    color: #475569;
    line-height: 1.35;
}

.notif-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: #94a3b8;
}

.notif-open {
    color: #2563eb;
    font-size: 12px;
}

.notif-empty {
    font-size: 13px;
    color: #64748b;
    padding: 8px;
}

.user-pill-btn {
    border: 1px solid var(--line);
    background: #f5f8fd;
    color: #425777;
    border-radius: 999px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.user-pill-btn:hover {
    transform: translateY(-1px);
    border-color: #b9d1f5;
    background: #f0f6ff;
    box-shadow: 0 6px 14px rgba(47, 128, 237, 0.12);
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: 38px;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(30, 48, 90, 0.16);
    z-index: 30;
    padding: 6px;
    animation: userMenuIn .14s ease-out;
}

.user-menu-dropdown a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #2f4361;
    font-size: 13px;
}

.user-menu-dropdown a:hover {
    background: #eef4ff;
}

.user-menu-dropdown a.user-menu-logout {
    color: var(--danger);
}

.user-menu-dropdown a.user-menu-logout:hover {
    background: #fff1f2;
}

.user-menu-head {
    font-size: 11px;
    color: #90a0b9;
    padding: 6px 10px 4px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

@keyframes userMenuIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-wrap {
    padding: 24px;
    display: grid;
    gap: 16px;
}

.content-wrap > * {
    min-width: 0;
}

.panel, .project-card, .upload-form, .keys-section, .no-keys, .no-projects, .filter-section, .auth-card {
    border: 1px solid #F1F5F9;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.panel, .project-card, .upload-form, .keys-section, .no-keys, .no-projects, .filter-section { padding: 12px; }
.panel:hover, .project-card:hover, .upload-form:hover, .keys-section:hover, .filter-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

.btn, button, .action-btn, .submit-btn, .auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.btn-primary, .submit-btn, .auth-button, .view-keys-btn, button {
    background: var(--brand);
    color: #fff;
    border-color: #3a88ef;
}
.btn-primary:hover, .submit-btn:hover, .auth-button:hover, .view-keys-btn:hover, button:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}
.btn-secondary, .back-btn { background: #eff6ff; color: #1D4ED8; border-color: #bfdbfe; }
.btn-secondary:hover, .back-btn:hover {
    background: #dbeafe;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}
.btn-danger, .delete-btn { background: var(--danger); color: #fff; }
.btn-success { background: var(--ok); color: #fff; }

.project-menu-wrap {
    position: relative;
    margin-left: 4px;
}

.project-menu-btn {
    min-width: 40px;
    padding: 0 10px;
}

.project-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 220px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    z-index: 40;
}

.project-menu-dropdown button {
    width: 100%;
    display: block;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
}

.project-menu-dropdown button:hover {
    background: #eef4ff;
}

.project-menu-dropdown button.danger {
    color: var(--danger);
}

.stats-section, .cascade-stats-section {
    border: 1px solid #F1F5F9;
    border-radius: var(--radius-md);
    background: #fff;
    padding: 16px;
    box-shadow: var(--shadow);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.stat-card, .cascade-stat-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}
.stat-value {
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.stat-label { color: var(--muted); font-size: 12px; margin-top: 6px; font-weight: 500; }
.stat-icon { font-size: 18px; margin-bottom: 8px; }

.cascade-stats-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.cascade-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 16px;
}
.cascade-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.filter-controls, .control-row, .link-input, .actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-controls { align-items: flex-end; }
.filter-controls .form-group { margin: 0; min-width: 170px; }
.filter-controls .btn { margin-bottom: 0; }

.wm-history-filters {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(140px, .85fr)) minmax(190px, 1.1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 12px;
}
.wm-history-filter { min-width: 0; margin: 0; }
.wm-history-filter--action { display: flex; align-items: flex-end; }
.wm-history-filter--action .btn { min-height: 38px; white-space: nowrap; }
@media (max-width: 900px) {
    .wm-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wm-history-filter--project { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .wm-history-filters { grid-template-columns: 1fr; }
    .wm-history-filter--project { grid-column: auto; }
    .wm-history-filter--action .btn { width: 100%; }
}

label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 500; color: #566888; }
input, select, textarea {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 0 12px;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #8fb8ff;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}
textarea { height: auto; padding: 8px 10px; }

.projects-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.project-url a { overflow-wrap: anywhere; }
.project-card.project-card-deleted-admin,
.project-card.project-card-deleted-client {
    background: #fff6f7;
    border-color: #ffd8de;
}

.project-card.project-card-deleted-admin:hover,
.project-card.project-card-deleted-client:hover {
    background: #fff3f5;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-backdrop.is-open {
    display: flex;
}

.project-schedule-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.project-schedule-summary > div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
}

.project-schedule-label {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.project-schedule-summary strong {
    display: block;
    color: var(--text);
    font-size: 22px;
    line-height: 1.1;
}

.project-schedule-toggle {
    width: fit-content;
    margin-bottom: 10px;
}

.project-schedule-help {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
}

.project-schedule-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.project-schedule-hourly {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
}

.project-schedule-hourly .form-group {
    min-width: 150px;
}

.project-schedule-hourly input {
    width: 150px;
}

.project-schedule-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f1f5f9;
}

.project-schedule-hour {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 700;
}

.project-schedule-hour input {
    width: 74px;
    min-height: 34px;
    padding: 6px 8px;
}

@media (max-width: 760px) {
    .project-schedule-summary,
    .project-schedule-grid {
        grid-template-columns: 1fr;
    }

    .project-schedule-hourly,
    .project-schedule-hourly .btn,
    .project-schedule-hourly input {
        width: 100%;
    }
}

.modal-panel {
    width: min(640px, 100%);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
    padding: 20px;
}

.modal-panel.project-schedule-panel {
    width: min(980px, calc(100vw - 32px));
}

.modal-panel.project-auto-boost-schedule-panel {
    width: min(980px, calc(100vw - 32px));
}

.modal-panel.project-hard-delete-panel {
    width: min(640px, calc(100vw - 32px));
}

.project-hard-delete-progress {
    display: grid;
    gap: 12px;
}

.project-hard-delete-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted-strong);
}

.project-hard-delete-row strong {
    font-size: 22px;
    color: var(--text);
}

.project-hard-delete-message {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbff;
    color: var(--muted-strong);
    line-height: 1.4;
}

.project-hard-delete-meta {
    color: var(--muted);
    font-size: 12px;
}

.project-auto-boost-grid {
    overflow: auto;
    max-height: 420px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    background: #fbfcff;
}

.project-auto-boost-grid-inner {
    display: grid;
    grid-template-columns: 46px repeat(24, 30px);
    gap: 1px;
    min-width: max-content;
}

.project-auto-boost-hour-head {
    height: 24px;
    color: var(--muted);
    font-size: 11px;
    line-height: 24px;
    text-align: center;
}

.project-auto-boost-day-head {
    height: 30px;
    padding-right: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 30px;
}

.project-auto-boost-cell {
    width: 30px;
    height: 30px;
    min-width: 0;
    padding: 0;
    border: 1px solid #d8e2f6;
    border-radius: 0;
    color: #27406b;
    background: #fff;
    font: 700 11px/1 var(--font-family, inherit);
    cursor: pointer;
}

.project-auto-boost-cell:hover {
    position: relative;
    z-index: 1;
    outline: 2px solid rgba(37, 99, 235, 0.32);
}

.project-auto-boost-cell.is-legacy {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
    opacity: 0.78;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.modal-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.modal-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 30px;
    height: 30px;
    padding: 0;
    flex: 0 0 30px;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text);
    transform: none;
    box-shadow: none;
}

.modal-close:focus-visible {
    background: #f1f5f9;
    color: var(--text);
    outline: 2px solid #cbd5e1;
    outline-offset: 2px;
    transform: none;
    box-shadow: none;
}

.modal-grid {
    display: grid;
    gap: 12px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.rank-tracking-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}
.rank-tracking-head-actions { display: flex; align-items: center; gap: 10px; }
.rank-column-picker { position: relative; }
.rank-column-picker summary { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #475569; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.rank-column-picker summary::-webkit-details-marker { display: none; }
.rank-column-picker-menu { position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; width: 230px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 30px rgba(15, 23, 42, .14); }
.rank-column-picker-menu label { display: flex; align-items: center; gap: 8px; padding: 8px; color: #334155; font-size: 13px; cursor: pointer; }
.rank-column-picker-menu input { width: 16px !important; min-height: 0 !important; height: 16px; margin: 0; accent-color: #2563eb; }

.rank-tracking-head h1 {
    margin: 6px 0 8px;
    font-size: clamp(28px, 4vw, 40px);
}

.rank-tracking-head p,
.rank-tracking-empty span,
.rank-project-card dl { color: var(--muted); }

.rank-tracking-projects { min-height: 240px; }
.rank-project-status-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.rank-project-status-tabs a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.rank-project-status-tabs a.is-active { background: #eef4ff; color: #2563eb; }

.rank-tracking-empty {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 190px;
    text-align: center;
}

.rank-project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.rank-project-grid[hidden], .rank-project-table-wrap[hidden] { display: none !important; }

.rank-project-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rank-project-list-head h2 { margin: 0 0 4px; font-size: 19px; }
.rank-project-list-head p { margin: 0; color: var(--muted); font-size: 13px; }
.rank-view-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.rank-view-switch button { border: 0; border-radius: 7px; padding: 8px 11px; background: #fff; color: #475569; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.rank-view-switch button.is-active { background: #2563eb; color: #fff; box-shadow: 0 1px 3px rgba(37, 99, 235, .35); }
.rank-project-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.rank-project-table { width: 100%; min-width: 1420px; border-collapse: collapse; background: #fff; }
.rank-project-table th, .rank-project-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.rank-project-table th:first-child, .rank-project-table td.rank-table-project { text-align: left; }
.rank-project-table th { color: #52647e; background: #f8fafc; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.rank-project-table tbody tr { height: 76px; }
.rank-project-table tbody tr:last-child td { border-bottom: 0; }
.rank-project-table a { display: block; max-width: 250px; overflow: hidden; color: var(--primary); text-overflow: ellipsis; white-space: nowrap; }
.rank-table-project a { max-width: 290px; color: var(--text); white-space: normal; }
.rank-table-project strong, .rank-table-project span { display: block; }
.rank-table-project span, .rank-check-empty { margin-top: 4px; color: var(--muted); font-size: 12px; }
.rank-table-project-line { display: block; }
.rank-table-project-line > a { display: flex; min-width: 0; align-items: center; gap: 9px; }
.rank-table-project { text-align: left; }
.rank-table-project-domain { display: flex; align-items: center; gap: 9px; margin: 4px 0 0; }
.rank-table-project-domain a { color: var(--muted); font-size: 12px; }
.rank-project-access-meta { max-width: 290px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.rank-project-favicon { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; border-radius: 4px; }
.rank-table-project-line form { margin: 0; }
.rank-project-favorite { width: 18px; height: 18px; padding: 0; border: 0; background: transparent; color: #cbd5e1; font-size: 18px; line-height: 1; cursor: pointer; }
.rank-project-favorite:hover, .rank-project-favorite.is-active { color: #f59e0b; }
.rank-project-table th[data-rank-column="check"], .rank-project-table td[data-rank-column="check"] { min-width: 128px; text-align: center; }
.rank-check-control { display: grid; justify-items: center; gap: 4px; color: #71819a; font-size: 11px; line-height: 1.15; text-align: center; }
.rank-check-button { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #2583ee; color: #fff; font: inherit; font-size: 21px; line-height: 1; cursor: pointer; }
.rank-check-button:hover, .rank-check-button:focus-visible { background: #1d6fd8; outline: 2px solid #bfdbfe; outline-offset: 2px; }
.rank-metric-empty { color: #94a3b8; white-space: nowrap; }
.rank-metric-empty span { display: inline-block; margin-right: 8px; }
.rank-visibility-cell { min-width: 92px; }
.rank-visibility-value { display: inline-block; min-width: 58px; padding: 6px 10px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 800; line-height: 1; }
.rank-visibility-value.is-high { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.rank-visibility-value.is-medium { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.rank-visibility-value.is-low { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.rank-dynamics-list { display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; }
.rank-dynamics-item { display: inline-flex; align-items: baseline; gap: 2px; font-size: 12px; font-weight: 800; }
.rank-dynamics-item strong { color: #253650; font: inherit; }
.rank-dynamics-item.is-improved { color: #16a34a; }
.rank-dynamics-item.is-unchanged { color: #64748b; }
.rank-dynamics-item.is-worsened { color: #dc2626; }
.rank-top-list { display: inline-grid; grid-template-columns: repeat(3, minmax(30px, 1fr)); align-items: end; gap: 8px; min-width: 112px; }
.rank-top-value { padding: 3px 3px 5px; border-bottom: 3px solid; color: #253650; font-size: 12px; font-weight: 800; line-height: 1; text-align: center; }
.rank-top-value.is-top10 { border-color: #2563eb; }
.rank-top-value.is-top30 { border-color: #22c55e; }
.rank-top-value.is-top100 { border-color: #f97316; }
th[data-rank-column][hidden], td[data-rank-column][hidden] { display: none !important; }
.rank-table-actions { position: relative; width: 42px; text-align: center; }
.rank-table-actions details { position: relative; display: inline-block; vertical-align: middle; }
.rank-table-actions summary { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: #64748b; cursor: pointer; font-size: 20px; list-style: none; }
.rank-table-actions summary::-webkit-details-marker { display: none; }
.rank-table-actions details[open] summary { background: #eef4ff; color: #2563eb; }
.rank-actions-menu { position: fixed; z-index: 100; top: var(--rank-menu-top, 0px); left: var(--rank-menu-left, 0px); width: 210px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(15, 23, 42, .16); }
.rank-actions-menu a, .rank-actions-menu button { display: block; width: 100%; max-width: none; padding: 10px 12px; border: 0; background: #fff; color: var(--text); font: inherit; font-size: 13px; text-align: left; white-space: normal; cursor: pointer; }
.rank-actions-menu a:hover, .rank-actions-menu button:hover { background: #f8fafc; }
.rank-actions-menu form { margin: 0; }
.rank-actions-menu .is-danger { color: #dc2626; }

.rank-project-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfdff;
}

.rank-project-card h2 { margin: 8px 0 5px; font-size: 18px; }
.rank-project-domain { display: block; overflow: hidden; color: var(--primary); text-overflow: ellipsis; white-space: nowrap; }
.rank-project-card-link { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.rank-project-card-link:hover, .rank-project-card-link:focus-visible { border-color: #93c5fd; box-shadow: 0 10px 24px rgba(37, 99, 235, .1); outline: 0; transform: translateY(-1px); }
.rank-project-engine { color: var(--primary); font-size: 12px; font-weight: 700; }
.rank-device-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #d8e3f1; border-radius: 8px; background: #f8fafc; color: #355274; vertical-align: middle; cursor: help; }
.rank-device-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rank-project-engine .rank-device-icon { width: 22px; height: 22px; margin-left: 3px; border-radius: 6px; }
.rank-project-engine .rank-device-icon svg { width: 14px; height: 14px; }
.rank-project-device-list { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rank-region-summary-trigger { display: inline-grid; justify-items: center; gap: 2px; padding: 5px 9px; border: 1px solid #bfdbfe; border-radius: 9px; background: #f8fbff; color: #2563eb; font: inherit; cursor: pointer; }
.rank-region-summary-trigger:hover, .rank-region-summary-trigger:focus-visible { border-color: #60a5fa; background: #eff6ff; outline: 0; }
.rank-region-summary-trigger strong { font-size: 12px; }
.rank-region-summary-trigger small { color: #64748b; font-size: 10px; white-space: nowrap; }
.rank-region-summary-modal { z-index: 2100; }
.rank-region-summary-panel { width: min(920px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); overflow: hidden; }
.rank-region-summary-content { max-height: calc(100vh - 150px); padding: 16px 20px 22px; overflow-y: auto; }
.rank-region-summary-content[hidden] { display: none !important; }
.rank-region-summary-project { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.rank-region-summary-project span { color: #64748b; font-size: 12px; }
.rank-region-engine-summary + .rank-region-engine-summary { margin-top: 20px; }
.rank-region-engine-summary h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: 14px; }
.rank-region-engine-mark { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 900; }
.rank-region-engine-mark.is-yandex { background: #ef2626; }
.rank-region-engine-mark.is-google { background: #4285f4; }
.rank-region-summary-table-wrap { overflow-x: auto; border: 1px solid #dbe5f2; border-radius: 12px; }
.rank-region-summary-table { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
.rank-region-summary-table th, .rank-region-summary-table td { padding: 11px 12px; border-bottom: 1px solid #e6edf6; text-align: center; }
.rank-region-summary-table th { background: #f8fafc; color: #94a3b8; font-size: 11px; font-weight: 600; }
.rank-region-summary-table th:first-child, .rank-region-summary-table td:first-child { text-align: left; }
.rank-region-summary-table tbody tr:last-child td { border-bottom: 0; }
.rank-region-name { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.rank-region-name .rank-device-icon { width: 24px; height: 24px; border: 0; background: transparent; }
.rank-region-top { display: inline-block; min-width: 30px; padding: 3px 4px 5px; border-bottom: 3px solid; font-weight: 800; }
.rank-region-top.is-top10 { border-color: #2563eb; }
.rank-region-top.is-top30 { border-color: #22c55e; }
.rank-region-top.is-top100 { border-color: #f97316; }

.rank-tracking-pricing-modal { z-index: 2100; }
.rank-pricing-modal-panel { width: min(540px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 32px)); overflow: hidden; }
.rank-pricing-content { padding: 0 4px 2px; }
.rank-pricing-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.rank-pricing-table { width: 100%; margin-top: 12px; border-collapse: collapse; table-layout: fixed; background: #fff; border: 1px solid #dbe5f2; border-radius: 12px; overflow: hidden; }
.rank-pricing-table thead th { background: #f8fafc; color: #64748b; font-size: 11px; font-weight: 600; padding: 10px 12px; text-align: left; }
.rank-pricing-table th,
.rank-pricing-table td { vertical-align: middle; }
.rank-pricing-col-source { width: 44%; }
.rank-pricing-col-depth { width: 24%; }
.rank-pricing-col-value { width: 32%; }
.rank-pricing-table thead th.rank-pricing-col-value { text-align: right; }
.rank-pricing-table td { padding: 11px 12px; border-top: 1px solid #e6edf6; text-align: left; color: #0f172a; font-size: 13px; }
.rank-pricing-table td strong { color: #2563eb; }
.rank-pricing-table tr:last-child td { border-bottom: 0; }
.rank-pricing-table td + td { text-align: right; font-weight: 700; color: #1d4ed8; white-space: nowrap; }
.rank-pricing-table thead .rank-pricing-col-depth,
.rank-pricing-table td.rank-pricing-depth { text-align: center; }
.rank-pricing-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.rank-pricing-custom-box { margin-top: 6px; padding: 10px 12px; border: 1px solid #dbe5f2; border-radius: 10px; background: #f8fafc; }
.rank-pricing-custom-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rank-pricing-custom-item { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #dbe5f2; border-radius: 9px; background: #fff; }
.rank-pricing-custom-item strong { color: #1d4ed8; font-size: 12px; }
.rank-pricing-empty { margin: 7px 0 0; color: #64748b; font-size: 12px; }
.rank-pricing-meta { margin-left: 8px; color: #64748b; font-size: 11px; font-weight: 500; }
.rank-pricing-table tr.has-custom-price td:first-child { font-weight: 700; }

@media (max-width: 680px) {
    .rank-region-summary-panel { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .rank-region-summary-content { padding: 12px; }
    .rank-region-summary-project { align-items: flex-start; flex-direction: column; gap: 3px; }
    .rank-pricing-modal-panel { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
}
.rank-project-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; }
.rank-project-card dl div { padding: 9px; border-radius: 10px; background: #f1f5f9; }
.rank-project-card dt { font-size: 11px; }
.rank-project-card dd { margin: 3px 0 0; color: var(--text); font-size: 14px; font-weight: 700; }
.rank-project-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rank-project-actions form { margin: 0; }
.rank-project-actions .btn { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.rank-project-delete { border: 1px solid #fecaca; background: #fff; color: #dc2626; }
.rank-project-open-link { color: var(--primary); font-weight: 700; }
.rank-project-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rank-project-detail-grid div { padding: 16px; border-radius: 12px; background: #f8fafc; }
.rank-project-detail-grid span { display: block; color: var(--muted); font-size: 12px; }
.rank-project-detail-grid strong { display: block; margin-top: 6px; }
.rank-project-keywords h2 { margin-top: 0; }
.rank-project-results { padding: 14px 0 0; overflow: hidden; border-radius: 6px; box-shadow: none; }
.rank-project-results h2 { margin-top: 0; }
.rank-project-results .rank-project-section-head { margin-bottom: 12px; padding: 0 16px; }
.rank-project-results .table-wrap { overflow-x: auto; }
.rank-project-results table { width: 100%; min-width: 640px; border-collapse: collapse; }
.rank-project-results th, .rank-project-results td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.rank-project-results td:last-child { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-project-settings h2 { margin-top: 0; }
.rank-project-settings-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.rank-project-settings-form .rank-project-checkbox { grid-column: span 3; }
.rank-project-links h2, .rank-project-history h2 { margin-top: 0; }
.rank-project-links > p { color: var(--muted); }
.rank-project-links-list { display: grid; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.rank-project-links-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.rank-project-links-list span { display: grid; gap: 3px; min-width: 0; }
.rank-project-links-list small { color: var(--muted); }
.rank-project-links-list form { margin: 0; }
.rank-project-links-list li { flex-wrap: wrap; }
.rank-boost-link-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-project-link-form { display: flex; gap: 10px; }
.rank-project-link-form select { min-width: 0; flex: 1; }
.rank-project-history .table-wrap { overflow-x: auto; }
.rank-project-history table { width: 100%; min-width: 620px; border-collapse: collapse; }
.rank-project-history th, .rank-project-history td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.rank-keyword-add-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 16px; }
.rank-keyword-add-form textarea { min-height: 74px; }
.rank-project-keywords ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; padding: 0; list-style: none; }
.rank-project-keywords li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.rank-project-keywords li form { margin: 0; }
.rank-project-keywords li button { border: 0; background: transparent; color: #94a3b8; font-size: 18px; cursor: pointer; }
.rank-check-overview { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)) auto; gap: 14px; align-items: center; }
.rank-check-overview > div { display: grid; gap: 4px; }
.rank-check-overview span { color: #6e7e9b; font-size: 13px; }
.rank-check-overview strong { font-size: 18px; }
.rank-check-overview form, .rank-check-error { margin: 0; }
.rank-check-error { grid-column: 1 / -1; color: #c53a43; font-size: 13px; }
.rank-check-progress { grid-column: 1 / -1; margin: 0; color: #2563eb; font-size: 13px; font-weight: 700; }
.rank-check-live { display: grid; gap: 8px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 12px; background: #f3f8ff; color: #29496f; }
.rank-check-live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rank-check-live-head strong { color: #17233b; }
.rank-check-live-head span { padding: 4px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: 800; }
.rank-check-live-head span.is-complete { background: #dcfce7; color: #15803d; }
.rank-check-live-head span.is-error { background: #fee2e2; color: #b91c1c; }
.rank-check-live p { margin: 0; font-size: 13px; }
.rank-check-live-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dbe7f5; }
.rank-check-live-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #14b8a6); transition: width .35s ease; }
.rank-toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 1400; width: min(420px, calc(100vw - 36px)); pointer-events: none; }
.rank-toast { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; padding: 13px 14px; border: 1px solid #a7e7bd; border-radius: 13px; background: #f0fdf4; color: #166534; box-shadow: 0 18px 45px rgba(15, 35, 70, .2); pointer-events: auto; animation: rank-toast-in .2s ease-out; }
.rank-toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
.rank-toast-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #22c55e; color: #fff; font-weight: 900; }
.rank-toast strong { display: block; color: #14532d; font-size: 13px; }
.rank-toast p { margin: 3px 0 0; font-size: 12px; line-height: 1.4; }
.rank-toast button { padding: 0 2px; border: 0; background: transparent; color: #4d7c5c; font-size: 20px; line-height: 1; cursor: pointer; }
@keyframes rank-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.rank-project-workspace-head { position: relative; overflow: visible; }
.rank-project-workspace-head:has(.rank-date-range-picker[open]),
.rank-project-workspace-head:has(.rank-toolbar-popover[open]),
.rank-project-workspace-head:has(.rank-settings-panel:not([hidden])) { z-index: 70; }
.dashboard-hero.rank-project-hero { display: grid; align-items: stretch; gap: 0; }
.rank-project-hero-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rank-project-hero .dashboard-hero-text { margin: 0; }
.rank-project-hero-actions { flex: 0 0 auto; }
.rank-project-command-bar { margin-bottom: 16px; }
.rank-project-detail-grid-top { margin-bottom: 12px; }
.rank-analytics-toolbar { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; overflow: visible; }
.rank-analytics-toolbar--embedded { width: 100%; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid #dce7f5; }
.rank-analytics-toolbar--embedded { flex-wrap: wrap; }
.rank-analytics-toolbar--embedded .rank-toolbar-actions { flex-wrap: wrap; }
.rank-analytics-filter-form { display: flex; height: 38px; align-items: center; margin: 0; }
.rank-analytics-toolbar label { display: grid; gap: 5px; color: #64748b; font-size: 12px; font-weight: 700; }
.rank-analytics-toolbar input { min-height: 38px; }
.rank-date-range-picker { position: relative; }
.rank-date-range-trigger { display: inline-flex; min-width: 228px; height: 38px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #d7e3f2; border-radius: 10px; background: #fff; color: #334155; cursor: pointer; list-style: none; }
.rank-date-range-trigger::-webkit-details-marker { display: none; }
.rank-date-range-trigger strong { flex: 1; font-size: 13px; font-weight: 700; }
.rank-date-range-trigger i { color: #94a3b8; font-style: normal; }
.rank-date-range-picker[open] .rank-date-range-trigger, .rank-date-range-trigger:hover { border-color: #7eabff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.rank-date-range-menu { position: absolute; z-index: 55; top: calc(100% + 10px); left: 0; width: min(660px, calc(100vw - 48px)); padding: 14px; border: 1px solid #d7e3f2; border-radius: 15px; background: #fff; box-shadow: 0 20px 55px rgba(30, 55, 95, .2); }
.rank-date-range-presets { display: flex; gap: 6px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #e7edf5; overflow-x: auto; }
.rank-date-range-presets button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 8px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.rank-date-range-presets button:hover { background: #e6efff; color: #1d4ed8; }
.rank-date-range-nav { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; margin-bottom: 9px; text-align: center; }
.rank-date-range-nav button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #2563eb; font-size: 24px; cursor: pointer; }
.rank-date-range-nav button:hover { background: #eef4ff; }
.rank-date-range-nav strong { font-size: 13px; }
.rank-date-range-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rank-date-calendar h4 { margin: 0 0 9px; color: #334155; font-size: 13px; text-align: center; }
.rank-date-weekdays, .rank-date-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.rank-date-weekdays { margin-bottom: 4px; }
.rank-date-weekdays span { color: #94a3b8; font-size: 10px; text-align: center; }
.rank-date-days button { height: 32px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #334155; font-size: 12px; cursor: pointer; }
.rank-date-days button:hover { background: #eaf1ff; color: #1d4ed8; }
.rank-date-days button.is-check-day { background: #fff7d6; color: #8a6100; font-weight: 700; box-shadow: inset 0 0 0 1px #f4d77d; }
.rank-date-days button.is-check-day:hover:not(.is-start):not(.is-end):not(.is-between) { background: #ffefb0; color: #704b00; }
.rank-date-days button.is-between { border-radius: 3px; background: #e8f0ff; color: #1d4ed8; }
.rank-date-days button.is-start, .rank-date-days button.is-end { background: #2563eb; color: #fff; font-weight: 800; }
.rank-date-range-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e7edf5; }
.rank-date-range-footer span { color: #64748b; font-size: 12px; }
.rank-date-range-footer .btn { min-width: 128px; }
.rank-analytics-cost { display: inline-flex; height: 38px; align-items: center; color: #64748b; font-size: 13px; white-space: nowrap; }
.rank-analytics-cost strong { color: #17233b; }
.rank-toolbar-check-form { margin: 0; flex: 0 0 auto; }
.rank-toolbar-check-form .btn { white-space: nowrap; }
.rank-toolbar-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.rank-toolbar-action, .rank-toolbar-icon { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid #d7e3f2; border-radius: 10px; background: #fff; color: #2563eb; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap; }
.rank-toolbar-action span { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 999px; background: #eef4ff; font-size: 11px; }
.rank-toolbar-icon { width: 38px; padding: 0; font-size: 17px; }
.rank-toolbar-icon::-webkit-details-marker { display: none; }
.rank-toolbar-action:hover, .rank-toolbar-icon:hover, .rank-toolbar-popover[open] .rank-toolbar-icon { border-color: #93baff; background: #eef4ff; }
.rank-toolbar-popover { position: relative; }
.rank-toolbar-menu { position: absolute; z-index: 40; top: calc(100% + 9px); right: 0; width: min(680px, calc(100vw - 48px)); padding: 18px; border: 1px solid #d9e4f2; border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(27, 45, 78, .18); }
.rank-toolbar-links-menu { width: min(560px, calc(100vw - 48px)); }
.rank-toolbar-menu-head { display: grid; gap: 4px; margin-bottom: 14px; }
.rank-toolbar-menu-head strong { font-size: 17px; }
.rank-toolbar-menu-head span, .rank-toolbar-menu > p { color: var(--muted); font-size: 12px; }
.rank-toolbar-settings-launcher { width: 290px; padding: 7px; }
.rank-toolbar-settings-launcher button { display: grid; width: 100%; height: auto; min-height: 58px; align-content: center; align-items: stretch; justify-content: stretch; gap: 3px; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.rank-toolbar-settings-launcher button:hover { background: #eef4ff; }
.rank-toolbar-settings-launcher button strong { font-size: 13px; }
.rank-toolbar-settings-launcher button span { color: var(--muted); font-size: 11px; }
.rank-share-trigger { width: auto; min-width: 38px; padding: 0 12px; justify-content: center; list-style: none; font-size: 13px; }
.rank-share-trigger > span { background: transparent; }
.rank-share-trigger::-webkit-details-marker { display: none; }
.rank-share-menu { width: 340px; padding: 8px; }
.rank-share-menu .rank-toolbar-menu-head { padding: 10px 11px 8px; margin-bottom: 2px; }
.rank-share-option { display: grid; width: 100%; height: auto; min-height: 60px; align-content: center; align-items: start; justify-content: stretch; gap: 3px; padding: 11px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.rank-share-option:hover, .rank-share-option:focus-visible { background: #eef4ff; outline: none; box-shadow: none; transform: none; }
.rank-share-option:disabled { opacity: .58; cursor: wait; }
.rank-share-option strong { display: block; font-size: 13px; line-height: 1.25; white-space: normal; }
.rank-share-option span { display: block; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
.rank-share-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 4px 2px; padding: 10px; border-radius: 9px; background: #ecfdf5; color: #047857; font-size: 11px; font-weight: 700; }
.rank-share-status[hidden] { display: none; }
.rank-share-status.is-error { background: #fef2f2; color: #b91c1c; }
.rank-share-status a { color: inherit; white-space: nowrap; }
.rank-settings-panel { position: absolute; z-index: 45; top: calc(100% + 9px); right: 16px; width: min(680px, calc(100vw - 48px)); padding: 18px; border: 1px solid #d9e4f2; border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(27, 45, 78, .18); }
.rank-settings-panel[hidden] { display: none; }
.rank-settings-panel .rank-toolbar-menu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.rank-settings-panel .rank-toolbar-menu-head > div { display: grid; gap: 4px; }
.rank-settings-panel .rank-toolbar-menu-head > button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: #f1f5f9; color: #64748b; font-size: 22px; line-height: 1; cursor: pointer; }
.rank-settings-panel .rank-toolbar-menu-head > button:hover { background: #e2e8f0; color: #17233b; }
.rank-settings-panel .rank-project-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rank-settings-panel .rank-project-settings-form .rank-project-checkbox { grid-column: 1 / -1; }
.rank-tool-settings-panel { width: min(620px, calc(100vw - 48px)); }
.rank-competitor-settings-panel { width: min(760px, calc(100vw - 48px)); }
.rank-search-settings-panel { width: min(760px, calc(100vw - 48px)); }
.rank-search-settings-form { display: grid; gap: 14px; }
.rank-search-settings-panel .rank-search-engine-card { max-height: min(520px, calc(100vh - 250px)); overflow-y: auto; }
.rank-search-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #e3ebf5; }
.rank-search-settings-actions > span { color: #94a3b8; font-size: 11px; }
.rank-search-settings-panel .rank-search-target-remove:disabled { opacity: .35; cursor: not-allowed; }
.rank-competitor-settings-form { display: grid; gap: 12px; }
.rank-competitor-settings-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 2px; color: #64748b; font-size: 12px; }
.rank-competitor-settings-summary strong { color: #1e293b; }
.rank-competitor-settings-columns,
.rank-competitor-settings-row { display: grid; grid-template-columns: minmax(150px, .85fr) minmax(180px, 1.15fr) 72px; gap: 9px; align-items: center; }
.rank-competitor-settings-columns { padding: 0 2px; color: #94a3b8; font-size: 11px; font-weight: 700; }
.rank-competitor-settings-list { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; padding: 2px 4px 2px 2px; scrollbar-gutter: stable; }
.rank-competitor-settings-row { padding-bottom: 8px; border-bottom: 1px solid #edf2f8; }
.rank-competitor-settings-row:last-child { padding-bottom: 0; border-bottom: 0; }
.rank-competitor-settings-row input[type="text"] { min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #d7e2ef; border-radius: 8px; background: #fff; color: #17233b; }
.rank-competitor-settings-row input[type="text"]:focus { border-color: #7aa7ff; outline: 2px solid rgba(37, 99, 235, .12); }
.rank-competitor-remove { padding: 7px 5px; border: 0; background: transparent; color: #dc2626; font-size: 11px; font-weight: 700; cursor: pointer; }
.rank-competitor-remove:hover, .rank-competitor-remove:focus-visible { border-radius: 7px; background: #fff1f2; outline: none; }
.rank-competitor-add { justify-self: start; }
.rank-competitor-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #e3ebf5; }
.rank-competitor-settings-actions > span { color: #94a3b8; font-size: 11px; }
.rank-tool-settings-form { display: grid; gap: 14px; }
.rank-tool-settings-form fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.rank-tool-settings-form legend { margin-bottom: 7px; color: #334155; font-size: 12px; font-weight: 800; }
.rank-segmented { display: inline-flex; width: fit-content; max-width: 100%; padding: 3px; border: 1px solid #d9e4f2; border-radius: 10px; background: #f8fafc; }
.rank-segmented label { position: relative; cursor: pointer; }
.rank-segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rank-segmented span { display: inline-flex; min-height: 34px; align-items: center; padding: 0 11px; border-radius: 7px; color: #64748b; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rank-segmented input:checked + span { background: #2563eb; color: #fff; box-shadow: 0 1px 3px rgba(37, 99, 235, .24); }
.rank-segmented input:focus-visible + span { outline: 2px solid #93c5fd; outline-offset: 1px; }
.rank-tool-roadmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 2px; }
.rank-tool-roadmap > span { display: grid; gap: 3px; padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; color: #334155; font-size: 12px; font-weight: 700; }
.rank-tool-roadmap b { color: #94a3b8; font-size: 11px; font-weight: 600; }
.rank-keywords-workspace { overflow: visible; }
.rank-keywords-search { display: flex; gap: 8px; margin: 0; }
.rank-keywords-add-panel { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; margin-bottom: 20px; padding: 14px; border: 1px solid #dce7f5; border-radius: 12px; background: #f8fafc; }
.rank-keywords-add-panel textarea { min-height: 88px; resize: vertical; }
.rank-keywords-table-wrap { overflow-x: auto; border: 1px solid #dce7f5; border-radius: 12px; }
.rank-keywords-table { width: 100%; border-collapse: collapse; }
.rank-keywords-table th, .rank-keywords-table td { padding: 12px 14px; border-bottom: 1px solid #e5edf7; text-align: left; }
.rank-keywords-table th { background: #f5f8fc; color: #64748b; font-size: 11px; text-transform: uppercase; }
.rank-keywords-table tr:last-child td { border-bottom: 0; }
.rank-keywords-table td:first-child { width: 100%; font-weight: 700; }
.rank-keywords-table form { margin: 0; }
.rank-keyword-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #e8f9ef; color: #168447; font-size: 12px; font-weight: 800; }
.rank-keyword-remove { border: 0; background: transparent; color: #dc2626; font: inherit; font-size: 12px; cursor: pointer; }
.rank-keywords-empty { color: var(--muted); text-align: center !important; }

/* Compact keyword workspace: project structure on the left, working list on the right. */
.rank-keyword-hero { margin-bottom: 18px; }
.rank-keyword-manager { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 520px; padding: 0; overflow: visible; }
.rank-keyword-sidebar { padding: 18px 14px; border-right: 1px solid #dce7f5; border-radius: 14px 0 0 14px; background: linear-gradient(180deg, #f7faff 0%, #f2f6fc 100%); }
.rank-keyword-sidebar-head, .rank-keyword-tree-title, .rank-keyword-content-head, .rank-keyword-bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rank-keyword-sidebar-head { padding: 0 8px 14px; }
.rank-keyword-sidebar-head strong { color: #172033; font-size: 15px; }
.rank-keyword-sidebar-head span, .rank-keyword-content-head p { color: #7a8aa3; font-size: 12px; }
.rank-keyword-scope-list, .rank-keyword-tree-section { display: grid; gap: 5px; }
.rank-keyword-tree-section { margin-top: 18px; }
.rank-keyword-tree-title { padding: 0 8px 6px; color: #8391a7; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rank-keyword-scope-list a, .rank-keyword-tree-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 8px 10px; border-radius: 9px; color: #40516d; font-size: 13px; font-weight: 700; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.rank-keyword-scope-list a:hover, .rank-keyword-tree-link:hover { background: #eaf1ff; color: #1f63dd; }
.rank-keyword-scope-list a.is-active, .rank-keyword-tree-link.is-active { background: #2469e8; color: #fff; box-shadow: 0 7px 16px rgba(36, 105, 232, .18); }
.rank-keyword-scope-list small, .rank-keyword-tree-link small { color: inherit; opacity: .7; font-size: 11px; }
.rank-keyword-tree-empty { margin: 3px 8px; color: #94a3b8; font-size: 12px; }
.rank-keyword-create-popover, .rank-keyword-add-popover { position: relative; }
.rank-keyword-create-popover > summary, .rank-keyword-add-popover > summary { list-style: none; cursor: pointer; }
.rank-keyword-create-popover > summary::-webkit-details-marker, .rank-keyword-add-popover > summary::-webkit-details-marker { display: none; }
.rank-keyword-create-popover > summary { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #2469e8; font-size: 18px; }
.rank-keyword-create-popover > summary:hover { background: #e5efff; }
.rank-keyword-create-popover form, .rank-keyword-add-popover form { position: absolute; z-index: 60; display: grid; gap: 10px; padding: 14px; border: 1px solid #d9e4f2; border-radius: 12px; background: #fff; box-shadow: 0 18px 45px rgba(15, 35, 70, .17); }
.rank-keyword-create-popover form { top: 30px; left: 0; width: 230px; }
.rank-keyword-add-popover form { top: 48px; right: 0; width: min(440px, calc(100vw - 40px)); }
.rank-keyword-create-popover input, .rank-keyword-add-popover textarea, .rank-keyword-add-popover select, .rank-keyword-filter-bar input, .rank-keyword-filter-bar select, .rank-keyword-bulk-actions select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d7e2f0; border-radius: 9px; background: #fff; color: #172033; font: inherit; }
.rank-keyword-add-popover textarea { min-height: 170px; resize: vertical; }
.rank-keyword-import-actions { display: flex; justify-content: flex-end; gap: 8px; }
.rank-keyword-content { min-width: 0; padding: 20px; }
.rank-keyword-content-head { align-items: flex-start; margin-bottom: 16px; }
.rank-keyword-content-head h2 { margin: 3px 0 2px; font-size: 22px; }
.rank-keyword-content-head p { margin: 0; }
.rank-keyword-head-actions { display: flex; align-items: flex-start; gap: 9px; }
.rank-relevance-cta { display: inline-flex; align-items: center; gap: 9px; border-color: #f3c45f; background: #fff8df; color: #8a5700; box-shadow: 0 5px 14px rgba(180, 116, 0, .1); }
.rank-relevance-cta:hover { border-color: #e8ad2f; background: #fff1bd; color: #704500; }
.rank-relevance-cta small { padding: 3px 6px; border-radius: 999px; background: #f5b82e; color: #4f3300; font-size: 10px; font-weight: 800; white-space: nowrap; }
.rank-relevance-cta:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.rank-keyword-kicker { color: #2469e8; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.rank-keyword-location { display: inline-flex; padding: 4px 8px; border-radius: 7px; background: #eef3fa; color: #53657e; font-size: 12px; }
.rank-keyword-filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 160px auto; gap: 8px; margin-bottom: 12px; }
.rank-keyword-bulk-form { min-width: 0; }
.rank-keyword-bulk-bar { min-height: 48px; padding: 8px 10px; border: 1px solid #dce7f5; border-bottom: 0; border-radius: 11px 11px 0 0; background: #f8fafd; color: #53657e; font-size: 12px; }
.rank-keyword-bulk-bar label, .rank-keyword-bulk-actions { display: flex; align-items: center; gap: 8px; }
.rank-keyword-bulk-actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.rank-keyword-bulk-actions .btn:disabled, .rank-keyword-bulk-actions select:disabled { opacity: .48; cursor: not-allowed; }
.rank-keyword-bulk-actions select { min-width: 150px; }
.rank-relevance-progress { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #b8d4ff; border-radius: 12px; background: #f1f7ff; color: #29496f; }
.rank-relevance-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rank-relevance-progress span { color: #1768df; font-weight: 700; }
.rank-relevance-progress p { margin: 5px 0 0; font-size: 13px; }
.rank-relevance-modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .46); }
.rank-relevance-modal[hidden] { display: none; }
.rank-relevance-dialog { width: min(560px, 100%); overflow: hidden; border: 1px solid #d7e2f0; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .22); }
.rank-relevance-dialog header, .rank-relevance-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; }
.rank-relevance-dialog header { border-bottom: 1px solid #e4ebf5; }
.rank-relevance-dialog header h3, .rank-relevance-dialog header p { margin: 0; }
.rank-relevance-dialog header p { margin-top: 5px; color: #687b95; font-size: 12px; line-height: 1.4; }
.rank-relevance-dialog header > button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #eef3fa; color: #53657e; font-size: 22px; cursor: pointer; }
.rank-relevance-dialog-body { display: grid; gap: 14px; padding: 18px; }
.rank-relevance-dialog-body label { display: grid; gap: 7px; color: #34445d; font-size: 13px; font-weight: 700; }
.rank-relevance-dialog-body select, .rank-relevance-dialog-body input { min-height: 42px; padding: 8px 10px; border: 1px solid #cedbec; border-radius: 9px; background: #fff; color: #172033; font: inherit; }
.rank-relevance-dialog-body input[readonly] { background: #f8fafc; color: #53657e; }
.rank-relevance-dialog-body > p { margin: 0; color: #687b95; font-size: 12px; line-height: 1.5; }
.rank-relevance-note { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 10px; background: #f2f6fc; color: #34445d; }
.rank-relevance-dialog footer { justify-content: flex-end; border-top: 1px solid #e4ebf5; }
.rank-keyword-table-wrap { overflow-x: auto; border: 1px solid #dce7f5; border-radius: 0 0 11px 11px; }
.rank-keyword-table { width: 100%; min-width: 650px; border-collapse: collapse; table-layout: fixed; }
.rank-keyword-table th, .rank-keyword-table td { height: 43px; padding: 8px 12px; border-bottom: 1px solid #e6edf6; text-align: left; vertical-align: middle; }
.rank-keyword-table th { background: #f3f6fa; color: #70809a; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rank-keyword-table th:nth-child(2) { width: 56%; }
.rank-keyword-table th:nth-child(3) { width: 24%; }
.rank-keyword-table th:nth-child(4) { width: 16%; }
.rank-keyword-table tbody tr:hover { background: #f8fbff; }
.rank-keyword-table tbody tr:last-child td { border-bottom: 0; }
.rank-keyword-table td strong { display: block; overflow: hidden; color: #26344a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rank-keyword-phrase-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-keyword-phrase-cell strong { min-width: 0; flex: 1; }
.rank-keyword-target-button.has-target { border-color: #14b8a6; background: #ecfdf5; color: #0f766e; }
.rank-keyword-location-stack { display: grid; justify-items: start; gap: 5px; }
.rank-keyword-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rank-keyword-tags span { max-width: 120px; overflow: hidden; padding: 2px 6px; border-radius: 999px; background: #eef4ff; color: #2762bd; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rank-keyword-check-col { width: 42px; }
.rank-keyword-checkbox, #rank-keyword-select-all { width: 16px; min-width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; padding: 0; accent-color: #2469e8; }
.rank-keyword-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e7f8ee; color: #168447; font-size: 11px; font-weight: 800; }
.rank-keyword-status.is-disabled { background: #eef1f5; color: #77849a; }
.rank-keyword-empty { padding: 38px 16px !important; color: #7a8aa3; text-align: center !important; }

@media (max-width: 900px) {
    .rank-keyword-manager { grid-template-columns: 1fr; }
    .rank-keyword-sidebar { border-right: 0; border-bottom: 1px solid #dce7f5; border-radius: 14px 14px 0 0; }
    .rank-keyword-scope-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .rank-keyword-content { padding: 14px; }
    .rank-keyword-content-head, .rank-keyword-bulk-bar { align-items: stretch; flex-direction: column; }
    .rank-keyword-head-actions { display: grid; grid-template-columns: 1fr; }
    .rank-keyword-content-head .btn { width: 100%; }
    .rank-keyword-filter-bar { grid-template-columns: 1fr; }
    .rank-keyword-filter-bar .btn { width: 100%; }
    .rank-keyword-bulk-actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
    .rank-keyword-bulk-actions select { min-width: 0; flex: 1 1 150px; }
    .rank-keyword-scope-list { grid-template-columns: 1fr; }
}
.rank-project-analytics { margin-bottom: 16px; }
.rank-project-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rank-project-section-head h2 { margin: 0 0 5px; }
.rank-project-section-head p { margin: 0; color: var(--muted); }
.rank-project-section-head > strong { padding-top: 5px; white-space: nowrap; }
.rank-analytics-compare { padding: 7px 10px; border-radius: 999px; background: #eef4ff; color: #2563eb; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rank-analytics-metrics { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 10px; overflow-x: auto; }
.rank-analytics-metrics > div { min-width: 110px; padding: 13px; border: 1px solid #e4ebf5; border-radius: 12px; background: #f8fafc; }
.rank-analytics-metrics span { display: block; color: var(--muted); font-size: 12px; }
.rank-analytics-metrics strong { display: block; margin-top: 7px; color: #17233b; font-size: 21px; }
.rank-competitor-comparison { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #dce7f5; border-radius: 14px; background: #f8fbff; }
.rank-competitor-comparison-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rank-competitor-comparison-head > div { display: grid; gap: 3px; }
.rank-competitor-comparison-head strong { color: #17233b; font-size: 14px; }
.rank-competitor-comparison-head span, .rank-competitor-comparison-head small { color: #64748b; font-size: 11px; }
.rank-competitor-comparison-head small { white-space: nowrap; }
.rank-competitor-comparison-head b { color: #17233b; }
.rank-competitor-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.rank-competitor-badge { --competitor-color: #64748b; display: inline-flex; min-width: 120px; min-height: 34px; align-items: center; justify-content: center; padding: 7px 14px; border: 2px solid transparent; border-radius: 7px; background: #94a3b8; color: #fff; font-size: 12px; font-weight: 800; line-height: 1.15; text-align: center; text-decoration: none; opacity: .82; }
.rank-competitor-badge.is-project { --competitor-color: #0f9f8f; background: #0f9f8f; }
.rank-competitor-badge:hover { color: #fff; opacity: .9; }
.rank-competitor-badge:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }
.rank-competitor-badge.is-active { border-color: #fff; background: var(--competitor-color); opacity: 1; box-shadow: 0 0 0 2px var(--competitor-color), 0 5px 14px rgba(30, 41, 59, .14); }
.rank-competitor-empty { margin-bottom: 16px; text-align: center; }
.rank-competitor-empty strong { color: #17233b; }
.rank-competitor-empty p { margin: 6px 0 0; color: #64748b; }
.rank-dynamics-overview { margin-bottom: 16px; }
.rank-dynamics-tabs { display: inline-flex; gap: 4px; margin: 0 0 18px; padding: 4px; border: 1px solid #dce7f5; border-radius: 12px; background: #f8fafc; }
.rank-dynamics-tabs button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: #64748b; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.rank-dynamics-tabs button:hover { background: #eef4ff; color: #1d4ed8; }
.rank-dynamics-tabs button.is-active { background: #2563eb; color: #fff; box-shadow: 0 1px 3px rgba(37, 99, 235, .25); }
.rank-dynamics-panels { display: grid; }
.rank-guest-shell > .rank-dynamics-overview { margin: 18px 0; }
.rank-dynamics-panel { display: block; grid-area: 1 / 1; min-width: 0; visibility: hidden; pointer-events: none; }
.rank-dynamics-panel.is-active { visibility: visible; pointer-events: auto; }
.rank-dynamics-panel > .rank-dynamics-grid { height: 100%; }
.rank-dynamics-grid { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(420px, 1.6fr); gap: 18px; }
.rank-distribution-card, .rank-history-card { min-width: 0; padding: 16px; border: 1px solid #e4ebf5; border-radius: 14px; background: #fbfdff; }
.rank-distribution-card h3, .rank-history-card h3 { margin: 0 0 14px; font-size: 15px; }
.rank-guest-search { display: grid; gap: 8px; margin-bottom: 16px; }
.rank-table-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.rank-table-filter details { flex: 1 1 100%; padding: 12px; border: 1px solid #dbe5f3; border-radius: 10px; background: #f8faff; }
.rank-table-filter summary { cursor: pointer; color: #245ff5; font-weight: 600; }
.rank-filter-quick { display: grid; gap: 8px; width: min(560px, 100%); }
.rank-filter-fields { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; margin-top: 16px; }
.rank-filter-fields label { display: grid; align-content: start; gap: 6px; min-width: 0; }
.rank-filter-fields select, .rank-filter-fields textarea { width: 100%; box-sizing: border-box; }
.rank-filter-fields textarea { resize: vertical; min-height: 72px; }
.rank-filter-help, .rank-filter-status { color: #647b9b; font-size: 12px; overflow-wrap: anywhere; white-space: pre-line; }
.rank-filter-error { color: #b42318; }
.rank-project-results tr[hidden] { display: none; }
@media (max-width: 640px) { .rank-filter-fields { grid-template-columns: 1fr; } }
.rank-guest-phrase { display: flex; align-items: center; gap: 8px; }
.rank-guest-url-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 1px solid #dbe5f3; border-radius: 6px; background: #fff; color: #647b9b; cursor: pointer; }
.rank-guest-url-button:hover, .rank-guest-url-button:focus-visible { background: #f1f3f5; color: #5f6b7a; border-color: #cbd2da; box-shadow: none; transform: none; }
.rank-guest-url-button:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; }
.rank-guest-url-dialog { box-sizing: border-box; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #dbe5f3; border-radius: 16px; color: #17243b; background: #fff; box-shadow: 0 24px 70px #16254440; }
.rank-guest-url-dialog::backdrop { background: #17243b66; }
.rank-guest-url-dialog h2 { margin: 0 0 12px; font-size: 20px; }
.rank-guest-url-dialog p { margin: 12px 0; overflow-wrap: anywhere; }
.rank-guest-url-dialog #rank-guest-url-description { color: #647b9b; font-size: 13px; }
.rank-guest-url-value { padding: 12px; background: #f4f7fc; border-radius: 8px; }
.rank-guest-url-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.rank-guest-url-actions form { margin: 0; }
.rank-guest-url-actions [hidden] { display: none; }
.rank-guest-search label { font-weight: 600; }
.rank-guest-search-controls { display: flex; gap: 8px; max-width: 560px; }
.rank-guest-search-controls input { flex: 1; min-width: 0; }
.rank-guest-search [data-rank-guest-count] { color: var(--muted); font-size: 12px; }
[data-rank-guest-table] tr[hidden] { display: none; }
.rank-distribution-donut { position: relative; display: grid; width: 160px; height: 160px; place-items: center; margin: 0 auto 16px; border-radius: 50%; }
.rank-donut-hit-areas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.rank-donut-hit-areas path { fill: transparent; pointer-events: auto; cursor: pointer; }
.rank-donut-hit-areas path:hover, .rank-donut-hit-areas path:focus-visible { fill: rgba(255,255,255,.3); outline: none; stroke: #17233b; stroke-width: 1.5; }
.rank-donut-tooltip { position: fixed; z-index: 100; box-sizing: border-box; max-width: min(260px, calc(100vw - 24px)); margin: 0; padding: 10px 12px; border: 1px solid #dbe5f1; border-radius: 8px; background: #fff; color: #17233b; box-shadow: 0 6px 24px #1e365b26; font-size: 13px; pointer-events: none; }
.rank-donut-tooltip[hidden] { display: none; }
.rank-distribution-donut > div { display: grid; width: 108px; height: 108px; place-items: center; align-content: center; border-radius: 50%; background: #fff; text-align: center; }
.rank-distribution-donut strong { color: #0f766e; font-size: 25px; }
.rank-distribution-donut span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.rank-distribution-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rank-distribution-legend span { display: flex; align-items: center; gap: 6px; color: #52647e; font-size: 12px; }
.rank-distribution-legend i { width: 9px; height: 9px; border-radius: 50%; }
.rank-distribution-legend strong { margin-left: auto; color: var(--text); }
.rank-history-chart { display: flex; height: 218px; gap: 10px; align-items: stretch; overflow-x: auto; padding: 0 2px; }
.rank-history-column { display: grid; flex: 1 0 36px; min-width: 36px; grid-template-rows: 1fr auto; gap: 7px; }
.rank-history-stack { display: flex; height: 100%; min-height: 170px; flex-direction: column-reverse; overflow: hidden; border: 1px solid #e4ebf5; border-radius: 8px 8px 3px 3px; background: repeating-linear-gradient(to top, #f8fafc 0 1px, transparent 1px 25%); }
.rank-history-stack span { flex: 0 0 auto; min-height: 2px; border-top: 1px solid rgba(255, 255, 255, .8); }
.rank-history-column small { color: #64748b; font-size: 10px; text-align: center; white-space: nowrap; }

.rank-distribution-chart-card { overflow: hidden; }
.rank-distribution-plot { position: relative; min-height: 258px; overflow: hidden; border-left: 1px solid #dfe6ed; border-bottom: 1px solid #dfe6ed; }
.rank-distribution-gridlines { position: absolute; inset: 0 0 34px; display: grid; grid-template-rows: repeat(4, 1fr); pointer-events: none; }
.rank-distribution-gridlines span { border-top: 1px dotted #dce5ed; }
.rank-distribution-gridlines span:last-child { border-bottom: 1px dotted #dce5ed; }
.rank-distribution-history { position: relative; z-index: 1; display: flex; min-width: 100%; height: 258px; align-items: flex-end; gap: 14px; overflow-x: auto; overflow-y: hidden; padding: 0 12px; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.rank-distribution-column { position: relative; display: grid; flex: 0 0 clamp(38px, 3vw, 44px); grid-template-rows: 218px 26px; gap: 6px; outline: none; }
.rank-distribution-column::before { position: absolute; top: 0; bottom: 34px; left: -8px; border-left: 1px solid rgba(217, 226, 235, .72); content: ""; }
.rank-distribution-stack { display: flex; height: 218px; flex-direction: column; align-self: end; overflow: hidden; border-radius: 2px 2px 0 0; background: #eef3f7; box-shadow: 0 0 0 1px rgba(207, 218, 229, .78); }

.rank-distribution-segment {
    display: grid;
    min-height: 1px;
    flex: 0 0 var(--segment-size);
    place-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .9);
    background: var(--segment-color);
}

.rank-distribution-segment b {
    opacity: 0;
    color: #fff;
    font-size: 9px;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .45);
    transition: opacity .12s ease;
}
.rank-distribution-column:hover .rank-distribution-segment b,
.rank-distribution-column:focus-visible .rank-distribution-segment b { opacity: 1; }

.rank-distribution-date {
    overflow: visible;
    color: #8a97aa;
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.rank-distribution-tooltip {
    position: absolute;
    z-index: 30;
    top: 12px;
    left: 50%;
    display: grid;
    width: 190px;
    gap: 6px;
    padding: 12px;
    pointer-events: none;
    opacity: 0;
    border: 1px solid #dce6f2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(30, 57, 91, .18);
    transform: translate(-50%, 5px);
    transition: opacity .14s ease, transform .14s ease;
}

.rank-distribution-tooltip > strong {
    padding-bottom: 3px;
    border-bottom: 1px solid #edf2f7;
    color: #172033;
    font-size: 12px;
}

.rank-distribution-tooltip span {
    display: grid;
    grid-template-columns: 8px 1fr auto;
    align-items: center;
    gap: 6px;
    color: #55657d;
    font-size: 11px;
}

.rank-distribution-tooltip span i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.rank-distribution-tooltip span b { color: #172033; }

.rank-distribution-tooltip .rank-distribution-tooltip-total {
    grid-template-columns: 1fr auto;
    color: #172033;
    font-weight: 700;
}

.rank-distribution-column:hover .rank-distribution-tooltip,
.rank-distribution-column:focus-visible .rank-distribution-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.rank-distribution-column:first-child .rank-distribution-tooltip {
    left: 0;
    transform: translate(0, 5px);
}

.rank-distribution-column:first-child:hover .rank-distribution-tooltip,
.rank-distribution-column:first-child:focus-visible .rank-distribution-tooltip { transform: translate(0, 0); }
.rank-distribution-chart-legend { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 0; }
.rank-distribution-chart-legend span { display: inline-flex; min-width: 62px; height: 28px; align-items: center; justify-content: center; padding: 0 11px; border-radius: 3px; background: var(--legend-color); color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.rank-distribution-chart-legend span:nth-last-child(-n + 2) { color: #334155; }
.rank-line-chart { display: block; width: 100%; height: 230px; overflow: visible; }
.rank-line-chart-grid line { stroke: #dfe7ef; stroke-width: 1; vector-effect: non-scaling-stroke; }
.rank-line-chart-grid line:nth-child(-n + 5) { stroke-dasharray: 2 3; }
.rank-line-chart-axis-label, .rank-line-chart-date { fill: #8a99ae; font-size: 10px; }
.rank-line-chart-area { fill: color-mix(in srgb, var(--series-color, #0ea5a4) 11%, transparent); stroke: none; }
.rank-line-chart-series { fill: none; stroke: var(--series-color, #0ea5a4); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.rank-line-chart-point { fill: #fff; stroke: var(--series-color, #0ea5a4); stroke-width: 3; vector-effect: non-scaling-stroke; }
.rank-line-chart [hidden] { display: none; }
.rank-chart-series-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid #e4ebf5; }
.rank-chart-series-toggle { min-height: 30px; padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #e2e8f0; color: #475569; font: inherit; font-size: 11px; font-weight: 800; line-height: 1.15; cursor: pointer; opacity: 1; }
.rank-chart-series-toggle:hover { border-color: #94a3b8; background: #cbd5e1; }
.rank-chart-series-toggle.is-active { border-color: var(--series-color); background: var(--series-color); color: #fff; opacity: 1; box-shadow: 0 3px 9px color-mix(in srgb, var(--series-color) 24%, transparent); }
.rank-chart-series-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--series-color) 28%, transparent); outline-offset: 2px; }
.rank-bucket-chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid #e4ebf5; }
.rank-bucket-chart-toggle { min-width: 62px; min-height: 30px; padding: 6px 12px; border: 1px solid var(--series-color); border-radius: 4px; background: #fff; color: var(--series-color); font: inherit; font-size: 11px; font-weight: 800; line-height: 1.15; cursor: pointer; transition: opacity .14s ease, background .14s ease, color .14s ease; }
.rank-bucket-chart-toggle.is-active { background: var(--series-color); color: #fff; }
.rank-bucket-chart-toggle:hover { opacity: .86; }
.rank-bucket-chart-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--series-color) 28%, transparent); outline-offset: 2px; }

.rank-guest-body { min-height: 100vh; margin: 0; background: #f4f7fb; color: #17233b; }
.rank-guest-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; }
.rank-guest-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.rank-guest-header h1, .rank-guest-section-head h2, .rank-guest-not-found h1 { margin: 6px 0; }
.rank-guest-header p, .rank-guest-section-head p, .rank-guest-not-found p { margin: 0; color: #64748b; }
.rank-guest-period { display: grid; gap: 4px; min-width: 210px; padding: 12px 14px; border: 1px solid #dce6f2; border-radius: 12px; background: #f8fafc; }
.rank-guest-period span { color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.rank-guest-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.rank-guest-summary article { display: grid; align-content: start; gap: 7px; min-height: 116px; padding: 17px; }
.rank-guest-summary span { color: #64748b; font-size: 12px; }
.rank-guest-summary strong { font-size: 22px; }
.rank-guest-summary .rank-guest-summary-delta { display: inline-flex; align-items: center; width: max-content; max-width: 100%; margin-top: 3px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.25; }
.rank-guest-summary-delta b { margin-right: 4px; font-size: 13px; line-height: 1; }
.rank-guest-summary-delta.is-up { background: #eafaf0; color: #15803d; }
.rank-guest-summary-delta.is-down { background: #fff0f1; color: #dc2626; }
.rank-guest-summary-delta.is-stable { background: #f1f5f9; color: #64748b; }
.rank-guest-ranges { margin-top: 14px; padding: 18px 20px; }
.rank-guest-ranges-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.rank-guest-ranges-head h2 { margin: 0 0 4px; font-size: 17px; }
.rank-guest-ranges-head p { margin: 0; color: #64748b; font-size: 12px; }
.rank-guest-ranges-head > span { color: #64748b; font-size: 11px; white-space: nowrap; }
.rank-guest-ranges-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; border: 1px solid #dce6f2; border-radius: 12px; background: #f8fafc; }
.rank-guest-range-item { display: grid; min-width: 0; gap: 4px; padding: 13px 14px; border-right: 1px solid #dce6f2; }
.rank-guest-range-item:last-child { border-right: 0; }
.rank-guest-range-label { color: #475569; font-size: 11px; font-weight: 800; }
.rank-guest-range-item strong { color: #17233b; font-size: 20px; line-height: 1.1; }
.rank-guest-range-item small { color: #64748b; font-size: 10px; }
.rank-guest-range-change { display: inline-flex; align-items: center; width: fit-content; margin-top: 3px; font-size: 10px; font-weight: 800; line-height: 1.2; }
.rank-guest-range-change b { margin-right: 4px; font-size: 12px; }
.rank-guest-range-change.is-up { color: #15803d; }
.rank-guest-range-change.is-down { color: #dc2626; }
.rank-guest-range-change.is-stable { color: #64748b; }
.rank-guest-history, .rank-guest-positions { margin-top: 14px; padding: 20px; }
.rank-guest-shell > .rank-competitor-comparison { margin: 14px 0 0; padding: 20px; }
.rank-guest-shell > .rank-competitor-comparison .rank-competitor-badges { margin-top: 16px; gap: 8px; }
.rank-guest-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.rank-guest-section-head > span { padding: 6px 9px; border-radius: 999px; background: #eef4ff; color: #2563eb; font-size: 11px; font-weight: 800; }
.rank-guest-history-list { display: grid; gap: 10px; }
.rank-guest-history-row { display: grid; grid-template-columns: 145px minmax(120px, 1fr) 54px; align-items: center; gap: 12px; font-size: 12px; }
.rank-guest-history-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e9eef5; }
.rank-guest-history-track span { display: block; height: 100%; border-radius: inherit; background: #0ea5a4; }
.rank-guest-history-row strong { text-align: right; }
.rank-guest-empty { color: #64748b; }
.rank-guest-table-wrap { overflow: auto; border: 1px solid #dce6f2; border-radius: 12px; }
.rank-guest-table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rank-guest-table-wrap th, .rank-guest-table-wrap td { min-width: 74px; padding: 10px 11px; border-right: 1px solid #e5ebf3; border-bottom: 1px solid #e5ebf3; text-align: center; }
.rank-guest-table-wrap thead th { background: #f8fafc; color: #475569; }
.rank-guest-table-wrap tbody th, .rank-guest-table-wrap thead th:first-child { position: sticky; left: 0; z-index: 1; width: 360px; min-width: 360px; max-width: 360px; overflow-wrap: anywhere; background: #fff; text-align: left; }
.rank-guest-table-wrap thead th:first-child { z-index: 2; background: #f8fafc; }
.rank-guest-table-wrap th small { display: block; margin-top: 2px; color: #94a3b8; font-weight: 500; }
.rank-guest-sort-button { position: relative; display: block; width: 100%; padding: 0 18px 0 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.rank-guest-sort-button:hover, .rank-guest-sort-button:focus-visible { border-color: transparent; outline: 0; background: transparent; color: inherit; box-shadow: none; transform: none; }
.rank-guest-sort-indicator { position: absolute; top: 50%; right: 2px; color: #94a3b8; font-size: 12px; transform: translateY(-50%); }
.rank-guest-position-value { display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; }
.rank-guest-position-trend { font-size: 12px; font-weight: 900; }
.rank-guest-position-trend--up { color: #16a34a; }
.rank-guest-position-trend--down { color: #dc2626; }
.rank-guest-footer { padding: 22px 4px 0; color: #94a3b8; font-size: 11px; text-align: center; }
.rank-guest-not-found { max-width: 620px; padding-top: 12vh; }
.rank-guest-not-found .ui-card { padding: 28px; }
@media (max-width: 760px) {
    .rank-share-menu { width: auto; }
    .rank-guest-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
    .rank-guest-header { align-items: stretch; flex-direction: column; padding: 18px; }
    .rank-guest-period { min-width: 0; }
    .rank-guest-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rank-guest-summary article { min-height: 108px; padding: 14px; }
    .rank-guest-summary .rank-guest-summary-delta { width: fit-content; white-space: normal; }
    .rank-guest-summary article:last-child { grid-column: 1 / -1; }
    .rank-guest-ranges { padding: 14px; }
    .rank-guest-ranges-head { align-items: flex-start; flex-direction: column; gap: 4px; }
    .rank-guest-ranges-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rank-guest-range-item { border-bottom: 1px solid #dce6f2; }
    .rank-guest-range-item:nth-child(2n) { border-right: 0; }
    .rank-guest-range-item:nth-last-child(-n + 2) { border-bottom: 0; }
    .rank-guest-history, .rank-guest-positions { padding: 14px; }
    .rank-guest-history-row { grid-template-columns: 1fr 52px; }
    .rank-guest-history-row time { grid-column: 1 / -1; }
    .rank-guest-table-wrap { overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
    .rank-guest-table-wrap table { width: max-content; min-width: 100%; }
    .rank-guest-table-wrap th, .rank-guest-table-wrap td { padding: 9px 10px; }
    .rank-guest-table-wrap tbody th, .rank-guest-table-wrap thead th:first-child {
        width: clamp(154px, 46vw, 184px);
        min-width: clamp(154px, 46vw, 184px);
        max-width: clamp(154px, 46vw, 184px);
        font-size: 11px;
        line-height: 1.35;
        white-space: normal;
    }
}
.rank-chart-empty { display: grid; min-height: 218px; place-items: center; padding: 24px; border: 1px dashed #cbd5e1; border-radius: 10px; color: #64748b; font-size: 13px; text-align: center; }
.rank-summary-strip { display: grid; grid-template-columns: repeat(11, minmax(86px, 1fr)); margin: 18px -20px -20px; overflow-x: auto; border-top: 1px solid #e4ebf5; background: #f8fafc; }
.rank-summary-strip > div { min-width: 86px; padding: 12px; border-right: 1px solid #e4ebf5; }
.rank-summary-strip span { display: block; color: #64748b; font-size: 11px; white-space: nowrap; }
.rank-summary-strip strong { display: block; margin-top: 5px; color: #17233b; font-size: 18px; }
.rank-summary-strip .is-up { color: #16a34a; }
.rank-summary-strip .is-down { color: #dc2626; }
.rank-summary-strip .is-stable { color: #64748b; }
.rank-position-pill { display: inline-grid; min-width: 34px; place-items: center; padding: 5px 8px; border-radius: 8px; font-weight: 800; }
.rank-position-top { background: #dcfce7; color: #15803d; }
.rank-position-mid { background: #fef3c7; color: #b45309; }
.rank-position-low { background: #fee2e2; color: #b91c1c; }
.rank-position-high { background: #dbeafe; color: #1d4ed8; }
.rank-position-middle { background: #d1fae5; color: #047857; }
.rank-position-not-found { background: #f1f5f9; color: #94a3b8; }
.rank-position-delta { font-weight: 800; }
.rank-position-delta.is-up { color: #16a34a; }
.rank-position-delta.is-down { color: #dc2626; }
.rank-position-delta.is-stable { color: #64748b; }
.rank-check-timeline { display: flex; gap: 8px; margin: 0 0 12px; overflow-x: auto; padding-bottom: 2px; }
.rank-check-timeline span { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 12px; font-weight: 700; }
.rank-check-timeline .is-current { background: #dbeafe; color: #1d4ed8; }
.rank-position-matrix-wrap { overflow: hidden; border: 1px solid #aebccc; border-radius: 2px; background: #fff; }
.rank-matrix-table-scroll { max-height: none; overflow-x: auto; overflow-y: hidden; scrollbar-color: #8796a8 #dce3eb; scrollbar-width: auto; }
.rank-matrix-scrollbar { height: 16px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid #aebccc; background: #dce3eb; scrollbar-color: #8796a8 #dce3eb; }
.rank-matrix-scrollbar > div { height: 1px; }
.rank-project-results .rank-position-matrix { width: max-content; min-width: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-variant-numeric: tabular-nums; }
.rank-position-matrix th, .rank-position-matrix td { box-sizing: border-box; height: 40px; padding: 4px 7px; border-right: 1px solid #aebccc; border-bottom: 1px solid #aebccc; text-align: center; white-space: nowrap; }
.rank-position-matrix th:not(:first-child), .rank-position-matrix td:not(:first-child) { width: 78px; min-width: 78px; max-width: 78px; }
.rank-position-matrix th { position: sticky; top: 0; z-index: 3; height: 42px; background: #f4f6f8; color: #334155; font-size: 11px; font-weight: 600; }
.rank-position-matrix th.rank-matrix-sortable { height: 64px; padding: 23px 17px 4px 7px; cursor: pointer; user-select: none; }
.rank-position-matrix th.rank-matrix-sortable::after { position: absolute; right: 5px; bottom: 16px; color: #94a3b8; content: '\2195'; font-size: 10px; }
.rank-position-matrix th.rank-matrix-sortable[data-sort-direction="asc"]::after { color: #2563eb; content: '\2191'; }
.rank-position-matrix th.rank-matrix-sortable[data-sort-direction="desc"]::after { color: #2563eb; content: '\2193'; }
.rank-position-matrix th.rank-matrix-sortable:hover,
.rank-position-matrix th.rank-matrix-sortable:focus-visible { background: #e8eef6; color: #1d4ed8; outline: 0; }
.rank-matrix-check-date { display: grid; gap: 1px; justify-items: center; line-height: 1; }
.rank-matrix-check-date small { color: #9aa7b6; font-size: 9px; font-weight: 600; }
.rank-matrix-delete-form { position: absolute; top: 3px; right: 17px; left: 3px; z-index: 4; display: grid; height: 17px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s ease 0s, visibility 0s linear .12s; }
.rank-matrix-delete-button { width: 100%; height: 17px; padding: 0 3px; border: 1px solid #fecaca; border-radius: 4px; background: #fff1f2; color: #dc2626; font: inherit; font-size: 9px; font-weight: 700; line-height: 1; cursor: pointer; }
.rank-matrix-delete-button:hover, .rank-matrix-delete-button:focus-visible { border-color: #ef4444; background: #fee2e2; outline: 0; }
.rank-position-matrix th.rank-matrix-sortable:hover .rank-matrix-delete-form { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: .7s, .7s; }
.rank-position-matrix th.rank-matrix-sortable:focus-within .rank-matrix-delete-form { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.rank-position-matrix th.is-problem { background: #fff1f2; color: #be123c; }
.rank-position-matrix td.is-problem { box-shadow: none; }
.rank-position-matrix th:first-child, .rank-position-matrix td:first-child { position: sticky; left: 0; z-index: 2; text-align: left; background: #f8fafc; box-shadow: 1px 0 0 #8796a8; }
.rank-position-matrix th:first-child { z-index: 5; background: #edf1f5; color: #1e293b; font-size: 13px; font-weight: 700; }
.rank-position-matrix .is-current { box-shadow: none; }
.rank-position-matrix .is-live { background: #edf5ff; color: #1d4ed8; }
.rank-position-matrix tbody tr:last-child td { border-bottom: 0; }
.rank-position-matrix tbody tr:hover td { filter: brightness(.985); }
.rank-position-matrix th:first-child,
.rank-position-matrix td.rank-matrix-phrase {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}
.rank-position-matrix td.rank-matrix-phrase { height: 40px; padding: 4px 10px; white-space: normal; vertical-align: middle; }
.rank-matrix-phrase { overflow: hidden; }
.rank-matrix-phrase-content { position: relative; min-height: 28px; padding-right: 22px; }
.rank-matrix-phrase-label { display: flex; min-width: 0; align-items: center; gap: 6px; }
.rank-matrix-phrase-label strong { min-width: 0; flex: 1; }
.rank-matrix-target-button { display: inline-grid; width: 18px; height: 18px; flex: 0 0 18px; padding: 0; place-items: center; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #64748b; cursor: pointer; }
.rank-matrix-target-button:hover, .rank-matrix-target-button:focus-visible { border-color: #2563eb; background: #eff6ff; color: #2563eb; outline: 0; }
.rank-matrix-target-button.has-target { border-color: #5eead4; background: #ecfdf5; color: #0f766e; }
.rank-matrix-row-actions { position: absolute; top: 50%; right: 0; display: flex; flex-direction: column-reverse; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-50%); transition: opacity .12s ease, visibility 0s linear .12s; }
.rank-position-matrix tbody tr:hover .rank-matrix-row-actions,
.rank-position-matrix tbody tr:focus-within .rank-matrix-row-actions { opacity: 1; visibility: visible; transition-delay: 0s; }
.rank-matrix-row-actions form { display: flex; margin: 0; }
.rank-matrix-row-action { display: inline-grid; width: 18px; height: 18px; padding: 0; place-items: center; border: 1px solid #bfdbfe; border-radius: 5px; background: #eff6ff; color: #2563eb; font: inherit; font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; }
.rank-matrix-row-action:hover, .rank-matrix-row-action:focus-visible { border-color: #2563eb; background: #dbeafe; outline: 0; }
.rank-matrix-row-action.is-delete { border-color: #fecaca; background: #fff1f2; color: #dc2626; }
.rank-matrix-row-action.is-delete:hover, .rank-matrix-row-action.is-delete:focus-visible { border-color: #ef4444; background: #fee2e2; }
.rank-matrix-row-action:disabled { border-color: #e2e8f0; background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.rank-target-editor-dialog form { margin: 0; }
.rank-target-relevant { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.rank-target-relevant a { color: #2563eb; font-size: 12px; font-weight: 700; text-decoration: none; }
.rank-target-relevant a:hover { text-decoration: underline; }
.rank-matrix-phrase strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.12;
    font-size: 11px;
    font-weight: 500;
    overflow-wrap: normal;
    word-break: normal;
    text-overflow: ellipsis;
}
.rank-matrix-position { display: inline-flex; align-items: flex-start; justify-content: center; min-width: 26px; padding: 0; border-radius: 0; color: #164e63; font-size: 15px; font-weight: 500; line-height: 1; }
.rank-position-link { display: inline-block; text-decoration: none; }
.rank-position-link:hover .rank-matrix-position { color: #1d4ed8; text-decoration: underline; }
.rank-matrix-top, .rank-matrix-high, .rank-matrix-middle, .rank-matrix-low { background: transparent; color: inherit; }
.rank-matrix-cell-top { background: #a8d7ee; }
.rank-matrix-cell-high { background: #92dfb7; }
.rank-matrix-cell-middle { background: #cfefe3; }
.rank-matrix-cell-low { background: #f8dfdf; }
.rank-matrix-empty-cell { background: #f8ebc4; }
.rank-position-miss { color: #64748b; }
.rank-matrix-delta { margin-left: 2px; font-size: 9px; font-weight: 700; line-height: 1; }
.rank-matrix-delta.is-up { color: #16a34a; }
.rank-matrix-delta.is-down { color: #ef4444; }
.rank-position-loading { display: inline-block; width: 18px; height: 18px; border: 2px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%; animation: rank-position-spin .8s linear infinite; vertical-align: middle; }
@keyframes rank-position-spin { to { transform: rotate(360deg); } }
.rank-matrix-url a { color: var(--primary); font-size: 13px; font-weight: 700; }

.rank-project-modal-panel { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; }
.rank-project-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rank-project-modal-panel small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.rank-project-checkbox { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rank-project-checkbox input { width: auto; min-height: 0; margin-top: 3px; }
.rank-project-wizard { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 500px; margin: 0 -24px -24px; border-top: 1px solid var(--line); }
.rank-project-wizard-nav { padding: 20px 14px; border-right: 1px solid var(--line); background: #f8fafc; }
.rank-project-wizard-step { position: relative; display: grid; grid-template-columns: 32px 1fr; width: 100%; height: auto; min-height: 58px; padding: 12px 10px; border: 0; border-radius: 12px; background: transparent; color: #64748b; text-align: left; cursor: pointer; }
.rank-project-wizard-step > span { grid-row: 1 / 3; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #94a3b8; border-radius: 50%; background: #fff; color: #0f172a; font-size: 12px; font-weight: 800; }
.rank-project-wizard-step strong { color: #334155; font-size: 13px; line-height: 1.25; }
.rank-project-wizard-step small { margin: 3px 0 0; font-size: 11px; }
.rank-project-wizard-step:hover { background: #f1f5f9; color: #475569; transform: none; box-shadow: none; }
.rank-project-wizard-step.is-active,
.rank-project-wizard-step.is-active:hover { background: #eaf2ff; color: #64748b; transform: none; box-shadow: none; }
.rank-project-wizard-step.is-active > span { border: 2px solid #2563eb; background: #fff; color: #0f172a; }
.rank-project-wizard-step.is-active strong { color: #1d4ed8; }
.rank-project-wizard-step.is-complete > span { border-color: #22c55e; background: #dcfce7; color: #0f172a; }
.rank-project-wizard-main { display: flex; min-width: 0; flex-direction: column; max-height: calc(100vh - 130px); padding: 24px; overflow-y: auto; }
.rank-project-wizard-panel { display: grid; align-content: start; gap: 18px; animation: rank-wizard-panel-in .18s ease-out; }
.rank-project-wizard-panel[hidden],
.rank-project-wizard-main [hidden] { display: none !important; }
.rank-project-form-grid-single { grid-template-columns: minmax(0, 1fr); }
.rank-search-engine-card { border: 1px solid #dbe5f2; border-radius: 16px; background: #f8fbff; padding: 16px; display: grid; gap: 14px; }
.rank-search-engine-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rank-search-engine-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-search-engine-title > span:last-child { display: grid; gap: 2px; }
.rank-search-engine-title small { color: #71819a; font-weight: 500; }
.rank-yandex-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #ef3124; color: #fff; font-weight: 800; font-size: 18px; }
.rank-search-target-list { display: grid; gap: 10px; }
.rank-search-target-row { display: grid; grid-template-columns: minmax(165px, .5fr) minmax(250px, 1fr) minmax(150px, .45fr) 40px; align-items: end; gap: 12px; padding: 12px; border: 1px solid #dbe5f2; border-radius: 13px; background: #fff; }
.rank-region-field { margin: 0; min-width: 0; }
.rank-region-combobox { position: relative; }
.rank-region-suggestions { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); max-height: 230px; overflow-y: auto; padding: 6px; border: 1px solid #d7e2f0; border-radius: 12px; background: #fff; box-shadow: 0 16px 34px rgba(24, 45, 78, .16); }
.rank-region-suggestion { width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 9px 10px; display: flex; justify-content: space-between; gap: 12px; text-align: left; color: #17233a; cursor: pointer; }
.rank-region-suggestion:hover, .rank-region-suggestion:focus-visible { background: #edf4ff; color: #175ee8; outline: 0; }
.rank-region-suggestion span { color: #7a8ba5; }
.rank-region-suggestion-empty { display: block; padding: 10px; color: #7a8ba5; }
.rank-device-picker { min-width: 0; margin: 0; }
.rank-device-picker select { width: 100%; height: 40px; }
.rank-search-target-remove { width: 40px; height: 40px; border: 1px solid #efc8cb; border-radius: 10px; background: #fff; color: #d8323c; font-size: 22px; cursor: pointer; }
.rank-search-target-remove:hover { background: #fff1f2; }
@keyframes rank-wizard-panel-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.rank-project-step-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rank-project-step-head > span { display: inline-flex; margin-bottom: 7px; padding: 4px 8px; border-radius: 999px; background: #eaf2ff; color: #2563eb; font-size: 11px; font-weight: 800; }
.rank-project-step-head h3 { margin: 0; color: var(--text); font-size: 22px; }
.rank-project-step-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.rank-tool-settings { display: grid; border: 1px solid #dbe5f2; border-radius: 14px; overflow: hidden; background: #fff; }
.rank-schedule-grid { display: grid; grid-template-columns: minmax(160px, .6fr) minmax(340px, 1.4fr); gap: 16px; align-items: end; }
.rank-schedule-days { min-width: 0; margin: 0; padding: 0; border: 0; }
.rank-schedule-days legend { margin-bottom: 7px; color: #334155; font-size: 12px; font-weight: 800; }
.rank-schedule-days-hint { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 500; }
.rank-schedule-day-options { display: grid; grid-template-columns: repeat(7, minmax(40px, 1fr)); gap: 8px; }
.rank-schedule-day-options label { position: relative; }
.rank-schedule-day-options input { position: absolute; opacity: 0; pointer-events: none; }
.rank-schedule-day-options span { display: grid; min-height: 42px; place-items: center; border: 1px solid #dbe5f2; border-radius: 10px; background: #fff; color: #475569; font-weight: 800; cursor: pointer; }
.rank-schedule-day-options input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.rank-schedule-day-options input:focus-visible + span { outline: 2px solid #60a5fa; outline-offset: 2px; }
.rank-schedule-note { margin: 0; color: var(--muted); font-size: 13px; }
.rank-tool-setting { position: relative; display: grid; grid-template-columns: minmax(190px, .85fr) minmax(280px, 1.15fr) auto; align-items: center; gap: 16px; min-width: 0; margin: 0; padding: 12px 14px; border: 0; border-bottom: 1px solid #e7edf5; }
.rank-tool-setting:last-child { border-bottom: 0; }
.rank-tool-setting > div:first-child { display: grid; gap: 2px; min-width: 0; }
.rank-tool-setting strong { color: #1e293b; font-size: 13px; }
.rank-tool-setting small { margin: 0; }
.rank-setting-options { display: inline-flex; width: max-content; max-width: 100%; padding: 3px; border: 1px solid #d8e2ef; border-radius: 10px; background: #f8fafc; }
.rank-setting-options > span,
.rank-setting-options label span { display: block; padding: 7px 10px; border-radius: 7px; color: #7b8ba3; font-size: 12px; line-height: 1.2; white-space: nowrap; }
.rank-setting-options .is-selected { background: #e7eef8; color: #52657f; font-weight: 700; }
.rank-setting-options-inputs label { cursor: pointer; }
.rank-setting-options-inputs input { position: absolute; opacity: 0; pointer-events: none; }
.rank-setting-options-inputs label:has(input:checked) span { background: #2569ee; color: #fff; font-weight: 700; box-shadow: 0 3px 9px rgba(37, 105, 238, .2); }
.rank-development-badge { padding: 5px 8px; border-radius: 999px; background: #fff4db; color: #9a6500; font-size: 10px; font-weight: 800; white-space: nowrap; }
.rank-tool-setting.is-unavailable .rank-setting-options { opacity: .62; }
.rank-project-keyword-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; color: var(--muted); font-size: 12px; }
.rank-project-keyword-meta strong { color: #1d4ed8; }
.rank-project-wizard-actions { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); }
.rank-project-wizard-actions [data-rank-project-cancel] { margin-right: auto; }

@media (max-width: 640px) {
    .rank-tracking-head { align-items: stretch; flex-direction: column; }
    .rank-tracking-head .btn { width: 100%; }
    .dashboard-hero.rank-project-hero { align-items: stretch; flex-direction: column; gap: 18px; }
    .rank-project-hero-actions .btn { width: 100%; }
    .rank-tracking-head-actions { align-items: stretch; flex-direction: column; }
    .rank-column-picker summary { text-align: center; }
    .rank-project-list-head { align-items: stretch; flex-direction: column; }
    .rank-view-switch { width: 100%; }
    .rank-view-switch button { flex: 1; }
    .rank-project-form-grid, .rank-project-card dl { grid-template-columns: 1fr; }
    .rank-search-engine-head { align-items: flex-start; flex-direction: column; }
    .rank-search-target-row { grid-template-columns: 1fr; }
    .rank-search-target-remove { justify-self: end; }
    .rank-project-link-form { display: grid; grid-template-columns: 1fr; }
    .rank-project-modal-panel { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 16px; }
    .rank-project-wizard { grid-template-columns: 1fr; min-height: 0; margin: 0 -16px -16px; }
    .rank-project-wizard-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .rank-project-wizard-step { display: flex; min-width: 70px; min-height: 42px; align-items: center; justify-content: center; padding: 8px; }
    .rank-project-wizard-step > span { flex: 0 0 26px; }
    .rank-project-wizard-step strong, .rank-project-wizard-step small { display: none; }
    .rank-project-wizard-main { max-height: calc(100vh - 190px); padding: 18px 16px; }
    .rank-schedule-grid { grid-template-columns: 1fr; }
    .rank-project-wizard-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .rank-project-wizard-actions .btn { width: 100%; }
    .rank-project-wizard-actions [data-rank-project-cancel] { display: none; }
    .rank-tool-setting { grid-template-columns: 1fr; gap: 9px; }
    .rank-setting-options { width: 100%; overflow-x: auto; }
    .rank-development-badge { justify-self: start; }
    .rank-project-actions { align-items: stretch; flex-wrap: wrap; }
    .rank-project-actions .btn { width: 100%; }
    .rank-project-actions form { flex: 1; }
    .rank-project-detail-grid { grid-template-columns: 1fr; }
    .rank-project-settings-form { grid-template-columns: 1fr; }
    .rank-project-settings-form .rank-project-checkbox { grid-column: auto; }
    .rank-keyword-add-form { grid-template-columns: 1fr; }
    .rank-check-overview { grid-template-columns: 1fr 1fr; }
    .rank-check-overview form { grid-column: 1 / -1; }
    .rank-check-overview .btn { width: 100%; }
    .rank-project-section-head { flex-direction: column; }
    .rank-project-section-head > strong { padding-top: 0; }
    .rank-project-detail-grid-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rank-project-detail-grid-top div { padding: 11px; }
    .rank-analytics-toolbar { align-items: stretch; flex-wrap: wrap; }
    .rank-analytics-filter-form { width: 100%; height: auto; }
    .rank-date-range-picker, .rank-date-range-trigger { width: 100%; }
    .rank-date-range-menu { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-height: calc(100vh - 24px); overflow-y: auto; }
    .rank-date-range-calendars { grid-template-columns: 1fr; }
    .rank-date-range-calendars .rank-date-calendar:nth-child(2) { display: none; }
    .rank-toolbar-check-form, .rank-toolbar-check-form .btn { width: 100%; }
    .rank-toolbar-actions { position: relative; width: 100%; margin-left: 0; flex-wrap: wrap; }
    .rank-toolbar-action { flex: 1; }
    .rank-toolbar-popover[open] { position: static; }
    .rank-toolbar-menu { position: absolute; top: calc(100% + 9px); right: 0; bottom: auto; left: 0; width: auto; max-height: calc(100vh - 24px); overflow-y: auto; }
    .rank-settings-panel { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-height: calc(100vh - 24px); overflow-y: auto; }
    .rank-settings-panel .rank-project-settings-form { grid-template-columns: 1fr; }
    .rank-settings-panel .rank-project-settings-form .rank-project-checkbox { grid-column: auto; }
    .rank-search-settings-actions { align-items: stretch; flex-direction: column; }
    .rank-search-settings-actions .btn { width: 100%; }
    .rank-competitor-settings-columns { display: none; }
    .rank-competitor-settings-row { grid-template-columns: minmax(0, 1fr) 66px; }
    .rank-competitor-settings-row input[name$="[name]"] { grid-column: 1 / -1; }
    .rank-competitor-settings-actions { align-items: stretch; flex-direction: column; }
    .rank-competitor-settings-actions .btn { width: 100%; }
    .rank-tool-roadmap { grid-template-columns: 1fr; }
    .rank-segmented { width: 100%; overflow-x: auto; }
    .rank-analytics-cost { flex: 1 1 100%; text-align: center; }
    .rank-keywords-search, .rank-keywords-add-panel { grid-template-columns: 1fr; width: 100%; }
    .rank-keywords-search { display: grid; }
    .rank-analytics-metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); overflow: visible; }
    .rank-analytics-metrics > div { min-width: 0; }
    .rank-competitor-comparison-head { align-items: flex-start; flex-direction: column; gap: 7px; }
    .rank-competitor-comparison-head small { white-space: normal; }
    .rank-competitor-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rank-competitor-badge { min-width: 0; }
    .rank-dynamics-grid { grid-template-columns: 1fr; }
    .rank-dynamics-tabs { display: flex; width: 100%; margin: 0 0 16px; padding: 4px; overflow-x: auto; }
    .rank-dynamics-tabs button { flex: 1 0 112px; }
    .rank-history-chart { height: 190px; }
    .rank-summary-strip { margin: 16px -16px -16px; }
    .rank-project-results { padding-top: 12px; }
    .rank-project-results .rank-project-section-head { padding: 0 12px; }
    .rank-position-matrix th, .rank-position-matrix td { padding: 4px 7px; }
    .rank-position-matrix th:first-child,
    .rank-position-matrix td.rank-matrix-phrase { width: 190px; min-width: 190px; max-width: 190px; }
}

.project-header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.project-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 16px;
    font-weight: 600;
}

.project-schedule-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1D4ED8;
    font-size: 11px;
    font-weight: 700;
}

.project-auto-boost-badge {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.project-individual-boost-badge {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.project-auto-boost-badge-active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.project-schedule-btn-active {
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.project-auto-boost-btn-active {
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}
.project-date { color: #98a5bb; font-size: 11px; }
.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin: 10px 0;
}
.stat-item {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 8px;
    text-align: center;
    background: var(--panel-alt);
}
.project-stats .stat-value {
    font-size: clamp(15px, 1vw, 24px);
}

.project-controls, .form-section, .api-links-content {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}
.project-controls .action-btn, .project-controls .api-toggle-btn { min-width: 84px; }
.user-mode-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: #455976;
    font-size: 11px;
    font-weight: 500;
}

.infinite-toggle, .work-status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    padding: 0 12px;
    margin-bottom: 0;
    line-height: 1;
    white-space: nowrap;
}
.infinite-toggle input, .work-status-toggle input { display: none; }
.toggle-slider {
    width: 42px;
    height: 20px;
    border-radius: 999px;
    background: #d1d9e7;
    position: relative;
}
.toggle-slider:before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    left: 2px;
    top: 2px;
    transition: transform .2s ease;
}
.infinite-toggle input:checked + .toggle-slider,
.work-status-toggle input:checked + .toggle-slider { background: #42bf73; }
.infinite-toggle input:checked + .toggle-slider:before,
.work-status-toggle input:checked + .toggle-slider:before { transform: translateX(20px); }
.infinite-toggle span:last-child, .work-status-toggle span:last-child {
    font-size: 12px;
    font-weight: 500;
    color: #455976;
    line-height: 1;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 7px;
}
.status-active { background: #37c66a; }
.status-stopped { background: #ef4444; }

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #f8fafc; font-size: 12px; }
th { font-weight: 600; color: #334155; }

tbody tr:hover {
    background: #f8fbff;
}

.message, .success-message, .error-message, .warning {
    border-radius: 10px;
    border: 1px solid;
    padding: 10px 12px;
    font-size: 13px;
}
.success-message, .message { background: #effdf4; border-color: #b7f0ca; color: #146c3b; }
.error-message, .error { background: #fff1f2; border-color: #ffcdd2; color: #be123c; }
.warning { background: #fff7e6; border-color: #ffe2a8; color: #9a6700; }

.text-muted { color: var(--muted); }
.small { font-size: 12px; line-height: 1.35; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-success {
    background: var(--ok-soft);
    border-color: #bbf7d0;
    color: #166534;
}
.badge-warning {
    background: #fff7d6;
    border-color: #fde68a;
    color: #92400e;
}
.badge-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}
.badge-neutral {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.webmaster-hero-panel { margin-bottom: 18px; }
.page-head.wm-webmaster-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 20px;
    padding: 22px;
}

.project-webmaster-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 9px;
    border: 1px solid #ffdc50;
    border-radius: 999px;
    background: rgba(255, 220, 80, .12);
    color: #000000;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.project-webmaster-badge:hover {
    border-color: #ffdc50;
    background: rgba(255, 220, 80, .22);
    color: #000000;
}
.wm-webmaster-head__main { min-width: 0; }
.wm-webmaster-head__main h1 { margin: 0; }
.wm-webmaster-head__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}
.wm-webmaster-head__side .page-actions { margin: 0; }
.wm-webmaster-head__side .webmaster-status-pill { min-width: 136px; padding: 12px 16px; }
.wm-head-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.wm-head-stats > div {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 1px 8px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.72);
}
.wm-head-stats > div > span { grid-row: 1 / 3; font-size: 16px; }
.wm-head-stats strong { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 15px; line-height: 1.25; }
.wm-head-stats small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.wm-subscription-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.wm-subscription-compact__copy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 12px;
    min-width: 0;
    color: var(--muted-strong);
    font-size: 12px;
}
.wm-subscription-compact__copy strong { color: var(--ink); font-size: 13px; }
.wm-subscription-compact__copy span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.wm-subscription-compact .wm-subscription-form { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin:0; }
.wm-subscription-compact .btn { white-space: nowrap; }
.panel.webmaster-host-panel {
    padding: 24px;
}
.webmaster-host-panel > .header {
    gap: 12px 24px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.webmaster-host-panel > .header h2 {
    margin: 0;
}
.webmaster-host-panel > p {
    margin: 0 0 20px;
    line-height: 1.6;
}
.webmaster-host-panel .webmaster-hero h2 {
    margin: 4px 0 16px;
}
.webmaster-host-panel .webmaster-hero p {
    margin: 0 0 14px;
    line-height: 1.6;
}
.webmaster-host-panel .webmaster-hero p:last-child {
    margin-bottom: 0;
}
@media (max-width: 640px) {
    .panel.webmaster-host-panel {
        padding: 16px;
    }
}
.webmaster-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.webmaster-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
}
.webmaster-lead {
    margin: 10px 0 0;
    color: var(--muted-strong);
    max-width: 860px;
}
.webmaster-status-pill {
    min-width: 170px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    text-align: center;
}
.webmaster-status-pill strong {
    display: block;
    margin: 8px 0 2px;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
}
.webmaster-status-pill span:last-child {
    color: var(--muted);
    font-size: 12px;
}
.webmaster-config-panel { margin-bottom: 18px; }
.webmaster-config-panel {
    position: relative;
    z-index: 12;
    overflow: visible;
}
.webmaster-config-panel:hover {
    z-index: 18;
}
.webmaster-inline-copy {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.webmaster-inline-copy input {
    flex: 1 1 auto;
    min-width: 0;
}
.webmaster-steps {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid var(--line);
}
.webmaster-steps ol {
    margin: 0;
    padding-left: 18px;
    color: var(--muted-strong);
    display: grid;
    gap: 6px;
}
.webmaster-details summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 600;
}
.webmaster-details pre {
    margin: 10px 0 0;
    padding: 12px;
    max-width: 100%;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.45;
}
.webmaster-json-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.webmaster-json-grid > div {
    min-width: 0;
}
.webmaster-charts-panel {
    margin-bottom: 18px;
}
.webmaster-dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}
.webmaster-dash-layout > .webmaster-dash-card-wide {
    grid-row: 1;
    min-width: 0;
}
.webmaster-dash-layout > .webmaster-summary-card {
    min-width: 0;
}
.webmaster-dash-layout .webmaster-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.webmaster-dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.webmaster-dash-grid-single {
    grid-template-columns: 1fr;
}
.webmaster-dash-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
    box-shadow: var(--shadow);
    min-height: 0;
}
.webmaster-dash-card-wide {
    width: 100%;
}
.webmaster-summary-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
    box-shadow: var(--shadow);
    min-height: 0;
}
.webmaster-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.webmaster-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}
.webmaster-summary-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}
.webmaster-summary-total {
    font-size: 12px;
    font-weight: 700;
    color: var(--blue-dark);
    background: #eef4ff;
    border: 1px solid #d9e4ff;
    border-radius: 999px;
    padding: 5px 8px;
    white-space: nowrap;
}
.webmaster-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.webmaster-summary-chip {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.webmaster-summary-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}
.webmaster-summary-chip-label i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
}
.webmaster-summary-chip strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.1;
}
.webmaster-summary-chip div {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}
.webmaster-dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.webmaster-dash-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}
.webmaster-dash-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}
.webmaster-dash-value {
    font-size: 28px;
    line-height: 1;
    font-weight: 800;
    color: var(--ink);
}
.webmaster-dash-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.webmaster-dash-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}
.webmaster-dash-legend i {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
}
.webmaster-chart-wrap {
    position: relative;
    height: 142px;
    border-radius: 14px;
    overflow: visible;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%),
    linear-gradient(180deg, #f7faff, #eef4ff);
    border: 1px solid #e2e8f0;
}
.webmaster-chart-wrap-combo {
    height: clamp(240px, 24vw, 320px);
}
.webmaster-chart-svg-multi polyline {
    vector-effect: non-scaling-stroke;
    stroke-width: 2;
}
.webmaster-chart-svg-multi circle {
    vector-effect: non-scaling-stroke;
    r: 2;
    stroke-width: 1.5;
}
.webmaster-chart-svg-multi polygon {
    fill-opacity: 0.04;
}
.webmaster-chart-axis {
    display: grid;
    grid-template-columns: repeat(var(--chart-points), minmax(0, 1fr));
    gap: 0;
    margin-top: 6px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    user-select: none;
}
.webmaster-chart-axis span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.webmaster-chart-svg {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}
.webmaster-chart-svg circle {
    pointer-events: none;
}
.webmaster-chart-svg circle.is-active-point {
    stroke-width: 3;
}
.webmaster-chart-guide-line {
    position: absolute;
    top: 12px;
    bottom: 28px;
    width: 1px;
    background: rgba(15, 23, 42, 0.22);
    pointer-events: none;
    z-index: 3;
}
.webmaster-chart-tooltip {
    position: absolute;
    z-index: 4;
    width: max-content;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.94);
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    pointer-events: none;
    transform: translate(0, -50%);
    white-space: nowrap;
    text-align: left;
}
.webmaster-chart-tooltip strong,
.webmaster-chart-tooltip span {
    display: block;
    white-space: nowrap;
}
.webmaster-chart-tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -6px;
    width: 10px;
    height: 10px;
    background: rgba(15, 23, 42, 0.94);
    transform: translateY(-50%) rotate(45deg);
    border-radius: 2px;
}
.webmaster-chart-tooltip[data-side="left"]::after {
    left: auto;
    right: -6px;
}
.webmaster-mini-caption {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}
.webmaster-matrix-wrap {
    overflow-x: auto;
    position: relative;
    z-index: 1;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.webmaster-host-panel .webmaster-matrix th:first-child,
.webmaster-host-panel .webmaster-matrix td:first-child {
    padding-left: 12px;
    padding-right: 12px;
}
.wm-export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.wm-export-controls {
    margin-top: 18px;
}
.wm-export-dropdown {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}
.wm-export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 150px;
    padding: 6px;
    display: grid;
    gap: 4px;
    background: #fff;
    border: 1px solid #d8e2f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(24, 45, 80, .12);
}
.wm-export-menu[hidden] { display: none; }
.wm-export-menu .btn { width: 100%; text-align: left; }
.wm-matrix-sort {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.wm-matrix-sort:hover,
.wm-matrix-sort:active {
    background: transparent;
    color: inherit;
    border-color: transparent;
    box-shadow: none;
    transform: none;
}
.wm-matrix-sort:focus-visible { outline: 2px solid #94a3b8; outline-offset: 3px; border-radius: 3px; }
.wm-export-controls p {
    margin: 12px 0;
    line-height: 1.5;
}
.wm-export-controls [hidden] {
    display: none;
}
.webmaster-matrix {
    min-width: 1520px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}
.webmaster-matrix thead th {
    position: sticky;
    top: 0;
    background: #f8fbff;
    z-index: 1;
    border-bottom: 1px solid #d8e2f0;
    border-right: 1px solid #e7edf6;
    padding: 10px 6px;
    font-size: 11px;
    line-height: 1.15;
}
.webmaster-matrix th,
.webmaster-matrix td {
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid #e7edf6;
    border-right: 1px solid #eff4fb;
}
.webmaster-matrix th:first-child,
.webmaster-matrix td:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    text-align: left;
    min-width: 280px;
    width: 280px;
    max-width: 280px;
    background: #fff;
}
.webmaster-matrix th:nth-child(2),
.webmaster-matrix td:nth-child(2) {
    position: sticky;
    left: 280px;
    z-index: 3;
    min-width: 74px;
    width: 74px;
    max-width: 74px;
    background: #fff;
}
.webmaster-matrix th:nth-child(3),
.webmaster-matrix td:nth-child(3) {
    position: sticky;
    left: 354px;
    z-index: 3;
    min-width: 68px;
    width: 68px;
    max-width: 68px;
    background: #fff;
}
.webmaster-matrix th:nth-child(4),
.webmaster-matrix td:nth-child(4) {
    position: sticky;
    left: 422px;
    z-index: 3;
    min-width: 86px;
    width: 86px;
    max-width: 86px;
    background: #fff;
}
.webmaster-matrix thead th:first-child,
.webmaster-matrix thead th:nth-child(2),
.webmaster-matrix thead th:nth-child(3),
.webmaster-matrix thead th:nth-child(4) {
    background: #f8fbff;
    z-index: 5;
}
.webmaster-matrix tbody td:first-child,
.webmaster-matrix tbody td:nth-child(2),
.webmaster-matrix tbody td:nth-child(3),
.webmaster-matrix tbody td:nth-child(4) {
    box-shadow: 10px 0 14px rgba(15, 23, 42, 0.04);
}
.webmaster-matrix th:nth-child(n + 5),
.webmaster-matrix td:nth-child(n + 5) {
    min-width: 70px;
    width: 70px;
    max-width: 70px;
}
.webmaster-matrix td {
    padding: 6px 4px;
}
.webmaster-matrix td .matrix-cell {
    position: relative;
    min-height: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.webmaster-matrix td .matrix-kv {
    position: absolute;
    bottom: 4px;
    left: 4px;
    margin-top: 0;
    font-size: 7px;
    line-height: 1;
    font-weight: 700;
    color: #84a4b4;
    opacity: 0.9;
    white-space: nowrap;
    pointer-events: none;
}
.webmaster-matrix td .matrix-value {
    display: block;
    font-weight: 700;
    line-height: 1.1;
    padding-top: 3px;
    padding-bottom: 5px;
    font-size: 12px;
}
.webmaster-matrix td small.matrix-delta {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8px;
    opacity: 0.78;
    line-height: 1;
    pointer-events: none;
}
.webmaster-matrix td small.matrix-delta.is-positive {
    color: #16a34a;
}
.webmaster-matrix td small.matrix-delta.is-negative {
    color: #dc2626;
}
.webmaster-matrix td small.matrix-delta.is-neutral {
    color: var(--muted);
}
.webmaster-matrix td.is-hot { background: #dcfce7; color: #166534; }
.webmaster-matrix td.is-good { background: #dbeafe; color: #1d4ed8; }
.webmaster-matrix td.is-mid { background: #fef3c7; color: #92400e; }
.webmaster-matrix td.is-cold { background: #fee2e2; color: #991b1b; }
.webmaster-matrix td.is-empty { background: #f8fafc; color: var(--muted); }
.webmaster-matrix tr.is-selected-row > td,
.webmaster-matrix tr.is-selected-row > th {
    box-shadow: inset 0 0 0 9999px rgba(59, 130, 246, 0.06);
}
.webmaster-matrix td:first-child strong {
    display: block;
    white-space: normal;
    line-height: 1.25;
}
.webmaster-matrix td:first-child a {
    color: #2563eb;
}
.webmaster-matrix td:first-child a:hover {
    text-decoration: underline;
}
.webmaster-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}
.webmaster-filter-grid .form-group {
    margin: 0;
}
.webmaster-filter-grid select,
.webmaster-filter-grid input[type="date"] {
    width: 100%;
}
.webmaster-filter-grid input[type="search"] {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cfdaf0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    padding: 0 12px;
    outline: none;
}
.webmaster-filter-grid input[type="search"]::placeholder {
    color: #94a3b8;
}
.webmaster-filter-grid input[type="search"]:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.webmaster-period-btn {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #cfdaf0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.webmaster-query-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.webmaster-query-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
}
.webmaster-period-btn span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.webmaster-query-filter-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    z-index: 225;
    width: min(380px, calc(100vw - 40px));
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #dbe5f3;
    border-radius: 16px;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.18);
    padding: 14px;
}
.webmaster-query-filter-form {
    display: grid;
    gap: 10px;
}
.webmaster-query-filter-head {
    font-size: 14px;
    font-weight: 700;
}
.webmaster-query-filter-form textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid #dbe5f3;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 12px;
    outline: none;
    font: inherit;
}
.webmaster-query-filter-form textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.webmaster-query-filter-help {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}
.webmaster-query-filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.webmaster-query-filter-actions .btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}
.webmaster-calendar-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    z-index: 220;
    width: min(360px, calc(100vw - 40px));
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #dbe5f3;
    border-radius: 16px;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.18);
    padding: 14px;
}
.webmaster-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.webmaster-calendar-title {
    font-weight: 700;
    font-size: 15px;
    text-transform: capitalize;
}
.webmaster-calendar-nav {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #d6deea;
    background: #f8fbff;
    color: #334155;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.webmaster-calendar-weekdays,
.webmaster-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.webmaster-calendar-weekdays {
    margin-bottom: 8px;
    color: #64748b;
    font-size: 11px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.webmaster-calendar-grid {
    margin-bottom: 12px;
}
.webmaster-calendar-pad {
    height: 34px;
}
.webmaster-calendar-day {
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.webmaster-calendar-day:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateY(-1px);
}
.webmaster-calendar-day.is-disabled,
.webmaster-calendar-day:disabled {
    background: #f8fafc;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.65;
}
.webmaster-calendar-day.is-selected {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}
.webmaster-calendar-day.is-range-start,
.webmaster-calendar-day.is-range-end {
    background: #3b82f6;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.18);
}
.webmaster-calendar-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.webmaster-calendar-footer .btn {
    flex: 1 1 auto;
}
.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.pagination a {
    min-width: 36px;
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfdaf0;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}
.pagination a.active {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}
.empty-state {
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 980px) {
    .page-head.wm-webmaster-head { grid-template-columns: 1fr; }
    .wm-webmaster-head__side { flex-direction: row; align-items: center; }
    .wm-head-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .wm-subscription-compact { align-items:flex-start; flex-direction:column; }
    .wm-subscription-compact .wm-subscription-form { justify-content:flex-start; }
    .webmaster-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .webmaster-status-pill {
        min-width: 0;
        width: 100%;
    }
    .webmaster-inline-copy {
        flex-direction: column;
    }
    .webmaster-inline-copy .btn {
        width: 100%;
    }
    .webmaster-json-grid {
        grid-template-columns: 1fr;
    }
    .webmaster-dash-grid {
        grid-template-columns: 1fr;
    }
    .webmaster-dash-layout {
        grid-template-columns: 1fr;
    }
    .webmaster-filter-grid {
        grid-template-columns: 1fr;
    }
    .webmaster-summary-grid {
        grid-template-columns: 1fr;
    }
}

.load-more-section { text-align: center; margin-top: 10px; }
.load-more-btn { background: #1f2937; color: #fff; }

.main-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: #f8fbff;
}
.footer-container { padding: 12px 18px; }
.footer-content {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.footer-section h4 { margin: 0 0 6px; font-size: 12px; color: #5d7192; font-weight: 500; }
.footer-section p, .footer-links a { margin: 0; font-size: 12px; color: #8190a8; font-weight: 400; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-bottom {
    margin-top: 8px;
    border-top: 1px solid var(--line);
    padding-top: 8px;
    font-size: 11px;
    color: #93a0b5;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(900px 560px at 20% 8%, rgba(76, 111, 255, 0.18), transparent 60%),
        radial-gradient(760px 460px at 80% 14%, rgba(69, 161, 255, 0.14), transparent 62%),
        linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%);
}
.auth-card {
    width: min(460px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.auth-title { font-size: 32px; font-weight: 600; }
.auth-subtitle { color: var(--muted); font-weight: 400; }

.auth-page-modern {
    padding: 24px;
}

.auth-shell {
    width: min(1200px, 100%);
}

.auth-modern-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.auth-modern-info,
.auth-modern-form {
    border: 1px solid #d8e5f9;
    border-radius: 24px;
    background: linear-gradient(145deg, #ffffff, #f7fbff);
    box-shadow: 0 18px 42px rgba(39, 76, 160, 0.14);
    padding: 34px 36px;
    color: #1f2f4f;
}

.auth-modern-info {
    position: relative;
    overflow: hidden;
}

.auth-modern-info::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(360px 200px at 60% 40%, rgba(82, 143, 255, 0.18), transparent 70%);
    pointer-events: none;
}

.auth-modern-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #1c325a;
    margin-bottom: 18px;
}

.auth-modern-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #bfd8ff;
    background: #eaf3ff;
    color: #356fd3;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .05em;
}

.auth-modern-info h1 {
    font-size: 50px;
    line-height: 1.08;
    color: #1e3257;
    margin: 22px 0 14px;
}

.auth-modern-info h1 span {
    color: #2f80ed;
}

.auth-modern-info p {
    margin: 0 0 22px;
    color: #60789f;
    font-size: 17px;
    max-width: 560px;
}

.auth-modern-features {
    display: grid;
    gap: 10px;
}

.auth-modern-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d8e5f9;
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8fbff;
    color: #334c72;
    font-size: 16px;
    font-weight: 520;
}

.auth-modern-feature span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #e7f0ff;
}

.auth-modern-form h2 {
    margin: 0;
    font-size: 42px;
    color: #1f3459;
}

.auth-modern-sub {
    margin: 8px 0 24px;
    color: #6b84aa;
    font-size: 17px;
}

.auth-modern-form label {
    color: #45608a;
    font-size: 15px;
}

.auth-modern-form input {
    height: 52px;
    border-radius: 14px;
    border: 1px solid #cfe0f8;
    background: #fff;
    color: #22395f;
    font-size: 16px;
}

.auth-modern-form input::placeholder {
    color: #8ea4c7;
}

.auth-modern-form input:focus {
    border-color: #438dff;
    box-shadow: 0 0 0 3px rgba(67, 141, 255, 0.22);
}

.auth-button-wide {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    margin-top: 8px;
    font-size: 17px;
}

.auth-modern-divider {
    margin: 18px 0 12px;
    text-align: center;
    color: #8ca1c2;
    text-transform: lowercase;
}

.auth-links {
    color: #7f93b4;
    text-align: center;
    font-size: 15px;
}

.auth-modern-form form + .auth-links {
    margin-top: 16px;
}

.auth-links a {
    color: #2f80ed;
    font-weight: 650;
}

.auth-credit {
    margin: 16px auto 24px;
    padding: 0 16px;
    text-align: center;
    color: #7f93b4;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-credit a {
    color: #2f80ed;
    font-weight: 650;
    text-decoration: none;
}

.auth-credit a:hover {
    text-decoration: underline;
}

.auth-credit-community {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-credit-community svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.muted {
    color: #7e95bc;
    font-size: 12px;
}

@media (max-width: 1200px) {
    .clicks-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .clicks-filters-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 760px) {
    .clicks-hero-head,
    .clicks-panel-head,
    .clicks-results-head,
    .queue-hero-head,
    .queue-panel-head {
        flex-direction: column;
    }
    .clicks-hero-stats {
        grid-template-columns: 1fr;
    }
    .clicks-filters-grid {
        grid-template-columns: 1fr;
    }
    .clicks-filters-actions {
        width: 100%;
    }
    .clicks-filters-panel,
    .clicks-results-panel,
    .queue-filters-panel,
    .queue-results-panel,
    .queue-day-panel,
    .queue-meta-panel {
        padding: 18px;
    }
    .queue-meta-grid {
        grid-template-columns: 1fr;
    }
    .queue-filters-actions {
        width: 100%;
    }
    .queue-filters-actions .btn {
        width: 100%;
    }
    .queue-pagination,
    .queue-pagination-meta,
    .queue-pagination-actions,
    .queue-inline-form {
        width: 100%;
    }
}

.wallet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    z-index: 1700;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wallet-modal {
    width: min(700px, 100%);
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 14px 14px 12px;
}
.wallet-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.wallet-empty-clicks {
    width: min(700px, 100%);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 20px;
}
.wallet-empty-clicks-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}
.wallet-empty-clicks-mascot {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.wallet-empty-clicks #empty-clicks-description > p:first-child {
    margin-top: 0;
}
.wallet-empty-clicks .wallet-note {
    margin-bottom: 0;
}
@media (max-width: 600px) {
    .wallet-empty-clicks {
        padding: 16px;
    }
    .wallet-empty-clicks-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .wallet-empty-clicks-mascot {
        width: 160px;
        margin: 0 auto;
    }
    .wallet-empty-clicks .wallet-actions > * {
        flex: 1 1 auto;
        text-align: center;
    }
}
.wallet-close {
    border: 0;
    background: transparent;
    color: #8f9ab2;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    min-width: 0;
    width: auto;
    height: auto;
}
.wallet-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #cde0ff;
    border-radius: 9px;
    background: #edf5ff;
    color: #2f80ed;
}
.wallet-note-compact {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.35;
}
.wallet-note-compact a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hint-tip-btn {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    border: 1px solid #b7f0ca;
    background: #ecfdf3;
    color: #178a46;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: inline-grid;
    place-items: center;
    cursor: help;
    position: relative;
}

.hint-tip-btn::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    top: auto;
    min-width: 360px;
    max-width: 460px;
    white-space: pre-line;
    text-align: left;
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    z-index: 2200;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    transition: opacity .15s ease;
}

.hint-tip-btn:hover::after,
.hint-tip-btn:focus-visible::after {
    opacity: 1;
}

#keys-bulk-count {
    height: 38px;
    display: inline-flex;
    align-items: center;
}
.wallet-modal .form-group {
    margin: 0 0 12px;
}
.wallet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.welcome-card, .about-card {
    border: 1px solid #F1F5F9;
    border-radius: 14px;
    padding: 20px;
    background: #fff;
    min-height: 124px;
    box-shadow: var(--shadow);
}
.welcome-card {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 12px;
}
.welcome-card h1 { margin: 0; font-size: 30px; font-weight: 600; }
.welcome-card p { margin: 2px 0 0; color: var(--muted); }
.welcome-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0f172a;
    color: #fff;
    font-weight: 600;
}
.about-card {
    display: grid;
    align-content: center;
    gap: 6px;
}
.about-card h3 {
    margin: 0;
    font-size: 32px;
}
.about-card p {
    margin: 0;
    color: var(--muted);
}
.about-links {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.dashboard-stats-grid .stat-card {
    min-height: 92px;
    display: grid;
    align-content: center;
}

.dashboard-projects-mobile-list {
    display: none;
}

.dashboard-project-mobile-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.dashboard-project-mobile-title {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: #0f172a;
}

.dashboard-project-mobile-group {
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}

.dashboard-project-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-project-mobile-metric {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 8px;
    display: grid;
    gap: 4px;
}

.dashboard-project-mobile-metric span {
    font-size: 11px;
    color: #64748b;
}

.dashboard-project-mobile-metric strong {
    font-size: 14px;
    line-height: 1.2;
    color: #0f172a;
}

.dashboard-project-mobile-metric-plan {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.dashboard-project-mobile-metric-plan strong {
    color: #1d4ed8;
}

.dashboard-project-mobile-metric-today {
    background: #fff7ed;
    border-color: #fed7aa;
}

.dashboard-project-mobile-metric-today strong {
    color: #c2410c;
}

.dashboard-project-mobile-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #dcfce7;
}

.dashboard-project-mobile-status.status-stopped {
    color: #b91c1c;
    background: #fee2e2;
}

.dashboard-project-mobile-status.status-active {
    color: #166534;
    background: #dcfce7;
}

.dashboard-project-mobile-empty {
    padding: 10px;
    color: #64748b;
    font-size: 13px;
}

.dashboard-projects-table td {
    vertical-align: middle;
}

.dashboard-project-table-project-name {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
    color: #0f172a;
}

.dashboard-project-table-project-group {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.25;
    color: #64748b;
}

.dashboard-project-table-metric {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    min-width: 118px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    gap: 2px;
}

.dashboard-project-table-metric-label {
    font-size: 11px;
    line-height: 1;
    color: #64748b;
}

.dashboard-project-table-metric strong {
    font-size: 14px;
    line-height: 1.2;
    color: #0f172a;
}

.dashboard-project-table-metric-plan {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.dashboard-project-table-metric-plan strong {
    color: #1d4ed8;
}

.dashboard-project-table-metric-today {
    background: #fff7ed;
    border-color: #fed7aa;
}

.dashboard-project-table-metric-today strong {
    color: #c2410c;
}

.dashboard-projects-table .status-badge {
    min-height: 28px;
    padding: 0 12px;
}

/* Reusable UI KIT helpers for future components */
.ui-card {
    background: #fff;
    border: 1px solid #F1F5F9;
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.ui-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.profile-settings {
    display: grid;
    gap: 20px;
}

.profile-settings > h1,
.profile-settings > .ui-card > h2,
.profile-settings > .ui-card > p {
    margin: 0;
}

.profile-settings > .ui-card,
.profile-settings form {
    display: grid;
    gap: 16px;
}

.profile-settings > .ui-card > p {
    line-height: 1.5;
}

.profile-settings .form-group {
    margin: 0;
}

.profile-settings form .btn {
    justify-self: start;
    margin: 0;
}

.ui-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ui-status-chip--ok { background: var(--ok-soft); color: var(--ok-strong); }
.ui-status-chip--warning { background: var(--warn-soft); color: var(--warn-strong); }
.ui-status-chip--muted { background: var(--status-muted-soft); color: var(--status-muted-strong); }

.ui-switch-button {
    position: relative;
    width: 44px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--muted-soft);
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease;
}

.ui-switch-button span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--panel);
    box-shadow: var(--switch-thumb-shadow);
    transition: transform .18s ease;
}

.ui-switch-button.is-on { background: var(--brand); }
.ui-switch-button.is-on span { transform: translateX(20px); }
.ui-switch-button:hover { box-shadow: 0 4px 12px var(--switch-brand-shadow); }
.ui-switch-button:focus-visible { outline: 3px solid var(--switch-brand-focus); outline-offset: 2px; }

.profile-email-notifications {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.profile-email-notifications__copy { min-width: 0; }
.profile-email-notifications__title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-email-notifications h3 { margin: 0; }
.profile-email-notifications p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.profile-notification-form { display: block !important; flex: 0 0 auto; }

@media (max-width: 760px) {
    .profile-settings {
        gap: 16px;
    }

    .profile-settings > .ui-card {
        padding: 16px;
    }

    .profile-settings form .btn {
        width: 100%;
    }

    .profile-email-notifications { align-items: flex-start; }
}

.ui-kpi-value {
    font-size: clamp(28px, 2vw, 32px);
    line-height: 1;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ui-kpi-label {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.dashboard-hero {
    display: block;
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid #dbe7f6;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-hero-copy {
    min-width: 0;
}

.dashboard-hero-eyebrow,
.dashboard-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dashboard-hero-title {
    margin: 12px 0 10px;
    font-size: clamp(26px, 2.2vw, 34px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.dashboard-hero-text {
    max-width: 760px;
    color: var(--muted-strong);
    line-height: 1.65;
}

.projects-hero {
    margin-bottom: 16px;
}

.projects-hero-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.projects-hero-actions {
    flex-shrink: 0;
}

.dashboard-stats-shell {
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 166px;
}

.dashboard-stat-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    opacity: 0.6;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
    pointer-events: none;
}

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

.dashboard-stat-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #f8fbff;
    font-size: 22px;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.dashboard-stat-card-projects .dashboard-stat-icon,
.dashboard-stat-card-projects .dashboard-stat-badge {
    background: #eef2ff;
    color: #1d4ed8;
}

.dashboard-stat-card-planned .dashboard-stat-icon,
.dashboard-stat-card-planned .dashboard-stat-badge {
    background: #effdf5;
    color: #15803d;
}

.dashboard-stat-card-today .dashboard-stat-icon,
.dashboard-stat-card-today .dashboard-stat-badge {
    background: #fff7ed;
    color: #c2410c;
}

.dashboard-stat-card-boosts .dashboard-stat-icon,
.dashboard-stat-card-boosts .dashboard-stat-badge {
    background: #eef2ff;
    color: #4338ca;
}

.dashboard-projects-shell-card {
    padding: 24px;
    border: 1px solid #e8eef7;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.55), #ffffff 22%);
}

.dashboard-projects-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-projects-head-copy h2 {
    margin: 10px 0 6px;
}

.dashboard-projects-head-meta {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-projects-head-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.services-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e8eef7;
    box-shadow: var(--shadow);
}

.services-hero-copy {
    max-width: 760px;
}

.services-hero-copy h1 {
    margin-bottom: 8px;
}

.services-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.services-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.services-hero-note {
    font-size: 12px;
    max-width: 220px;
    text-align: right;
    color: var(--muted);
}

.services-section {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.services-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 2px 4px;
}

.services-list {
    display: grid;
    gap: 14px;
}

.service-card {
    background: #fff;
    border: 1px solid #e8eef7;
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 22px 24px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #dbe7f6;
}

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

.service-card-copy h2 {
    margin-bottom: 6px;
}

.service-card-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.service-card-price {
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
    color: var(--brand);
    white-space: nowrap;
}

.service-card-description {
    margin: 12px 0 14px;
    color: var(--muted-strong);
    line-height: 1.6;
}

.service-card-bullets {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.service-card-bullets li {
    position: relative;
    padding-left: 20px;
    color: var(--text);
    line-height: 1.55;
}

.service-card-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.service-features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.service-feature {
    border-radius: 14px;
    border: 1px solid #e8eef7;
    background: #f8fbff;
    padding: 16px;
}

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

.service-feature-head strong {
    color: var(--text);
    font-size: 14px;
}

.service-feature-head span {
    color: var(--brand);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.service-feature-text {
    color: var(--muted);
    line-height: 1.6;
}

.services-footer {
    margin-top: 22px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e8eef7;
    box-shadow: var(--shadow);
}

.services-footer p {
    margin: 0;
    line-height: 1.7;
}

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

@media (max-width: 900px) {
    .services-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .services-hero-actions {
        align-items: flex-start;
    }

    .services-hero-note {
        text-align: left;
        max-width: none;
    }
}

.page-breadcrumb {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}
.payments-filters {
    margin-bottom: 10px;
}
.payments-search {
    min-width: 280px;
    flex: 1;
}

.payments-mobile-list {
    display: none !important;
}

.payments-mobile-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.payments-mobile-user {
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
}

.payments-mobile-type {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.payments-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.payments-mobile-grid div {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 8px;
    display: grid;
    gap: 3px;
}

.payments-mobile-grid span {
    font-size: 11px;
    color: #64748b;
}

.payments-mobile-grid strong {
    font-size: 13px;
    line-height: 1.25;
    color: #0f172a;
}

.payments-mobile-comment {
    font-size: 12px;
    color: #475569;
    line-height: 1.35;
}

.payments-mobile-empty {
    padding: 10px;
    color: #64748b;
    font-size: 13px;
}

.clicks-chart-panel .stats-grid .stat-card {
    min-height: 96px;
}

.clicks-shell #clicks-shell-content:not([hidden]) {
    display: grid;
    gap: 18px;
}

#positions-shell-content:not([hidden]) {
    display: grid;
    gap: 24px;
}

.clicks-hero {
    margin-bottom: 0;
}

.clicks-hero-head,
.clicks-panel-head,
.clicks-results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.clicks-hero-actions {
    flex-shrink: 0;
}

.clicks-hero-stats {
    margin-top: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.clicks-hero-stats > .clicks-summary-card {
    min-width: 0;
}

@media (max-width: 1200px) {
    .clicks-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .clicks-hero-stats {
        grid-template-columns: 1fr;
    }
}

.clicks-summary-card {
    min-height: 158px;
    position: relative;
    overflow: hidden;
}

.clicks-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.clicks-summary-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 20px;
    background: #f8fbff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.clicks-summary-card-clicked .clicks-summary-icon,
.clicks-summary-card-clicked .dashboard-stat-badge {
    background: #effdf5;
    color: #15803d;
}

.clicks-summary-card-found .clicks-summary-icon,
.clicks-summary-card-found .dashboard-stat-badge {
    background: #eef2ff;
    color: #1d4ed8;
}

.clicks-summary-card-events .clicks-summary-icon,
.clicks-summary-card-events .dashboard-stat-badge {
    background: #fff7ed;
    color: #c2410c;
}

.clicks-section-head .header,
.clicks-results-panel .header,
.clicks-shell #clicks-shell-content > .page-head {
    display: none;
}

.clicks-chart-panel .stats-grid,
.clicks-chart-panel .header + .stats-grid + .text-muted {
    display: none;
}

.clicks-panel-head {
    margin-bottom: 14px;
}

.clicks-panel-head h2 {
    margin: 0 0 6px;
}

.clicks-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.clicks-chart-note {
    margin-bottom: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.chart-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #F1F5F9;
    border-radius: 12px;
    background: #fff;
    padding: 10px 10px 4px;
}

.chart-wrap canvas {
    display: block;
    max-width: 100%;
}

.clicks-filters-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
    min-width: 0;
    max-width: 100%;
}

.clicks-filters-actions {
    display: flex;
    gap: 8px;
}

.clicks-filters-panel,
.clicks-results-panel {
    padding: 22px 24px;
}

.clicks-filters-grid {
    padding: 16px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.7), #ffffff);
}

.clicks-filters-grid .form-group,
.clicks-filters-grid input,
.clicks-filters-grid select,
.clicks-filters-grid textarea {
    min-width: 0;
}

.clicks-table-wrap {
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #fff;
}

.clicks-results-table th {
    white-space: nowrap;
}

.clicks-results-table td {
    vertical-align: top;
}

.clicks-cell-title,
.clicks-cell-domain,
.clicks-cell-profile {
    font-weight: 600;
    color: var(--text);
}

.clicks-cell-query {
    min-width: 220px;
    line-height: 1.45;
    color: var(--text);
}

.clicks-url-link {
    display: block;
    width: 220px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--brand);
    text-decoration: none;
}

.clicks-url-link:hover {
    text-decoration: underline;
}

.clicks-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.clicks-status-badge.is-ok {
    background: #ecfdf3;
    color: #15803d;
}

.clicks-status-badge.is-muted {
    background: #f1f5f9;
    color: #475569;
}

.queue-shell #queue-shell-content:not([hidden]),
.queue-shell #queue-core-content:not([hidden]) {
    display: grid;
    gap: 24px;
}

.queue-hero {
    margin-bottom: 0;
}

.queue-hero-head,
.queue-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.queue-hero-actions {
    flex-shrink: 0;
}

.queue-shell #queue-shell-content > .page-head,
.queue-results-panel .header {
    display: none;
}

.queue-note {
    margin: 0;
}

.queue-filters-panel,
.queue-results-panel,
.queue-day-panel,
.queue-meta-panel {
    padding: 22px 24px;
}

.queue-panel-head {
    margin-bottom: 14px;
}

.queue-panel-head h2 {
    margin: 0 0 6px;
}

.queue-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.queue-filters-grid {
    padding: 16px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.7), #ffffff);
}

.queue-filters-actions {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.queue-results-panel .table-container {
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #fff;
}

.queue-day-panel .table-container,
.queue-profiles-panel .table-container {
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #fff;
}

.queue-kpi-shell {
    margin-bottom: 18px;
}

.queue-kpi-sections {
    display: grid;
    gap: 16px;
}

.queue-kpi-section {
    --queue-kpi-accent: #64748b;
    position: relative;
    min-width: 0;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #f8fafc;
}

.queue-kpi-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--queue-kpi-accent);
}

.queue-kpi-section--normal {
    --queue-kpi-accent: #2563eb;
    background: #f8fbff;
}

.queue-kpi-section--boost {
    --queue-kpi-accent: #f59e0b;
    background: #fffcf5;
}

.queue-kpi-section--delivery {
    --queue-kpi-accent: #64748b;
}

.queue-kpi-section-title {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.queue-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.queue-kpi-card {
    min-height: 138px;
    background: #fff;
}

@media (max-width: 640px) {
    .queue-kpi-section {
        padding: 14px;
    }

    .queue-kpi-section .queue-kpi-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .queue-kpi-section .queue-kpi-card {
        min-height: 0;
    }
}

.queue-meta-panel {
    margin-bottom: 18px;
}

.queue-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.queue-meta-card {
    padding: 20px;
}

.queue-mini-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.queue-forecast-box {
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #ffffff);
    line-height: 1.6;
}

.queue-meta-note {
    margin-top: 12px;
}

.queue-profiles-panel {
    padding: 20px;
}

.queue-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.queue-hour-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.queue-hour-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.queue-hour-chip--base {
    background: #e2e8f0;
    color: #334155;
}

.queue-hour-chip--debt {
    background: #dbeafe;
    color: #1d4ed8;
}

.queue-hour-chip--recovery {
    background: #dcfce7;
    color: #166534;
}

.queue-cell-url {
    overflow-wrap: anywhere;
}

.queue-status-badge,
.queue-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.queue-status-badge--muted {
    background: #f1f5f9;
    color: #475569;
}

.queue-status-badge--info {
    background: #dbeafe;
    color: #1d4ed8;
}

.queue-status-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.queue-status-badge--success {
    background: #dcfce7;
    color: #166534;
}

.queue-status-badge--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.queue-type-pill {
    background: #eff6ff;
    color: #1d4ed8;
}

.queue-type-pill--boost {
    background: #fff7ed;
    color: #c2410c;
}

.queue-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0 2px;
}

.queue-pagination-meta,
.queue-pagination-actions,
.queue-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.users-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.users-filters-panel,
.users-table-panel {
    margin-bottom: 14px;
}

.users-filters-row,
.users-filters-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.users-filters-form {
    flex: 1 1 auto;
}

.users-filter-search {
    min-width: 260px;
}

.capacities-filters-panel,
.capacities-rows-panel {
    margin-bottom: 14px;
}

.capacities-filters-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px 10px;
    align-items: end;
}

.capacities-filter-search {
    grid-column: span 5;
}

.capacities-filter-actions {
    grid-column: span 2;
    display: flex;
    gap: 8px;
    align-items: end;
}

.capacity-page-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 16px;
}

.capacity-page-note > div {
    display: grid;
    gap: 3px;
}

.capacity-page-note > a {
    white-space: nowrap;
    font-weight: 700;
}

.queue-kpi-note {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), #ffffff);
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

.queue-kpi-note span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.queue-meta-compact-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.55;
}

.pos-cell-btn {
    height: 28px;
    min-width: 46px;
    padding: 0 8px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.pos-cell-btn:hover {
    background: #dbeafe;
}
.payments-topup {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    overflow: visible;
    min-width: 0;
    max-width: 100%;
}
.payments-topup h2 {
    margin: 0 0 10px;
    font-size: 18px;
}
.payment-methods {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}
.payment-method-card {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid #dce6f5;
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
}
.payment-method-card > div {
    min-width: 0;
}

.panel-alt {
    background: #fff;
    border: 1px solid #F1F5F9;
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.payment-method-card:has(input:checked) {
    border-color: #9ebcfb;
    box-shadow: 0 0 0 3px rgba(76, 111, 255, 0.12);
}
.payment-method-title {
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.payment-method-sub {
    color: #6f7f9c;
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.payments-topup-controls {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.payments-topup-controls .form-group {
    min-width: 280px;
    margin: 0;
}

.payments-filters,
.payments-filters .form-group,
.payments-search {
    min-width: 0;
    max-width: 100%;
}

.payments-table-wrap {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.payments-table-rail {
    width: max-content;
    min-width: 100%;
}

.payments-table {
    min-width: 1040px;
    width: 100%;
    table-layout: auto;
}

.payments-table th,
.payments-table td {
    white-space: nowrap;
}

.payments-table .pay-col-comment {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payments-scroll-hint {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px dashed #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 12px;
    line-height: 1.3;
}

.keys-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.page-head:has(+ .keys-hero) {
    display: none;
}

.keys-hero {
    margin-bottom: 18px;
}

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

.keys-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.keys-hero-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.keys-hero-stat {
    padding: 14px 16px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), #ffffff);
    min-width: 0;
}

.keys-hero-stat span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
}

.keys-hero-stat strong {
    display: block;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.keys-filters-panel,
.keys-results-panel {
    padding: 22px 24px;
}

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

.keys-panel-head h2 {
    margin: 0 0 6px;
}

.keys-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.keys-filters-grid > .form-group {
    min-width: 0;
    max-width: 100%;
}

.keys-filters-grid input,
.keys-filters-grid select,
.keys-filters-grid textarea {
    min-width: 0;
}

.keys-table-wrap {
    padding-top: 8px;
    position: relative;
    padding-bottom: 92px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.keys-table-wrap .table-container {
    display: block;
    overflow-x: scroll;
    overflow-y: hidden;
    padding-bottom: 8px;
    max-width: 100%;
    width: 100%;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
}

.keys-table-wrap .table-container::-webkit-scrollbar { height: 10px; }
.keys-table-wrap .table-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.keys-table-wrap .table-container::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 999px; }

.keys-modern-table {
    min-width: 1280px;
}

.keys-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
    position: relative;
}

.keys-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
}

.keys-pagination-meta,
.keys-pagination-actions,
.keys-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.columns-popover {
    position: absolute;
    top: 36px;
    right: 0;
    z-index: 20;
    width: 240px;
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(30, 48, 90, 0.16);
    padding: 10px;
    display: grid;
    gap: 8px;
}

.columns-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.columns-popover label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #334866;
    cursor: grab;
    user-select: none;
}

.columns-popover input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.columns-popover label.dragging {
    opacity: 0.5;
}

.keys-modern-table thead th {
    position: relative;
}

.col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
}

.col-resizer:hover {
    background: rgba(76, 111, 255, 0.2);
}

.keys-modern-table th,
.keys-modern-table td {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 6px;
}

.keys-modern-table th:first-child,
.keys-modern-table td:first-child {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    text-align: center;
    padding-left: 6px;
    padding-right: 6px;
}

.keys-modern-table .col-query {
    min-width: 220px;
    white-space: normal;
}

.keys-modern-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    vertical-align: middle;
}

.keys-modern-table .k-col-url {
    min-width: 190px;
}

.keys-modern-table .k-col-url input {
    min-width: 170px;
}

.keys-modern-table .k-col-actions {
    min-width: 220px;
}

.keys-modern-table input[type="text"] {
    width: 100%;
    min-width: 140px;
}

.keys-modern-table td:last-child .actions {
    flex-wrap: nowrap;
}

.keys-modern-table td:last-child .btn {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
}

.b-actionbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    z-index: 1200;
    width: min(1400px, calc(100vw - 24px));
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.status-active {
    background: #ecfdf3;
    color: #178a46;
}

.status-badge.status-stopped {
    background: #fff1f2;
    color: #be123c;
}

.empty-state-cell {
    text-align: center;
    padding: 36px 12px;
}

.empty-state {
    color: #8695ad;
    font-size: 14px;
}

.keys-import-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
}

.keys-modal,
.keys-boost-modal {
    min-width: 0;
}

.keys-modal-mode-switch {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.keys-modal-card,
.keys-boost-card {
    padding: 14px;
}

.keys-modal-card-head {
    margin-bottom: 12px;
}

.keys-modal-card-head h4 {
    margin: 0 0 6px;
    font-size: 15px;
}

.keys-modal-card-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 13px;
}

.keys-modal-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.keys-modal-actions {
    margin-top: auto;
}

.keys-boost-card {
    margin-bottom: 12px;
}

.keys-boost-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    align-items: center;
}

.keys-boost-preset {
    padding: 0 10px;
    height: 30px;
}

@media (max-width: 980px) {
    .keys-import-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1320px) {
    .keys-filters-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 980px) {
    .keys-filters-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
    .keys-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .keys-filters-grid {
        grid-template-columns: 1fr;
    }
    .keys-hero-head {
        flex-direction: column;
    }
    .keys-hero-actions,
    .keys-hero-stats {
        width: 100%;
    }
    .keys-hero-stats {
        grid-template-columns: 1fr;
    }
    .keys-filters-panel,
    .keys-results-panel {
        padding: 18px;
    }
    .keys-panel-head,
    .keys-pagination,
    .keys-pagination-meta,
    .keys-pagination-actions,
    .keys-inline-form {
        width: 100%;
    }
}

.create-project-big-btn {
    display: block;
    width: 100%;
    border-radius: 12px;
    height: 44px;
    background: #22c55e;
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 44px;
    letter-spacing: .02em;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.create-project-big-btn:hover {
    background: #16a34a;
    color: #fff;
    transform: translateY(-1px);
}

.quickstart-page {
    display: block;
}
.quickstart-main {
    min-height: 520px;
}
.wizard-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin: 8px 0 14px;
}
.wizard-line {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 16px;
    height: 2px;
    background: #cfd7e5;
}
.wizard-step {
    position: relative;
    z-index: 1;
    text-align: center;
}
.wizard-step span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #9aa9c2;
    color: #6b7c99;
    background: #fff;
    font-weight: 700;
}
.wizard-step em {
    display: block;
    margin-top: 6px;
    font-style: normal;
    color: #8a98b0;
    font-weight: 600;
}
.wizard-step.active span,
.wizard-step.done span {
    border-color: #66bb4b;
    color: #66bb4b;
}
.wizard-step.active em,
.wizard-step.done em {
    color: #66bb4b;
}
.wizard-pane { display: none; }
.wizard-pane.active { display: block; }
.quickstart-form .wizard-pane > .form-group {
    margin-bottom: 18px;
}
.quickstart-form .wizard-pane > .form-group > label:first-child {
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}
.wizard-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.wizard-counter {
    margin-top: 8px;
    color: #607393;
}
.check-row {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.progress {
    height: 14px;
    border-radius: 8px;
    background: #e1e7f2;
    overflow: hidden;
}
.progress > div {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #3d8fff, #5ba7ff);
    transition: width .2s ease;
}
.panel-alt {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: #f8fbff;
}
.region-picker {
    position: relative;
}
.region-selected-list {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.region-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 7px 5px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    font-weight: 600;
}
.region-selected-chip button {
    display: inline-grid;
    place-items: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e40af;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.region-selected-chip button:hover {
    background: #bfdbfe;
}
.region-selection-preview {
    margin-top: 7px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
}
.region-selection-preview.is-empty {
    color: #dc2626;
}
.region-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow: auto;
    border: 1px solid #d8e3f3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    z-index: 50;
}
.region-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #eef3fb;
    background: #fff;
    color: #334155;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    height: auto;
}
.region-item:hover {
    background: #f3f8ff;
}
.region-item.is-selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}
.region-item-check {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
    border: 1px solid #b8c7dc;
    border-radius: 5px;
    background: #fff;
    color: #fff;
    font-size: 12px;
}
.region-item.is-selected .region-item-check {
    border-color: #2563eb;
    background: #2563eb;
}
.region-item.muted {
    color: #8ea0be;
    cursor: default;
}
.region-section-title {
    padding: 8px 12px;
    background: #f3f7ff;
    border-bottom: 1px solid #e3ecfb;
    color: #3f5f95;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
    .project-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
    .quickstart-page { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
    .dashboard-shell { margin: 0; border-radius: 0; max-width: none; border-left: 0; border-right: 0; }
    .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
    .dashboard-shell { flex-direction: column; }
    .dashboard-hero-grid { grid-template-columns: 1fr; }
    .check-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .stats-grid, .project-stats { grid-template-columns: 1fr 1fr; }
    .content-wrap { padding: 12px; }
    h1 { font-size: 24px; }
}
@media (max-width: 480px) {
    html,
    body {
        overflow-x: hidden;
    }
    .dashboard-shell {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1600;
        width: min(276px, calc(100vw - 36px));
        max-width: calc(100vw - 36px);
        border-right: 1px solid var(--line);
        border-bottom: 0;
        padding: 12px 10px 14px;
        gap: 10px;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }
    body.mobile-menu-open .sidebar {
        transform: translateX(0);
    }
    .mobile-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1500;
        background: rgba(15, 23, 42, 0.36);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    body.mobile-menu-open .mobile-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }
    body.mobile-menu-open {
        overflow: hidden;
    }
    .brand-toggle-btn {
        pointer-events: none;
    }
    .sidebar-collapsed .sidebar {
        width: min(276px, calc(100vw - 36px));
        max-width: calc(100vw - 36px);
        padding: 12px 10px 14px;
    }
    .sidebar-collapsed .brand-block {
        width: 100%;
        height: auto;
        min-height: 92px;
        padding: 14px;
        margin: 0;
        display: block;
    }
    .sidebar-collapsed .brand-title {
        font-size: 34px;
        text-align: left;
    }
    .sidebar-collapsed .brand-full,
    .sidebar-collapsed .brand-subtitle,
    .sidebar-collapsed .menu-group-title,
    .sidebar-collapsed .menu-text {
        display: block;
    }
    .sidebar-collapsed .brand-short,
    .sidebar-collapsed .brand-toggle-chevron {
        display: none;
    }
    .sidebar-collapsed .create-project-big-btn {
        position: static;
        flex: 0 0 44px;
        height: 44px;
        padding: 0 14px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sidebar-collapsed .create-project-big-btn .menu-text {
        display: inline;
    }
    .sidebar .create-project-big-btn {
        justify-content: center;
    }
    .sidebar .create-project-big-btn .menu-icon {
        display: none;
    }
    .sidebar-collapsed .menu-link {
        justify-content: flex-start;
        padding: 9px 10px;
    }
    .mobile-menu-btn {
        display: inline-flex;
        place-items: center;
        align-items: center;
        gap: 7px;
        width: auto;
        min-width: 74px;
        padding: 0 10px;
        flex: 0 0 auto;
    }
    .mobile-menu-label {
        display: inline;
        font-size: 12px;
        font-weight: 700;
    }
    .menu-section .menu-list {
        display: grid;
    }

    .topbar {
        min-height: auto;
        padding: 8px 10px 10px;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }
    .topbar-title-wrap {
        width: 100%;
    }
    .topbar-title {
        font-size: 16px;
        width: auto;
    }
    .topbar-right {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(72px, 1fr) minmax(72px, 1fr) 36px minmax(68px, .9fr);
        gap: 6px;
        align-items: center;
    }
    .topbar-right > * {
        min-width: 0;
    }
    .topbar-right .wallet-pill {
        width: 100%;
        justify-content: center;
        height: 30px;
        padding: 0 6px;
        font-size: 11px;
    }
    .topbar-right .user-menu-wrap {
        grid-column: auto;
    }
    .topbar-right .notif-wrap {
        grid-column: auto;
    }
    .topbar-right .notif-btn {
        width: 100%;
        height: 30px;
        min-width: 0;
        padding: 0;
    }
    .user-menu-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        width: auto;
        min-width: 0;
        top: 82px;
    }
    .notif-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 82px;
        width: auto;
        max-width: none;
    }
    .user-pill-btn {
        width: 100%;
        justify-content: center;
        height: 30px;
        padding: 0 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .project-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .project-controls {
        padding: 10px;
    }
    .project-controls .control-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }
    .project-controls .btn,
    .project-controls .work-status-toggle,
    .project-controls .infinite-toggle {
        width: 100%;
        min-width: 0;
        height: 34px;
        padding: 0 8px;
        justify-content: center;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .project-controls .project-menu-wrap {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }
    .project-controls .project-menu-btn {
        width: 100%;
        min-width: 0;
    }
    .project-controls [data-project-auto-boost-btn] {
        font-size: 0;
    }
    .project-controls [data-project-auto-boost-btn]::after {
        content: "Авто-бусты";
        font-size: 12px;
    }
    .project-controls .toggle-slider {
        flex: 0 0 38px;
        width: 38px;
        height: 18px;
    }
    .project-controls .toggle-slider:before {
        width: 14px;
        height: 14px;
    }
    .project-controls .work-status-toggle input:checked + .toggle-slider:before,
    .project-controls .infinite-toggle input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
    .stats-section {
        padding: 10px;
    }
    .stat-card {
        padding: 8px;
        min-height: 74px;
    }
    .stat-value {
        font-size: 20px;
    }
    .stat-label {
        font-size: 11px;
        margin-top: 4px;
    }
    .stat-icon {
        margin-bottom: 4px;
    }
    .dashboard-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        width: 100%;
    }
    .dashboard-stats-grid .stat-card {
        width: auto;
        min-width: 0;
        margin: 0;
        min-height: 128px;
        align-content: stretch;
    }
    .dashboard-stat-head {
        gap: 8px;
        margin-bottom: 14px;
    }
    .dashboard-stat-badge {
        padding: 5px 8px;
        font-size: 11px;
    }
    .dashboard-stat-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 18px;
    }
    .dashboard-projects-panel .header {
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .dashboard-projects-panel .header h2 {
        font-size: 20px;
        margin: 0;
    }
    .dashboard-projects-panel .header .btn {
        height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }
    .dashboard-projects-mobile-list {
        display: grid;
        gap: 10px;
        margin-top: 10px;
    }
    .dashboard-project-mobile-card,
    .dashboard-project-mobile-title,
    .dashboard-project-mobile-group,
    .dashboard-project-mobile-metrics,
    .dashboard-project-mobile-metric {
        min-width: 0;
        max-width: 100%;
    }
    .dashboard-project-mobile-title,
    .dashboard-project-mobile-group {
        overflow-wrap: anywhere;
    }
    .dashboard-project-mobile-metrics {
        grid-template-columns: 1fr;
    }
    .project-card .project-header,
    .project-card .project-info,
    .project-card .project-title {
        min-width: 0;
        max-width: 100%;
    }
    .project-card .project-title {
        flex-direction: column;
        align-items: flex-start;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .project-card .project-schedule-badge {
        max-width: 100%;
        white-space: normal;
    }
    .dashboard-main,
    .content-wrap,
    .content-wrap > *,
    .dashboard-hero,
    .projects-shell,
    .clicks-shell,
    .queue-shell,
    #positions-shell-content,
    .clicks-hero,
    .queue-hero,
    .clicks-filters-panel,
    .clicks-results-panel,
    .queue-filters-panel,
    .queue-results-panel,
    .queue-day-panel,
    .queue-meta-panel {
        min-width: 0;
        max-width: 100%;
    }
    .dashboard-hero-text,
    .clicks-hero p,
    .queue-hero p,
    .queue-note,
    .projects-hero-text {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .clicks-hero-head,
    .queue-hero-head,
    .clicks-hero-actions,
    .queue-hero-actions {
        min-width: 0;
        max-width: 100%;
    }
    .clicks-hero-actions .btn,
    .queue-hero-actions .btn {
        max-width: 100%;
    }
    #positions-shell-content > .panel,
    #positions-shell-content .clicks-filters-grid,
    #positions-shell-content .clicks-filters-grid .form-group,
    #positions-shell-content .clicks-filters-actions {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }
    #positions-shell-content .clicks-filters-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
    }
    #positions-shell-content .clicks-filters-grid input,
    #positions-shell-content .clicks-filters-grid select,
    #positions-shell-content .clicks-filters-actions .btn {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .dashboard-projects-table-wrap {
        display: none;
    }
    .payments-mobile-list {
        display: none !important;
    }
    .payments-table-wrap {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
    }

    .main-footer {
        position: relative;
        z-index: 1;
    }
    .footer-container {
        padding: 10px 12px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .footer-bottom {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-bottom > div {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .page-head {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
    .page-actions {
        justify-content: flex-start;
    }
    .projects-hero-head {
        flex-direction: column;
    }
    .dashboard-hero { padding: 18px; }
    .dashboard-projects-shell-card {
        padding: 18px;
    }
    .dashboard-projects-header {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-projects-header .btn {
        align-self: flex-start;
    }
    .content-wrap {
        padding: 10px;
    }
    .panel {
        padding: 10px;
    }
    .keys-filters-grid {
        grid-template-columns: 1fr !important;
        width: 100%;
        max-width: 100%;
    }
    .clicks-chart-panel > div:first-child {
        flex-wrap: wrap;
    }
    .clicks-chart-panel .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
        width: 100%;
        max-width: 100%;
    }
    .clicks-filters-grid {
        grid-template-columns: 1fr !important;
        width: 100%;
        max-width: 100%;
    }
    .clicks-filters-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .clicks-filters-actions .btn {
        width: 100%;
    }
    .keys-filters-grid .form-group {
        min-width: 0 !important;
        width: 100%;
        max-width: 100%;
    }
    .keys-filters-grid input,
    .keys-filters-grid select,
    .keys-filters-grid textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .payments-topup {
        padding: 12px;
    }
    .payments-topup-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .payments-topup-controls .form-group {
        min-width: 0;
        width: 100%;
    }
    .payments-topup-controls .btn {
        width: 100%;
    }
    .payments-filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .payments-filters .form-group,
    .payments-search {
        min-width: 0;
        width: 100%;
    }
    .payments-filters .btn {
        width: 100%;
    }
    .payment-method-card {
        align-items: flex-start;
    }
    .payment-method-title,
    .payment-method-sub {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .payments-mobile-list { display: none !important; }
    .payments-scroll-hint { display: flex; }
    .payments-table-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        border-radius: 10px;
    }
    .payments-table-rail {
        width: max-content;
        min-width: 100%;
    }
    .payments-table {
        width: max-content;
        min-width: 980px;
        table-layout: auto;
    }
    .payments-table th,
    .payments-table td {
        white-space: nowrap;
        padding: 8px 6px;
        font-size: 11px;
        line-height: 1.25;
    }
    .payments-table .pay-col-comment {
        max-width: 320px;
    }

    .keys-toolbar {
        margin-bottom: 6px;
    }
    #columns-toggle-btn {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }
    .columns-popover {
        width: min(92vw, 280px);
        right: 0;
    }
    .keys-table-wrap {
        padding: 8px 8px 104px;
    }
    .keys-table-wrap .table-container {
        display: block;
        max-width: 100%;
        width: 100%;
        overflow-x: scroll !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding-bottom: 10px;
        scrollbar-width: auto;
    }
    .keys-modern-table {
        width: max-content;
        min-width: 1280px;
        table-layout: auto;
    }
    .keys-modern-table th,
    .keys-modern-table td {
        padding: 7px 6px;
        font-size: 11px;
        line-height: 1.2;
        white-space: nowrap;
    }
    .keys-modern-table input[type="text"],
    .keys-modern-table input[type="number"] {
        min-width: 120px !important;
        width: auto !important;
        height: 30px;
        padding: 0 8px;
        font-size: 11px;
    }
    .keys-modern-table th:first-child,
    .keys-modern-table td:first-child {
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .keys-modern-table .col-query { min-width: 240px; }
    .keys-modern-table .col-clicks-day { min-width: 110px; }
    .keys-modern-table .col-status { min-width: 120px; }
    .keys-modern-table .col-actions { min-width: 220px; }
    .keys-modern-table .col-domain,
    .keys-modern-table .col-url,
    .keys-modern-table .col-query,
    .keys-modern-table .col-project,
    .keys-modern-table .col-wordstat,
    .keys-modern-table .col-region,
    .keys-modern-table .col-clicks-day,
    .keys-modern-table .col-today,
    .keys-modern-table .col-completed,
    .keys-modern-table .col-auto-boost,
    .keys-modern-table .col-status,
    .keys-modern-table .col-actions {
        display: table-cell !important;
    }
.keys-modern-table .k-col-actions {
    min-width: 190px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
}
.keys-modern-table .k-col-actions .btn {
    width: auto;
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
}
.keys-modern-table .k-col-actions .key-row-edit-btn {
    width: 32px;
    padding: 0;
    font-weight: 700;
}
.keys-modern-table .key-row-field:disabled {
    background: #e6ebf2;
    color: #5f6f86;
    border-color: #d3dce8;
    cursor: not-allowed;
    opacity: 1;
    caret-color: transparent;
}
.keys-modern-table tr.key-row.is-editing .key-row-field:disabled {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.15);
    color: #0f172a;
    cursor: text;
}
.keys-modern-table tr.key-row.is-editing .key-row-field:disabled {
    background: #fff;
}
    .keys-filters-grid > .form-group {
        min-width: 0;
    }
    #keys-bulk-panel.b-actionbar {
        width: calc(100vw - 12px);
        left: 6px;
        transform: none;
        bottom: 6px;
        padding: 8px !important;
        border-radius: 10px;
    }
    #keys-bulk-panel .form-group {
        min-width: 0 !important;
        width: 100%;
    }
    #keys-bulk-panel > div {
        align-items: stretch !important;
        gap: 6px !important;
    }
    #keys-bulk-panel .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard-projects-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .dashboard-projects-header .btn {
        align-self: center;
        flex: 0 0 auto;
    }
    .dashboard-projects-head-copy {
        min-width: 0;
    }
    .filter-controls {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .filter-controls .form-group {
        min-width: 0 !important;
        width: 100%;
    }
    .filter-controls .btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .topbar {
        padding: 7px 8px 9px;
    }
    .topbar-right {
        grid-template-columns: minmax(62px, 1fr) minmax(62px, 1fr) 32px minmax(58px, .86fr);
        gap: 5px;
    }
    .topbar-right .wallet-pill {
        height: 28px;
        padding: 0 4px;
        font-size: 10px;
    }
    .topbar-right .notif-btn,
    .user-pill-btn {
        height: 28px;
    }
    .user-pill-btn {
        padding: 0 6px;
        font-size: 10px;
    }
    .content-wrap {
        padding: 10px;
    }
    .services-hero,
    .service-card,
    .services-footer {
        padding: 18px 16px;
        border-radius: 14px;
    }
    .services-hero {
        gap: 14px;
    }
    .services-hero-copy h1 {
        font-size: 24px;
        line-height: 1.2;
    }
    .services-hero-copy p,
    .service-card-description,
    .service-card-bullets li,
    .service-feature-text,
    .services-footer p {
        font-size: 13px;
        line-height: 1.55;
    }
    .services-hero-actions .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding-inline: 12px;
    }
    .service-card-head,
    .service-feature-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .service-card-copy h2 {
        font-size: 20px;
        line-height: 1.25;
    }
    .service-card-price {
        white-space: normal;
        font-size: 16px;
        line-height: 1.25;
    }
    .service-feature {
        padding: 14px;
    }
    .service-feature-head span {
        white-space: normal;
    }
}

@media (max-width: 1100px) {
    .auth-modern-grid {
        grid-template-columns: 1fr;
    }
    .auth-modern-info h1,
    .auth-modern-form h2 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .auth-page-modern {
        padding: 12px;
    }
    .auth-modern-info,
    .auth-modern-form {
        border-radius: 18px;
        padding: 18px 16px;
    }
    .auth-modern-logo {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .auth-modern-badge {
        font-size: 11px;
        padding: 6px 10px;
    }
    .auth-modern-info h1 {
        font-size: 20px;
        line-height: 1.2;
        margin: 14px 0 10px;
        overflow-wrap: normal;
        word-break: normal;
    }
    .auth-modern-info p {
        font-size: 14px;
        margin-bottom: 14px;
    }
    .auth-modern-feature {
        font-size: 14px;
        padding: 10px 12px;
    }
    .auth-modern-form h2 {
        font-size: 24px;
        line-height: 1.08;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .auth-modern-sub {
        font-size: 14px;
        margin: 6px 0 14px;
    }
    .auth-modern-form input,
    .auth-button-wide {
        height: 44px;
        font-size: 14px;
    }
}
.rank-project-competitor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
    gap: 18px;
}

.rank-project-competitor-editor,
.rank-project-competitor-suggestions {
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}

.rank-project-competitor-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: #718198;
    font-size: 13px;
}

.rank-project-competitor-head strong { color: #162238; }

.rank-project-competitor-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) 38px;
    gap: 8px;
    margin-bottom: 8px;
}

.rank-project-competitor-row input {
    min-width: 0;
    height: 42px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    padding: 0 12px;
}

.rank-project-competitor-row button {
    border: 1px solid #f2cccc;
    border-radius: 10px;
    color: #d73a3a;
    background: #fff7f7;
    cursor: pointer;
}

.rank-project-add-competitor { margin-top: 4px; }

.rank-project-competitor-suggestions {
    background: #f7faff;
    color: #718198;
}

.rank-project-competitor-suggestions span,
.rank-project-competitor-suggestions strong { display: block; }
.rank-project-competitor-suggestions strong { margin: 12px 0 6px; color: #162238; }
.rank-project-competitor-suggestions p { margin: 0; line-height: 1.5; }

@media (max-width: 760px) {
    .rank-project-competitor-layout { grid-template-columns: 1fr; }
    .rank-project-competitor-row { grid-template-columns: 1fr 38px; }
    .rank-project-competitor-row input[name="competitor_names[]"] { grid-column: 1 / -1; grid-row: 2; }
}
.rank-search-target-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: min(100%, 620px);
    margin-top: 4px;
}

.rank-search-target-engine {
    color: var(--text-muted, #64748b);
    font-size: 14px;
}

.rank-search-target-engine::after { content: '·'; margin-left: 6px; }
.rank-search-target-form { display: inline-flex; }

.rank-search-target-select {
    width: auto;
    min-height: 31px;
    padding: 4px 28px 4px 9px;
    border: 1px solid #d4e1f2;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, .72);
    color: var(--text-muted, #64748b);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.rank-search-target-select:hover,
.rank-search-target-select:focus {
    border-color: #7eb1ff;
    color: var(--text-primary, #172033);
    outline: 2px solid rgba(37, 99, 235, .12);
}

.api-delivery-page {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
}

.api-delivery-page > * {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.api-delivery-hero,
.api-delivery-section-head,
.api-delivery-update-block {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.api-delivery-hero,
.api-delivery-section-head {
    flex-wrap: wrap;
}

.api-delivery-hero > :first-child,
.api-delivery-section-head > :first-child {
    flex: 1 1 360px;
    min-width: 0;
}

.api-delivery-hero h1,
.api-delivery-section-head h2 {
    margin: 0;
    color: #172033;
}

.api-delivery-hero p,
.api-delivery-section-head p {
    margin: 6px 0 0;
    color: #718198;
    line-height: 1.5;
}

@media (max-width: 560px) {
    .wm-webmaster-head__side { flex-direction: column; align-items: stretch; }
    .wm-webmaster-head__side .page-actions .btn { width: 100%; }
    .wm-head-stats { grid-template-columns: 1fr; }
    .wm-subscription-compact .wm-subscription-form,.wm-subscription-compact .btn { width:100%; }
}

.api-delivery-efficiency-controls {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.api-delivery-efficiency-period {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid #d7e2ef;
    border-radius: 11px;
    background: #f8fafc;
}

.api-delivery-efficiency-period button {
    min-height: 34px;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.api-delivery-efficiency-period button.is-active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 7px rgba(37, 99, 235, .22);
}

.api-delivery-efficiency-period button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.api-delivery-efficiency-cascade-field {
    display: grid;
    gap: 4px;
    min-width: 180px;
    color: #58677e;
    font-size: 12px;
    font-weight: 800;
}

.api-delivery-efficiency-cascade-field select {
    width: 100%;
    height: 42px;
    padding: 0 34px 0 12px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background-color: #fff;
    color: #172033;
}

.api-delivery-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.api-delivery-update-block {
    flex: 0 1 auto;
    max-width: 100%;
    flex-wrap: wrap;
    color: #718198;
    font-size: 13px;
}

.api-delivery-status,
.api-delivery-error {
    padding: 13px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
    color: #1e40af;
    line-height: 1.45;
}

.api-delivery-status--fresh {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.api-delivery-status--stale,
.api-delivery-error {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.api-delivery-offline-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 16px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff7f7;
    color: #991b1b;
    line-height: 1.4;
}

.api-delivery-offline-summary[hidden] {
    display: none;
}

.api-delivery-offline-summary-title {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 800;
}

.api-delivery-offline-summary-servers {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 6px;
}

.api-delivery-offline-server {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
}

.api-delivery-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.api-delivery-view-switcher {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: min(360px, 100%);
    padding: 6px;
    margin-inline: auto;
    border: 1px solid #cfe0f7;
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 26px rgba(37, 99, 235, .12);
    backdrop-filter: blur(12px);
}

.api-delivery-view-tab {
    min-height: 40px;
    padding: 9px 16px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #52627a;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.api-delivery-view-tab:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.api-delivery-view-tab.is-active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 5px 14px rgba(37, 99, 235, .22);
}

.api-delivery-view-tab:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

.api-delivery-view-panel,
.api-delivery-work-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}

.api-delivery-view-panel[hidden] {
    display: none !important;
}

.api-delivery-filter-grid {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 16px;
}

/* Grid children must be allowed to shrink below their content's intrinsic width. */
.api-delivery-filters,
.api-delivery-section-head > :first-child,
.rank-keyword-content,
.rank-keyword-filter-bar,
.rank-analytics-toolbar > * {
    min-width: 0;
    max-width: 100%;
}
@media (max-width: 640px) {
    .api-delivery-section-head { flex-wrap: wrap; }
    .api-delivery-section-head p { overflow-wrap: anywhere; }
    .rank-keyword-create-popover form { left: auto; right: 0; max-width: calc(100vw - 40px); }
    .rank-keyword-filter-bar :is(input, select) { min-width: 0; max-width: 100%; }
}

.api-delivery-filter-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #58677e;
    font-size: 13px;
    font-weight: 700;
}

.api-delivery-filter-field select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 34px 0 12px;
    border: 1px solid #d7e2ef;
    border-radius: 10px;
    background-color: #fff;
    color: #172033;
}

.api-delivery-scope-meta {
    margin-top: 12px;
    color: #718198;
    font-size: 13px;
    line-height: 1.5;
}

.api-delivery-summary {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 16px;
}

.api-delivery-summary-card {
    box-sizing: border-box;
    display: grid;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid #e1e9f4;
    border-radius: 12px;
    background: #f8fbff;
}

.api-delivery-summary-card--health {
    border-top: 3px solid #60a5fa;
}

.api-delivery-summary-card--rps {
    border-top: 3px solid #8b5cf6;
}

.api-delivery-summary-card--metric {
    border-top: 3px solid #14b8a6;
}

.api-delivery-summary-value {
    color: #172033;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.api-delivery-summary-label {
    color: #718198;
    font-size: 12px;
    line-height: 1.35;
}

.api-delivery-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: #58677e;
    font-size: 13px;
}

.api-delivery-chart-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.api-delivery-chart-legend-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 5px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.35;
    cursor: pointer;
}

.api-delivery-chart-legend-toggle:hover {
    background: #eef4ff;
    color: #1d4ed8;
}

.api-delivery-chart-legend-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.api-delivery-chart-legend-toggle[aria-pressed="false"] {
    opacity: 0.42;
    text-decoration: line-through;
}

.api-delivery-fleet-legend {
    max-height: 92px;
    overflow-y: auto;
}

.api-delivery-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.api-delivery-legend-dot--poll {
    background: #2563eb;
}

.api-delivery-legend-dot--empty {
    background: #94a3b8;
}

.api-delivery-legend-dot--issued {
    background: #f59e0b;
}

.api-delivery-legend-dot--report {
    background: #10b981;
}

.api-delivery-legend-dot--error {
    background: #ef4444;
}

.api-delivery-legend-dot--expired {
    background: #8b5cf6;
}

.api-delivery-chart-wrap {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    max-width: min(100%, 1180px);
    min-width: 0;
    margin-top: 14px;
    margin-inline: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #e1e9f4;
    border-radius: 12px;
    background: #fbfdff;
}

.api-delivery-chart {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 900px;
    height: 420px;
}

.api-delivery-primary-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.api-delivery-primary-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 18px;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff, #f5f9ff);
    box-shadow: 0 10px 24px rgba(48, 92, 150, 0.08);
}

.api-delivery-primary-card--issued {
    border-top: 4px solid #2563eb;
}

.api-delivery-primary-card--empty {
    border-top: 4px solid #f59e0b;
}

.api-delivery-primary-card--rate {
    border-top: 4px solid #10b981;
}

.api-delivery-primary-value {
    color: #172033;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.api-delivery-primary-label {
    color: #58677e;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.api-delivery-chart-grid {
    stroke: #e5edf7;
    stroke-width: 1;
}

.api-delivery-chart-axis,
.api-delivery-chart-empty {
    fill: #718198;
    font-size: 11px;
}

.api-delivery-chart-axis--hour {
    font-size: 10.5px;
}

.api-delivery-chart-line {
    vector-effect: non-scaling-stroke;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.api-delivery-chart-line--poll {
    stroke: #2563eb;
}

.api-delivery-chart-line--empty {
    stroke: #94a3b8;
    stroke-dasharray: 5 4;
}

.api-delivery-chart-line--issued {
    stroke: #f59e0b;
}

.api-delivery-chart-line--report {
    stroke: #10b981;
}

.api-delivery-chart-line--error {
    stroke: #ef4444;
}

.api-delivery-chart-line--expired {
    stroke: #8b5cf6;
}

.api-delivery-fleet-line {
    opacity: .82;
}

.api-delivery-fleet-line--total {
    opacity: 1;
    stroke-width: 3.5;
}

.api-delivery-fleet-point {
    vector-effect: non-scaling-stroke;
    stroke-width: 1.8;
}

.api-delivery-chart-total-label {
    fill: #c2410c;
    font-size: 10px;
    font-weight: 700;
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 3px;
    stroke-linejoin: round;
}

.api-delivery-chart-section-label,
.api-delivery-chart-section-value {
    fill: #172033;
    font-size: 12px;
    font-weight: 700;
}

.api-delivery-chart-section-label--total,
.api-delivery-chart-section-value {
    fill: #c2410c;
}

.api-delivery-chart-separator {
    stroke: #dbe4ef;
    stroke-width: 1;
}

.api-delivery-chart-guide {
    pointer-events: none;
    stroke: #475569;
    stroke-width: 1;
    stroke-dasharray: 3 3;
    vector-effect: non-scaling-stroke;
}

.api-delivery-chart-hit-area {
    fill: transparent;
    cursor: crosshair;
}

.api-delivery-chart-hit-area:focus {
    fill: rgba(37, 99, 235, .06);
    outline: none;
}

.api-delivery-chart-tooltip {
    box-sizing: border-box;
    position: absolute;
    z-index: 3;
    top: 12px;
    display: grid;
    gap: 6px;
    min-width: min(168px, calc(100% - 24px));
    max-width: calc(100% - 24px);
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
    color: #344258;
    font-size: 12px;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
    scrollbar-width: thin;
    transform: translateX(-50%);
}

.api-delivery-chart-tooltip:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .35);
    outline-offset: -3px;
}

.api-delivery-chart-tooltip[hidden] {
    display: none;
}

.api-delivery-chart-tooltip-time {
    color: #172033;
    font-size: 13px;
}

.api-delivery-chart-tooltip-row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    line-height: 1.25;
}

.api-delivery-chart-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.api-delivery-chart-tooltip-dot--poll {
    background: #2563eb;
}

.api-delivery-chart-tooltip-dot--empty {
    background: #94a3b8;
}

.api-delivery-chart-tooltip-dot--issued {
    background: #f59e0b;
}

.api-delivery-chart-tooltip-dot--report {
    background: #10b981;
}

.api-delivery-chart-tooltip-dot--error {
    background: #ef4444;
}

.api-delivery-chart-tooltip-dot--expired {
    background: #8b5cf6;
}

.api-delivery-table-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: min(100%, 1180px);
    min-width: 0;
    margin-top: 14px;
    margin-inline: auto;
    overflow-x: auto;
    border: 1px solid #e1e9f4;
    border-radius: 12px;
}

.api-delivery-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    background: #fff;
}

.api-delivery-table caption {
    padding: 12px 14px;
    color: #58677e;
    font-size: 13px;
    text-align: left;
}

.api-delivery-table th,
.api-delivery-table td {
    padding: 11px 12px;
    border-top: 1px solid #e8eef6;
    color: #344258;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    vertical-align: top;
}

.api-delivery-table th {
    background: #f6f9fd;
    color: #58677e;
    font-weight: 800;
    white-space: nowrap;
}

.api-delivery-hour-cell {
    min-width: 118px;
    text-align: center !important;
    white-space: nowrap;
}

.api-delivery-table-row--offline,
.api-delivery-table-row--stalled,
.api-delivery-table-row--no_data {
    background: #fffafa;
}

.api-delivery-server-name {
    color: #172033;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.api-delivery-server-name-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 116px;
}

.api-delivery-copy-history-toggle {
    padding: 6px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.api-delivery-copy-history-toggle[aria-expanded="true"] {
    border-color: #93c5fd;
    background: #dbeafe;
}

.api-delivery-copy-history-toggle--icon {
    display: inline-grid;
    flex: 0 0 24px;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-color: transparent;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}

.api-delivery-copy-history-toggle--icon:hover,
.api-delivery-copy-history-toggle--icon:focus-visible {
    background: #eff6ff;
    color: #2563eb;
    outline: none;
}

.api-delivery-copy-history-toggle--icon[aria-expanded="true"] {
    border-color: transparent;
    background: #eff6ff;
    color: #2563eb;
    transform: rotate(90deg);
}

.api-delivery-delete-button {
    padding: 6px 9px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff;
    color: #b91c1c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.api-delivery-delete-button:hover,
.api-delivery-delete-button:focus-visible {
    border-color: #ef4444;
    background: #fef2f2;
    outline: 2px solid rgba(239, 68, 68, .12);
    outline-offset: 1px;
}

.api-delivery-delete-button:disabled {
    cursor: wait;
    opacity: .6;
}

.api-delivery-server-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.api-delivery-copy-history-row > td {
    padding: 0 12px 14px;
    background: #f8fbff;
}

.api-delivery-copy-history {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
    background: #fff;
    overflow-wrap: anywhere;
}

.api-delivery-copy-summary {
    margin-bottom: 14px;
}

.api-delivery-copy-summary h3 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 15px;
}

.api-delivery-copy-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 8px;
    margin: 0;
}

.api-delivery-copy-summary-grid .api-delivery-card-metric {
    padding: 9px 10px;
    border: 1px solid #e1e9f4;
    border-radius: 9px;
    background: #f8fbff;
}

.api-delivery-copy-summary-note {
    margin: 10px 0 0;
    color: #718198;
    font-size: 12px;
}

.api-delivery-copy-summary-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.api-delivery-copy-chart-section {
    min-width: 0;
}

.api-delivery-copy-chart-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.api-delivery-copy-chart-head h3,
.api-delivery-copy-chart-head p {
    margin: 0;
}

.api-delivery-copy-chart-head p {
    margin-top: 4px;
    color: #718198;
    font-size: 12px;
}

.api-delivery-copy-chart-legend {
    flex: 0 1 auto;
}

.api-delivery-copy-chart-wrap {
    margin-top: 10px;
}

.api-delivery-copy-chart {
    height: clamp(210px, 24vw, 280px);
}

.api-delivery-copy-history-table-wrap {
    max-height: 360px;
    overflow: auto;
}

.api-delivery-copy-history-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.api-delivery-copy-history-table caption {
    padding: 0 0 10px;
    color: #344258;
    font-weight: 800;
    text-align: left;
}

.api-delivery-copy-history-table th,
.api-delivery-copy-history-table td {
    padding: 7px 9px;
    border-top: 1px solid #e8eef6;
    font-size: 12px;
    text-align: left;
    white-space: nowrap;
}

.api-delivery-copy-history-loading,
.api-delivery-copy-history-empty,
.api-delivery-copy-history-error {
    margin: 0;
    color: #718198;
    font-size: 13px;
}

.api-delivery-copy-history-error {
    margin-bottom: 8px;
    color: #b91c1c;
}

.api-delivery-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.api-delivery-badge--healthy {
    background: #dcfce7;
    color: #166534;
}

.api-delivery-badge--idle {
    background: #eff6ff;
    color: #1d4ed8;
}

.api-delivery-badge--stalled {
    background: #ffedd5;
    color: #9a3412;
}

.api-delivery-badge--offline,
.api-delivery-badge--no_data {
    background: #fee2e2;
    color: #991b1b;
}

.api-delivery-badge--unspecified {
    background: #f3e8ff;
    color: #6b21a8;
}

.api-delivery-server-cards {
    display: none;
}

.api-delivery-empty {
    margin: 16px 0 0;
    color: #718198;
    text-align: center;
}

.api-delivery-mail-block {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.api-delivery-mail-block > * {
    min-width: 0;
}

.api-delivery-mail-panel {
    border-top: 3px solid #14b8a6;
}

.api-delivery-mail-empty-note {
    grid-column: 1 / -1;
    width: 100%;
}

@media (max-width: 900px) {
    .api-delivery-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .api-delivery-hero,
    .api-delivery-section-head {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .api-delivery-page {
        gap: 12px;
        width: 100%;
    }

    .api-delivery-view-switcher {
        top: 8px;
        width: 100%;
    }

    .api-delivery-view-tab {
        min-height: 44px;
    }

    .api-delivery-view-panel,
    .api-delivery-work-block {
        gap: 14px;
    }

    .api-delivery-hero,
    .api-delivery-section-head,
    .api-delivery-update-block {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .api-delivery-hero > :first-child {
        flex: 0 1 auto;
        height: auto;
        min-height: 0;
    }

    .api-delivery-section-head > :first-child {
        flex: 0 1 auto;
        height: auto;
        min-height: 0;
    }

    .api-delivery-efficiency-controls,
    .api-delivery-efficiency-cascade-field,
    .api-delivery-efficiency-period {
        width: 100%;
    }

    .api-delivery-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .api-delivery-filter-reset,
    .api-delivery-retry {
        width: 100%;
        justify-content: center;
    }

    .api-delivery-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .api-delivery-primary-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .api-delivery-chart-legend {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .api-delivery-copy-chart-head {
        flex-direction: column;
    }

    .api-delivery-table-wrap {
        display: none;
    }

    .api-delivery-mail-panel .api-delivery-table-wrap {
        display: block;
    }

    .api-delivery-mail-block {
        gap: 14px;
    }

    .api-delivery-server-cards {
        display: grid;
        gap: 10px;
        margin-top: 14px;
    }

    .api-delivery-server-card {
        min-width: 0;
        padding: 14px;
        border: 1px solid #e1e9f4;
        border-left: 4px solid #94a3b8;
        border-radius: 12px;
        background: #fff;
    }

    .api-delivery-server-card--healthy {
        border-left-color: #22c55e;
    }

    .api-delivery-server-card--idle {
        border-left-color: #3b82f6;
    }

    .api-delivery-server-card--stalled {
        border-left-color: #f97316;
    }

    .api-delivery-server-card--offline,
    .api-delivery-server-card--no_data {
        border-left-color: #ef4444;
    }

    .api-delivery-server-card--unspecified {
        border-left-color: #a855f7;
    }

    .api-delivery-server-card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .api-delivery-server-card-identity {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }

    .api-delivery-server-card-meta {
        margin: 7px 0 10px;
        color: #718198;
        font-size: 13px;
    }

    .api-delivery-server-hours {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        margin: 10px 0 0;
    }

    .api-delivery-server-hours .api-delivery-card-metric {
        gap: 2px;
        padding: 7px 5px;
        border: 1px solid #e1e9f4;
        border-radius: 8px;
        background: #f7faff;
        text-align: center;
    }

    .api-delivery-server-hours .api-delivery-card-label {
        font-size: 9px;
        line-height: 1.25;
    }

    .api-delivery-server-hours .api-delivery-card-value {
        font-size: 12px;
    }

    .api-delivery-server-card > .api-delivery-copy-history-toggle {
        width: 100%;
    }

    .api-delivery-server-card-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 12px;
    }

    .api-delivery-server-card > .api-delivery-copy-history {
        margin-top: 10px;
        padding: 10px;
    }

    .api-delivery-copy-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .api-delivery-server-card-details summary {
        color: #2563eb;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
    }

    .api-delivery-card-grid {
        display: grid;
        gap: 8px;
        margin: 12px 0 0;
    }

    .api-delivery-card-metric {
        display: grid;
        gap: 3px;
        min-width: 0;
        padding: 9px 10px;
        border-radius: 9px;
        background: #f7faff;
    }

    .api-delivery-card-label,
    .api-delivery-card-value {
        margin: 0;
        overflow-wrap: anywhere;
    }

    .api-delivery-card-label {
        color: #718198;
        font-size: 11px;
    }

    .api-delivery-card-value {
        color: #172033;
        font-size: 13px;
        font-weight: 700;
    }
}

@media (max-width: 420px) {
    .api-delivery-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .api-delivery-chart-legend {
        grid-template-columns: minmax(0, 1fr);
    }
}
.btn.btn-rank-danger { background: #dc3545; border-color: #dc3545; color: #fff; }
.btn.btn-rank-danger:hover { background: #b91c2c; border-color: #b91c2c; color: #fff; }
.rank-access-panel { width: min(680px, calc(100vw - 40px)); max-height: 75vh; overflow-y: auto; }
.rank-access-grid { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.rank-access-grid label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 180px; }
.rank-access-grid label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; }
.rank-access-member { border-top: 1px solid #dbe5f4; padding-top: 16px; margin-top: 16px; }
.project-boost-warning { margin-bottom: 16px; padding: 14px 16px; border: 1px solid #fecaca; border-radius: 12px; background: #fff1f2; color: #991b1b; line-height: 1.5; }
.project-boost-warning strong { display: block; margin-bottom: 5px; }
.project-boost-estimate { margin-top: 16px; padding: 16px; border: 1px solid #bfd4ff; border-radius: 12px; background: #eff6ff; color: #1e40af; font-size: 18px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
