/* rt-board.css — Board: columns, cards, goal, drag-drop */

/* ============================================================
   5. BOARD
   ============================================================ */

/* Layout */
.rt-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Columns */
.rt-column {
    background: var(--rt-card-bg);
    border-radius: var(--rt-r3);
    padding: 20px;
    box-shadow: var(--rt-shadow);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
    position: relative;
    border: 1px solid var(--rt-border);
}

/* Минимална височина само когато колоната е разгъната */
.rt-column.rt-expanded {
    min-height: 300px;
}

.rt-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--rt-border);
    flex-shrink: 0;
    border-radius: 8px;
    padding: 10px 14px !important;
    margin-bottom: 16px !important;
    margin-left: -4px;
}
.rt-col-title { font-size: 1.2em; font-weight: 700; margin: 0; }
.rt-col-count { background: var(--rt-card-bg); padding: 3px 10px; border-radius: 999px; font-size: 0.85em; font-weight: 700; color: var(--rt-text); border: 1px solid var(--rt-border); }

.rt-list {
    list-style: none; padding: 0; margin: 0;
    flex: 1; padding-bottom: 20px;
    position: relative; cursor: default !important;
    display: none; /* Скрит по default — видим само при rt-expanded */
    margin-top: 15px;
}

/* Минимална височина на списъка само когато колоната е разгъната */
.rt-column.rt-expanded .rt-list {
    display: block;
    min-height: 200px;
}

/* Empty column hint */
.rt-list:empty::after {
    content: 'Пусни книгата тук';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #BDC3C7; font-size: 1.1em; font-weight: 600;
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.rt-column.rt-drag-over .rt-list:empty::after { opacity: 1; }

/* Drag & Drop */
.sortable-chosen { cursor: grabbing !important; }
.sortable-ghost  { opacity: 0.3; background: var(--rt-primary-soft); border: 2px dashed var(--rt-primary); }
.sortable-drag   { opacity: 0.9; transform: rotate(2deg) scale(1.03); box-shadow: var(--rt-shadow-lg); cursor: grabbing !important; z-index: 1000; }

.rt-column.can-drop { position: relative; }
.rt-column.can-drop::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border: 2px dashed transparent; border-radius: var(--rt-r3);
    pointer-events: none; transition: all 0.2s;
}
.rt-column.can-drop.rt-drag-over::before { border-color: var(--rt-success); background: color-mix(in oklab, var(--rt-success) 5%, transparent); }
.rt-column.rt-drag-over {
    background: var(--rt-success-soft);
    border-color: var(--rt-success);
    box-shadow: 0 0 0 2px var(--rt-success);
}

/* Book Cards */
.rt-book-card {
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    padding: 15px;
    margin-bottom: 12px;
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: default !important;
    position: relative;
    min-height: 100px;
    touch-action: none;
    display: flex;
    flex-direction: column;
}
.rt-book-card:hover { box-shadow: var(--rt-shadow-hover); border-color: var(--rt-border-strong); }
.rt-book-card.dragging { opacity: 0.5; }
.rt-book-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.rt-book-cover {
    width: 100%; aspect-ratio: 2 / 3;
    margin-bottom: 12px; border-radius: var(--rt-r1);
    overflow: hidden;
    background: color-mix(in oklab, var(--rt-primary) 20%, var(--rt-surface2));
    display: flex; align-items: center; justify-content: center;
}
.rt-book-cover img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

.rt-book-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.rt-book-title  { font-size: 1em; font-weight: 600; color: var(--rt-text); flex: 1; line-height: 1.3; font-family: var(--rt-font-display); }
.rt-book-author { font-size: 0.9em; color: var(--rt-text-muted); margin-bottom: 8px; }
.rt-book-series { font-size: 0.8em; color: var(--rt-text-muted); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.rt-book-owned-badge { font-size: 0.8em; color: var(--rt-text-muted); margin-bottom: 6px; }
.rt-book-meta   { display: flex; gap: 10px; margin-bottom: 8px; font-size: 0.85em; color: var(--rt-text-light); }
.rt-meta-item   { display: inline-flex; align-items: center; gap: 4px; }
.rt-book-date   { margin-top: 6px; font-size: 0.8em; color: var(--rt-text-light); font-style: italic; }

/* Delete button */
.rt-delete-btn {
    background: #E74C3C; color: white; border: none;
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; font-size: 18px; line-height: 1; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.rt-delete-btn:hover { background: #C0392B; transform: scale(1.1); }

/* Book Actions (status dropdown + edit button) */
.rt-book-actions {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--rt-border);
}

.rt-status-dropdown {
    width: 100%; min-width: 140px;
    padding: 10px 36px 10px 12px; min-height: 44px; height: auto;
    font-size: 14px; line-height: 1.4;
    border: 1px solid var(--rt-border); border-radius: 6px;
    background: var(--rt-card-bg); color: var(--rt-text);
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1.5L6 6.5L11 1.5" stroke="%23495057" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
    cursor: pointer; transition: all 0.2s ease; font-weight: 500;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    box-sizing: border-box;
}
.rt-status-dropdown:hover { border-color: var(--rt-primary); box-shadow: 0 0 0 3px var(--rt-primary-soft); }
.rt-status-dropdown:focus { outline: none; border-color: var(--rt-primary); box-shadow: 0 0 0 3px var(--rt-primary-soft); }

.rt-edit-btn {
    width: 100%; padding: 10px 14px; height: 42px;
    font-size: 14px;
    background: var(--rt-card-bg);
    color: var(--rt-text);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    cursor: pointer; transition: background 0.15s, border-color 0.15s; flex-shrink: 0;
    line-height: normal; display: flex; align-items: center; justify-content: center;
    gap: 6px; font-weight: 600; font-family: var(--rt-font-body);
}
.rt-edit-btn:hover  { background: var(--rt-surface2); border-color: var(--rt-border-strong); }
.rt-edit-btn:active { background: var(--rt-border); }
.rt-edit-text { display: inline; }

/* Hidden books (load more) */
.rt-book-hidden { display: none !important; }

/* Per-column client filter */
.rt-col-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    flex-shrink: 0;
    overflow: visible;
    min-height: 44px;
}
.rt-col-filter-wrap[hidden],
.rt-col-filter-empty[hidden],
.rt-col-filter-hint[hidden] {
    display: none !important;
}
.rt-col-filter-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    line-height: normal;
    font-size: 14px;
    border: 2px solid var(--rt-border);
    border-radius: 8px;
    box-sizing: border-box;
    background: transparent;
    background: color-mix(in oklab, var(--col-color) 5%, var(--rt-bg));
    color: var(--rt-text);
    font-family: var(--rt-font-body);
}
.rt-col-filter-input:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}
.rt-col-filter-input::placeholder {
    color: var(--rt-text-light);
}
.rt-col-rating-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin: 0;
    min-height: 44px;
    overflow: visible;
    font-size: 13px;
    font-weight: 600;
    color: var(--rt-text);
    font-family: var(--rt-font-body);
}
.rt-col-rating-filter-label {
    line-height: 1.3;
    white-space: nowrap;
}
.rt-col-rating-filter-select {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    max-width: 180px;
    padding: 0 10px;
    line-height: normal;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--rt-border);
    border-radius: 8px;
    background: transparent;
    background: color-mix(in oklab, var(--col-color) 5%, var(--rt-bg));
    color: var(--rt-text);
    font-family: var(--rt-font-body);
}
.rt-col-rating-filter-select:focus {
    outline: none;
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-soft);
}
@media (max-width: 768px) {
    .rt-col-filter-wrap {
        flex-wrap: wrap;
        align-items: stretch;
    }
    .rt-col-filter-input,
    .rt-col-rating-filter {
        flex: 1 0 100%;
    }
    .rt-col-rating-filter-select {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        height: 44px;
        min-height: 44px;
    }
}
.rt-book-filter-hidden { display: none !important; }
.rt-col-filter-empty {
    text-align: center;
    padding: 16px 12px;
    color: var(--rt-text-muted);
    font-size: 14px;
    font-style: italic;
}
.rt-col-filter-hint {
    font-size: 12px;
    color: var(--rt-text-light);
    margin: 0 0 8px;
    padding: 0 2px;
}

