
.tp-page { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.tp-page-narrow { max-width: 720px; }
.tp-page-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.5rem; font-weight: 700; margin-bottom: 16px;
}
.tp-muted { color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 60%, transparent)); font-size: 0.875rem; }

.tp-page > .rb-block { margin-bottom: 16px; }

.tp-user-head {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--surface, #1d2330);
    border: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent));
    border-radius: 12px;
}
.tp-uh-avatar { display: inline-block; line-height: 0; }
.tp-uh-meta { flex: 1; min-width: 0; }
.tp-user-name {
    font-size: 1.5rem; font-weight: 700;
    margin: 0;
    color: var(--text-primary, var(--foreground, #111827));
}
.tp-uh-sub {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--text-muted, rgba(0,0,0,0.55));
}

.tp-avatar-init {
    display: inline-flex;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ff5722, #a855f7);
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    border-radius: 50%;
}
.tp-avatar-init.tp-avatar-lg { font-size: 1.75rem; }

.tp-score-card { padding: 0; }
.tp-score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
@media (max-width: 720px) {
    .tp-score-grid { grid-template-columns: 1fr; }
}

.tp-sc-left { padding: 18px 20px; border-right: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent)); }
.tp-sc-right { padding: 18px 20px; }
.tp-sc-row {
    display: grid;
    grid-template-columns: 220px 12px 1fr;
    align-items: center;
    padding: 4px 0;
    font-size: 0.95rem;
}
.tp-sc-label { color: var(--text-primary, var(--foreground, #111827)); }
.tp-sc-label-strong { font-weight: 600; }
.tp-sc-sep { color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 50%, transparent)); }
.tp-sc-value { color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 60%, transparent)); font-weight: 500; }
.tp-sc-pos { color: #34d399; }
.tp-sc-neu { color: #fbbf24; }
.tp-sc-neg { color: #f87171; }
.tp-sc-score { font-weight: 700; }
.tp-sc-score.pos { color: #34d399; }
.tp-sc-score.neg { color: #f87171; }
.tp-sc-score.neu { color: #fbbf24; }
.tp-sc-divider {
    height: 1px;
    margin: 10px 0;
    background: var(--border, color-mix(in srgb, var(--foreground, #111827) 8%, transparent));
}

.tp-period-pills {
    display: flex; gap: 4px; margin-bottom: 14px;
    border-bottom: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent));
}
.tp-pill {
    background: none;
    border: 0;
    padding: 6px 14px;
    color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 60%, transparent));
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tp-pill:hover { color: var(--text-primary, var(--foreground, #111827)); }
.tp-pill.active {
    color: var(--primary, #60a5fa);
    border-bottom-color: var(--primary, #60a5fa);
    font-weight: 600;
}

.tp-period-pane { display: flex; flex-direction: column; gap: 8px; }
.tp-period-row {
    display: grid;
    grid-template-columns: 12px 80px 1fr 40px;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}
.tp-period-dot {
    width: 10px; height: 10px; border-radius: 50%;
}
.tp-period-dot.pos { background: #34d399; }
.tp-period-dot.neu { background: #fbbf24; }
.tp-period-dot.neg { background: #f87171; }
.tp-period-name { color: var(--text-primary, var(--foreground, #111827)); }
.tp-period-bar {
    height: 6px;
    background: color-mix(in srgb, var(--foreground, #111827) 8%, transparent);
    border-radius: 4px;
    overflow: hidden;
}
.tp-period-bar span { display: block; height: 100%; }
.tp-period-bar .ok { background: #34d399; }
.tp-period-bar .warn { background: #fbbf24; }
.tp-period-bar .err { background: #f87171; }
.tp-period-n {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary, var(--foreground, #111827));
    font-weight: 600;
}

.tp-tbl-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    border-bottom: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent));
    gap: 12px;
}
.tp-tbl-filters { display: flex; align-items: center; gap: 8px; }
.tp-select {
    background: var(--surface, #14191f);
    border: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent));
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary, var(--foreground, #111827));
    font: inherit;
    font-size: 0.875rem;
}
.tp-tbl-check {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #22c55e; color: white; border-radius: 6px;
    cursor: pointer;
}
.tp-tbl-count { font-size: 0.875rem; color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 60%, transparent)); }

.tp-tbl-wrap { overflow-x: auto; }
.tp-tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tp-tbl th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 55%, transparent));
    border-bottom: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent));
    background: var(--surface, #1d2330);
}
.tp-tbl td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 6%, transparent));
    vertical-align: top;
}
.tp-th-status, .tp-td-status { width: 30px; text-align: center; }
.tp-th-actions, .tp-td-actions { width: 110px; }
.tp-th-from, .tp-td-from { width: 160px; }
.tp-th-date, .tp-td-date { width: 110px; color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 70%, transparent)); }
.tp-tbl-empty { padding: 24px; text-align: center; color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 55%, transparent)); }

.tp-status-pos { color: #22c55e; font-size: 1.125rem; }
.tp-status-neu { color: #fbbf24; font-size: 1.125rem; }
.tp-status-neg { color: #ef4444; font-size: 1.125rem; }

.tp-td-title-main {
    font-weight: 500;
    color: var(--text-primary, var(--foreground, #111827));
    word-break: break-word;
    overflow-wrap: anywhere;
}
.tp-td-title-msg {
    font-size: 0.75rem;
    color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 55%, transparent));
    margin-top: 2px;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.tp-tbl { table-layout: fixed; }
.tp-th-title, .tp-td-title { max-width: 0; }

.tp-td-actions { display: table-cell; }
.tp-td-actions .tp-act-icon {
    display: inline-flex;
    width: 28px; height: 28px;
    align-items: center; justify-content: center;
    border-radius: 4px;
    color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 60%, transparent));
    text-decoration: none;
    margin-right: 2px;
}
.tp-td-actions .tp-act-icon:hover {
    background: color-mix(in srgb, var(--foreground, #111827) 8%, transparent);
    color: var(--text-primary, var(--foreground, #111827));
}
.tp-act-warn { color: #ef4444 !important; }

.tp-td-from-link {
    color: var(--primary, #60a5fa);
    text-decoration: none;
    font-weight: 500;
}
.tp-td-from-link:hover { text-decoration: underline; }
.tp-td-from-count { font-size: 0.75rem; color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 55%, transparent)); }

.tp-pager { display: flex; gap: 4px; justify-content: center; padding: 16px; }
.tp-pager a {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 60%, transparent));
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    font-size: 0.875rem;
}
.tp-pager a:hover { background: color-mix(in srgb, var(--foreground, #111827) 10%, transparent); color: #fff; }
.tp-pager a.active {
    background: var(--color-primary-500, #3b82f6);
    color: #fff;
    font-weight: 600;
}

.tp-pb-trade-row {
    text-decoration: none;
    color: inherit;
}
.tp-pb-trade-row:hover { opacity: 0.85; }
.tp-pb-trade-row .rb-pb-row__value.tp-pb-pos { color: #22c55e; font-weight: 600; }
.tp-pb-trade-row .rb-pb-row__value.tp-pb-neg { color: #ef4444; font-weight: 600; }
.tp-pb-trade-row .rb-pb-row__value.tp-pb-neu { font-weight: 600; }

.tp-pp-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.tp-pp-cell {
    padding: 10px;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    border-radius: 8px;
    text-align: center;
}
.tp-pp-label { font-size: 0.7rem; opacity: 0.7; text-transform: uppercase; margin-bottom: 4px; }
.tp-pp-value { font-size: 1.25rem; font-weight: 700; }
.tp-score-pos { color: #22c55e; }
.tp-score-neg { color: #ef4444; }
.tp-score-neu { color: #fbbf24; }
.tp-pp-bd { display: flex; align-items: center; justify-content: center; gap: 12px; }
.tp-pp-bd span { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; }
.tp-bd-pos { color: #22c55e; }
.tp-bd-neu { color: #fbbf24; }
.tp-bd-neg { color: #ef4444; }

.tp-pp-subtitle { font-size: 0.875rem; font-weight: 600; margin: 0 0 10px; opacity: 0.85; }
.tp-pp-list { list-style: none; margin: 0; padding: 0; }
.tp-pp-row {
    display: flex; gap: 10px;
    padding: 8px 10px;
    border-left: 3px solid transparent;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    border-radius: 6px;
    margin-bottom: 6px;
}
.tp-pp-row.tp-rating-pos { border-left-color: #22c55e; }
.tp-pp-row.tp-rating-neu { border-left-color: #fbbf24; }
.tp-pp-row.tp-rating-neg { border-left-color: #ef4444; }
.tp-pp-row-icon { margin-top: 3px; }
.tp-pp-row.tp-rating-pos .tp-pp-row-icon { color: #22c55e; }
.tp-pp-row.tp-rating-neu .tp-pp-row-icon { color: #fbbf24; }
.tp-pp-row.tp-rating-neg .tp-pp-row-icon { color: #ef4444; }
.tp-pp-row-body { flex: 1; min-width: 0; }
.tp-pp-row-head {
    display: flex; justify-content: space-between;
    font-size: 0.75rem; margin-bottom: 2px;
}
.tp-pp-row-from { color: var(--primary, #60a5fa); text-decoration: none; }
.tp-pp-row-date { color: var(--text-muted, color-mix(in srgb, var(--foreground, #111827) 55%, transparent)); }
.tp-pp-row-title { font-weight: 500; font-size: 0.875rem; }

.tp-form { display: flex; flex-direction: column; gap: 14px; }
.tp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tp-rating-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-rating-opt {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 12%, transparent));
    border-radius: 6px;
    cursor: pointer;
}
.tp-rating-opt.pos { color: #22c55e; }
.tp-rating-opt.neu { color: #fbbf24; }
.tp-rating-opt.neg { color: #ef4444; }
.tp-rating-opt input { accent-color: currentColor; }
.tp-form-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    border-top: 1px solid var(--border, color-mix(in srgb, var(--foreground, #111827) 6%, transparent));
    padding-top: 12px;
}

.tp-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.tp-avatar-lg { width: 64px; height: 64px; }

.tp-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 8%, transparent));
    color: var(--text-primary, var(--foreground, #111827));
    font-size: 0.875rem;
}
.tp-badge-pos { border-left: 3px solid #22c55e; }
.tp-badge-neg { border-left: 3px solid #ef4444; }
.tp-badge-neu { border-left: 3px solid #fbbf24; }
.tp-badge-score { font-weight: 700; }
.tp-badge-total { opacity: 0.7; font-size: 0.75rem; }

.tp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.tp-stat {
    padding: 12px;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    border-radius: 8px;
    border-left: 3px solid transparent;
}
.tp-stat-label { font-size: 0.75rem; opacity: 0.7; text-transform: uppercase; margin-bottom: 4px; }
.tp-stat-value { font-size: 1.5rem; font-weight: 700; }
.tp-stat-pos { border-left-color: #22c55e; }
.tp-stat-neu { border-left-color: #fbbf24; }
.tp-stat-neg { border-left-color: #ef4444; }

.tp-period-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.tp-period-label { font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; }

.tp-leaderboard {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.tp-leader {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    text-decoration: none;
    color: var(--text-primary, var(--foreground, #111827));
    font-size: 0.875rem;
}
.tp-leader:hover { background: color-mix(in srgb, var(--foreground, #111827) 10%, transparent); }
.tp-leader-score { color: #22c55e; font-weight: 600; }

.tp-feedback-list { list-style: none; margin: 0; padding: 0; }
.tp-feedback-item {
    border-left: 4px solid transparent;
    background: var(--surface-2, color-mix(in srgb, var(--foreground, #111827) 5%, transparent));
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.tp-feedback-item.tp-rating-pos { border-left-color: #22c55e; }
.tp-feedback-item.tp-rating-neu { border-left-color: #fbbf24; }
.tp-feedback-item.tp-rating-neg { border-left-color: #ef4444; }
.tp-feedback-head {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    font-size: 0.875rem; margin-bottom: 6px;
}
.tp-fb-author, .tp-fb-target {
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; color: var(--text-primary, var(--foreground, #111827)); font-weight: 500;
}
.tp-fb-arrow { opacity: 0.4; }
.tp-fb-rating {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tp-fb-rating.pos { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.tp-fb-rating.neu { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.tp-fb-rating.neg { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.tp-fb-time { opacity: 0.5; font-size: 0.75rem; }
.tp-fb-title { font-size: 1rem; font-weight: 600; margin: 4px 0; }
.tp-fb-msg { margin: 4px 0 8px; line-height: 1.5; }
.tp-fb-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 0.75rem; opacity: 0.8;
}
.tp-fb-link { color: var(--primary, #60a5fa); text-decoration: none; }
.tp-fb-actions {
    display: flex; gap: 8px;
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid color-mix(in srgb, var(--foreground, #111827) 6%, transparent);
}
.tp-inline-form { display: inline; }

.tp-cat {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 4px;
    font-weight: 500;
}
.tp-cat-accent  { background: rgba(96, 165, 250, 0.15);  color: #60a5fa; }
.tp-cat-info    { background: rgba(96, 165, 250, 0.15);  color: #60a5fa; }
.tp-cat-success { background: rgba(34, 197, 94, 0.15);   color: #22c55e; }
.tp-cat-warning { background: rgba(251, 191, 36, 0.15);  color: #fbbf24; }
.tp-cat-danger  { background: rgba(239, 68, 68, 0.15);   color: #ef4444; }
.tp-cat-muted   { background: color-mix(in srgb, var(--foreground, #111827) 8%, transparent); color: color-mix(in srgb, var(--foreground, #111827) 70%, transparent); }
