:root {
    --page-bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --border: #e3e7ef;
    --text: #182238;
    --muted: #73809a;
    --primary: #315efb;
    --primary-hover: #244bd3;
    --success: #16845b;
    --danger: #c13b4d;
    --sidebar: #121a2d;
    --sidebar-muted: #96a0b8;
    --shadow: 0 18px 50px rgba(20, 32, 64, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at top left,
            #e8efff,
            transparent 44%
        ),
        var(--page-bg);
}

.login-card {
    width: 100%;
    max-width: 460px;
    padding: 38px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    color: #fff;
    background: var(--primary);
    border-radius: 16px;
    font-size: 22px;
    font-weight: 800;
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 34px;
}

.login-description {
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 13px;
    outline: none;
    background: var(--surface);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(49, 94, 251, 0.12);
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 700;
}

.button-primary {
    width: 100%;
    color: #fff;
    background: var(--primary);
}

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

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-error {
    color: #93283a;
    border: 1px solid #f0cbd2;
    background: #fff1f3;
}

.admin-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 26px 20px;
    color: #fff;
    background: var(--sidebar);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    padding: 0 10px;
    font-size: 20px;
    font-weight: 800;
}

.sidebar-brand-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.sidebar-link {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 0 14px;
    color: var(--sidebar-muted);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 650;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
    position: absolute;
    right: 20px;
    bottom: 24px;
    left: 20px;
}

.logout-button {
    width: 100%;
    color: var(--sidebar-muted);
    background: rgba(255, 255, 255, 0.06);
}

.admin-content {
    min-width: 0;
    padding: 30px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.admin-title {
    margin: 0;
    font-size: 30px;
}

.admin-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
}

.user-box {
    text-align: right;
}

.user-name {
    font-weight: 750;
}

