.a360-insights-open {
    font-weight: 600;
    text-decoration: none
}

.a360-insights-modal {
    display: none
}

.a360-insights-modal.is-open {
    display: block
}

.a360-insights-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 100000
}

.a360-insights-dialog {
    position: fixed;
    z-index: 100001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(980px, calc(100vw - 40px));
    max-height: calc(100vh - 60px);
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 24px
}

.a360-insights-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 16px
}

.a360-insights-header h2 {
    margin: 0 0 4px
}

.a360-insights-post-title {
    margin: 0;
    color: #646970
}

.a360-insights-close {
    font-size: 32px;
    line-height: 1;
    text-decoration: none
}

.a360-insights-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0
}

.a360-insights-tabs {
    display: flex;
    gap: 8px;
    margin: 0
}

.a360-insights-tabs button {
    border: 1px solid #c3c4c7;
    background: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer
}

.a360-insights-tabs button.active {
    background: #1d2327;
    color: #fff;
    border-color: #1d2327
}

.a360-insights-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 18px
}

.a360-insights-summary strong {
    font-size: 28px
}

.a360-insights-chart-wrap {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px
}

.a360-insights-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px
}

.a360-insights-grid h3 {
    margin-top: 0
}

.a360-insights-export-form {
    margin-top: 20px
}

@media(max-width:780px) {
    .a360-insights-grid {
        grid-template-columns: 1fr
    }

    .a360-insights-dialog {
        width: calc(100vw - 24px);
        padding: 16px
    }
}

.a360-insights-period-nav {
    display: flex;
    align-items: center;
    gap: 10px
}

.a360-insights-period-label {
    min-width: 160px;
    text-align: center
}

.a360-insights-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.a360-insights-period-nav .button:disabled {
    opacity: .45;
    cursor: not-allowed
}

@media(max-width:780px) {
    .a360-insights-toolbar {
        align-items: flex-start
    }

    .a360-insights-period-nav {
        order: 3;
        width: 100%;
        justify-content: center
    }

    .a360-insights-period-label {
        min-width: auto
    }
}

.a360-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dcdcde;
    border-radius: 6px
}

.a360-table-wrap table {
    border: 0
}

.a360-table-wrap thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2
}

.a360-recent-wrap {
    overflow-x: auto
}

.a360-insights-danger-zone {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px
}

.a360-insights-reset-all {
    color: #b32d2e;
    border-color: #b32d2e
}

.a360-insights-reset-all:hover,
.a360-insights-reset-all:focus {
    color: #8a2424;
    border-color: #8a2424
}

.a360-content-selector {
    position: relative;
    max-width: 720px
}

.a360-content-results {
    position: absolute;
    z-index: 1000;
    top: 38px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 280px;
    overflow: auto
}

.a360-content-result {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f0f0f1;
    background: #fff;
    text-align: left;
    cursor: pointer
}

.a360-content-result:hover,
.a360-content-result:focus {
    background: #f6f7f7
}

.a360-content-result.is-selected {
    opacity: .55;
    cursor: not-allowed
}

.a360-content-result.is-empty {
    display: block;
    color: #646970;
    cursor: default
}

.a360-content-result span {
    font-weight: 600
}

.a360-content-result small {
    color: #646970;
    white-space: nowrap
}

.a360-content-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px
}

.a360-content-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 999px;
    padding: 6px 10px
}

.a360-content-pill span {
    font-weight: 600
}

.a360-content-pill small {
    color: #646970
}

.a360-content-remove {
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    color: #646970
}

.a360-content-remove:hover {
    color: #b32d2e
}

@media(max-width:782px) {
    .a360-content-results {
        top: 42px
    }

    .a360-content-result {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px
    }

    .a360-content-pill {
        border-radius: 8px
    }
}

.a360-insights-view-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    border-bottom: 1px solid #dcdcde
}

.a360-insights-view-tabs button {
    border: 0;
    background: transparent;
    border-bottom: 3px solid transparent;
    padding: 10px 12px;
    margin-bottom: -1px;
    cursor: pointer;
    font-weight: 600
}

