/**
 * R10.web.tr - Premium UI Enhancements
 * Advanced styling, dark mode, micro-interactions, modern components
 * v2.0 - 2026
 */

/* ==================== Dark Mode Variables ==================== */
[data-theme="dark"] {
    --r10-primary: #7c6b9e;
    --r10-primary-dark: #6a5a8a;
    --r10-header-bg: #1a1a2e;
    --r10-nav-bg: #252540;
    --r10-purple: #8b7aaf;
    --r10-dark: #0f0f1a;
    
    --bg-body: #121220;
    --bg-white: #1e1e30;
    --bg-gray: #252540;
    --bg-light: #1a1a2e;
    
    --text-primary: #e0e0e8;
    --text-secondary: #a0a0b0;
    --text-muted: #707088;
    --text-link: #9b8bc0;
    
    --border-color: #2d2d48;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

/* ==================== Dark Mode Toggle ==================== */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s ease;
    color: var(--text-white);
    font-size: 13px;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.theme-toggle .toggle-icon {
    font-size: 16px;
    transition: transform 0.5s ease;
}

[data-theme="dark"] .theme-toggle .toggle-icon {
    transform: rotate(180deg);
}

/* ==================== Scroll to Top Button ==================== */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--r10-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(92,77,125,0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--r10-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(92,77,125,0.5);
}

/* ==================== Enhanced Topic Cards ==================== */
.topic-row {
    transition: all 0.2s ease;
    position: relative;
}

.topic-row:hover {
    background: var(--bg-light);
    transform: translateX(2px);
}

.topic-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.2s ease;
    border-radius: 0 2px 2px 0;
}

.topic-row:hover::before {
    background: var(--r10-primary);
}

.topic-row.sticky::before {
    background: var(--warning-color);
}

.topic-row.announcement::before {
    background: var(--danger-color);
}

.topic-row.hot::before {
    background: var(--notification-red);
}

/* ==================== Enhanced Avatars ==================== */
.avatar-wrapper {
    position: relative;
    display: inline-block;
}

.avatar-wrapper .online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: var(--online-green);
    border: 2px solid var(--bg-white);
    border-radius: 50%;
    z-index: 1;
}

.avatar-wrapper img {
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.avatar-wrapper:hover img {
    transform: scale(1.05);
}

/* Avatar sizes */
.avatar-xs { width: 24px; height: 24px; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

/* ==================== Enhanced Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-admin {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.badge-mod {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.badge-premium {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(243,156,18,0.3); }
    50% { box-shadow: 0 0 15px rgba(243,156,18,0.5); }
}

.badge-verified {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

/* ==================== Enhanced Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--r10-primary), var(--r10-primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(92,77,125,0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(92,77,125,0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-gray);
    border-color: var(--r10-primary);
    color: var(--r10-primary);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

/* ==================== Enhanced Search Box ==================== */
.search-enhanced {
    position: relative;
}

.search-enhanced input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-enhanced input:focus {
    border-color: var(--r10-primary);
    box-shadow: 0 0 0 3px rgba(92,77,125,0.1);
    outline: none;
}

.search-enhanced .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.2s;
}

.search-enhanced input:focus + .search-icon {
    color: var(--r10-primary);
}

/* Live search results */
.search-results-live {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results-live.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-gray);
}

.search-result-item .result-icon {
    color: var(--text-muted);
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.search-result-item .result-title {
    font-size: 13px;
    color: var(--text-primary);
}

.search-result-item .result-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== Enhanced Stats Cards ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--r10-primary), var(--r10-purple));
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    font-size: 28px;
    color: var(--r10-primary);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ==================== Enhanced Forum Category ==================== */
.category-header {
    position: relative;
    overflow: hidden;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--r10-primary), transparent);
}

/* ==================== Tooltip ==================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    padding: 6px 10px;
    background: var(--r10-dark);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--r10-dark);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ==================== Progress Bar ==================== */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-gray);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--r10-primary), var(--r10-purple));
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ==================== Breadcrumb Enhanced ==================== */
.breadcrumb-enhanced {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 0;
    font-size: 13px;
}

.breadcrumb-enhanced a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb-enhanced a:hover {
    color: var(--r10-primary);
}

.breadcrumb-enhanced .separator {
    color: var(--text-muted);
    font-size: 10px;
}

.breadcrumb-enhanced .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== Cookie Consent Banner ==================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent-text {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.cookie-consent-text a {
    color: var(--r10-primary);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ==================== Reading Progress Bar ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--r10-primary), var(--r10-purple));
    z-index: 10001;
    transition: width 0.1s linear;
}

/* ==================== Enhanced Tables ==================== */
.table-enhanced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.table-enhanced thead {
    background: var(--bg-gray);
}