/* Scroll to book highlight */
@keyframes rt-book-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--rt-primary) 40%, transparent); background: var(--rt-primary-soft); }
    50%  { box-shadow: 0 0 0 8px transparent; background: var(--rt-primary-soft); }
    100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}
.rt-book-highlight { animation: rt-book-highlight-pulse 2s ease-out; border-radius: 12px; }

/* Desktop color band on cards */
@media (min-width: 769px) {
    .rt-book-card { border-left-width: 3px !important; transition: border-color 0.2s; }
    .rt-book-card:hover { border-left-width: 4px !important; }
}

/* Service Actions (import buttons section) */
.rt-service-actions {
    margin: 40px auto 30px; padding: 25px;
    background: var(--rt-surface2);
    border-radius: var(--rt-r3); border: 1px dashed var(--rt-border-strong); max-width: 900px;
}
.rt-service-title { margin: 0 0 20px 0; text-align: center; color: var(--rt-text); font-size: 18px; font-weight: 600; }
.rt-service-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.rt-service-buttons .rt-btn { min-width: 220px; }
.rt-service-buttons .rt-btn-warning { background: #e74c3c; }
.rt-service-buttons .rt-btn-warning:hover { background: #c0392b; }


/* ============================================================
   6. GOAL CARD
   ============================================================ */

.rt-goal-card {
    background: var(--rt-primary-soft);
    border: 1px solid color-mix(in oklab, var(--rt-primary) 25%, transparent);
    color: var(--rt-text); padding: 28px; border-radius: var(--rt-r3);
    margin-bottom: 30px; box-shadow: var(--rt-shadow);
}
.rt-goal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.rt-goal-info   { display: flex; align-items: center; gap: 15px; flex: 1; }
.rt-goal-emoji  { font-size: 48px; line-height: 1; }
.rt-goal-title h4 { margin: 0; font-size: 1.4em; font-weight: 700; color: var(--rt-text); font-family: var(--rt-font-display); }
.rt-goal-subtitle { margin: 5px 0 0 0; font-size: 1em; color: var(--rt-text-muted); font-weight: 500; }

.rt-btn-edit-goal {
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border); color: var(--rt-text);
    padding: 8px 18px; border-radius: var(--rt-r2); cursor: pointer;
    font-size: 13px; font-weight: 600; transition: background 0.15s; white-space: nowrap;
    font-family: var(--rt-font-body);
}
.rt-btn-edit-goal:hover { background: var(--rt-surface2); border-color: var(--rt-border-strong); }

.rt-goal-progress-bar { background: color-mix(in oklab, var(--rt-primary) 15%, transparent); border-radius: 999px; height: 28px; overflow: hidden; position: relative; margin-bottom: 15px; }
.rt-goal-progress-fill { background: var(--rt-primary); height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.rt-goal-percentage { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-weight: 700; font-size: 13px; color: var(--rt-primary-fg); white-space: nowrap; }
.rt-goal-text         { text-align: center; font-size: 1em; color: var(--rt-text-muted); }
.rt-goal-remaining    { color: var(--rt-text-muted); }
.rt-goal-remaining strong { font-size: 1.1em; font-weight: 700; color: var(--rt-primary); }

.rt-goal-empty { background: var(--rt-surface2); border: 1px solid var(--rt-border); color: var(--rt-text); text-align: center; padding: 40px 30px; border-radius: var(--rt-r3); }
.rt-goal-empty-icon   { font-size: 64px; margin-bottom: 15px; }
.rt-goal-empty h4     { color: var(--rt-text); font-size: 1.5em; margin: 0 0 10px 0; font-family: var(--rt-font-display); }
.rt-goal-empty p      { color: var(--rt-text-muted); margin: 0 0 20px 0; font-size: 1em; }


/* ============================================================
   7. STATS
   ============================================================ */

.rt-stats-controls  { margin-bottom: 20px; display: flex; gap: 10px; align-items: center; }
.rt-stats-loading   { text-align: center; padding: 40px; color: var(--rt-text-light); }
.rt-stats-grid      { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.rt-stat-card       { background: var(--rt-card-bg); border: 1px solid var(--rt-border); padding: 20px; border-radius: var(--rt-r2); text-align: center; box-shadow: var(--rt-shadow); }
.rt-stat-value      { font-size: 1.5em; font-weight: 700; color: var(--rt-primary); margin-bottom: 5px; font-family: var(--rt-font-display); letter-spacing: -0.02em; }
.rt-stat-label      { color: var(--rt-text-light); font-size: 0.9em; }
.rt-chart-container { background: var(--rt-card-bg); border: 1px solid var(--rt-border); padding: 20px; border-radius: var(--rt-r2); margin-bottom: 20px; }
.rt-chart-title     { font-size: 1.1em; font-weight: 700; margin-bottom: 15px; color: var(--rt-text); font-family: var(--rt-font-display); }


/* ============================================================
   8. SEARCH
   ============================================================ */

#rt-search-input {
    width: 100%; padding: 12px; font-size: 16px;
    border: 2px solid var(--rt-border-strong); border-radius: 8px;
    margin-bottom: 20px; box-sizing: border-box;
    background: var(--rt-card-bg); color: var(--rt-text);
}
#rt-search-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: 0 0 0 3px var(--rt-primary-soft); }

#rt-search-results {
    min-height: 300px; max-height: 500px;
    overflow-y: auto; background: var(--rt-surface2); border-radius: var(--rt-r2); margin-bottom: 15px;
    border: 1px solid var(--rt-border);
}

.rt-search-grid         { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.rt-search-section-label{ font-size: 12px; font-weight: 700; color: var(--rt-text-light); text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 4px 6px; border-bottom: 1px solid var(--rt-border); margin-bottom: 4px; }
.rt-search-section-label:first-child { padding-top: 0; }

.rt-search-card { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: var(--rt-r1); cursor: pointer; transition: background 0.15s; border: 1px solid transparent; }
.rt-search-card:hover { background: var(--rt-primary-soft); border-color: color-mix(in oklab, var(--rt-primary) 25%, transparent); }
.rt-search-card-owned { opacity: 0.65; cursor: default; }
.rt-search-card-owned:hover { background: none; border-color: transparent; }
.rt-search-card-owned.rt-search-card-clickable { cursor: pointer; opacity: 1; }
.rt-search-card-owned.rt-search-card-clickable:hover { background: var(--rt-primary-soft); border-color: color-mix(in oklab, var(--rt-primary) 25%, transparent); }
.rt-search-card-owned.rt-search-card-clickable:hover .rt-search-card-badge { background: var(--rt-primary); color: var(--rt-primary-fg); }

.rt-search-thumb             { width: 48px; height: 68px; object-fit: cover; border-radius: var(--rt-r1); flex-shrink: 0; background: var(--rt-surface2); }
.rt-search-thumb-placeholder { width: 48px; height: 68px; background: var(--rt-surface2); border-radius: var(--rt-r1); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.rt-search-card-info         { flex: 1; min-width: 0; }
.rt-search-card-title        { font-weight: 600; font-size: 14px; color: var(--rt-text); margin-bottom: 2px; line-height: 1.35; word-break: break-word; }
.rt-search-card-author       { font-size: 12px; color: var(--rt-text-muted); margin-bottom: 2px; }
.rt-search-card-series       { font-size: 11px; color: var(--rt-text-light); margin-bottom: 4px; }
.rt-search-card-badge        { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-top: 4px; }
.rt-search-card-badge.catalog{ background: var(--rt-primary-soft); color: var(--rt-primary); }
.rt-search-card-badge.owned  { background: var(--rt-success-soft); color: var(--rt-success); }

/* Empty search — suggest book CTA */
.rt-search-empty-with-suggestion {
    padding: 28px 20px;
    text-align: center;
}

.rt-search-empty-with-suggestion .rt-search-state {
    margin: 0 0 14px;
    color: var(--rt-text-muted);
}

.rt-btn-catalog-suggest,
#rt-search-modal .rt-btn-catalog-suggest,
.rt-search-empty-with-suggestion .rt-btn-catalog-suggest {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 12px 18px;
    background: var(--rt-primary-soft) !important;
    color: var(--rt-primary) !important;
    border: 1px solid color-mix(in oklab, var(--rt-primary) 38%, transparent) !important;
    border-radius: var(--rt-r2);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(176, 90, 34, 0.1);
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.rt-btn-catalog-suggest:hover,
.rt-btn-catalog-suggest:focus,
#rt-search-modal .rt-btn-catalog-suggest:hover,
#rt-search-modal .rt-btn-catalog-suggest:focus,
.rt-search-empty-with-suggestion .rt-btn-catalog-suggest:hover,
.rt-search-empty-with-suggestion .rt-btn-catalog-suggest:focus {
    background: color-mix(in oklab, var(--rt-primary) 16%, var(--rt-primary-soft)) !important;
    color: var(--rt-primary-active) !important;
    border-color: var(--rt-primary) !important;
    box-shadow: 0 2px 10px rgba(176, 90, 34, 0.16) !important;
}

.rt-btn-catalog-suggest:active {
    background: color-mix(in oklab, var(--rt-primary) 22%, var(--rt-primary-soft)) !important;
    color: var(--rt-primary-active) !important;
}

/* "Виж книгата" — warm secondary CTA after add success */
.rt-search-goto-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 16px;
    background: var(--rt-primary-soft);
    color: var(--rt-primary);
    border: 1px solid color-mix(in oklab, var(--rt-primary) 40%, transparent);
    border-radius: var(--rt-r2);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--rt-font-body);
    line-height: 1.35;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 1px 4px rgba(176, 90, 34, 0.12);
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.rt-search-card .rt-search-goto-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 7px 12px;
    font-size: 12px;
}

.rt-search-card-owned:has(.rt-search-goto-btn) {
    opacity: 1;
}

.rt-search-goto-btn:hover {
    background: color-mix(in oklab, var(--rt-primary) 14%, var(--rt-primary-soft));
    color: var(--rt-primary-active);
    border-color: var(--rt-primary);
    box-shadow: 0 2px 8px rgba(176, 90, 34, 0.18);
}

.rt-search-goto-btn:active {
    background: color-mix(in oklab, var(--rt-primary) 22%, var(--rt-primary-soft));
    color: var(--rt-primary-active);
}


/* ============================================================
   9. COMMUNITY
   ============================================================ */

.rt-notif-bell {
    position: relative; background: none; border: 1px solid var(--rt-border);
    border-radius: 50%; width: 40px; height: 40px;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s; flex-shrink: 0; color: var(--rt-text-muted);
}
.rt-notif-bell:hover { border-color: var(--rt-primary); color: var(--rt-primary); }

.rt-notif-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--rt-danger); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.rt-notif-dropdown {
    position: fixed; top: 80px; right: 20px;
    width: 340px; max-height: 480px;
    background: var(--rt-card-bg); border: 1px solid var(--rt-border); border-radius: var(--rt-r3); box-shadow: var(--rt-shadow-lg);
    z-index: 9999; overflow: hidden; display: flex; flex-direction: column;
}
.rt-notif-header     { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rt-border); font-weight: 600; color: var(--rt-text); }
.rt-notif-mark-all   { background: none; border: none; color: var(--rt-primary); font-size: 12px; cursor: pointer; }
.rt-notif-list       { overflow-y: auto; flex: 1; }
.rt-notif-item       { padding: 12px 16px; border-bottom: 1px solid var(--rt-border); cursor: pointer; transition: background 0.15s; font-size: 13px; line-height: 1.4; color: var(--rt-text-muted); }
.rt-notif-item:hover { background: var(--rt-surface2); }
.rt-notif-item.unread{ background: var(--rt-primary-soft); }
.rt-notif-actor      { font-weight: 600; color: var(--rt-text); }
.rt-notif-book       { font-style: italic; color: var(--rt-primary); }
.rt-notif-time       { font-size: 11px; color: var(--rt-text-light); margin-top: 2px; }
.rt-notif-empty      { padding: 24px; text-align: center; color: var(--rt-text-light); font-size: 14px; }
.rt-notif-type-badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--rt-primary); margin-right: 4px; }
.rt-notif-announce-excerpt { margin-top: 4px; color: var(--rt-text-muted); font-size: 12px; line-height: 1.45; }
.rt-notif-announce-link    { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--rt-primary); text-decoration: underline; }