.user-email {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(20, 32, 64, 0.04);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-value {
    margin-top: 13px;
    font-size: 32px;
    font-weight: 800;
}

.empty-panel {
    margin-top: 20px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.empty-panel h2 {
    margin: 0 0 8px;
}

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

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

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

    .sidebar {
        position: static;
        height: auto;
    }

    .sidebar-footer {
        position: static;
        margin-top: 24px;
    }

    .admin-content {
        padding: 22px;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .user-box {
        text-align: left;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}.alert-success {
    color: #136a49;
    border: 1px solid #bce3d3;
    background: #ecfaf4;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.domains-summary {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
}

.server-ip-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.server-ip-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.server-ip-copy {
    min-height: 32px;
    padding: 5px 11px;
    color: var(--primary);
    border: 1px solid rgba(49, 94, 251, 0.22);
    border-radius: 9px;
    background: rgba(49, 94, 251, 0.06);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.server-ip-copy:hover {
    border-color: var(--primary);
    background: rgba(49, 94, 251, 0.11);
}

.server-ip-unavailable {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.button-auto {
    width: auto;
}

.button-secondary {
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--surface);
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.button-danger {
    color: #a82e42;
    border: 1px solid #efc7cf;
    background: #fff2f4;
}

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

.button-small {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
}

.table-card,
.form-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(20, 32, 64, 0.04);
}

.table-scroll {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 17px 18px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

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

.data-table tbody tr:hover {
    background: #fbfcff;
}

.domain-title {
    margin-bottom: 5px;
    font-weight: 750;
}

.domain-host {
    color: var(--primary);
    font-size: 13px;
}

.domain-host:hover {
    text-decoration: underline;
}

.muted {
    color: var(--muted);
}

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

.status-active {
    color: #146c4b;
    background: #e8f8f1;
}

.status-disabled {
    color: #7a8499;
    background: #edf0f5;
}


.status-waiting-dns {
    color: #9a6700;
    background: #fff5d6;
}

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

.inline-actions form {
    margin: 0;
}

.empty-state {
    padding: 60px 30px;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 10px;
}

.empty-state p {
    max-width: 500px;
    margin: 0 auto 24px;
    color: var(--muted);
    line-height: 1.6;
}

.form-card {
    max-width: 980px;
    padding: 28px;
}

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

.form-control[type="text"],
.form-control[type="email"],
.form-control[type="password"],
select.form-control {
    appearance: none;
}

.form-textarea {
    min-height: 130px;
    padding-top: 14px;
    padding-bottom: 14px;
    resize: vertical;
}

.form-hint {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.error-list {
    margin: 9px 0 0;
    padding-left: 20px;
}

.error-list li + li {
    margin-top: 5px;
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .inline-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-actions .button {
        width: 100%;
    }
}.status-draft {
    color: #8a6413;
    background: #fff5d8;
}

.table-note {
    max-width: 180px;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-control {
    display: block;
    width: 100%;
    padding: 13px;
    color: var(--text);
    border: 1px dashed #b9c2d4;
    border-radius: 13px;
    background: var(--surface-soft);
}

.file-control::file-selector-button {
    min-height: 38px;
    margin-right: 13px;
    padding: 0 15px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: var(--surface);
    font-weight: 700;
}

.current-version {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid #cad8ff;
    border-radius: 14px;
    background: #f2f6ff;
}

@media (max-width: 650px) {
    .current-version {
        align-items: flex-start;
        flex-direction: column;
    }
}.tracking-url {
    max-width: 360px;
    margin-bottom: 9px;
    overflow: hidden;
    color: var(--primary);
    font-size: 13px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.readonly-code {
    padding: 15px;
    overflow-wrap: anywhere;
    color: #394464;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
    font-family:
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 13px;
    line-height: 1.6;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}.statistics-filters {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(20, 32, 64, 0.04);
}

.statistics-filter-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 0 18px;
}

.statistics-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.statistics-summary {
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    margin-bottom: 20px;
}

.stat-description {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.statistics-chart-card {
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(20, 32, 64, 0.04);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 21px;
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.daily-chart {
    display: flex;
    min-height: 280px;
    align-items: flex-end;
    gap: 10px;
    overflow-x: auto;
    padding: 15px 5px 0;
}

.daily-chart-item {
    display: grid;
    min-width: 58px;
    flex: 1;
    grid-template-rows: auto 180px auto;
    gap: 9px;
    text-align: center;
}

.daily-chart-values {
    display: grid;
    min-height: 52px;
    align-content: end;
    gap: 2px;
}

.daily-chart-values strong {
    font-size: 16px;
}

.daily-chart-values span {
    color: var(--muted);
    font-size: 10px;
}

.daily-chart-column {
    display: flex;
    height: 180px;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface-soft);
}

.daily-chart-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 10px 10px 0 0;
    background: var(--primary);
    transition: height 0.25s ease;
}

.daily-chart-date {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.statistics-table-card {
    margin-top: 0;
}

.statistics-table-heading {
    margin: 0;
    padding: 22px 22px 10px;
}

.clicks-table {
    min-width: 1280px;
}

.campaign-value {
    max-width: 220px;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.click-badges {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.click-details {
    min-width: 120px;
}

.click-details summary {
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.click-details dl {
    width: 320px;
    margin: 12px 0 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.click-details dt {
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.click-details dt:first-child {
    margin-top: 0;
}

.click-details dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.5;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 22px;
    border-top: 1px solid var(--border);
}

.pagination-state {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

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

    .statistics-summary {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .statistics-filter-grid {
        grid-template-columns: 1fr;
    }

    .statistics-summary {
        grid-template-columns: 1fr;
    }

    .statistics-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .statistics-filter-actions .button {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
.status-warning {
    color: #8a6413;
    background: #fff2c7;
}

.status-error {
    color: #a82e42;
    background: #ffe8ec;
}

.lead-search-field {
    grid-column: span 2;
}

.leads-table {
    min-width: 1450px;
}

.lead-error-preview {
    max-width: 240px;
    margin-top: 8px;
    overflow: hidden;
    color: #a82e42;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.lead-details-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.lead-details-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow:
        0 8px 30px
        rgba(20, 32, 64, 0.04);
}

.lead-details-card h2 {
    margin: 0 0 20px;
    font-size: 19px;
}

.lead-definition-list {
    display: grid;
    grid-template-columns:
        minmax(110px, 0.45fr)
        minmax(0, 1fr);
    gap: 14px 18px;
    margin: 0;
}

.lead-definition-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.lead-definition-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.55;
}

.lead-marketing-card {
    margin-bottom: 18px;
}

.lead-parameter-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.lead-parameter-grid > div {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-soft);
}

.lead-parameter-grid span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.lead-parameter-grid strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 13px;
}

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

.lead-json {
    max-height: 460px;
    margin: 0;
    padding: 18px;
    overflow: auto;
    color: #dbe4ff;
    border-radius: 14px;
    background: #111a2e;
    font-family:
        SFMono-Regular,
        Consolas,
        monospace;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.lead-security-note {
    margin-bottom: 13px;
    padding: 11px 13px;
    color: #765b12;
    border: 1px solid #ecd995;
    border-radius: 11px;
    background: #fff9df;
    font-size: 12px;
    line-height: 1.5;
}

.lead-long-value {
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .lead-details-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 850px) {
    .lead-payload-grid {
        grid-template-columns: 1fr;
    }

    .lead-search-field {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .lead-parameter-grid {
        grid-template-columns: 1fr;
    }

    .lead-definition-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .lead-definition-list dd {
        margin-bottom: 12px;
    }
}.button-danger {
    color: #ffffff;
    border-color: #c83f50;
    background: #c83f50;
}

.button-danger:hover {
    color: #ffffff;
    border-color: #ad3040;
    background: #ad3040;
}

.button-danger:focus-visible {
    outline: 3px solid rgba(200, 63, 80, 0.24);
    outline-offset: 2px;
}.inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}

.inline-actions form {
    display: inline-flex;
    margin: 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1;
}

.icon-button i {
    pointer-events: none;
}

.icon-button-warning {
    color: #a7640b;
    border: 1px solid #f0cf9c;
    background: #fff8e9;
}

.icon-button-warning:hover {
    color: #875005;
    border-color: #deb876;
    background: #ffefce;
}

.icon-button-success {
    color: #17865c;
    border: 1px solid #a9ddc8;
    background: #ebfaf4;
}

.icon-button-success:hover {
    color: #106b48;
    border-color: #83cdb3;
    background: #dcf5eb;
}

.button-danger.icon-button {
    color: #ffffff;
    border-color: #cc4052;
    background: #cc4052;
}

.button-danger.icon-button:hover {
    color: #ffffff;
    border-color: #ad3040;
    background: #ad3040;
}

@media (max-width: 700px) {
    .icon-button {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 10px;
    }
}
/*
|--------------------------------------------------------------------------
| Глобальні кнопки-іконки
|--------------------------------------------------------------------------
*/

.inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.inline-actions form {
    display: inline-flex;
    margin: 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1;
}

.icon-button .fa-solid {
    pointer-events: none;
}

.icon-button-warning {
    color: #a7640b;
    border: 1px solid #f0cf9c;
    background: #fff8e9;
}

.icon-button-warning:hover {
    color: #875005;
    border-color: #deb876;
    background: #ffefce;
}

.icon-button-success {
    color: #17865c;
    border: 1px solid #a9ddc8;
    background: #ebfaf4;
}

.icon-button-success:hover {
    color: #106b48;
    border-color: #83cdb3;
    background: #dcf5eb;
}

.button-danger.icon-button {
    color: #ffffff;
    border-color: #cc4052;
    background: #cc4052;
}

.button-danger.icon-button:hover {
    color: #ffffff;
    border-color: #ad3040;
    background: #ad3040;
}

@media (max-width: 700px) {
    .icon-button {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 10px;
    }
}

.geo-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.geo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 5px 9px;
    border: 1px solid #cbd6e8;
    border-radius: 999px;
    background: #f4f7fc;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
}

.geo-badge-all {
    color: #66738d;
    font-weight: 700;
    letter-spacing: normal;
}

/* Offer filters */
.offer-filters {
    display: grid;
    grid-template-columns: 140px minmax(280px, 1fr) auto;
    gap: 16px;
    align-items: end;
    padding: 20px 24px;
    border-bottom: 1px solid #e5eaf3;
    background: #fff;
}

.offer-filter {
    min-width: 0;
}

.offer-filter .form-label {
    display: block;
    margin-bottom: 8px;
}

.offer-filter .form-control {
    width: 100%;
    height: 48px;
}

.offer-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.offer-filter-actions .button {
    height: 48px;
    white-space: nowrap;
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 1050px) {
    .offer-filters {
        grid-template-columns: 120px 1fr;
    }

    .offer-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 700px) {
    .offer-filters {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .offer-filter-actions {
        grid-column: auto;
        justify-content: stretch;
    }

    .offer-filter-actions .button {
        flex: 1;
    }
}

/* User domain permissions */
.user-domain-list {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(280px, 1fr)
    );
    gap: 10px;
    margin-top: 8px;
}

.user-domain-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid #e3e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.user-domain-item:hover {
    border-color: #b9c4d4;
    background: #f8fafc;
}

.user-domain-item input {
    margin-top: 4px;
}

.user-domain-item span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-domain-item small {
    color: #718096;
    line-height: 1.4;
}

.user-domain-item:has(input:disabled) {
    opacity: .55;
    cursor: not-allowed;
}



.campaign-parameters {
    margin: 4px 0 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-soft);
}

.campaign-parameters > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 750;
    user-select: none;
}

.campaign-parameters > summary::-webkit-details-marker {
    display: none;
}

.campaign-parameters > summary i {
    color: var(--muted);
    transition: transform 0.18s ease;
}

.campaign-parameters[open] > summary i {
    transform: rotate(180deg);
}

.campaign-parameters-body {
    padding: 0 18px 18px;
}

.parameter-table {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.parameter-table-head,
.parameter-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 0.8fr)
        24px
        minmax(260px, 1.6fr)
        42px;
    gap: 10px;
    align-items: center;
}

.parameter-table-head {
    padding: 10px 12px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.parameter-row {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.parameter-row:last-child {
    border-bottom: 0;
}

.parameter-row .form-control {
    height: 42px;
    border-radius: 10px;
    font-family:
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 12px;
}

.parameter-equals {
    color: var(--muted);
    text-align: center;
    font-weight: 750;
}

.parameter-remove {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
}

.parameter-remove:hover {
    color: #c93648;
    border-color: #f1b8c0;
    background: #fff4f5;
}

.parameter-add {
    margin-top: 12px;
}

@media (max-width: 760px) {
    .parameter-table-head {
        display: none;
    }

    .parameter-row {
        grid-template-columns:
            24px
            minmax(0, 1fr)
            42px;
    }

    .parameter-row .form-control:first-child {
        grid-column: 1 / -1;
    }
}


/* =========================================================
   CLICKS FILTERS — COMPACT LAYOUT
   ========================================================= */

.clicks-filters {
    padding: 24px !important;
}

.clicks-filters form {
    display: block !important;
}

.clicks-filter-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px 16px !important;
    align-items: end;
}

.clicks-filter-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    margin: 0 !important;
}

.clicks-filter-grid .form-label {
    margin: 0 !important;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
}

.clicks-filter-grid .form-control {
    width: 100%;
    height: 46px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 14px;
    background: var(--surface);
}

.clicks-filter-grid input[type="date"] {
    padding-right: 12px;
}

/* Пошук по параметрах та referrer робимо ширшими */
.clicks-filter-grid .clicks-filter-wide {
    grid-column: span 2 !important;
}

/* Кнопки */
.clicks-filters .statistics-filter-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.clicks-filters .statistics-filter-actions .button {
    min-height: 44px;
}

/* Візуально трохи відділяємо блок фільтрів */
.clicks-filters {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(20, 31, 61, 0.035);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1350px) {
    .clicks-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1050px) {
    .clicks-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .clicks-filter-grid .clicks-filter-wide {
        grid-column: span 2 !important;
    }
}

@media (max-width: 680px) {
    .clicks-filters {
        padding: 16px !important;
    }

    .clicks-filter-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .clicks-filter-grid .clicks-filter-wide {
        grid-column: span 1 !important;
    }

    .clicks-filters .statistics-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .clicks-filters .statistics-filter-actions .button {
        width: 100%;
    }
}


/* =========================================================
   CLICKS TABLE — POLISHED
   ========================================================= */

.clicks-table-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.clicks-table-card .table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
}

.clicks-data-table {
    width: 100%;
    min-width: 1620px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}


/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */

.clicks-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;

    padding: 14px 14px;

    color: #72809a;
    border-bottom: 1px solid var(--border);
    background: #f7f9fd;

    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;

    letter-spacing: 0.06em;
    text-transform: uppercase;

    vertical-align: middle;
}


/* ---------------------------------------------------------
   COLUMN WIDTHS
   --------------------------------------------------------- */

.clicks-data-table th:nth-child(1),
.clicks-data-table td:nth-child(1) {
    width: 145px;
}

.clicks-data-table th:nth-child(2),
.clicks-data-table td:nth-child(2) {
    width: 130px;
}

.clicks-data-table th:nth-child(3),
.clicks-data-table td:nth-child(3) {
    width: 120px;
}

.clicks-data-table th:nth-child(4),
.clicks-data-table td:nth-child(4) {
    width: 150px;
}

.clicks-data-table th:nth-child(5),
.clicks-data-table td:nth-child(5) {
    width: 135px;
}

.clicks-data-table th:nth-child(6),
.clicks-data-table td:nth-child(6) {
    width: 72px;
    text-align: center;
}

.clicks-data-table th:nth-child(7),
.clicks-data-table td:nth-child(7) {
    width: 150px;
}

.clicks-data-table th:nth-child(8),
.clicks-data-table td:nth-child(8) {
    width: 130px;
}

.clicks-data-table th:nth-child(9),
.clicks-data-table td:nth-child(9) {
    width: 135px;
}

.clicks-data-table th:nth-child(10),
.clicks-data-table td:nth-child(10) {
    width: 125px;
}

.clicks-data-table th:nth-child(11),
.clicks-data-table td:nth-child(11) {
    width: 240px;
}


/* ---------------------------------------------------------
   ROWS
   --------------------------------------------------------- */

.clicks-data-table tbody td {
    padding: 16px 14px;

    color: var(--text);
    border-bottom: 1px solid var(--border);

    font-size: 13px;
    line-height: 1.35;

    vertical-align: middle;

    transition:
        background 0.14s ease;
}

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

.clicks-data-table tbody tr:hover td {
    background: #fafbfe;
}


/* ---------------------------------------------------------
   DATE
   --------------------------------------------------------- */

.click-date-cell strong {
    display: block;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.click-date-cell .table-note {
    margin-top: 4px;

    color: var(--muted);
    font-size: 11px;
}


/* ---------------------------------------------------------
   CAMPAIGN / DOMAIN / OFFER
   --------------------------------------------------------- */

.clicks-data-table td strong {
    font-weight: 750;
}

.clicks-data-table .table-note {
    margin-top: 4px;

    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}


/* ---------------------------------------------------------
   IP
   --------------------------------------------------------- */

.clicks-data-table td:nth-child(5) code {
    padding: 0;

    color: #33415f;
    background: transparent;

    font-family:
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;
}


/* ---------------------------------------------------------
   GEO
   --------------------------------------------------------- */

.clicks-data-table td:nth-child(6) .status-badge {
    display: inline-flex;
    min-width: 36px;
    height: 30px;

    align-items: center;
    justify-content: center;

    padding: 0 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}


/* ---------------------------------------------------------
   CLICK TYPE
   --------------------------------------------------------- */

.clicks-data-table td:nth-child(8) .status-badge {
    display: inline-flex;

    min-height: 30px;

    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    border-radius: 999px;

    white-space: nowrap;

    font-size: 11px;
    font-weight: 800;
}


/* ---------------------------------------------------------
   PARAMETERS
   --------------------------------------------------------- */

.click-parameters-cell {
    overflow: visible;
}

.click-parameters-details {
    position: relative;
}

.click-parameters-details > summary {
    display: inline-flex;

    align-items: center;
    gap: 7px;

    min-height: 32px;

    padding: 6px 10px;

    color: #315efb;

    border: 1px solid rgba(49, 94, 251, 0.18);
    border-radius: 9px;

    background: rgba(49, 94, 251, 0.055);

    cursor: pointer;

    font-size: 11px;
    font-weight: 800;

    list-style: none;

    white-space: nowrap;
}

.click-parameters-details > summary::-webkit-details-marker {
    display: none;
}

.click-parameters-details > summary::before {
    content: "›";

    display: inline-block;

    font-size: 16px;
    line-height: 1;

    transition:
        transform 0.16s ease;
}

.click-parameters-details[open] > summary::before {
    transform: rotate(90deg);
}

.click-parameters-details[open] > summary {
    border-color: rgba(49, 94, 251, 0.35);
    background: rgba(49, 94, 251, 0.1);
}

.click-parameter-list {
    min-width: 380px;
    max-width: 520px;

    margin-top: 9px;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 11px;

    background: #fff;

    box-shadow:
        0 12px 30px rgba(20, 31, 61, 0.08);
}

.click-parameter-row {
    display: grid;

    grid-template-columns:
        minmax(110px, 0.8fr)
        14px
        minmax(180px, 1.4fr);

    gap: 6px;

    align-items: start;

    padding: 8px 10px;

    border-bottom: 1px solid var(--border);

    font-size: 11px;
}

.click-parameter-row:last-child {
    border-bottom: 0;
}

.click-parameter-key {
    color: #53617a;
    font-weight: 800;

    overflow-wrap: anywhere;
}

.click-parameter-value {
    color: var(--text);

    overflow-wrap: anywhere;
    white-space: normal;
}


/* ---------------------------------------------------------
   OS + DEVICE
   --------------------------------------------------------- */

.click-os-cell {
    color: #26324a;
    font-size: 12px;
    line-height: 1.3;
}

.clicks-data-table td:nth-child(10) {
    color: #33415f;
    font-size: 12px;
}


/* ---------------------------------------------------------
   REFERRER
   --------------------------------------------------------- */

.click-referrer-cell {
    max-width: 240px;
}

.click-referrer-cell a {
    display: block;

    max-width: 220px;

    overflow: hidden;

    color: #315efb;

    font-size: 12px;

    text-decoration: none;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.click-referrer-cell a:hover {
    text-decoration: underline;
}

.click-referrer-cell .muted {
    color: #8d98ad;
}


/* ---------------------------------------------------------
   HORIZONTAL SCROLLBAR
   --------------------------------------------------------- */

.clicks-table-card .table-scroll::-webkit-scrollbar {
    height: 9px;
}

.clicks-table-card .table-scroll::-webkit-scrollbar-track {
    background: #f2f4f8;
}

.clicks-table-card .table-scroll::-webkit-scrollbar-thumb {
    border: 2px solid #f2f4f8;
    border-radius: 999px;
    background: #bec6d4;
}

.clicks-table-card .table-scroll::-webkit-scrollbar-thumb:hover {
    background: #9da8ba;
}


/* =========================================================
   CLICKS PARAMETERS — FLOATING DROPDOWN
   ========================================================= */

.click-parameters-details {
    position: relative;
    display: inline-block;
}

.click-parameters-details[open] {
    z-index: 100;
}

/* Сам список більше не розтягує рядок */
.click-parameters-details .click-parameter-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 200;

    width: 500px;
    min-width: 500px;
    max-width: min(500px, calc(100vw - 80px));
    max-height: 330px;

    margin: 0;

    overflow-x: hidden;
    overflow-y: auto;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 18px 50px rgba(20, 31, 61, 0.16);
}

/* Рядок таблиці при відкритті залишається нормальної висоти */
.clicks-data-table tbody td {
    overflow: visible;
}

.clicks-data-table tbody tr {
    position: relative;
}

/* Трохи компактніші параметри */
.click-parameter-row {
    grid-template-columns:
        minmax(120px, 0.8fr)
        16px
        minmax(200px, 1.4fr);

    padding: 9px 12px;
}

.click-parameter-key,
.click-parameter-value {
    font-size: 11px;
    line-height: 1.35;
}

/* Скрол всередині параметрів */
.click-parameter-list::-webkit-scrollbar {
    width: 7px;
}

.click-parameter-list::-webkit-scrollbar-track {
    background: #f4f6fa;
}

.click-parameter-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c3cad7;
}


/* =========================================================
   Підняти відкритий dropdown над сусідніми рядками
   ========================================================= */

.clicks-data-table tbody tr:has(
    .click-parameters-details[open]
) {
    z-index: 50;
}

.clicks-data-table tbody tr:has(
    .click-parameters-details[open]
) td {
    position: relative;
    z-index: 50;
}


/* Click parameters popup — final alignment */

.click-parameters-details[open] {
    z-index: 1000 !important;
}

.click-parameters-details .click-parameter-list {
    top: calc(100% + 14px) !important;
    z-index: 1000 !important;
}

.clicks-data-table tbody tr:has(
    .click-parameters-details[open]
) {
    z-index: 999 !important;
}

.clicks-data-table tbody tr:has(
    .click-parameters-details[open]
) td {
    z-index: 999 !important;
}

/* Трохи повітря у першому рядку popup */
.click-parameter-list .click-parameter-row:first-child {
    padding-top: 11px;
}

/* Click parameters popup — extra top spacing */

.click-parameters-details .click-parameter-list {
    top: calc(100% + 26px) !important;
}


/* =========================================================
   DASHBOARD V2
   ========================================================= */

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;

    margin-bottom: 22px;
    padding: 28px 30px;

    overflow: hidden;

    border: 1px solid rgba(49, 94, 251, 0.14);
    border-radius: 20px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(49, 94, 251, 0.13),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7f9ff 100%
        );

    box-shadow:
        0 12px 35px rgba(20, 31, 61, 0.045);
}

.dashboard-eyebrow {
    display: inline-block;

    margin-bottom: 9px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 850;

    letter-spacing: 0.12em;
}

.dashboard-hero-copy h2 {
    margin: 0;

    color: var(--text);

    font-size: 24px;
    line-height: 1.2;
}

.dashboard-hero-copy p {
    max-width: 600px;

    margin: 9px 0 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.55;
}

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


/* ---------------------------------------------------------
   METRICS
   --------------------------------------------------------- */

.dashboard-metrics-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 22px;
}

.dashboard-metric-card {
    display: flex;
    min-height: 155px;

    flex-direction: column;

    padding: 20px 22px;

    color: inherit;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: var(--surface);

    text-decoration: none;

    box-shadow:
        0 8px 28px rgba(20, 31, 61, 0.035);

    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.dashboard-metric-card:hover {
    transform: translateY(-2px);

    border-color:
        rgba(49, 94, 251, 0.28);

    box-shadow:
        0 14px 34px rgba(20, 31, 61, 0.075);
}

.dashboard-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #71809b;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.dashboard-card-arrow {
    display: inline-flex;
    width: 28px;
    height: 28px;

    align-items: center;
    justify-content: center;

    color: var(--primary);

    border-radius: 8px;

    background:
        rgba(49, 94, 251, 0.07);

    font-size: 15px;
}

.dashboard-metric-card > strong {
    margin-top: auto;

    color: var(--text);

    font-size: 34px;
    font-weight: 850;
    line-height: 1;
}

.dashboard-metric-card > small {
    margin-top: 7px;

    color: var(--muted);

    font-size: 12px;
}

.dashboard-metric-primary {
    border-color:
        rgba(49, 94, 251, 0.22);

    background:
        linear-gradient(
            145deg,
            rgba(49, 94, 251, 0.075),
            rgba(49, 94, 251, 0.02)
        ),
        #fff;
}


/* ---------------------------------------------------------
   WORKFLOW
   --------------------------------------------------------- */

.dashboard-workflow {
    padding: 24px 26px 26px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: var(--surface);

    box-shadow:
        0 8px 28px rgba(20, 31, 61, 0.03);
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.dashboard-section-heading h2 {
    margin: 0;

    font-size: 17px;
}

.dashboard-section-heading p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 12px;
}

.dashboard-flow {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        34px
        minmax(0, 1fr)
        34px
        minmax(0, 1fr)
        34px
        minmax(0, 1fr);

    align-items: center;
    gap: 8px;
}

.dashboard-flow > a {
    display: flex;
    min-height: 82px;

    align-items: center;
    gap: 13px;

    padding: 14px;

    color: inherit;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #fafbfe;

    text-decoration: none;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.dashboard-flow > a:hover {
    border-color:
        rgba(49, 94, 251, 0.3);

    background:
        rgba(49, 94, 251, 0.035);
}

.dashboard-flow > a > span {
    display: inline-flex;
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    align-items: center;
    justify-content: center;

    color: var(--primary);

    border-radius: 10px;

    background:
        rgba(49, 94, 251, 0.08);

    font-size: 11px;
    font-weight: 850;
}

.dashboard-flow strong {
    display: block;

    font-size: 13px;
}

.dashboard-flow small {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.dashboard-flow-arrow {
    color: #a4aec0;

    text-align: center;

    font-size: 20px;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 1150px) {
    .dashboard-metrics-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-flow-arrow {
        display: none;
    }
}

@media (max-width: 760px) {
    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;

        padding: 22px;
    }

    .dashboard-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero-actions .button {
        width: 100%;
    }

    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-flow {
        grid-template-columns: 1fr;
    }
}


/* MOBILE BURGER MENU */

.mobile-menu-toggle,
.mobile-menu-close,
.mobile-menu-overlay {
    display: none;
}

@media (max-width: 820px) {
    .admin-layout {
        display: block !important;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1200;

        display: flex;
        width: min(86vw, 310px);
        height: 100dvh !important;
        flex-direction: column;

        padding: 24px 18px !important;

        overflow-x: hidden;
        overflow-y: auto;

        background: var(--sidebar);

        box-shadow:
            18px 0 50px rgba(4, 10, 25, 0.22);

        transform: translateX(-105%);
        transition: transform 0.24s ease;
    }

    .sidebar.mobile-menu-open {
        transform: translateX(0);
    }

    .sidebar-brand {
        margin-bottom: 26px !important;
        padding-right: 48px !important;
    }

    .sidebar-footer {
        position: static !important;
        margin-top: auto !important;
        padding-top: 24px;
    }

    .mobile-menu-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1100;

        display: inline-flex;
        width: 46px;
        height: 46px;

        align-items: center;
        justify-content: center;

        padding: 0;

        color: #17223b;

        border: 1px solid var(--border);
        border-radius: 13px;

        background: rgba(255, 255, 255, 0.96);

        box-shadow:
            0 8px 25px rgba(20, 31, 61, 0.12);

        cursor: pointer;
        font-size: 18px;
    }

    body.mobile-menu-active .mobile-menu-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .mobile-menu-close {
        position: absolute;
        top: 24px;
        right: 18px;

        display: inline-flex;
        width: 38px;
        height: 38px;

        align-items: center;
        justify-content: center;

        padding: 0;

        color: #aeb7cb;

        border: 0;
        border-radius: 10px;

        background: rgba(255, 255, 255, 0.06);

        cursor: pointer;
        font-size: 17px;
    }

    .mobile-menu-close:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 1150;

        display: block;

        background: rgba(7, 13, 27, 0.54);

        opacity: 0;
        visibility: hidden;

        transition:
            opacity 0.22s ease,
            visibility 0.22s ease;
    }

    .mobile-menu-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .admin-content {
        width: 100%;
        padding: 76px 16px 24px !important;
    }

    body.mobile-menu-active {
        overflow: hidden;
    }
}


/* Copy button success state */

.icon-button.js-copy.copy-success {
    color: #15845b !important;
    border-color: #9dd9c3 !important;
    background: #eaf9f3 !important;
}

.icon-button.js-copy.copy-success i {
    font-size: 16px;
}


/* Campaigns table — clean layout */

.campaigns-table {
    width: 100%;
    table-layout: fixed;
}

.campaigns-table th:nth-child(1) {
    width: 43%;
}

.campaigns-table th:nth-child(2) {
    width: 25%;
}

.campaigns-table th:nth-child(3) {
    width: 10%;
}

.campaigns-table th:nth-child(4) {
    width: 10%;
}

.campaigns-table th:nth-child(5) {
    width: 12%;
}

.campaign-main-cell {
    min-width: 0;
}

.campaign-main-cell .tracking-url {
    display: block;
    max-width: 100%;

    margin-top: 3px;

    overflow: hidden;

    color: var(--primary);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.campaign-main-cell .icon-button {
    margin-top: 12px;
}

.campaign-click-count {
    display: block;

    font-size: 16px;
    line-height: 1.2;
}

.campaign-actions-cell {
    text-align: right;
}

.campaign-actions-cell .inline-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
}

@media (max-width: 900px) {
    .campaigns-table {
        min-width: 980px;
    }
}


/* Public Click ID */

.lead-click-id-cell code {
    display: inline-block;

    padding: 6px 9px;

    color: #315efb;

    border: 1px solid rgba(49, 94, 251, 0.15);
    border-radius: 8px;

    background: rgba(49, 94, 251, 0.055);

    font-family:
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;
    font-weight: 700;

    white-space: nowrap;
}


/* Lead details — public Click ID */

.lead-click-public-id code {
    display: inline-block;

    padding: 5px 8px;

    color: #315efb;

    border: 1px solid rgba(49, 94, 251, 0.14);
    border-radius: 7px;

    background: rgba(49, 94, 251, 0.055);

    font-family:
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.02em;
}


/* =========================================================
   DOMAIN -> CAMPAIGNS
   ========================================================= */

.domain-campaign-count {
    display: inline-flex;

    min-width: 38px;
    height: 34px;

    align-items: center;
    justify-content: center;

    padding: 0 10px;

    color: #315efb;

    border: 1px solid rgba(49, 94, 251, 0.18);
    border-radius: 10px;

    background: rgba(49, 94, 251, 0.055);

    font-size: 13px;
    font-weight: 800;

    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.domain-campaign-count:hover {
    border-color: rgba(49, 94, 251, 0.35);
    background: rgba(49, 94, 251, 0.1);
}


.campaign-domain-filter-banner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 16px;
    padding: 14px 16px;

    border: 1px solid rgba(49, 94, 251, 0.16);
    border-radius: 14px;

    background: rgba(49, 94, 251, 0.045);
}

.campaign-domain-filter-banner div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.campaign-domain-filter-banner span {
    color: var(--muted);
    font-size: 12px;
}

.campaign-domain-filter-banner strong {
    color: var(--text);
    font-size: 13px;
}

@media (max-width: 650px) {
    .campaign-domain-filter-banner {
        align-items: stretch;
        flex-direction: column;
    }
}



/* CLICKS FILTER MODAL V1 */

.clicks-filter-toolbar {
    display: flex;
    justify-content: flex-end;

    margin-bottom: 18px;
}

.clicks-filter-open {
    display: inline-flex;

    width: auto;

    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 46px;

    padding-left: 20px;
    padding-right: 20px;
}


.clicks-filter-modal[hidden] {
    display: none !important;
}

.clicks-filter-modal {
    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.clicks-filter-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(12, 20, 39, 0.52);

    backdrop-filter:
        blur(3px);
}

.clicks-filter-dialog {
    position: relative;

    z-index: 1;

    width: min(
        1180px,
        calc(100vw - 48px)
    );

    max-height:
        calc(100vh - 48px);

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: #fff;

    box-shadow:
        0 30px 80px
        rgba(15, 25, 50, 0.22);
}

.clicks-filter-modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    padding: 24px 26px 20px;

    border-bottom:
        1px solid var(--border);
}

.clicks-filter-modal-header h2 {
    margin: 0;

    color: var(--text);

    font-size: 22px;
    line-height: 1.2;
}

.clicks-filter-modal-header p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 13px;
}

