/**
 * Tutorials Hub - CSS
 * Integrado com sidebar do SPA
 */

.tuh-tutorials-hub {
    --ui-bg: var(--tuh-bg-secondary, var(--tuh-account-bg, #0f0f1a));
    --ui-card: var(--tuh-card-bg, var(--tuh-account-card-bg, #1a1a2e));
    --ui-text: var(--tuh-text-primary, var(--tuh-account-text, #ffffff));
    --ui-muted: var(--tuh-text-muted, var(--tuh-account-text-muted, #64748b));
    --ui-border: var(--tuh-card-border, var(--tuh-account-border, #2a2a4a));
    --ui-accent: var(--tuh-primary, var(--tuh-account-primary, #3b82f6));
    --ui-accent-soft: rgba(59, 130, 246, 0.08);
    --ui-accent-hover: rgba(59, 130, 246, 0.12);
    --ui-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --ui-shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
    --ui-radius-xl: 20px;
    --ui-radius-lg: 16px;
    --ui-radius-md: 12px;
    --ui-radius-sm: 8px;
}

.tuh-tutorials-hub * { margin: 0; padding: 0; box-sizing: border-box; }

.tuh-tutorials-hub {
    font-family: inherit;
    color: var(--ui-text);
    line-height: 1.5;
}

/* ==========================================
   HEADER
   ========================================== */
.tuh-tutorials-hub header {
    margin-bottom: 28px;
}

.tuh-tutorials-hub header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.tuh-tutorials-hub header p {
    color: var(--ui-muted);
    font-size: 14px;
}

/* ==========================================
   TOOLBAR / FILTROS
   ========================================== */
.tuh-tutorials-hub .toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--ui-card);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
}

.tuh-tutorials-hub .toolbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.tuh-tutorials-hub .search {
    flex: 1 1 280px;
    max-width: 400px;
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.15s;
}

.tuh-tutorials-hub .search:focus-within {
    border-color: var(--ui-accent);
}

.tuh-tutorials-hub .search svg {
    color: var(--ui-muted);
    flex-shrink: 0;
}

.tuh-tutorials-hub .search input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    width: 100%;
    color: var(--ui-text);
}

.tuh-tutorials-hub .search input::placeholder {
    color: var(--ui-muted);
}

.tuh-tutorials-hub .filters-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tuh-tutorials-hub .chip-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ui-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tuh-tutorials-hub .chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tuh-tutorials-hub .chip {
    border: 1px solid var(--ui-border);
    background: var(--ui-card);
    color: var(--ui-muted);
    padding: 8px 14px;
    border-radius: var(--ui-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.tuh-tutorials-hub .chip:hover {
    border-color: var(--ui-accent);
    background: var(--ui-bg);
}

.tuh-tutorials-hub .chip.active {
    border-color: var(--ui-accent);
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    font-weight: 600;
}

/* ==========================================
   CONTENT (SEM SIDEBAR - USA A DO SPA)
   ========================================== */
.tuh-tutorials-hub .content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tuh-tutorials-hub .hub-view.is-hidden {
    display: none;
}

.tuh-tutorials-hub .hub-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================
   SECTIONS
   ========================================== */
.tuh-tutorials-hub .section {
    background: var(--ui-card);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    padding: 24px;
    box-shadow: var(--ui-shadow);
}

.tuh-tutorials-hub .section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.tuh-tutorials-hub .section-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tuh-tutorials-hub .section-description {
    font-size: 13px;
    color: var(--ui-muted);
}

.tuh-tutorials-hub .section-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.tuh-tutorials-hub .hero-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.tuh-tutorials-hub .hero-strip h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.tuh-tutorials-hub .hero-strip > div > p {
    font-size: 14px;
    color: var(--ui-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.tuh-tutorials-hub .hero-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tuh-tutorials-hub .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.tuh-tutorials-hub .stat {
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    padding: 16px 12px;
    text-align: center;
}

.tuh-tutorials-hub .stat strong {
    font-size: 20px;
    font-weight: 700;
    display: block;
    color: var(--ui-accent);
    margin-bottom: 4px;
}

.tuh-tutorials-hub .stat span {
    font-size: 11px;
    color: var(--ui-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tuh-tutorials-hub .quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tuh-tutorials-hub .quick-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--ui-accent);
    border: 1px solid var(--ui-border);
    background: var(--ui-card);
    padding: 10px 16px;
    border-radius: var(--ui-radius-sm);
    text-decoration: none;
    transition: all 0.15s;
}

.tuh-tutorials-hub .quick-link:hover {
    background: var(--ui-accent-soft);
    border-color: var(--ui-accent);
}

.tuh-tutorials-hub .results-summary {
    font-size: 13px;
    color: var(--ui-muted);
    padding: 12px 16px;
    background: var(--ui-bg);
    border-radius: var(--ui-radius-sm);
}

/* Hero Video */
.tuh-tutorials-hub .hero-video {
    display: flex;
    align-items: center;
}

.tuh-tutorials-hub .hero-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: var(--ui-radius-md);
    overflow: hidden;
    background: #000;
}

.tuh-tutorials-hub .hero-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================
   CARDS GRID
   ========================================== */
.tuh-tutorials-hub .cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Colunas configuráveis */
.tuh-tutorials-hub .cards--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.tuh-tutorials-hub .cards--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.tuh-tutorials-hub .cards--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.tuh-tutorials-hub .card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--ui-card);
    overflow: hidden;
}

.tuh-tutorials-hub .card:hover {
    border-color: var(--ui-accent);
    box-shadow: var(--ui-shadow-lg);
}

/* Card com thumbnail */
.tuh-tutorials-hub .card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.tuh-tutorials-hub .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s;
}

.tuh-tutorials-hub .card:hover .card-thumb img {
    transform: scale(1.05);
    opacity: 0.8;
}

.tuh-tutorials-hub .card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
}

.tuh-tutorials-hub .card:hover .card-play {
    opacity: 1;
}

.tuh-tutorials-hub .card-play svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Card body */
.tuh-tutorials-hub .card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Card sem thumbnail — padding no topo */
.tuh-tutorials-hub .card:not(.card--has-thumb) .card-body {
    padding-top: 18px;
}

.tuh-tutorials-hub .card-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    width: fit-content;
    padding: 5px 10px;
    border-radius: var(--ui-radius-sm);
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
}

.tuh-tutorials-hub .card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.tuh-tutorials-hub .card-desc {
    font-size: 13px;
    color: var(--ui-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tuh-tutorials-hub .card-meta {
    font-size: 13px;
    color: var(--ui-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.tuh-tutorials-hub .card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--ui-border);
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.tuh-tutorials-hub .empty {
    display: none;
    padding: 40px 24px;
    text-align: center;
    border: 1px dashed var(--ui-border);
    border-radius: var(--ui-radius-md);
    color: var(--ui-muted);
    font-size: 14px;
}

/* ==========================================
   DETAIL VIEW
   ========================================== */
.tuh-tutorials-hub .detail-view {
    display: none;
    background: var(--ui-card);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    padding: 28px;
    box-shadow: var(--ui-shadow);
    position: relative;
}

.tuh-tutorials-hub .detail-view.active {
    display: block;
}

.tuh-tutorials-hub .detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--ui-accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 24px;
    padding: 0;
}

.tuh-tutorials-hub .detail-back:hover {
    text-decoration: underline;
}

.tuh-tutorials-hub .detail-header {
    margin-bottom: 28px;
}

.tuh-tutorials-hub .detail-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tuh-tutorials-hub .detail-meta {
    font-size: 13px;
    color: var(--ui-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tuh-tutorials-hub .detail-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
}

.tuh-tutorials-hub .detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
}

.tuh-tutorials-hub .detail-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tuh-tutorials-hub .detail-aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tuh-tutorials-hub .detail-card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    padding: 20px;
    background: var(--ui-bg);
}

.tuh-tutorials-hub .detail-card h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ui-muted);
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ui-border);
}

.tuh-tutorials-hub .detail-card p {
    font-size: 14px;
    color: var(--ui-text);
    line-height: 1.7;
}

.tuh-tutorials-hub .detail-card li {
    font-size: 14px;
    color: var(--ui-text);
    line-height: 1.6;
}

.tuh-tutorials-hub .detail-card ol,
.tuh-tutorials-hub .detail-card ul {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tuh-tutorials-hub .detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tuh-tutorials-hub .detail-info > span {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--ui-muted);
}

.tuh-tutorials-hub .detail-info > span span {
    color: var(--ui-text);
    font-weight: 500;
}

.tuh-tutorials-hub .detail-related {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tuh-tutorials-hub .detail-related button {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    padding: 12px 14px;
    background: var(--ui-card);
    color: var(--ui-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.tuh-tutorials-hub .detail-related button:hover {
    border-color: var(--ui-accent);
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
}

.tuh-tutorials-hub .detail-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ui-accent);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--ui-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    transition: background 0.15s;
}

.tuh-tutorials-hub .detail-link:hover {
    background: #2563eb;
    color: #fff;
}

/* Detail Video */
.tuh-tutorials-hub .detail-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--ui-radius-md);
    overflow: hidden;
    background: #000;
    margin-bottom: 4px;
}

.tuh-tutorials-hub .detail-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Detail Content (full HTML from tutorial) */
.tuh-tutorials-hub .detail-content {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    padding: 24px;
    background: var(--ui-bg);
    font-size: 14px;
    line-height: 1.7;
    color: var(--ui-text);
}

.tuh-tutorials-hub .detail-content h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ui-border);
}

.tuh-tutorials-hub .detail-content h2:first-child {
    margin-top: 0;
}

.tuh-tutorials-hub .detail-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--ui-text);
    text-transform: none;
    letter-spacing: normal;
    padding-bottom: 0;
    border-bottom: none;
}

