/* LinkRadar report dashboard (UserPanel/LinkRadar/Dashboard).
   Everything is scoped under .lw-dash, and sides use logical properties so one file serves Arabic (rtl) and English (ltr). */

.lw-dash {
    --lw-primary: #C91D13;
    --lw-green: #39B54A;
    --lw-amber: #FAA61B;
    --lw-blue: #0067B1;
    --lw-gold: #D6A243;
    --lw-text: #2d3748;
    --lw-muted: #5c5c5c;
    --lw-faint: #7f7f7f;
    --lw-border: #DBDFE4;
    --lw-alt: #F3F4F4;

    display: flex;
    flex-direction: column;
    gap: 22px;
    text-align: start;
    color: var(--lw-text);
    margin-top: 16px;
    margin-bottom: 40px;
}

.lw-dash .lw-box {
    position: relative;
    background: #fff;
    border-radius: 24px;
    padding: 26px 28px;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, .04);
}

.lw-dash .lw-grid { display: grid; gap: 22px; align-items: stretch; }
.lw-dash .lw-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lw-dash .lw-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lw-dash .lw-grid-toxic { grid-template-columns: 3fr 9fr; }

/* ---------- page head ---------- */
.lw-dash .lw-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.lw-dash .lw-head .dashboard-title { font-size: 20px; font-weight: 700; margin: 0; }
.lw-dash .lw-back { font-size: 13px; color: var(--lw-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.lw-dash .lw-back:hover { color: var(--lw-primary); }
.lw-dash .lw-meta { margin-top: 6px; font-size: 13px; color: var(--lw-faint); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lw-dash .lw-meta .domain { direction: ltr; unicode-bidi: isolate; font-weight: 500; color: var(--lw-muted); }
.lw-dash .lw-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: #cfcfcf; }

/* ---------- report tabs ---------- */
.lw-dash .lw-tabs-nav {
    display: flex; gap: 4px;
    background: #fff; border-radius: 16px; padding: 8px;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, .04);
    overflow-x: auto;
}
.lw-dash .lw-tabs-nav a {
    flex: 1 1 0; min-width: max-content;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 10px; border-radius: 12px; cursor: pointer;
    font-size: 13px; color: #5c5c5c; text-decoration: none;
    transition: background .15s, color .15s; white-space: nowrap;
}
.lw-dash .lw-tabs-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.lw-dash .lw-tabs-nav a:hover { background: var(--lw-alt); color: var(--lw-text); }
.lw-dash .lw-tabs-nav a.active { background: #FCECEA; color: var(--lw-primary); font-weight: 500; }

.lw-dash .lw-tab-page { display: flex; flex-direction: column; gap: 22px; }
.lw-dash .lw-tab-page[hidden] { display: none; }

.lw-dash .lw-h3 { font-size: 15px; font-weight: 500; color: var(--lw-text); margin: 0; }
.lw-dash .lw-sub { font-size: 13px; color: var(--lw-faint); }

/* ---------- empty state ---------- */
.lw-dash .lw-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; min-height: 150px; text-align: center; padding: 16px;
    color: var(--lw-faint); font-size: 13px; font-weight: 300; line-height: 1.9;
}
.lw-dash .lw-empty svg { opacity: .5; }

.lw-dash .lw-chip { font-size: 11px; padding: 4px 12px; border-radius: 40px; display: inline-block; white-space: nowrap; }

/* short hint under each card title */
.lw-dash .lr-tip {
    display: flex; gap: 8px; align-items: flex-start;
    margin: 4px 0 16px; padding: 10px 14px; border-radius: 14px;
    background: var(--lw-alt); color: var(--lw-muted);
    font-size: 12.5px; font-weight: 300; line-height: 1.9;
}
.lw-dash .lr-tip svg { flex: none; margin-top: 4px; color: var(--lw-primary); }

/* ---------- row 1: health / quality / status ---------- */
.lw-dash .lw-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }

.lw-dash .lw-health-chart { position: relative; height: 210px; }
.lw-dash .lw-health-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    pointer-events: none;
}
.lw-dash .lw-health-num { font-size: 40px; font-weight: 700; color: var(--lw-text); direction: ltr; line-height: 1; }
.lw-dash .lw-health-label { font-size: 13px; font-weight: 300; color: var(--lw-faint); }

.lw-dash .lw-gauge-chart { height: 185px; }
.lw-dash .lw-quality-foot { text-align: center; margin-top: 4px; }
.lw-dash .lw-quality-num { font-size: 30px; font-weight: 700; direction: ltr; }
.lw-dash .lw-quality-diag { font-size: 13px; font-weight: 300; color: var(--lw-muted); line-height: 1.8; margin-top: 6px; }

.lw-dash .lw-status {
    display: flex; flex-direction: column; gap: 14px;
    border-radius: 24px; padding: 26px 28px;
    position: relative; overflow: hidden; height: 100%;
}
.lw-dash .lw-status .sticker { position: absolute; top: 18px; inset-inline-end: 22px; font-size: 44px; line-height: 1; }
.lw-dash .lw-status .label { font-size: 14px; font-weight: 400; color: var(--lw-muted); margin: 0; }
.lw-dash .lw-status .title { font-size: 21px; font-weight: 700; }
.lw-dash .lw-status .desc {
    font-size: 14px; font-weight: 300; line-height: 1.95; color: #2f2f2f; margin: 0;
    max-height: 150px; overflow-y: auto; padding-inline-end: 6px;
}

/* ---------- buttons ---------- */
.lw-dash .lw-btn,
.lw-modal .lw-btn {
    height: 38px; padding: 0 22px;
    border: none; border-radius: 8px;
    font-family: inherit; font-size: 14px; font-weight: 400;
    cursor: pointer; color: #fff; background: var(--lw-primary, #C91D13);
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none; transition: opacity .2s;
}
.lw-dash .lw-btn:hover, .lw-modal .lw-btn:hover { opacity: .9; color: #fff; }
.lw-dash .lw-btn-ghost, .lw-modal .lw-btn-ghost { background: transparent; color: var(--lw-primary, #C91D13); border: 1px solid var(--lw-border, #DBDFE4); }
.lw-dash .lw-btn-ghost:hover, .lw-modal .lw-btn-ghost:hover { color: var(--lw-primary, #C91D13); }
.lw-dash .lw-btn-excel { background: #217346; }
.lw-dash .lw-btn-excel:hover { background: #1a5c38; opacity: 1; }
.lw-dash .lw-btn-disavow { background: #5C6BC0; }
.lw-dash .lw-btn-disavow:hover { background: #4A5AB9; opacity: 1; }

/* ---------- ranged line charts ---------- */
.lw-dash .lw-range { display: inline-flex; gap: 4px; background: var(--lw-alt); padding: 4px; border-radius: 12px; }
.lw-dash .lw-range button {
    border: none; background: transparent;
    font-family: inherit; font-size: 12px; color: var(--lw-muted);
    padding: 5px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.lw-dash .lw-range button.active { background: #fff; color: var(--lw-primary); font-weight: 500; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.lw-dash .lw-line-chart { width: 100%; height: 240px; }

/* ---------- multi line + legend ---------- */
.lw-dash .lw-multi-wrap { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; }
.lw-dash .lw-multi-chart { flex: 1; min-width: 260px; height: 330px; }
.lw-dash .lw-legend { display: flex; flex-direction: column; gap: 10px; min-width: 180px; padding-top: 6px; }
.lw-dash .lw-legend-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--lw-text);
    cursor: pointer; padding: 6px 10px; border-radius: 10px;
    border: 1px solid var(--lw-border); user-select: none;
    transition: background .15s, opacity .15s;
}
.lw-dash .lw-legend-item:hover { background: var(--lw-alt); }
.lw-dash .lw-legend-item.off { opacity: .4; }
.lw-dash .lw-legend-item .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ---------- switch tabs + tables ---------- */
.lw-dash .lw-tabs { display: inline-flex; gap: 4px; background: var(--lw-alt); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.lw-dash .lw-tabs button {
    border: none; background: transparent; cursor: pointer;
    font-family: inherit; font-size: 13px; color: var(--lw-muted);
    padding: 6px 14px; border-radius: 9px;
    display: inline-flex; align-items: center; gap: 7px;
}
.lw-dash .lw-tabs button.active { background: #fff; color: var(--lw-text); font-weight: 500; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.lw-dash .lw-tabs .dot { width: 8px; height: 8px; border-radius: 50%; }

.lw-dash .lw-table-wrap { overflow-x: auto; margin-top: 14px; }
.lw-dash .lw-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.lw-dash .lw-table th {
    text-align: start; font-weight: 500; color: var(--lw-muted);
    font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--lw-border); white-space: nowrap;
}
.lw-dash .lw-table td { padding: 11px 14px; font-weight: 300; color: #747474; font-size: 13px; vertical-align: middle; }
.lw-dash .lw-table tbody tr:nth-child(even) { background: var(--lw-alt); }
.lw-dash .lw-table-bl tbody tr:hover { background: #FCECEA; }
.lw-dash .lw-ltr { direction: ltr; text-align: left; }

.lw-dash .lw-bl-source { max-width: 260px; }
.lw-dash .lw-bl-url {
    display: block; font-size: 12px; color: var(--lw-blue);
    direction: ltr; text-align: left;
    max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lw-dash .lw-bl-anchor {
    display: block; font-size: 12px; color: var(--lw-muted);
    margin-top: 3px; max-width: 240px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lw-dash .lw-bl-target {
    display: block; direction: ltr; text-align: left; font-size: 12px; color: var(--lw-blue);
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lw-dash .lw-domain-link { color: var(--lw-blue); direction: ltr; unicode-bidi: isolate; display: inline-block; font-size: 13px; }

.lw-dash .lw-type { font-size: 11px; padding: 3px 10px; border-radius: 40px; display: inline-block; white-space: nowrap; }
.lw-dash .lw-type-dofollow { background: #EAF7EC; color: #2F9E44; }
.lw-dash .lw-type-nofollow { background: #FFF3E0; color: #E65100; }
.lw-dash .lw-type-ugc { background: #E8EAF6; color: #283593; }
.lw-dash .lw-type-sponsored { background: #FCE4EC; color: #C62828; }

.lw-dash .lw-spam { font-size: 11px; padding: 3px 10px; border-radius: 40px; display: inline-block; }
.lw-dash .lw-spam-low { background: #EAF7EC; color: #2F9E44; }
.lw-dash .lw-spam-mid { background: #FFF8E1; color: #F9A825; }
.lw-dash .lw-spam-high { background: #FFEBEE; color: #C62828; }

.lw-dash .lw-dr { font-weight: 500; direction: ltr; text-align: center; }
.lw-dash .lw-ops { text-align: center; white-space: nowrap; }
.lw-dash .lw-ops-btn {
    width: 30px; height: 30px; border: none; border-radius: 8px;
    background: var(--lw-alt); cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; transition: background .15s;
}
.lw-dash .lw-ops-btn:hover { background: #FCECEA; }
.lw-dash .lw-ops-btn svg { width: 16px; height: 16px; color: var(--lw-muted); }

.lw-dash .lw-table-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--lw-border);
}
.lw-dash .lw-pager { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.lw-dash .lw-pager button {
    min-width: 34px; height: 34px; border: none; border-radius: 8px;
    background: var(--lw-alt); cursor: pointer; font-family: inherit;
    font-size: 13px; color: var(--lw-muted); display: inline-flex;
    align-items: center; justify-content: center; transition: all .15s; padding: 0 8px;
}
.lw-dash .lw-pager button:hover { background: #FCECEA; color: var(--lw-primary); }
.lw-dash .lw-pager button.active { background: var(--lw-primary); color: #fff; font-weight: 500; }
.lw-dash .lw-pager .lw-pager-dots { min-width: 24px; text-align: center; color: var(--lw-faint); font-size: 13px; }

/* ---------- expert box ---------- */
.lw-dash .lw-expert {
    position: relative; border-radius: 24px; overflow: hidden;
    background: linear-gradient(135deg, #fff 0%, #FCECEA 100%);
    border: 1.5px solid rgba(201, 29, 19, .25);
    box-shadow: 0 0 20px 0 rgba(201, 29, 19, .06);
}
.lw-dash .lw-expert .bar { height: 5px; background: var(--lw-primary); }
.lw-dash .lw-expert .in { padding: 24px 28px; }
.lw-dash .lw-expert .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lw-dash .lw-expert .who { display: flex; align-items: center; gap: 12px; }
.lw-dash .lw-expert .avatar {
    width: 46px; height: 46px; border-radius: 50%; background: var(--lw-primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lw-dash .lw-expert .who h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--lw-text); }
.lw-dash .lw-expert .who .sub { font-size: 12px; color: var(--lw-faint); }
.lw-dash .lw-expert .tag {
    font-size: 12px; color: var(--lw-primary); background: rgba(201, 29, 19, .10);
    padding: 6px 14px; border-radius: 40px; display: inline-flex; align-items: center; gap: 6px;
}
.lw-dash .lw-expert .quote { position: relative; margin-top: 16px; }
.lw-dash .lw-expert .quote p { margin: 0; font-size: 14px; font-weight: 300; line-height: 2.1; color: #2f2f2f; white-space: pre-line; }

/* ---------- suggested opportunities + rocket ---------- */
.lw-dash .lw-oppo-head { display: flex; align-items: center; gap: 10px; }
.lw-dash .lw-oppo-head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--lw-text); }
.lw-dash .lw-oppo-dot, .lw-dash .lw-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lw-primary); flex-shrink: 0; }
.lw-dash .lw-oppo-wrap { display: flex; align-items: stretch; gap: 20px; flex-wrap: wrap; }
.lw-dash .lw-rocket { width: 165px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.lw-dash .lw-rocket svg { width: 100%; height: auto; display: block; }
.lw-dash .lw-oppo-cards { flex: 1; min-width: 260px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lw-dash .lw-oppo-card { border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 11px; }
.lw-dash .lw-oppo-card .row1 { display: flex; align-items: center; justify-content: space-between; }
.lw-dash .lw-oppo-card h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--lw-text); }
.lw-dash .lw-oppo-card p { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.95; color: var(--lw-muted); flex: 1; }
.lw-dash .lw-oppo-card a { font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; }
.lw-dash .lw-oppo-card .none { font-size: 13px; color: #9aa1a9; }
.lw-dash .lw-oppo-green { background: #EAF7EC; } .lw-dash .lw-oppo-green a { color: #2F9E44; }
.lw-dash .lw-oppo-blue { background: #EAF1FB; } .lw-dash .lw-oppo-blue a { color: #2995E2; }
.lw-dash .lw-oppo-purple { background: #F2ECFB; } .lw-dash .lw-oppo-purple a { color: #7E5BD0; }

/* ---------- section title, search, chart head ---------- */
.lw-dash .lw-sec-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lw-dash .lw-sec-title-start { display: flex; align-items: center; gap: 10px; }
.lw-dash .lw-sec-title h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--lw-text); }
.lw-dash .lw-pad { padding: 26px 28px; }
.lw-dash .lw-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lw-dash .lw-search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--lw-alt); border: 1px solid var(--lw-border); border-radius: 10px;
    padding: 0 12px; height: 38px; min-width: 220px;
}
.lw-dash .lw-search-box input {
    border: none; background: transparent; outline: none; font-family: inherit;
    font-size: 13px; color: var(--lw-text); width: 100%; height: 100%; padding: 6px 0;
}
.lw-dash .lw-search-box input::placeholder { color: var(--lw-faint); }

/* ---------- referring domains ---------- */
.lw-dash .lw-avgdr-card { display: flex; flex-direction: column; gap: 14px; }
.lw-dash .lw-risk-card { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.lw-dash .lw-risk-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lw-dash .lw-risk-danger { border: 1.5px solid rgba(198, 40, 40, .25); }
.lw-dash .lw-risk-danger .lw-risk-icon { background: rgba(198, 40, 40, .10); }
.lw-dash .lw-risk-safe { border: 1.5px solid rgba(47, 158, 68, .25); }
.lw-dash .lw-risk-safe .lw-risk-icon { background: rgba(47, 158, 68, .10); }
.lw-dash .lw-risk-big { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; gap: 6px; }
.lw-dash .lw-risk-big strong { font-size: 60px; font-weight: 700; line-height: 1; }
.lw-dash .lw-risk-big span { font-size: 13px; color: #7f7f7f; }
.lw-dash .lw-risk-note { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.9; color: var(--lw-muted); }
.lw-dash .lw-risk-note a { color: var(--lw-primary); }

.lw-dash .lw-dist-wrap { display: flex; flex-direction: column; gap: 20px; }
.lw-dash .lw-dist-row { display: flex; align-items: center; gap: 16px; }
.lw-dash .lw-dist-label { display: flex; align-items: center; gap: 8px; min-width: 160px; font-size: 14px; color: var(--lw-text); }
.lw-dash .lw-dist-label small { color: var(--lw-faint); font-size: 12px; }
.lw-dash .lw-dist-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lw-dash .lw-dist-bar-wrap { flex: 1; height: 12px; background: var(--lw-alt); border-radius: 8px; overflow: hidden; }
.lw-dash .lw-dist-bar { height: 100%; border-radius: 8px; transition: width .6s ease; }
.lw-dash .lw-dist-count { min-width: 48px; text-align: center; font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: 40px; direction: ltr; }

/* ---------- smart report ---------- */
.lw-dash .lr-findings { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lw-dash .lr-finding {
    border: 1px solid var(--lw-border); border-radius: 18px; padding: 16px 18px;
    border-inline-start: 4px solid var(--lr-c, var(--lw-faint)); background: #fff;
}
.lw-dash .lr-finding h4 { font-size: 15px; font-weight: 600; margin: 10px 0 6px; color: var(--lw-text); }
.lw-dash .lr-finding p { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.95; color: var(--lw-muted); }
.lw-dash .lr-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lw-dash .lr-action {
    display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px;
    border: 1px solid var(--lw-border); border-radius: 18px; padding: 14px 16px;
}
.lw-dash .lr-action-num {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(201, 29, 19, .1); color: var(--lw-primary); font-weight: 700;
}
.lw-dash .lr-action h4 { font-size: 15px; font-weight: 600; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--lw-text); }
.lw-dash .lr-action p { margin: 0; font-size: 13px; font-weight: 300; line-height: 1.95; color: var(--lw-muted); }
.lw-dash .lr-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lw-dash .lr-insight {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px;
    background: var(--lw-alt); font-size: 13px; line-height: 1.9; color: var(--lw-muted);
}
.lw-dash .lr-insight b { color: var(--lw-text); }
.lw-dash .lr-insight-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; }

.lw-dash .lr-url {
    color: var(--lw-blue); direction: ltr; display: inline-block; max-width: 340px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-size: 13px;
}
.lw-dash .lr-anchor { direction: ltr; display: inline-block; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.lw-dash .lr-cell-anchor { direction: ltr; text-align: left; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-dash .lr-comp-chart { width: 100%; height: 320px; }
.lw-dash tr.lr-is-user td { background: rgba(201, 29, 19, .05); font-weight: 600; }

/* ---------- anchor word cloud ---------- */
.lw-dash #anchorWordCloud { width: 100%; min-height: 320px; position: relative; }
.lw-dash #anchorWordCloud canvas { max-width: 100%; height: auto !important; }

/* ---------- toxic analysis ---------- */
.lw-dash .lw-toxic-health { border: 2px solid var(--lw-primary); border-radius: 20px; display: flex; flex-direction: column; gap: 20px; }
.lw-dash .lw-toxic-health-head { display: flex; align-items: center; gap: 10px; }
.lw-dash .lw-toxic-shield {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(201, 29, 19, .10);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lw-dash .lw-toxic-health-label { font-size: 13px; font-weight: 700; color: var(--lw-primary); }
.lw-dash .lw-toxic-health-body { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lw-dash .lw-toxic-status { font-size: 32px; font-weight: 700; line-height: 1; }
.lw-dash .lw-toxic-pill { font-size: 13px; font-weight: 500; padding: 5px 16px; border-radius: 40px; display: inline-block; }
.lw-dash .lw-toxic-risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lw-dash .lw-toxic-risk-btn {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px;
    border: 1.5px solid var(--lw-border); border-radius: 14px; background: #fff;
    cursor: pointer; font-family: inherit; font-size: 13px; color: var(--lw-text);
    transition: all .15s; text-align: start;
}
.lw-dash .lw-toxic-risk-btn:hover:not(:disabled) { border-color: var(--lw-primary); background: #FCECEA; }
.lw-dash .lw-toxic-risk-btn:disabled { opacity: .45; cursor: not-allowed; }
.lw-dash .lw-toxic-risk-icon {
    width: 34px; height: 34px; border-radius: 10px; background: var(--lw-alt);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--lw-muted);
}
.lw-dash .lw-toxic-risk-label { flex: 1; }
.lw-dash .lw-toxic-risk-count { font-size: 14px; font-weight: 600; color: var(--lw-primary); direction: ltr; min-width: 28px; text-align: center; }
.lw-dash .lw-toxic-risk-badge { font-size: 11px; padding: 4px 12px; border-radius: 40px; display: inline-block; white-space: nowrap; }
.lw-dash .lw-toxic-reason-chip { font-size: 11px; padding: 3px 10px; border-radius: 40px; display: inline-block; white-space: nowrap; background: #FFEBEE; color: #C62828; }

/* ---------- link gap ---------- */
.lw-dash .lw-gap-intro { font-size: 14px; color: var(--lw-muted); line-height: 1.9; margin: 0; }
.lw-dash .lw-gap-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lw-dash .lw-gap-stat { border-radius: 16px; padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.lw-dash .lw-gap-stat .stat-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lw-dash .lw-gap-stat .stat-num { font-size: 28px; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.lw-dash .lw-gap-stat .stat-num small { font-size: 14px; font-weight: 400; }
.lw-dash .lw-gap-stat .stat-label { font-size: 13px; color: var(--lw-muted); }
.lw-dash .lw-gap-stat .stat-hint { font-size: 11px; color: var(--lw-faint); margin-top: 2px; }
.lw-dash .lw-gap-stat-total { background: #FCECEA; }
.lw-dash .lw-gap-stat-total .stat-icon { background: rgba(201, 29, 19, .12); color: var(--lw-primary); }
.lw-dash .lw-gap-stat-total .stat-num { color: var(--lw-primary); }
.lw-dash .lw-gap-stat-comp { background: #EAF1FB; }
.lw-dash .lw-gap-stat-comp .stat-icon { background: rgba(0, 103, 177, .12); color: var(--lw-blue); }
.lw-dash .lw-gap-stat-comp .stat-num { color: var(--lw-blue); }
.lw-dash .lw-gap-stat-safe { background: #EAF7EC; }
.lw-dash .lw-gap-stat-safe .stat-icon { background: rgba(47, 158, 68, .12); color: var(--lw-green); }
.lw-dash .lw-gap-stat-safe .stat-num { color: var(--lw-green); }
.lw-dash .lw-gap-stat-ref { background: #F3F4F4; }
.lw-dash .lw-gap-stat-ref .stat-icon { background: rgba(0, 0, 0, .06); color: var(--lw-muted); }
.lw-dash .lw-gap-stat-ref .stat-num { color: var(--lw-text); }

.lw-dash .lw-gap-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lw-dash .lw-gap-cards.single-col { grid-template-columns: 1fr; }
.lw-dash .lw-gap-card {
    background: #fff; border-radius: 16px; box-shadow: 0 0 16px 0 rgba(0, 0, 0, .04);
    cursor: pointer; transition: box-shadow .2s, transform .15s;
    overflow: hidden; display: flex; flex-direction: column;
    border-inline-start: 5px solid var(--lw-green);
}
.lw-dash .lw-gap-card:hover { box-shadow: 0 4px 24px 0 rgba(0, 0, 0, .08); transform: translateY(-2px); }
.lw-dash .lw-gap-card.spam-mid { border-inline-start-color: var(--lw-amber); }
.lw-dash .lw-gap-card.spam-high { border-inline-start-color: #C62828; }
.lw-dash .lw-gap-card-body { flex: 1; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.lw-dash .lw-gap-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lw-dash .lw-gap-card-domain { font-size: 16px; font-weight: 600; color: var(--lw-text); direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.lw-dash .lw-gap-card-rank { font-size: 13px; color: var(--lw-muted); }
.lw-dash .lw-gap-card-desc { font-size: 13px; color: var(--lw-muted); line-height: 1.8; }
.lw-dash .lw-gap-card-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lw-dash .lw-gap-badge { font-size: 11px; padding: 4px 12px; border-radius: 40px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lw-dash .lw-gap-badge-comp { background: #EAF1FB; color: #2995E2; }
.lw-dash .lw-gap-badge-target { background: #FFEBEE; color: #C62828; text-decoration: line-through; direction: ltr; }
.lw-dash .lw-gap-badge-sep { color: var(--lw-faint); font-size: 11px; }
.lw-dash .lw-gap-card-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; border-top: 1px solid var(--lw-border); background: var(--lw-alt);
}
.lw-dash .lw-gap-card-spam { font-size: 13px; font-weight: 500; direction: ltr; }
.lw-dash .lw-gap-card-cta { font-size: 13px; font-weight: 600; color: var(--lw-primary); }
.lw-dash .lw-gap-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lw-dash .lw-gap-view-toggle, .lw-dash .lw-gap-sort { display: inline-flex; gap: 4px; background: var(--lw-alt); padding: 4px; border-radius: 12px; }
.lw-dash .lw-gap-view-toggle button {
    border: none; background: transparent; cursor: pointer; width: 34px; height: 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center; transition: all .15s; color: var(--lw-muted);
}
.lw-dash .lw-gap-view-toggle button svg { width: 16px; height: 16px; }
.lw-dash .lw-gap-sort button {
    border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 12px;
    color: var(--lw-muted); padding: 5px 14px; border-radius: 9px; transition: all .15s;
}
.lw-dash .lw-gap-view-toggle button.active,
.lw-dash .lw-gap-sort button.active { background: #fff; color: var(--lw-primary); font-weight: 500; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.lw-dash .lw-gap-empty { text-align: center; padding: 60px 20px; color: var(--lw-faint); grid-column: 1 / -1; }

/* ---------- modals (Disavow, gap detail) ---------- */
.lw-modal-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center;
}
.lw-modal-overlay[hidden] { display: none; }
.lw-modal {
    --lw-primary: #C91D13; --lw-text: #2d3748; --lw-muted: #5c5c5c; --lw-faint: #7f7f7f;
    --lw-border: #DBDFE4; --lw-alt: #F3F4F4; --lw-blue: #0067B1; --lw-green: #39B54A; --lw-amber: #FAA61B;
    background: #fff; border-radius: 20px; width: 90%; max-width: 560px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .18); overflow: hidden; text-align: start;
    animation: lwModalIn .2s ease;
}
.lw-modal-wide { max-width: 640px; }
@keyframes lwModalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.lw-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--lw-border); }
.lw-modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--lw-text); }
.lw-modal-close {
    width: 32px; height: 32px; border: none; border-radius: 8px; flex-shrink: 0;
    background: var(--lw-alt); cursor: pointer; font-size: 20px; color: var(--lw-muted);
    display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.lw-modal-close:hover { background: #FCECEA; color: var(--lw-primary); }
.lw-modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.lw-modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--lw-border); }

.lw-modal .lw-slider-wrap { margin-bottom: 20px; }
.lw-modal .lw-slider-label { font-size: 14px; font-weight: 500; color: var(--lw-text); display: block; margin-bottom: 10px; }
.lw-modal .lw-slider-row { display: flex; align-items: center; gap: 16px; }
.lw-modal .lw-slider-row input[type="range"] { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 4px; outline: none; }
.lw-modal .lw-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
    background: var(--lw-primary); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); cursor: pointer;
}
.lw-modal .lw-slider-row input[type="range"]::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--lw-primary); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); cursor: pointer;
}
.lw-modal .lw-slider-value { min-width: 48px; text-align: center; font-size: 22px; font-weight: 700; color: var(--lw-primary); direction: ltr; }
.lw-modal .lw-slider-hint { margin: 10px 0 0; font-size: 13px; color: var(--lw-faint); font-weight: 300; }
.lw-modal .lw-disavow-preview { background: var(--lw-alt); border: 1px solid var(--lw-border); border-radius: 14px; overflow: hidden; }
.lw-modal .lw-disavow-preview-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--lw-border); font-size: 13px; font-weight: 500; color: var(--lw-muted);
}
.lw-modal .lw-disavow-count { background: var(--lw-primary); color: #fff; padding: 3px 12px; border-radius: 40px; font-size: 12px; }
.lw-modal .lw-disavow-pre {
    margin: 0; padding: 16px; font-size: 12px; line-height: 1.8; direction: ltr; text-align: left;
    max-height: 200px; overflow-y: auto; font-family: 'Courier New', monospace;
    color: var(--lw-text); white-space: pre-wrap; word-break: break-all;
}
.lw-modal .lw-gap-detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.lw-modal .lw-gap-detail-head strong { display: block; font-size: 14px; font-weight: 600; color: var(--lw-text); }
.lw-modal .lw-gap-detail-head span { font-size: 12px; color: var(--lw-faint); }
.lw-modal .lw-gap-score-badge {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 48px; height: 48px; border-radius: 50%; font-size: 18px; font-weight: 700; color: #fff;
}
.lw-modal .lw-gap-score-high { background: var(--lw-green); }
.lw-modal .lw-gap-score-mid { background: var(--lw-amber); }
.lw-modal .lw-gap-score-low { background: #C62828; }
.lw-modal .lw-gap-detail-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.lw-modal .lw-gap-detail-table th { text-align: start; font-weight: 500; color: var(--lw-muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--lw-border); width: 45%; }
.lw-modal .lw-gap-detail-table td { padding: 10px 14px; color: var(--lw-text); font-size: 14px; border-bottom: 1px solid #f5f5f5; overflow-wrap: anywhere; }
.lw-modal .lr-detail-link { color: var(--lw-blue); direction: ltr; display: block; text-align: left; word-break: break-all; font-size: 13px; }
.lw-modal .lr-anchor { direction: ltr; display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- word cloud tooltip (lives on body) ---------- */
.wc-tooltip {
    position: fixed; background: #fff; border: 1px solid #DBDFE4; border-radius: 12px;
    padding: 14px 18px; box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
    font-size: 13px; color: #2d3748; z-index: 9999; pointer-events: none;
    opacity: 0; transition: opacity .15s; line-height: 2; max-width: 320px; text-align: start;
}
.wc-tooltip.show { opacity: 1; }
.wc-tooltip strong { color: #C91D13; font-weight: 600; }
.wc-tooltip .wc-row { display: flex; justify-content: space-between; gap: 16px; }
.wc-tooltip .wc-label { color: #7f7f7f; }
.wc-tooltip .wc-val { font-weight: 500; direction: ltr; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
    .lw-dash .lw-grid-2, .lw-dash .lw-grid-3, .lw-dash .lw-grid-toxic { grid-template-columns: 1fr; }
    .lw-dash .lw-gap-summary, .lw-dash .lw-toxic-risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lw-dash .lw-gap-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .lw-dash .lw-oppo-cards { grid-template-columns: 1fr; }
    .lw-dash .lw-dist-row { flex-wrap: wrap; }
    .lw-dash .lw-dist-label { min-width: auto; }
    .lw-dash .lw-rocket { display: none; }
}

@media (max-width: 575px) {
    .lw-dash .lw-gap-summary, .lw-dash .lw-toxic-risk-grid, .lw-dash .lw-gap-cards { grid-template-columns: 1fr; }
    .lw-dash .lw-box, .lw-dash .lw-pad { padding: 20px 16px; }
    .lw-dash .lw-search-box { min-width: 0; width: 100%; }
}

@media print {
    .lw-dash .lw-tabs-nav, .lw-dash .lw-range, .lw-dash .lw-legend, .lw-modal-overlay { display: none !important; }
    .lw-dash .lw-box, .lw-dash .lw-expert { box-shadow: none !important; border: 1px solid #eee; break-inside: avoid; }
}