.clicks-filter-close {
    display: inline-flex;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    align-items: center;
    justify-content: center;

    padding: 0;

    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #fff;

    cursor: pointer;

    font-size: 17px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.clicks-filter-close:hover {
    border-color:
        rgba(49, 94, 251, 0.25);

    background:
        rgba(49, 94, 251, 0.05);
}

.clicks-filter-modal-body {
    max-height:
        calc(100vh - 155px);

    overflow-y: auto;

    padding: 24px 26px 26px;
}


/*
 * Прибираємо зовнішню картку,
 * бо тепер форма вже всередині modal.
 */

.clicks-filter-modal-body
.clicks-filters {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}


/*
 * Фільтри всередині modal:
 * 3 колонки замість 4 —
 * так вони читаються комфортніше.
 */

.clicks-filter-modal
.clicks-filter-grid {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        ) !important;

    gap: 18px 16px !important;
}

.clicks-filter-modal
.clicks-filter-grid
.clicks-filter-wide {
    grid-column:
        span 2 !important;
}


/*
 * Нижні кнопки
 */

.clicks-filter-modal
.statistics-filter-actions {
    position: sticky;

    bottom: -26px;

    z-index: 2;

    margin: 24px -26px -26px !important;

    padding:
        18px
        26px
        20px !important;

    border-top:
        1px solid var(--border);

    background:
        rgba(255, 255, 255, 0.96);

    backdrop-filter:
        blur(10px);
}