.tuh-tutorials-hub .detail-content p {
    margin: 8px 0;
    line-height: 1.7;
    color: var(--ui-text);
}

.tuh-tutorials-hub .detail-content ul,
.tuh-tutorials-hub .detail-content ol {
    padding-left: 24px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tuh-tutorials-hub .detail-content li {
    line-height: 1.6;
    color: var(--ui-text);
}

.tuh-tutorials-hub .detail-content a {
    color: var(--ui-accent);
    text-decoration: none;
    font-weight: 500;
}

.tuh-tutorials-hub .detail-content a:hover {
    text-decoration: underline;
}

.tuh-tutorials-hub .detail-content em {
    color: var(--ui-muted);
}

.tuh-tutorials-hub .detail-content strong {
    color: var(--ui-text);
}

/* ==========================================
   CONTENT REUSABLE COMPONENTS
   Classes usaveis no editor WordPress.
   Ao editar tutoriais no admin, use estas
   classes no HTML pra estilizar o conteudo.
   ========================================== */

/* Alert / Callout boxes */
.tuh-tutorials-hub .detail-content .tuh-alert {
    padding: 16px 20px;
    border-radius: var(--ui-radius-sm);
    margin: 16px 0;
    line-height: 1.6;
    font-size: 14px;
}

.tuh-tutorials-hub .detail-content .tuh-alert strong {
    display: block;
    margin-bottom: 4px;
}

.tuh-tutorials-hub .detail-content .tuh-alert--danger {
    background: rgba(220, 53, 69, 0.12);
    border-left: 4px solid #dc3545;
    color: #ff8a95;
}

.tuh-tutorials-hub .detail-content .tuh-alert--danger strong {
    color: #ff6b7a;
}

.tuh-tutorials-hub .detail-content .tuh-alert--warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    color: #ffe082;
}