/* Community Actions on cards */
.rt-community-actions {
    display: flex; gap: 6px; margin-top: auto; padding-top: 10px;
    border-top: 1px solid var(--rt-border);
}
.rt-community-btn {
    flex: 1; padding: 6px 8px; font-size: 12px; font-weight: 600;
    background: var(--rt-surface2); border: 1px solid var(--rt-border); border-radius: var(--rt-r1);
    cursor: pointer; transition: all 0.15s; color: var(--rt-text-muted); display: flex; align-items: center; gap: 4px;
}
.rt-community-btn:hover { background: var(--rt-primary); color: var(--rt-primary-fg); border-color: var(--rt-primary); }
.rt-community-btn-active { background: var(--rt-primary-soft); border-color: color-mix(in oklab, var(--rt-primary) 35%, transparent); color: var(--rt-primary); }
.rt-community-btn-active:hover { background: var(--rt-primary); color: var(--rt-primary-fg); border-color: var(--rt-primary); }
.rt-community-count { background: var(--rt-primary); color: var(--rt-primary-fg); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; margin-left: 2px; }
.rt-community-btn-active .rt-community-count { background: var(--rt-primary-hover); }
.rt-community-btn:hover .rt-community-count  { background: rgba(255,255,255,0.3); color: #fff; }

/* Community Modal Tabs */
.rt-community-tabs  { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--rt-border); padding-bottom: 0; }
.rt-tab-btn         { padding: 10px 16px; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--rt-text-light); transition: all 0.15s; margin-bottom: -1px; }
.rt-tab-btn:hover   { color: var(--rt-primary); }
.rt-tab-btn.active  { color: var(--rt-primary); border-bottom-color: var(--rt-primary); }
.rt-tab-count       { font-size: 12px; color: var(--rt-text-light); margin-left: 4px; }
.rt-tab-panel       { min-height: 200px; }