/*
 * Body lock
 */

body.clicks-filter-modal-open {
    overflow: hidden;
}


/*
 * Tablet
 */

@media (max-width: 1000px) {
    .clicks-filter-modal
    .clicks-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;
    }
}


/*
 * Mobile
 */

@media (max-width: 680px) {
    .clicks-filter-toolbar {
        justify-content: stretch;
    }

    .clicks-filter-open {
        width: 100%;
    }

    .clicks-filter-modal {
        align-items: flex-end;

        padding: 0;
    }

    .clicks-filter-dialog {
        width: 100%;

        max-height:
            calc(100vh - 18px);

        border-radius:
            22px
            22px
            0
            0;
    }

    .clicks-filter-modal-header {
        padding:
            20px
            18px
            16px;
    }

    .clicks-filter-modal-body {
        max-height:
            calc(100vh - 125px);

        padding:
            18px;
    }

    .clicks-filter-modal
    .clicks-filter-grid {
        grid-template-columns:
            1fr !important;
    }

    .clicks-filter-modal
    .clicks-filter-grid
    .clicks-filter-wide {
        grid-column:
            span 1 !important;
    }

    .clicks-filter-modal
    .statistics-filter-actions {
        bottom: -18px;

        margin:
            20px
            -18px
            -18px !important;

        padding:
            16px
            18px
            18px !important;
    }
}