.a360-insights-view-tabs button.active {
    border-bottom-color: #2271b1;
    color: #2271b1
}

.a360-insights-panel {
    display: none
}

.a360-insights-panel.is-active {
    display: block
}

.a360-insights-panel h3 {
    margin-top: 0
}

.a360-insights-panel .description {
    margin-top: -6px;
    margin-bottom: 12px
}

.a360-insights-chart-wrap .a360-insights-sources-empty {
    text-align: center;
    margin: 10px 0 0
}

.a360-onboarding-notice {
    border-left-color: #2563eb;
}

.a360-onboarding-notice__content {
    padding: 8px 0 10px;
}

.a360-onboarding-notice__content strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
    font-size: 15px;
}

.a360-onboarding-notice__content p {
    max-width: 860px;
}

.a360-onboarding-notice__content ul {
    display: grid;
    gap: 4px;
    margin: 8px 0;
    list-style: disc;
    padding-left: 18px;
}

.a360-onboarding-notice__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.a360-empty-state {
    display: grid;
    gap: 4px;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    text-align: left;
}

.a360-empty-state--compact {
    padding: 12px;
}

.a360-empty-state strong {
    color: #0f172a;
    font-size: 14px;
}

.a360-empty-state span {
    font-size: 13px;
    line-height: 1.45;
}

.a360-dashboard-widget .a360-widget-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.a360-dashboard-widget .a360-widget-kpi {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #f6f7f7;
    padding: 10px;
}

.a360-dashboard-widget .a360-widget-kpi--ai {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.a360-dashboard-widget .a360-widget-kpi strong {
    display: block;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.15;
}

.a360-dashboard-widget .a360-widget-kpi span {
    color: #4b5563;
}

.a360-dashboard-widget .a360-widget-list-title {
    margin: 14px 0 6px;
}

.a360-dashboard-widget .a360-widget-empty {
    margin: 0 0 8px;
    color: #646970;
}

.a360-dashboard-widget .a360-widget-list {
    margin: 0;
}

.a360-dashboard-widget .a360-widget-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f1;
}

.a360-dashboard-widget .a360-widget-list li > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a360-dashboard-widget .a360-widget-list li > strong {
    flex: 0 0 auto;
}

.a360-dashboard-widget .a360-widget-ai-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.a360-dashboard-widget .a360-widget-ai-source .a360-brand-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    font-size: 11px;
}

.a360-dashboard-widget .a360-widget-footer-link {
    margin: 12px 0 0;
}

/* Settings polish */
.a360-insights-settings {
    max-width: 1280px
}

.a360-settings-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 20px 0 18px;
    padding: 24px;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #f6f7f7)
}

.a360-settings-hero h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2
}

.a360-settings-hero p {
    margin: 0;
    color: #50575e;
    font-size: 14px
}

.a360-settings-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.a360-settings-badges span {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c3c4c7;
    border-radius: 999px;
    background: #fff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327
}

.a360-settings-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 18px;
    border-bottom: 1px solid #dcdcde
}

.a360-settings-tabs button {
    appearance: none;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #50575e;
    cursor: pointer;
    font-weight: 600;
    padding: 12px 16px 10px
}

.a360-settings-tabs button:hover,
.a360-settings-tabs button:focus {
    color: #1d2327
}

.a360-settings-tabs button.is-active {
    border-bottom-color: #2271b1;
    color: #1d2327
}

[data-a360-settings-panel][hidden] {
    display: none !important
}

.a360-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start
}

.a360-settings-main {
    min-width: 0
}

.a360-settings-main[data-a360-settings-panel="tracking"] {
    grid-column: 1 / -1
}

.a360-settings-sidebar {
    position: sticky;
    top: 46px;
    display: flex;
    flex-direction: column;
    gap: 16px
}

.a360-settings-sidebar[data-a360-settings-panel="diagnostics"] {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))
}

.a360-settings-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    margin: 0 0 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    overflow: hidden
}

.a360-settings-card>header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f1;
    background: #fbfbfc
}

.a360-settings-card h2 {
    margin: 0;
    font-size: 16px
}