/* Community Avg Rating */
.rt-community-avg { display: flex; align-items: center; gap: 6px; margin: -8px 0 16px; padding: 8px 12px; background: var(--rt-warning-soft); border: 1px solid color-mix(in oklab, var(--rt-warning) 30%, transparent); border-radius: var(--rt-r1); font-size: 14px; }
.rt-community-avg-value { font-weight: 700; color: var(--rt-warning); font-size: 15px; }
.rt-community-avg-count { color: var(--rt-text-light); font-size: 12px; }

/* Reviews */
.rt-reviews-filter      { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rt-filter-btn          { background: var(--rt-surface2) !important; border: 1px solid var(--rt-border) !important; border-radius: 999px !important; padding: 4px 12px !important; font-size: 12px !important; cursor: pointer; transition: all 0.15s; color: var(--rt-text-muted) !important; font-weight: 500 !important; line-height: 1.4 !important; }
.rt-filter-btn:hover    { background: var(--rt-border) !important; border-color: var(--rt-border-strong) !important; color: var(--rt-text) !important; }
.rt-filter-btn.active   { background: var(--rt-primary) !important; border-color: var(--rt-primary) !important; color: var(--rt-primary-fg) !important; font-weight: 600 !important; }
.rt-reviews-list        { display: flex; flex-direction: column; gap: 16px; }
.rt-review-card         { background: var(--rt-surface2); border: 1px solid var(--rt-border); border-radius: var(--rt-r2); padding: 16px; }
.rt-review-own          { border-left: 3px solid var(--rt-primary); }
.rt-review-header       { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.rt-review-header-main  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rt-user-author-row     { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rt-user-author-meta    { min-width: 0; }
.rt-review-author       { font-weight: 600; font-size: 14px; color: var(--rt-text); }
.rt-review-date         { font-size: 12px; color: var(--rt-text-light); }
.rt-review-rating-badge { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.rt-review-rating-val   { font-weight: 700; color: var(--rt-warning); font-size: 13px; }
.rt-review-body         { font-size: 14px; line-height: 1.6; color: var(--rt-text-muted); white-space: pre-wrap; }
.rt-review-edit-btn     { background: none; border: none; color: var(--rt-primary); font-size: 12px; cursor: pointer; }
.rt-review-visibility   { font-size: 11px; color: var(--rt-text-light); margin-top: 4px; }
.rt-review-footer       { display: flex; justify-content: flex-end; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rt-border); }

.rt-review-input { width: 100%; padding: 10px 12px; border: 1px solid var(--rt-border); border-radius: var(--rt-r2); font-size: 14px; resize: vertical; box-sizing: border-box; font-family: inherit; min-height: 80px; background: var(--rt-card-bg); color: var(--rt-text); }
.rt-review-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: 0 0 0 3px var(--rt-primary-soft); }
.rt-review-form-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; flex-wrap: wrap; }
.rt-review-public-toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--rt-text); cursor: pointer; }
/* OceanWP боядисва label с черешовия цвят на сайта. Той стои върху самия
   label и бие наследяването, затова цветът е върху надписа и с id на модала.
   Фонът на модала е --rt-card-bg; --rt-text е подбран към него във всяка тема. */
#rt-rating-popup .rt-rating-flags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
}
#rt-community-modal .rt-review-public-toggle,
#rt-rating-popup .rt-review-public-toggle,
#rt-book-detail-modal .rt-review-public-toggle,
#rt-community-modal .rt-spoiler-checkbox,
#rt-community-modal .rt-spoiler-checkbox label {
    color: var(--rt-text);
}
.rt-own-review-section  { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--rt-border); }

@keyframes rt-review-pulse {
    0%, 100% { box-shadow: none; background: transparent; }
    30%       { box-shadow: 0 0 0 4px color-mix(in oklab, var(--rt-primary) 25%, transparent); background: var(--rt-primary-soft); }
}
.rt-review-highlight { animation: rt-review-pulse 2s ease; border-radius: 8px; }

/* Comments */
.rt-comments-list     { display: flex; flex-direction: column; gap: 12px; }
.rt-comment-inner     { background: var(--rt-surface2); border-radius: var(--rt-r1); padding: 12px 14px; border-left: 3px solid transparent; }
.rt-comment[data-depth="0"] > .rt-comment-inner { border-left-color: var(--rt-primary); }
.rt-comment[data-depth="1"] > .rt-comment-inner { border-left-color: var(--rt-success); background: var(--rt-success-soft); }
.rt-comment[data-depth="2"] > .rt-comment-inner { border-left-color: var(--rt-warning); background: var(--rt-warning-soft); }
.rt-comment[data-depth="3"] > .rt-comment-inner,
.rt-comment[data-depth="4"] > .rt-comment-inner,
.rt-comment[data-depth="5"] > .rt-comment-inner,
.rt-comment[data-depth="6"] > .rt-comment-inner { border-left-color: var(--rt-accent); background: var(--rt-accent-soft); }