.tuh-tutorials-hub .detail-content .tuh-alert--warning strong {
    color: #ffd54f;
}

.tuh-tutorials-hub .detail-content .tuh-alert--info {
    background: rgba(0, 188, 242, 0.1);
    border-left: 4px solid #00BCF2;
    color: #80defc;
}

.tuh-tutorials-hub .detail-content .tuh-alert--info strong {
    color: #4fc3f7;
}

.tuh-tutorials-hub .detail-content .tuh-alert--success {
    background: rgba(40, 167, 69, 0.12);
    border-left: 4px solid #28a745;
    color: #81c784;
}

.tuh-tutorials-hub .detail-content .tuh-alert--success strong {
    color: #66bb6a;
}

.tuh-tutorials-hub .detail-content .tuh-alert--critical {
    background: rgba(220, 53, 69, 0.15);
    border: 2px solid #dc3545;
    border-left-width: 2px;
    text-align: center;
    color: #ff8a95;
}

.tuh-tutorials-hub .detail-content .tuh-alert--critical strong {
    color: #ff6b7a;
}

/* Video embed responsivo (16:9) */
.tuh-tutorials-hub .detail-content .tuh-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: var(--ui-radius-sm);
    overflow: hidden;
    background: #000;
    margin: 16px 0;
}

.tuh-tutorials-hub .detail-content .tuh-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    border-radius: 0;
}

/* Download / action buttons */
.tuh-tutorials-hub .detail-content .tuh-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    border: 1px solid var(--ui-accent);
    border-radius: var(--ui-radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s;
    margin: 8px 0;
}

.tuh-tutorials-hub .detail-content .tuh-download-btn:hover {
    background: var(--ui-accent);
    color: #fff;
    text-decoration: none;
}

.tuh-tutorials-hub .detail-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 26, 0.85);
    border-radius: var(--ui-radius-lg);
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--ui-muted);
    font-weight: 500;
}

.tuh-tutorials-hub .detail-view.loading .detail-loading {
    display: flex;
}

.tuh-tutorials-hub .detail-view.loading .detail-body {
    opacity: 0.3;
    pointer-events: none;
}

/* ==========================================
   SIDEBAR DO SPA - TOPICOS (INJETADO VIA JS)
   Seletores específicos para funcionar dentro do .tuh-nav
   ========================================== */