.a360-settings-card header p,
.a360-settings-card-compact p {
    margin: 6px 0 0;
    color: #646970
}

.a360-settings-card .form-table {
    margin: 0
}

.a360-settings-card .form-table th {
    padding-left: 20px;
    width: 190px
}

.a360-settings-card .form-table td {
    padding-right: 20px
}

.a360-settings-card-compact {
    padding: 18px
}

.a360-settings-card-compact h2 {
    margin: 0 0 12px
}

.a360-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px
}

.a360-checkbox-grid label,
.a360-radio-cards label,
.a360-toggle-list label,
.a360-inline-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0
}

.a360-checkbox-grid label {
    align-items: center;
    padding: 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff
}

.a360-checkbox-grid code {
    margin-left: auto;
    font-size: 11px
}

.a360-radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px
}

.a360-radio-cards label {
    padding: 12px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #fff
}

.a360-radio-cards label:has(input:checked) {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    background: #f6fbff
}

.a360-radio-cards strong {
    display: block;
    margin-bottom: 4px
}

.a360-radio-cards small {
    display: block;
    color: #646970;
    line-height: 1.4
}

.a360-toggle-list {
    display: grid;
    gap: 10px
}

.a360-toggle-list label {
    padding: 8px 0
}

.a360-status-list {
    margin: 0
}

.a360-status-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1
}

.a360-status-list li:last-child {
    border-bottom: 0
}

.a360-status-list span {
    font-weight: 600;
    color: #1d2327
}

.a360-danger-card {
    max-width: 940px
}

.a360-danger-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-left: 4px solid #d63638;
    background: #fff
}

.a360-danger-box h3 {
    margin: 0 0 8px;
    color: #b32d2e
}

.a360-danger-box p {
    margin: 0 0 8px
}

.a360-danger-box form {
    flex: 0 0 auto
}

.a360-report-manager-card {
    max-width: 1040px
}

.a360-report-manager {
    padding: 20px
}

.a360-report-manager-create {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 170px auto;
    gap: 14px;
    align-items: end
}

.a360-report-content-picker,
.a360-report-manager-expiry,
.a360-report-manager-output {
    display: grid;
    gap: 6px
}

.a360-report-content-picker {
    position: relative
}

.a360-report-content-results {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 280px;
    overflow: auto;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12)
}

.a360-report-selected-content {
    min-height: 34px
}

.a360-report-manager-output {
    margin-top: 16px
}

.a360-report-manager-list {
    margin-top: 22px
}

.a360-report-manager-list h3 {
    margin: 0 0 10px
}

.a360-report-manager-table {
    overflow-x: auto
}

@media(max-width:960px) {
    .a360-settings-layout {
        grid-template-columns: 1fr
    }

    .a360-settings-sidebar {
        position: static
    }

    .a360-settings-hero {
        align-items: flex-start;
        flex-direction: column
    }

    .a360-settings-badges {
        justify-content: flex-start
    }

    .a360-danger-box {
        align-items: flex-start;
        flex-direction: column
    }

    .a360-report-manager-create {
        grid-template-columns: 1fr
    }

    .a360-settings-card .form-table th {
        width: auto;
        padding-left: 20px
    }
}

@media(max-width:782px) {

    .a360-settings-card .form-table th,
    .a360-settings-card .form-table td {
        display: block;
        width: auto;
        padding: 12px 16px
    }

    .a360-settings-card .form-table th {
        padding-bottom: 0
    }

    .a360-radio-cards,
    .a360-checkbox-grid {
        grid-template-columns: 1fr
    }
}

.a360-insights-views-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    vertical-align: middle;
}

.a360-insights-views-icon span {
    display: block;
    width: 4px;
    background: currentColor;
    border-radius: 2px 2px 0 0;
}

.a360-insights-views-icon span:nth-child(1) {
    height: 6px;
}

.a360-insights-views-icon span:nth-child(2) {
    height: 10px;
}

.a360-insights-views-icon span:nth-child(3) {
    height: 14px;
}

/* Dashboard */
.a360-insights-dashboard {
    max-width: none;
}