.rt-comment-replies { margin-left: 20px; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.rt-comment[data-depth="3"] > .rt-comment-replies,
.rt-comment[data-depth="4"] > .rt-comment-replies,
.rt-comment[data-depth="5"] > .rt-comment-replies { margin-left: 8px; }

.rt-comment-header  { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rt-comment-header .rt-user-author-row { flex: 1; min-width: 0; }
.rt-comment-author  { font-weight: 600; font-size: 13px; color: var(--rt-text); }
.rt-comment-time    { font-size: 11px; color: var(--rt-text-light); }
.rt-comment-body    { font-size: 14px; line-height: 1.5; color: var(--rt-text-muted); white-space: pre-wrap; }
.rt-comment-deleted { font-size: 13px; color: var(--rt-text-light); font-style: italic; }
.rt-comment-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.rt-comment-action-btn { background: none; border: none; font-size: 12px; color: var(--rt-text-light); cursor: pointer; padding: 2px 6px; border-radius: var(--rt-r1); transition: all 0.15s; display: flex; align-items: center; gap: 3px; }
.rt-comment-action-btn:hover  { background: var(--rt-surface2); color: var(--rt-text); }
.rt-comment-action-btn.liked  { color: var(--rt-danger); }

.rt-reply-form { margin-top: 8px; margin-left: 24px; }
.rt-reply-form textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--rt-border); border-radius: var(--rt-r1); font-size: 13px; resize: none; box-sizing: border-box; font-family: inherit; background: var(--rt-card-bg); color: var(--rt-text); }
.rt-reply-form textarea:focus { outline: none; border-color: var(--rt-primary); box-shadow: 0 0 0 3px var(--rt-primary-soft); }
.rt-reply-form-actions { display: flex; gap: 6px; margin-top: 6px; }

.rt-new-comment-section { margin-bottom: 20px; }
.rt-new-comment-section .rt-btn { margin-top: 8px; }
.rt-comment-input { width: 100%; padding: 10px 12px; border: 1px solid var(--rt-border); border-radius: var(--rt-r2); font-size: 14px; resize: vertical; box-sizing: border-box; font-family: inherit; background: var(--rt-card-bg); color: var(--rt-text); }
.rt-comment-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: 0 0 0 3px var(--rt-primary-soft); }

/* Share */
.rt-share-btn { background: none; border: 1px solid var(--rt-border); border-radius: var(--rt-r1); padding: 3px 10px; font-size: 12px; color: var(--rt-text-light); cursor: pointer; transition: all 0.15s; }
.rt-share-btn:hover { border-color: var(--rt-primary); color: var(--rt-primary); background: var(--rt-primary-soft); }

/* User link */
.rt-user-link { color: inherit; text-decoration: none; font-weight: 600; border-bottom: 1px dashed currentColor; opacity: 0.85; transition: opacity 0.15s; }
.rt-user-link:hover { opacity: 1; border-bottom-style: solid; }

/* ============================================================
   USER TAGS на board картата + Active Filter Banner
   ============================================================ */

.rt-book-user-tags {
    display:    flex;
    flex-wrap:  wrap;
    gap:        4px;
    margin-bottom: 8px;
}

.rt-book-user-tag {
    display:       inline-block;
    background:    var(--rt-accent-soft);
    color:         var(--rt-accent);
    border-radius: var(--rt-r1);
    font-size:     10px;
    font-weight:   600;
    padding:       2px 7px;
    line-height:   1.5;
    max-width:     120px;
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
    flex-shrink:   0;
    cursor:        pointer;
    transition:    filter 0.12s, box-shadow 0.12s;
    user-select:   none;
}
.rt-book-user-tag:hover {
    filter:     brightness(0.95);
    box-shadow: 0 0 0 1px var(--rt-accent);
}

.rt-book-user-tag-more {
    display:       inline-block;
    background:    var(--rt-surface2);
    color:         var(--rt-text-light);
    border-radius: var(--rt-r1);
    font-size:     10px;
    font-weight:   600;
    padding:       2px 7px;
    line-height:   1.5;
}

/* Active filter banner */
.rt-board-active-filter {
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    gap:           12px;
    background:    var(--rt-accent-soft);
    color:         var(--rt-accent);
    border:        1px solid color-mix(in oklab, var(--rt-accent) 25%, transparent);
    border-radius: var(--rt-r2);
    padding:       10px 14px;
    margin:        0 0 16px;
    font-size:     14px;
    font-weight:   500;
}
.rt-board-active-filter[hidden] { display: none; }

.rt-board-active-filter-text strong {
    font-weight:   700;
    margin-left:   4px;
}

.rt-board-clear-filter {
    background:    transparent;
    border:        none;
    color:         var(--rt-accent);
    font-size:     22px;
    line-height:   1;
    padding:       0 6px;
    cursor:        pointer;
    border-radius: 50%;
    width:         28px;
    height:        28px;
    display:       inline-flex;
    align-items:   center;
    justify-content: center;
    transition:    background 0.15s;
}
.rt-board-clear-filter:hover {
    background: color-mix(in oklab, var(--rt-accent) 18%, transparent);
}
/* ============================================================
   PAGE HEADER (Greeting + Big Title)
   ============================================================ */

.rt-page-greeting {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--rt-text-muted);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .rt-page-greeting {
        padding-top: 18px;
    }
}

.rt-page-title {
    font-family: var(--rt-font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--rt-text);
    letter-spacing: -0.02em;
    margin: 0 0 24px 0;
    line-height: 1.1;
}

/* Намалява visual weight на старото "Reading Trolls" title в .rt-header
   защото вече има по-голямо title горе с името на user-а */
.rt-main-title-secondary {
    font-size: 1.2em;
    color: var(--rt-text-muted);
    font-weight: 600;
}

/* ============================================================
   BOARD STATS CARD (Goal + Pages + Books/Month + Avg Rating)
   ============================================================ */

.rt-stats-card {
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r3);
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--rt-shadow);
}

.rt-stats-card-caption {
    margin: 0 0 18px 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--rt-text-muted);
}

/* Scoped grid клас за board stats — не collid-ва с .rt-stats-grid в statistics page */
/* 2-row layout: goal cell заема целия първи ред (6 колони),
   останалите 6 metric клетки (страници, книги/месец, темп, страници/ден,
   средно стр./книга, оценка) са на втория ред. */
.rt-board-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    align-items: start;
}

.rt-stat-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.rt-stat-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rt-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rt-stat-badge {
    background: var(--rt-primary-soft);
    color: var(--rt-primary);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 600;
}