/* =========================================================
   CLICKS FILTER TOOLBAR — CLEAN
   ========================================================= */

/* Прибираємо велику білу картку навколо кнопок */
.clicks-filters:has(.clicks-filter-toolbar) {
    margin: 0 0 18px !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}

/* Сам toolbar */
.clicks-filter-toolbar {
    display: flex !important;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin: 0 !important;
    padding: 0 !important;
}

/* Обидві кнопки однакової висоти */
.clicks-filter-toolbar
.button {
    display: inline-flex;

    width: auto;

    min-height: 46px;

    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 0 18px;

    border-radius: 13px;

    white-space: nowrap;
}

/* Скинути */
.clicks-filter-reset {
    text-decoration: none;
}

/* Mobile */
@media (max-width: 680px) {
    .clicks-filter-toolbar {
        display: grid !important;

        grid-template-columns:
            1fr
            1fr;

        gap: 8px;
    }

    .clicks-filter-toolbar
    .button {
        width: 100%;
    }
}


/* Clicks toolbar — reset / export / filters */

.clicks-filter-export {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    text-decoration: none;

    white-space: nowrap;
}

.clicks-filter-toolbar {
    flex-wrap: wrap;
}

@media (max-width: 680px) {
    .clicks-filter-toolbar {
        grid-template-columns:
            1fr
            1fr !important;
    }

    .clicks-filter-open {
        grid-column: span 2;
    }
}