.a360-dashboard-shell {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 14px;
    padding: 28px;
    max-width: 1280px;
}

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

.a360-dashboard-header h1 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.a360-dashboard-header p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

/* Dashboard toolbar */
.a360-dashboard-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    margin: 24px 0;
}

.a360-range-tabs,
.a360-quick-ranges,
.a360-period-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.a360-period-control {
    justify-content: center;
    gap: 14px;
}

.a360-range-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    text-decoration: none;
    color: #0f172a;
    background: #fff;
    font-weight: 500;
}

.a360-range-tab.is-active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.a360-range-tab.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.a360-landing-scope-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.a360-landing-scope-tabs span {
    color: #64748b;
    font-size: 13px;
}

.a360-landing-scope-tabs span a {
    margin-left: 6px;
    font-weight: 700;
    text-decoration: none;
}

.a360-landing-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.a360-period-arrow {
    width: 48px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 28px !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.a360-period-arrow.is-disabled {
    opacity: .35;
    pointer-events: none;
}

.a360-period-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    min-width: 260px;
    text-align: center;
}

.a360-report-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.a360-report-table {
    border: 0;
}

.a360-report-table th {
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.a360-report-table td {
    vertical-align: middle;
}

.a360-report-table td:first-child {
    min-width: 240px;
}

.a360-report-table td:last-child {
    min-width: 120px;
    white-space: nowrap;
}

.a360-muted-count {
    color: #64748b;
    font-size: 12px;
    margin-left: 4px;
}

/* KPI cards */
.a360-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.a360-kpi-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 12px 12px 12px;
    min-height: 70px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.a360-kpi-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #2271b1;
}

.a360-kpi-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.a360-kpi-card__top span {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 0;
}

.a360-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 16px;
    font-style: normal;
    opacity: .9;
}

.a360-kpi-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    font-weight: 700;
    margin: 8px 0 4px;
    color: #0f172a;
}