.rt-stat-number-big {
    font-family: var(--rt-font-display);
    font-size: clamp(28px, 2.6vw, 36px);
    font-weight: 700;
    color: var(--rt-text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.rt-stat-number-muted {
    color: var(--rt-text-light);
}

.rt-stat-suffix {
    font-size: 18px;
    font-weight: 500;
    color: var(--rt-text-muted);
    margin-left: 2px;
}

.rt-stat-label {
    font-size: 13px;
    color: var(--rt-text-muted);
    margin-top: 2px;
}

/* Goal cell — заема целия първи ред над останалите metric клетки */
.rt-stat-cell-goal {
    grid-column: 1 / -1;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rt-border);
}

.rt-stat-goal-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.rt-stat-goal-numbers {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.rt-stat-goal-of {
    font-size: 15px;
    color: var(--rt-text-muted);
    font-weight: 500;
}

.rt-stat-goal-percent {
    font-family: var(--rt-font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--rt-primary);
    letter-spacing: -0.02em;
}

.rt-stat-goal-bar {
    width: 100%;
    height: 8px;
    background: var(--rt-surface2);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}

.rt-stat-goal-bar-fill {
    height: 100%;
    background: var(--rt-primary);
    border-radius: 999px;
    transition: width 0.4s ease;
    min-width: 4px;
}

.rt-stat-goal-edit {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--rt-text-muted);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 0 0;
    margin-top: 4px;
    transition: color 0.15s;
}
.rt-stat-goal-edit:hover {
    color: var(--rt-primary);
}

.rt-stat-goal-empty {
    margin-top: 6px;
}
.rt-stat-goal-empty p {
    font-size: 14px;
    color: var(--rt-text-muted);
    margin: 0 0 10px;
}

/* Tablet — 6 metric клетки в 2 реда от по 3 */
@media (max-width: 1100px) and (min-width: 769px) {
    .rt-board-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
    .rt-stat-cell-goal {
        grid-column: 1 / -1;
    }
}

/* Mobile responsive — 6 metric клетки в 3 реда от по 2 */
@media (max-width: 768px) {
    .rt-board-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .rt-stat-cell-goal {
        grid-column: 1 / -1;
        padding-bottom: 14px;
        margin-bottom: 4px;
    }
    .rt-stat-number-big {
        font-size: 24px;
    }
    .rt-stat-goal-percent {
        font-size: 24px;
    }
    .rt-page-title {
        font-size: 28px;
    }
}

/* ============================================================
   OceanWP override — четим hover на secondary бутоните
   ============================================================ */
/* Темата (OceanWP) налага бял текст на button:hover, което прави
   "Търси тролове" и "Моите тагове" нечетими (бял текст / светъл фон).
   Тези са <button>, докато "Статистики"/"Wishlist" са <a> и не са
   засегнати. Форсираме тъмен текст + светъл фон на hover. */
.rt-quick-actions .rt-btn-secondary:hover,
.rt-quick-actions .rt-btn-secondary:focus,
.rt-quick-actions button.rt-btn-secondary:hover,
.rt-quick-actions button.rt-btn-secondary:focus,
.rt-discover-row .rt-btn-secondary:hover,
.rt-discover-row .rt-btn-secondary:focus {
    background: var(--rt-surface2) !important;
    color: var(--rt-text) !important;
    border-color: var(--rt-border-strong) !important;
}

/* ============================================================
   BOARD FAQ — липсващи данни, импорт и каталог
   ============================================================ */

.rt-board-faq {
    max-width: 1100px;
    margin: 38px auto 34px;
    padding: 0;
    font-family: var(--rt-font-body);
}

.rt-board-faq-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: var(--rt-card-bg) !important;
    border: 1px solid var(--rt-border) !important;
    border-radius: var(--rt-r2);
    color: var(--rt-text) !important;
    font-family: var(--rt-font-display);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--rt-shadow);
    transition: background .15s, color .15s, border-color .15s;
}

.rt-board-faq-toggle:hover,
.rt-board-faq-toggle:focus {
    background: var(--rt-surface2) !important;
    color: var(--rt-text) !important;
    outline: none;
}

.rt-board-faq-toggle-icon {
    flex-shrink: 0;
    font-size: 20px;
    color: var(--rt-primary);
    transition: transform .2s;
    line-height: 1;
}

.rt-board-faq-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    margin-top: 12px;
}

.rt-board-faq-list[hidden] {
    display: none !important;
}

.rt-board-faq-item {
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    overflow: hidden;
    box-shadow: var(--rt-shadow);
    transition: border-color .15s, box-shadow .15s;
}

.rt-board-faq-item:has(.rt-board-faq-q[aria-expanded="true"]) {
    border-color: var(--rt-border-strong);
    box-shadow: var(--rt-shadow-hover);
}

.rt-board-faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--rt-card-bg) !important;
    border: none !important;
    font-family: var(--rt-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--rt-text) !important;
    text-align: left;
    cursor: pointer;
    line-height: 1.45;
    transition: background .15s, color .15s;
}

.rt-board-faq-q:hover,
.rt-board-faq-q:focus {
    background: var(--rt-surface2) !important;
    color: var(--rt-text) !important;
    outline: none;
}

.rt-board-faq-icon {
    flex-shrink: 0;
    font-size: 18px;
    color: var(--rt-primary);
    transition: transform .2s;
    line-height: 1;
}

.rt-board-faq-q[aria-expanded="true"] .rt-board-faq-icon {
    transform: rotate(45deg);
}

.rt-board-faq-a {
    display: none;
    padding: 12px 18px 15px;
    font-size: 14px;
    color: var(--rt-text-muted);
    line-height: 1.65;
    border-top: 1px solid var(--rt-border);
    background: var(--rt-card-bg);
}

.rt-board-faq-a.rt-board-faq-open {
    display: block;
}

@media (max-width: 768px) {
    .rt-board-faq {
        margin: 32px auto 28px;
    }

    .rt-board-faq-toggle {
        font-size: 17px;
        padding: 14px 14px;
    }

    .rt-board-faq-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .rt-board-faq-q {
        padding: 13px 14px;
        font-size: 14px;
    }

    .rt-board-faq-a {
        padding: 11px 14px 14px;
        font-size: 13px;
    }
}

/* ============================================================
   REMOVE DUPLICATES — preview с checkbox-и
   ============================================================ */

.rt-dedup-preview {
    max-height: 420px;
    overflow-y: auto;
    margin: 12px 0;
    padding-right: 4px;
}

.rt-dedup-item {
    background: var(--rt-surface2);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.rt-dedup-keep {
    font-size: 14px;
    color: var(--rt-text);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rt-border);
}

.rt-dedup-delete-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--rt-text-muted);
    line-height: 1.4;
}

.rt-dedup-delete-check input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 2px;
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--rt-primary);
}

.rt-dedup-delete-check span {
    flex: 1;
}