/* Clicks top CSV button */

.clicks-filter-export-top {
    display: inline-flex !important;

    width: auto !important;
    min-height: 46px;

    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 0 18px;

    text-decoration: none !important;

    white-space: nowrap;
}

@media (max-width: 680px) {
    .clicks-filter-toolbar {
        grid-template-columns:
            1fr
            1fr !important;
    }

    .clicks-filter-export-top {
        width: 100% !important;
    }

    .clicks-filter-open {
        grid-column: auto !important;
    }
}



/* LEADS FILTER MODAL V1 */

.leads-filter-toolbar {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin: 0 0 18px;
}

.leads-filter-toolbar .button {
    display: inline-flex;

    width: auto;

    min-height: 46px;

    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 0 18px;

    border-radius: 13px;

    white-space: nowrap;
}

.leads-filter-reset {
    text-decoration: none;
}


.leads-filter-modal[hidden] {
    display: none !important;
}

.leads-filter-modal {
    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.leads-filter-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(12, 20, 39, 0.52);

    backdrop-filter:
        blur(3px);
}

.leads-filter-dialog {
    position: relative;

    z-index: 1;

    width: min(
        1100px,
        calc(100vw - 48px)
    );

    max-height:
        calc(100vh - 48px);

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: #fff;

    box-shadow:
        0 30px 80px
        rgba(15, 25, 50, 0.22);
}