.tuh-spa-sidebar .tuh-nav .tuh-sidebar-topics,
.tuh-sidebar .tuh-nav .tuh-sidebar-topics {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-back,
.tuh-sidebar .tuh-nav .tuh-sidebar-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--tuh-text-secondary, #94a3b8);
    text-decoration: none;
    border-radius: var(--tuh-radius, 8px);
    transition: all 0.15s;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--tuh-bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--tuh-card-border, rgba(255,255,255,0.08));
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-back:hover,
.tuh-sidebar .tuh-nav .tuh-sidebar-back:hover {
    background: var(--tuh-card-hover, rgba(255,255,255,0.08));
    border-color: var(--tuh-primary, #3b82f6);
    color: var(--tuh-primary, #3b82f6);
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-back svg,
.tuh-sidebar .tuh-nav .tuh-sidebar-back svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-title,
.tuh-sidebar .tuh-nav .tuh-sidebar-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tuh-text-muted, #64748b);
    padding: 16px 16px 8px;
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-topic,
.tuh-sidebar .tuh-nav .tuh-sidebar-topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    color: var(--tuh-text-secondary, #94a3b8);
    text-decoration: none;
    border-radius: var(--tuh-radius, 8px);
    transition: all 0.15s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-topic:hover,
.tuh-sidebar .tuh-nav .tuh-sidebar-topic:hover {
    background: var(--tuh-card-hover, rgba(255,255,255,0.05));
    color: var(--tuh-text-primary, #fff);
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-topic.active,
.tuh-sidebar .tuh-nav .tuh-sidebar-topic.active {
    background: var(--tuh-primary-alpha-15, rgba(59, 130, 246, 0.15));
    color: var(--tuh-primary, #3b82f6);
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-topic-count,
.tuh-sidebar .tuh-nav .tuh-sidebar-topic-count {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--tuh-bg-secondary, rgba(255,255,255,0.1));
    color: var(--tuh-text-muted, #64748b);
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-topic.active .tuh-sidebar-topic-count,
.tuh-sidebar .tuh-nav .tuh-sidebar-topic.active .tuh-sidebar-topic-count {
    background: var(--tuh-primary, #3b82f6);
    color: #fff;
}

.tuh-spa-sidebar .tuh-nav .tuh-sidebar-divider,
.tuh-sidebar .tuh-nav .tuh-sidebar-divider {
    height: 1px;
    background: var(--tuh-card-border, rgba(255,255,255,0.1));
    margin: 8px 0;
}

/* ==========================================
   REDIRECT SCREEN
   ========================================== */
.tuh-redirect-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 60px 20px;
}

.tuh-redirect-card {
    background: var(--ui-card);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-xl);
    padding: 56px 48px;
    max-width: 540px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tuh-redirect-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 28px;
    background: linear-gradient(135deg, var(--ui-accent), rgba(99, 102, 241, 0.9));
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.tuh-redirect-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ui-text);
}

.tuh-redirect-message {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ui-muted);
    margin-bottom: 28px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.tuh-redirect-credentials {
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    padding: 20px 24px;
    margin-bottom: 28px;
    text-align: left;
}

.tuh-redirect-credentials h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ui-muted);
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ui-border);
}

.tuh-redirect-credentials pre {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--ui-text);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.tuh-redirect-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ui-accent);
    color: #fff;
    padding: 16px 32px;
    border-radius: var(--ui-radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.tuh-redirect-btn:hover {
    background: #2563eb;
    color: #fff;
}

.tuh-redirect-btn svg {
    flex-shrink: 0;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .tuh-redirect-screen {
        padding: 40px 16px;
        min-height: 40vh;
    }

    .tuh-redirect-card {
        padding: 40px 24px;
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .tuh-tutorials-hub .detail-layout {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .tuh-tutorials-hub .search {
        flex-basis: 100%;
        max-width: none;
    }

    .tuh-tutorials-hub .cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .tuh-tutorials-hub .hero-strip {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tuh-tutorials-hub .detail-layout {
        grid-template-columns: 1fr;
    }

    .tuh-tutorials-hub .detail-aside {
        order: -1;
    }

    .tuh-tutorials-hub .cards--cols-3,
    .tuh-tutorials-hub .cards--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .tuh-tutorials-hub .toolbar {
        padding: 16px;
    }

    .tuh-tutorials-hub .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tuh-tutorials-hub .section {
        padding: 20px;
    }

    .tuh-tutorials-hub .detail-view {
        padding: 20px;
    }

    .tuh-tutorials-hub .hero-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tuh-tutorials-hub .cards {
        grid-template-columns: 1fr;
    }

    .tuh-tutorials-hub .cards--cols-2,
    .tuh-tutorials-hub .cards--cols-3,
    .tuh-tutorials-hub .cards--cols-4 {
        grid-template-columns: 1fr;
    }

    .tuh-tutorials-hub .card-meta {
        flex-wrap: wrap;
    }

    .tuh-tutorials-hub .detail-info > span {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .tuh-tutorials-hub .detail-link {
        width: 100%;
        justify-content: center;
    }
}