.rt-dedup-hint {
    font-size: 13px;
    color: var(--rt-text-muted);
    margin: 0 0 8px;
    font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
   Жанрови теми — switcher (бутон + падащ панел)
   ───────────────────────────────────────────────────────────── */
.rt-theme-switch { position: relative; display: inline-block; }

.rt-theme-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 200;
    width: 240px;
    padding: 12px;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r3);
    box-shadow: var(--rt-shadow-lg);
}
.rt-theme-panel[hidden] { display: none; }

.rt-theme-panel-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.rt-theme-panel-head > span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rt-text-light);
}

.rt-theme-mode {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--rt-surface2);
    border-radius: var(--rt-r1);
}
.rt-theme-mode-btn {
    flex: 1;
    padding: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--rt-text-muted);
    cursor: pointer;
}
.rt-theme-mode-btn.is-active {
    background: var(--rt-card-bg);
    color: var(--rt-text);
    box-shadow: var(--rt-shadow);
}

.rt-theme-skins {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.rt-theme-skin-btn {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r1);
    background: var(--rt-surface2);
    color: var(--rt-text-muted);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rt-theme-skin-btn:hover {
    border-color: var(--rt-border-strong);
    color: var(--rt-text);
}
.rt-theme-skin-btn.is-active {
    border-color: var(--rt-primary);
    background: var(--rt-primary-soft);
    color: var(--rt-primary);
}

/* ============================================================
   QUICK ACTIONS — mobile (2-колонна мрежа)
   DOM редът в board-1.php вече е желаният визуален ред:
   1 search · 2 тролове · 3 статистики · 4 тагове · 5 wishlist · 6 покупки.
   Темата е в header toolbar. В quick actions влиза само ако този toolbar липсва.
   Затова НЕ ползваме крехки nth-child `order` правила — разчитаме на
   естествения ред. discover-inline се скрива от rt-community и вместо
   него се показва full-width бутонът .rt-discover-row отдолу.
   ============================================================ */

@media (max-width: 768px) {
    .rt-quick-actions:not(.rt-guest-actions) {
        width: 100%;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        align-items: stretch;
    }

    /* Неутрализираме flex-кръпката от rt-community: нулираме `order`
       (иначе .rt-btn получават order:1, а .rt-theme-switch остава 0 и
       изскача най-отпред) и махаме phantom-а `::after`, който в grid
       контекст заемаше реална клетка и разместваше двойките. */
    .rt-quick-actions:not(.rt-guest-actions) > * {
        order: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .rt-quick-actions:not(.rt-guest-actions)::after { display: none !important; }

    .rt-quick-actions:not(.rt-guest-actions) > .rt-btn {
        min-height: 44px;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }

    /* Mobile dropdown като bottom sheet, за да не излиза извън viewport-а */
    .rt-theme-panel {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        bottom: 16px !important;
        width: auto !important;
        max-width: none !important;
        max-height: min(70vh, 520px);
        overflow-y: auto;
        z-index: 10050;
        padding: 14px;
        border-radius: 18px;
    }

    .rt-theme-panel-head {
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--rt-card-bg);
        padding-bottom: 10px;
    }

    .rt-theme-skins {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .rt-theme-skin-btn {
        min-height: 42px;
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }

    .rt-theme-mode-btn {
        min-height: 38px;
    }
}
/* ─────────────────────────────────────────────────────────────
   Намери дубликати — опциите за метод. Нямаха никакъв CSS →
   наследяваха тъмния label цвят на темата и бяха невидими в dark.
   ───────────────────────────────────────────────────────────── */
.rt-duplicate-modes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rt-mode-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    background: var(--rt-surface2);
    color: var(--rt-text);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.rt-mode-option:hover {
    border-color: var(--rt-border-strong);
}
.rt-mode-option:has(input:checked) {
    border-color: var(--rt-primary);
    background: var(--rt-primary-soft);
}
.rt-mode-option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.rt-mode-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--rt-text);
}
.rt-mode-content p {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--rt-text-muted);
}
.rt-mode-content small {
    font-size: 12px;
    color: var(--rt-text-light);
}

/* ============================================================
   Profile tabs (?user= — library / wishlists)
   ============================================================ */

.rt-profile-tabs {
    margin: 8px 0 20px;
}

.rt-profile-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--rt-border, #e5e0d8);
    padding-bottom: 0;
}

.rt-profile-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    text-decoration: none;
    color: var(--rt-text-muted, #666);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.rt-profile-tab:hover {
    color: var(--rt-text);
    background: var(--rt-surface-muted, rgba(0, 0, 0, 0.03));
}

.rt-profile-tab.is-active {
    color: var(--rt-text);
    background: var(--rt-card-bg, #fff);
    border-color: var(--rt-border, #e5e0d8);
    border-bottom-color: var(--rt-card-bg, #fff);
}

.rt-profile-tab-panel[hidden] {
    display: none !important;
}

.rt-profile-wishlists-page {
    padding-top: 8px;
}

.rt-profile-wishlists-loading {
    padding: 24px 0;
    text-align: center;
}

.rt-profile-wishlists-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.rt-profile-wl-skeleton-card {
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--rt-surface-muted, #f0ebe3) 25%, rgba(255,255,255,0.5) 50%, var(--rt-surface-muted, #f0ebe3) 75%);
    background-size: 200% 100%;
    animation: rt-profile-wl-shimmer 1.2s infinite;
}

@keyframes rt-profile-wl-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.rt-profile-wishlists-loading-text,
.rt-profile-wishlists-error p {
    color: var(--rt-text-muted, #666);
    margin: 0 0 12px;
}

.rt-profile-wishlists-error {
    text-align: center;
    padding: 32px 16px;
}

.rt-profile-wishlists-empty {
    margin-top: 8px;
}

/* ── Клуб 5 ★ (чужд профил) — същият език като .rt-column ── */
.rt-five-star-club {
    --rt-five-star-accent: var(--rt-star);
    background: color-mix(in oklab, var(--rt-five-star-accent) 5%, var(--rt-card-bg));
    border: 1px solid var(--rt-border);
    border-top: 3px solid var(--rt-five-star-accent);
    border-radius: var(--rt-r3);
    padding: 20px;
    margin-top: 4px;
    margin-bottom: 30px;
    box-shadow: var(--rt-shadow);
}

.rt-five-star-club[hidden] {
    display: none !important;
}

.rt-five-star-club-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: -20px -20px 16px -20px;
    padding: 14px 20px;
    border-radius: var(--rt-r3) var(--rt-r3) 0 0;
    background: color-mix(in oklab, var(--rt-five-star-accent) 13%, transparent);
    border-left: 4px solid var(--rt-five-star-accent);
    border-bottom: 2px solid var(--rt-border);
}

.rt-five-star-club-title {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-family: var(--rt-font-display);
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rt-five-star-accent);
}

.rt-five-star-club-count {
    flex-shrink: 0;
}

.rt-five-star-club-count[hidden] {
    display: none !important;
}

.rt-five-star-club-root {
    min-width: 0;
}

.rt-five-star-club-strip {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 0 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.rt-five-star-club-item {
    flex: 0 0 96px;
    width: 96px;
    cursor: pointer;
    scroll-snap-align: start;
    background: var(--rt-card-bg);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    padding: 8px;
    text-align: left;
    color: inherit;
    font: inherit;
    box-shadow: var(--rt-shadow);
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.rt-five-star-club-item:hover {
    box-shadow: var(--rt-shadow-hover);
    border-color: var(--rt-border-strong);
    transform: translateY(-1px);
}

.rt-five-star-club-item:focus-visible {
    outline: 2px solid var(--rt-primary);
    outline-offset: 2px;
}

.rt-five-star-club-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--rt-r1);
    overflow: hidden;
    background: color-mix(in oklab, var(--rt-primary) 12%, var(--rt-surface2));
}

.rt-five-star-club-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.rt-five-star-club-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--rt-text-light);
    background: var(--rt-surface2);
}