.leads-filter-modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    padding:
        24px
        26px
        20px;

    border-bottom:
        1px solid var(--border);
}

.leads-filter-modal-header h2 {
    margin: 0;

    color: var(--text);

    font-size: 22px;
    line-height: 1.2;
}

.leads-filter-modal-header p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 13px;
}

.leads-filter-close {
    display: inline-flex;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    align-items: center;
    justify-content: center;

    padding: 0;

    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #fff;

    cursor: pointer;

    font-size: 17px;
}

.leads-filter-close:hover {
    border-color:
        rgba(49, 94, 251, 0.25);

    background:
        rgba(49, 94, 251, 0.05);
}

.leads-filter-modal-body {
    max-height:
        calc(100vh - 155px);

    overflow-y: auto;

    padding:
        24px
        26px
        26px;
}


/* Прибираємо стару білу картку форми */

.leads-filter-modal-body form {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}


/* Поля в modal */

.leads-filter-modal-body
.statistics-filter-grid,
.leads-filter-modal-body
.leads-filter-grid,
.leads-filter-modal-body
.filter-grid {
    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        ) !important;

    gap: 18px 16px !important;
}


/* Кнопки Застосувати всередині */

.leads-filter-modal-body
.statistics-filter-actions,
.leads-filter-modal-body
.filter-actions {
    position: sticky;

    bottom: -26px;

    z-index: 2;

    margin:
        24px
        -26px
        -26px !important;

    padding:
        18px
        26px
        20px !important;

    border-top:
        1px solid var(--border);

    background:
        rgba(255, 255, 255, 0.96);

    backdrop-filter:
        blur(10px);
}