.a360-kpi-card small {
    display: block;
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.a360-kpi-chart {
    display: block;
    width: 100%;
    height: 36px !important;
    margin-top: 12px;
}

.a360-ai-overview {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 14px;
    align-items: stretch;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #fff);
}

.a360-ai-overview__summary {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 10px;
}

.a360-ai-overview__summary span {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.a360-ai-overview__summary strong {
    color: #0f172a;
    font-size: 22px;
    line-height: 1.15;
}

.a360-ai-overview__summary small {
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
}

.a360-ai-source-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    max-height: 88px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.a360-ai-source-chips::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.a360-ai-source-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.a360-ai-source-chip:hover,
.a360-ai-source-chip:focus {
    border-color: #93c5fd;
    box-shadow: 0 1px 4px rgba(37, 99, 235, .15);
}

.a360-ai-source-chip.is-muted {
    opacity: .52;
}

.a360-ai-source-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a360-ai-source-chip strong {
    margin-left: auto;
    color: #0f172a;
    font-size: 13px;
}

/* Dashboard panels */
.a360-dashboard-panels,
.a360-dashboard-analysis-row {
    --a360-dashboard-panel-height: 340px;
    display: grid;
    gap: 16px;
    margin-top: 10px;
    align-items: start;
}

.a360-dashboard-panels {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.a360-dashboard-analysis-row {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    margin-top: 16px;
}

.a360-dashboard-analysis-row .a360-dashboard-chart {
    box-sizing: border-box;
    height: var(--a360-dashboard-panel-height);
    margin: 0;
}

.a360-dashboard-analysis-row .a360-chart-wrap {
    height: calc(var(--a360-dashboard-panel-height) - 72px);
}

.a360-dashboard-panel {
    box-sizing: border-box;
    height: var(--a360-dashboard-panel-height);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.a360-dashboard-panel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.a360-dashboard-panel,
.a360-dashboard-chart {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}

.a360-dashboard-panel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.a360-dashboard-panel h2,
.a360-dashboard-chart__header h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.a360-top-pages-panel table {
    table-layout: fixed;
}

.a360-top-pages-panel th:first-child,
.a360-top-pages-panel td:first-child {
    width: auto;
}

.a360-top-pages-panel th:nth-child(2),
.a360-top-pages-panel td:nth-child(2) {
    width: 58px;
}

.a360-top-pages-panel .button-link {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a360-top-pages-panel th:last-child,
.a360-top-pages-panel td:last-child {
    width: 76px;
}

.a360-dashboard-panel table {
    width: 100%;
    border: none;
    box-shadow: none;
    border-collapse: collapse;
    max-height: 320px;
}

.a360-dashboard-panel thead,
.a360-dashboard-panel tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.a360-dashboard-panel tbody {
    display: block;
    max-height: calc(var(--a360-dashboard-panel-height) - 95px);
    overflow-y: auto;
    padding-bottom: 52px;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#plugin-information .section h2 {
    clear: none !important;
}

.a360-dashboard-panel tbody::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.a360-dashboard-panel th {
    font-weight: 600;
    color: #334155;
}

.a360-dashboard-panel td,
.a360-dashboard-panel th {
    padding: 12px 14px;
}

.a360-dashboard-panel th:last-child,
.a360-dashboard-panel td:last-child {
    text-align: right;
    width: 100px;
}

.a360-dashboard-panel td:last-child {
    font-weight: 600;
    color: #0f172a;
}

.a360-dashboard-panel {
    position: relative;
    overflow: hidden;
}

.a360-dashboard-panel::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: 52px;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0.88) 45%,
            #ffffff 100%);
    box-shadow: inset 0 -10px 18px rgba(15, 23, 42, 0.06);
}

.a360-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    padding: 8px 12px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
}

.a360-active-filter[hidden] {
    display: none;
}

.a360-active-filter a {
    font-weight: 600;
    text-decoration: none;
}

/* Traffic chart */
.a360-dashboard-chart {
    margin: 10px 0;
    padding: 14px;
    transition: opacity 0.15s ease;
}

.a360-dashboard-chart.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.a360-dashboard-chart__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.a360-dashboard-chart__header h2 {
    margin: 0;
}

.a360-dashboard-chart__header span {
    color: #64748b;
    font-size: 13px;
}

.a360-chart-wrap {
    height: 220px;
    position: relative;
}

/* Source icons */
.a360-source-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #0f172a;
}

.a360-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
}

.a360-brand-icon--chatgpt {
    background: #10a37f;
}

.a360-brand-icon--codex {
    background: #0f172a;
    font-size: 10px;
}