.table-enhanced th {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.table-enhanced td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table-enhanced tbody tr:last-child td {
    border-bottom: none;
}

.table-enhanced tbody tr:hover {
    background: var(--bg-light);
}

/* ==================== Enhanced Tabs ==================== */
.tabs-enhanced {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-enhanced::-webkit-scrollbar {
    display: none;
}

.tabs-enhanced .tab-item {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tabs-enhanced .tab-item:hover {
    color: var(--text-primary);
    background: var(--bg-gray);
}

.tabs-enhanced .tab-item.active {
    color: var(--r10-primary);
    border-bottom-color: var(--r10-primary);
}

.tabs-enhanced .tab-item .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--bg-gray);
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.tabs-enhanced .tab-item.active .tab-count {
    background: var(--r10-primary);
    color: white;
}

/* ==================== Typing Indicator ==================== */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-gray);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.typing-indicator .dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state .empty-desc {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ==================== Card Grid ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== Enhanced Dropdown ==================== */
.dropdown-enhanced {
    position: relative;
    display: inline-block;
}

.dropdown-menu-enhanced {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.dropdown-enhanced.open .dropdown-menu-enhanced {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu-enhanced .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    transition: background 0.15s;
    cursor: pointer;
}

.dropdown-menu-enhanced .dropdown-item:first-child {
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.dropdown-menu-enhanced .dropdown-item:last-child {
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.dropdown-menu-enhanced .dropdown-item:hover {
    background: var(--bg-gray);
}

.dropdown-menu-enhanced .dropdown-item i {
    color: var(--text-muted);
    width: 16px;
    text-align: center;
}

.dropdown-menu-enhanced .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ==================== User Mention ==================== */
.user-mention {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--r10-primary);
    font-weight: 500;
    background: rgba(92,77,125,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.user-mention:hover {
    background: rgba(92,77,125,0.15);
}

/* ==================== Quote Block Enhanced ==================== */
.quote-block {
    border-left: 4px solid var(--r10-primary);
    background: var(--bg-gray);
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    position: relative;
}

.quote-block .quote-author {
    font-weight: 600;
    font-size: 12px;
    color: var(--r10-primary);
    margin-bottom: 6px;
}

.quote-block .quote-content {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================== Online Users Pulse ==================== */
.online-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--online-green);
    border-radius: 50%;
    position: relative;
}

.online-pulse::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid var(--online-green);
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ==================== Tag Cloud ==================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag:hover {
    background: var(--r10-primary);
    color: white;
    border-color: var(--r10-primary);
}

.tag .tag-count {
    font-size: 10px;
    opacity: 0.7;
}

/* ==================== Mobile Enhancements ==================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .scroll-top-btn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .cookie-consent {
        flex-direction: column;
        padding: 14px 16px;
    }
    
    .cookie-consent-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Bottom navigation for mobile */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-top: 1px solid var(--border-color);
        z-index: 999;
        padding: 6px 0 env(safe-area-inset-bottom, 6px);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    }
    
    .mobile-bottom-nav .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 4px;
        font-size: 10px;
        color: var(--text-muted);
        text-decoration: none;
        transition: color 0.2s;
        position: relative;
    }
    
    .mobile-bottom-nav .nav-item.active {
        color: var(--r10-primary);
    }
    
    .mobile-bottom-nav .nav-item i {
        font-size: 18px;
    }
    
    .mobile-bottom-nav .nav-badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 18px);
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 8px;
        background: var(--notification-red);
        color: white;
        font-size: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Add body padding for bottom nav */
    body {
        padding-bottom: 70px;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .main-header, .main-footer, .scroll-top-btn, .cookie-consent,
    .mobile-bottom-nav, .reading-progress, .theme-toggle,
    .breadcrumb-enhanced { display: none !important; }
    
    body { background: white; color: black; padding: 0; }
    
    .container { max-width: 100%; }
    
    a { color: black; text-decoration: underline; }
    
    .topic-row:hover { background: none; transform: none; }
}

/* ==================== Accessibility ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--r10-primary);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--r10-primary);
    color: white;
    padding: 10px 20px;
    z-index: 10002;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ==================== Animated Counters ==================== */
.count-animated {
    display: inline-block;
    transition: all 0.3s ease;
}

/* ==================== Status Indicators ==================== */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online { background: var(--online-green); }
.status-dot.offline { background: var(--text-muted); }
.status-dot.away { background: var(--warning-color); }
.status-dot.busy { background: var(--danger-color); }

/* ==================== Form Enhancements ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--r10-primary);
    box-shadow: 0 0 0 3px rgba(92,77,125,0.1);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* Select enhanced */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Checkbox & Radio enhanced */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--r10-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==================== Skeleton Loader ==================== */
.skeleton-topic {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    flex-shrink: 0;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-25 { width: 25%; }

[data-theme="dark"] .skeleton-avatar,
[data-theme="dark"] .skeleton-line {
    background: linear-gradient(90deg, #252540 25%, #2d2d48 50%, #252540 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