body.leads-filter-modal-open {
    overflow: hidden;
}


@media (max-width: 900px) {
    .leads-filter-modal-body
    .statistics-filter-grid,
    .leads-filter-modal-body
    .leads-filter-grid,
    .leads-filter-modal-body
    .filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;
    }
}


@media (max-width: 680px) {

    .leads-filter-toolbar {
        display: grid;

        grid-template-columns:
            1fr
            1fr;
    }

    .leads-filter-toolbar .button {
        width: 100%;
    }

    .leads-filter-modal {
        align-items: flex-end;

        padding: 0;
    }

    .leads-filter-dialog {
        width: 100%;

        max-height:
            calc(100vh - 18px);

        border-radius:
            22px
            22px
            0
            0;
    }

    .leads-filter-modal-header {
        padding:
            20px
            18px
            16px;
    }

    .leads-filter-modal-body {
        max-height:
            calc(100vh - 125px);

        padding: 18px;
    }

    .leads-filter-modal-body
    .statistics-filter-grid,
    .leads-filter-modal-body
    .leads-filter-grid,
    .leads-filter-modal-body
    .filter-grid {
        grid-template-columns:
            1fr !important;
    }
}



/* LEADS FILTER SHELL FIX V1 */

.leads-filter-shellless {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 0 !important;
}

.leads-filter-shellless::before,
.leads-filter-shellless::after {
    display: none !important;
    content: none !important;
}

.leads-filter-shellless .leads-filter-toolbar {
    margin: 0 0 18px !important;
}

@media (max-width: 680px) {
    .leads-filter-shellless .leads-filter-toolbar {
        margin: 0 0 14px !important;
    }
}



/* CLICKS TABLE SHELL CLEAN V1 */

.clicks-table-shell-clean {
    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}

/* Залишаємо лічильник акуратно над таблицею */
.clicks-table-shell-clean
.clicks-found-count-clean {
    margin: 0 0 14px !important;
}

/* Сама таблиця залишається нормальною */
.clicks-table-shell-clean
.table-scroll {
    border: 1px solid var(--border);
    border-radius: 18px;

    overflow: auto;

    background: #fff;
}

@media (max-width: 680px) {
    .clicks-table-shell-clean
    .clicks-found-count-clean {
        margin-bottom: 10px !important;
    }
}


/* Clicks found count — final alignment */

.clicks-table-shell-clean
.clicks-found-count-clean {
    margin:
        0
        0
        14px
        0 !important;

    padding: 0 !important;

    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.3;

    color: var(--text);
}

/* Якщо лічильник знаходиться всередині header-контейнера */
.clicks-table-shell-clean
*:has(> .clicks-found-count-clean) {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Clicks found count — exact table alignment */

.clicks-found-count-clean {
    padding-left: 0 !important;
    margin-left: 0 !important;
    font-weight: 800 !important;
}


/* USER API ACCESS */

.user-api-access-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-top: 12px;
}

.user-api-access-item {
    display: flex;

    align-items: center;

    gap: 12px;

    min-height: 60px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: #fff;

    cursor: pointer;
}

.user-api-access-item:hover {
    border-color:
        rgba(49, 94, 251, 0.28);

    background:
        rgba(49, 94, 251, 0.03);
}

.user-api-access-item input {
    width: 18px;
    height: 18px;

    flex: 0 0 18px;

    accent-color: #315efb;
}

.user-api-access-item span {
    display: flex;

    min-width: 0;

    flex-direction: column;

    gap: 3px;
}

.user-api-access-item strong {
    color: var(--text);

    font-size: 13px;
}

.user-api-access-item small {
    color: var(--muted);

    font-size: 11px;
}

@media (max-width: 680px) {
    .user-api-access-list {
        grid-template-columns: 1fr;
    }
}

/* CLICK DESTINATION BADGES */
.click-destination-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.click-destination-offer {
    background: #e3f7ef;
    color: #147a55;
}

.click-destination-white {
    background: #edf2ff;
    color: #315efb;
}

.click-destination-google {
    background: #eef1f5;
    color: #667085;
}

.click-destination-fallback {
    background: #fff3df;
    color: #a65f00;
}