.a360-brand-icon--gemini {
    background: linear-gradient(135deg, #7c3aed, #38bdf8);
}

.a360-brand-icon--copilot {
    background: linear-gradient(135deg, #2563eb, #22c55e, #f97316);
}

.a360-brand-icon--perplexity {
    background: #06b6d4;
}

.a360-brand-icon--claude {
    background: #ea580c;
}

.a360-brand-icon--meta-ai {
    background: #1877f2;
}

.a360-brand-icon--mistral {
    background: #f97316;
}

.a360-brand-icon--you {
    background: #7c3aed;
}

.a360-brand-icon--poe {
    background: #111827;
}

.a360-brand-icon--phind {
    background: #2563eb;
}

.a360-brand-icon--deepseek {
    background: #0ea5e9;
}

.a360-brand-icon--grok {
    background: #000;
}

.a360-brand-icon--google {
    background: #4285f4;
}

.a360-brand-icon--facebook {
    background: #1877f2;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

.a360-brand-icon--youtube {
    background: #ff0000;
}

.a360-brand-icon--bing {
    background: #008373;
    font-size: 15px;
}

.a360-brand-icon--direct {
    background: #64748b;
}

.a360-brand-icon--default {
    background: #94a3b8;
}

/* Dashboard mobile */
@media (max-width: 1100px) {
    .a360-dashboard-toolbar {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .a360-period-control {
        justify-content: flex-start;
    }

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

    .a360-ai-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .a360-dashboard-shell {
        padding: 20px;
        max-width: none;
        overflow: hidden;
    }

    .a360-dashboard-header {
        display: block;
    }

    .a360-dashboard-header .button {
        margin-top: 16px;
    }

    .a360-range-tabs,
    .a360-quick-ranges {
        flex-wrap: wrap;
    }

    .a360-period-label {
        min-width: 0;
        white-space: normal;
        text-align: left;
    }

    .a360-kpi-grid,
    .a360-dashboard-panels,
    .a360-dashboard-analysis-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .a360-ai-source-chips {
        grid-template-columns: 1fr;
        max-height: 232px;
    }

    .a360-kpi-card {
        width: auto;
        min-width: 0;
    }

    .a360-kpi-card strong {
        font-size: 30px;
    }

    .a360-dashboard-panel,
    .a360-dashboard-chart {
        overflow-x: auto;
    }

    .a360-chart-wrap {
        height: 220px;
        min-width: 520px;
    }

    .a360-dashboard-panel table {
        min-width: 520px;
    }
}

/* Post statistics modal polish */
.a360-insights-dialog {
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    padding: 28px;
}

.a360-insights-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.a360-insights-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.a360-insights-post-title {
    color: #64748b;
    font-size: 15px;
}

.a360-insights-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 18px 22px;
}

.a360-insights-summary strong {
    font-size: 36px;
    color: #0f172a;
}

.a360-insights-chart-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.a360-insights-tabs button {
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
}

.a360-insights-tabs button.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.a360-insights-view-tabs {
    border-bottom: 1px solid #e2e8f0;
    gap: 20px;
}

.a360-insights-view-tabs button {
    font-size: 15px;
    padding: 14px 0;
}

.a360-insights-view-tabs button.active {
    border-bottom-color: #2271b1;
    color: #2271b1;
}

.a360-insights-period-nav .button,
.a360-insights-quick .button,
.a360-insights-export-form .button,
.a360-insights-danger-zone .button {
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
}

.a360-insights-period-label {
    color: #1f2937;
    font-size: 17px;
    font-weight: 700;
}

.a360-insights-kpis {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.a360-insights-kpi {
    min-width: 0;
}

.a360-insights-kpi {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.a360-insights-kpi strong {
    display: block;
    font-size: 32px;
    line-height: 1;
    color: #0f172a;
}

@media(max-width:782px) {
    .a360-insights-kpis {
        grid-template-columns: 1fr;
    }
}

.a360-insights-kpis {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 18px 0 20px !important;
}

.a360-insights-kpi {
    min-width: 0 !important;
    padding: 16px 18px !important;
}

.a360-insights-kpi strong {
    font-size: 34px !important;
    line-height: 1.05 !important;
    margin: 8px 0 6px !important;
}

@media(max-width:1100px) {
    .a360-insights-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media(max-width:782px) {
    .a360-insights-kpis {
        grid-template-columns: 1fr !important;
    }
}

.a360-insights-kpi small {
    display: flex !important;
    align-items: center;
    gap: 4px;
}

.a360-insights-kpi small span {
    display: inline !important;
}

.a360-insights-summary.a360-insights-kpis {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 18px 0 20px !important;
}

.a360-insights-kpi {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;

    min-height: 70px !important;
    padding: 14px 16px !important;
}

.a360-insights-kpi>span {
    display: block !important;
    color: #64748b !important;
    font-size: 18px !important;
    font-weight: 700;
    margin: 0 0 10px !important;
}

.a360-insights-kpi strong {
    display: block !important;
    font-size: 26px !important;
    line-height: 1 !important;
    margin: 0 0 8px !important;
    color: #0f172a !important;
}

.a360-insights-kpi small {
    display: block !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #334155 !important;
    white-space: normal !important;
}

.a360-insights-kpi small span {
    display: inline !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
}

.a360-insights-report-link {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 14px 0 0;
}

.a360-insights-report-expiry {
    display: flex;
    align-items: center;
    gap: 6px;
}

.a360-insights-report-expiry span {
    font-weight: 600;
}

.a360-insights-report-url {
    min-width: min(100%, 420px);
}

.a360-insights-report-list {
    flex-basis: 100%;
    margin-top: 8px;
}