.rt-five-star-club-book-title {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--rt-text);
    font-family: var(--rt-font-display);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rt-five-star-club-book-author {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.3;
    color: var(--rt-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rt-five-star-club-loading,
.rt-five-star-club-error {
    font-size: 13px;
    color: var(--rt-text-muted);
    padding: 8px 0;
}

.rt-five-star-club-error p {
    margin: 0 0 10px;
}

.rt-five-star-club-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--rt-text-light);
}

.rt-five-star-club-more-wrap {
    margin-top: 12px;
}

.rt-five-star-club-more-wrap .rt-load-more-btn {
    margin: 0;
}

@media (max-width: 640px) {
    .rt-profile-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .rt-profile-tab {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .rt-five-star-club {
        padding: 16px;
    }

    .rt-five-star-club-header {
        margin: -16px -16px 14px -16px;
        padding: 12px 16px;
    }

    .rt-five-star-club-title {
        font-size: 1.05em;
    }

    .rt-five-star-club-item {
        flex-basis: 84px;
        width: 84px;
        padding: 6px;
    }
}

.rt-board-visibility-btn {
    appearance: none;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--rt-border);
    border-radius: 999px;
    background: var(--rt-card-bg);
    color: var(--rt-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.rt-board-visibility-btn:hover,
.rt-board-visibility-btn:focus-visible {
    color: var(--rt-primary);
    border-color: var(--rt-primary);
}

.rt-board-visibility-dialog {
    text-align: left;
}

.rt-board-visibility-dialog h3 {
    margin: 0 36px 16px 0;
    color: var(--rt-text);
    font-family: var(--rt-font-display);
}

.rt-board-visibility-save {
    width: 100%;
    margin-top: 16px;
}

.rt-board-visibility-status {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--rt-text-muted);
}

.rt-board-visibility-status:empty {
    margin: 0;
}

#rt-board-visibility-modal:focus {
    outline: none;
}

/* ── Последователи / Следвам ── */

.rt-social-counts {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin: 2px 0 18px;
}

.rt-social-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

button.rt-social-count {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none;
    cursor: pointer;
    font-family: var(--rt-font-body);
    text-align: left;
    color: var(--rt-text);
}

button.rt-social-count:hover,
button.rt-social-count:focus,
button.rt-social-count:focus-visible {
    background: transparent !important;
    color: var(--rt-text) !important;
    box-shadow: none;
}

button.rt-social-count:focus-visible {
    outline: 2px solid var(--rt-primary);
    outline-offset: 4px;
    border-radius: 8px;
}

.rt-social-count-num {
    font-family: var(--rt-font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--rt-text);
}

button.rt-social-count:hover .rt-social-count-num {
    color: var(--rt-primary);
}

.rt-social-count-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--rt-text-muted);
}

.rt-connections-dialog {
    max-width: 480px;
    width: 100%;
    padding: 22px 0 16px;
    display: flex;
    flex-direction: column;
    max-height: min(80vh, 720px);
    overflow: hidden;
}

.rt-connections-dialog h3 {
    margin: 0 48px 14px 22px;
    color: var(--rt-text);
    font-family: var(--rt-font-display);
}

.rt-connections-tabs {
    display: flex;
    gap: 8px;
    padding: 0 22px 12px;
}

button.rt-connections-tab {
    appearance: none;
    flex: 1;
    margin: 0;
    border: 1px solid var(--rt-border);
    background: var(--rt-surface2) !important;
    color: var(--rt-text-muted) !important;
    border-radius: var(--rt-r2);
    padding: 8px 10px;
    font-family: var(--rt-font-body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}

button.rt-connections-tab:hover,
button.rt-connections-tab:focus {
    color: var(--rt-text) !important;
    background: var(--rt-surface2) !important;
}

button.rt-connections-tab.is-active,
button.rt-connections-tab.is-active:hover {
    color: var(--rt-text) !important;
    background: var(--rt-card-bg) !important;
    border-color: var(--rt-primary);
}

.rt-connections-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 22px 8px;
    padding: 0 12px;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-r2);
    background: var(--rt-card-bg);
}

.rt-connections-search-icon {
    color: var(--rt-text-light);
    font-size: 16px;
}

#rt-connections-search {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 10px 0;
    font-family: var(--rt-font-body);
    font-size: 14px;
    color: var(--rt-text);
    outline: none;
}

.rt-connections-list {
    overflow-y: auto;
    min-height: 180px;
    flex: 1;
}

.rt-connections-state {
    padding: 28px 22px 18px;
    text-align: center;
    color: var(--rt-text);
}

.rt-connections-state p {
    margin: 0 0 8px;
}

.rt-connections-state-hint {
    color: var(--rt-text-muted);
    font-size: 14px;
}

.rt-connections-state .rt-btn {
    margin-top: 12px;
}

.rt-connections-more-wrap {
    padding: 8px 22px 0;
    text-align: center;
}

.rt-connections-more-wrap[hidden] {
    display: none;
}

.rt-connection-card.is-leaving {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease;
}

.rt-connection-skeleton {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
}

.rt-connection-sk-avatar,
.rt-connection-sk-lines span {
    display: block;
    background: var(--rt-surface2);
    border-radius: 8px;
    animation: rtConnPulse 1.2s ease-in-out infinite;
}

.rt-connection-sk-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rt-connection-sk-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rt-connection-sk-lines span:first-child { height: 12px; width: 55%; }
.rt-connection-sk-lines span:last-child { height: 10px; width: 32%; }

@keyframes rtConnPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .rt-connection-card.is-leaving { transition: none; }
    .rt-connection-sk-avatar,
    .rt-connection-sk-lines span { animation: none; }
}

@media (max-width: 768px) {
    #rt-connections-modal {
        padding: 0;
        align-items: stretch;
    }

    #rt-connections-modal .rt-connections-dialog {
        max-width: none;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
}
