/* Linkrix analytics dashboard */
.an-layout { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.an-main h1 { font-size: 28px; margin: 0 0 4px; }
.an-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.an-controls { display: flex; align-items: center; gap: 12px; }
.an-range select { padding: 6px 8px; border-radius: 8px; border: 1px solid #d4d4d8; background: #fff; font: inherit; margin-left: 6px; }
.an-back { text-decoration: none; color: #2563eb; font-size: 14px; }
.an-back:hover { text-decoration: underline; }

.an-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.an-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .an-grid, .an-grid-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .an-grid, .an-grid-2 { grid-template-columns: 1fr; } }

.an-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.an-card h2 { font-size: 15px; margin: 0 0 12px; color: #334155; font-weight: 600; letter-spacing: 0.01em; }
.an-kpi .an-k { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.an-kpi .an-v { font-size: 28px; font-weight: 700; margin-top: 4px; color: #0f172a; }
.an-kpi { margin-bottom: 0; }

.an-chart { height: 200px; position: relative; }
.an-chart svg { width: 100%; height: 100%; display: block; }
.an-chart .ax { stroke: #e5e7eb; stroke-width: 1; }
.an-chart .ln { fill: none; stroke: #2563eb; stroke-width: 2; }
.an-chart .ar { fill: #2563eb; fill-opacity: 0.08; }
.an-chart .dot { fill: #2563eb; }
.an-chart .lbl { fill: #94a3b8; font-size: 10px; }

.an-bar { list-style: none; padding: 0; margin: 0; }
.an-bar li.row { display: block; padding: 8px 0; font-size: 13px; }
.an-bar li.row .top { display: flex; align-items: center; gap: 8px; }
.an-bar .name { color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.an-bar .val { color: #475569; text-align: right; font-variant-numeric: tabular-nums; flex: 0 0 auto; min-width: 36px; }
.an-bar .bar { background: #2563eb; height: 4px; border-radius: 3px; opacity: 0.7; margin-top: 4px; max-width: 100%; }
.an-bar .flag { font-size: 18px; line-height: 1; flex: 0 0 auto; }

.an-links { list-style: none; padding: 0; margin: 0; }
.an-links li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.an-links li:last-child { border-bottom: none; }
.an-links a { color: #2563eb; text-decoration: none; }
.an-links a:hover { text-decoration: underline; }

.an-plan-banner { background: #fef3c7; border: 1px solid #fbbf24; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; color: #78350f; }
.an-plan-banner.pro { background: #dcfce7; border-color: #22c55e; color: #166534; }
.an-plan-banner a { color: inherit; font-weight: 600; }

.an-badge { display: inline-block; background: #2563eb; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; font-weight: 600; letter-spacing: 0.05em; }

.an-rt { list-style: none; padding: 0; margin: 0; max-height: 240px; overflow: auto; }
.an-rt li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; color: #475569; font-variant-numeric: tabular-nums; }

.an-export-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 14px; background: #2563eb; color: #fff; border-radius: 8px; text-decoration: none; font-size: 13px; border: none; cursor: pointer; font: inherit; }
.btn-secondary { background: #f1f5f9; color: #0f172a; }
.btn:hover { opacity: 0.92; }

.empty { padding: 24px; text-align: center; color: #64748b; }

/* polish3: top-links/search/export-all */
.an-links-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin: 0 0 8px; }
.an-filter { font: inherit; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background:#fff; color:#0f172a; width: 180px; max-width: 50%; }
.an-filter:focus { outline:none; border-color:#2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.an-export-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; padding-top:12px; border-top:1px solid #f1f5f9; }
.an-bar li.row .name a { color: inherit; text-decoration: none; }
.an-bar li.row .name a:hover { text-decoration: underline; color:#2563eb; }
