/* ============================================
   GUIA MIOLOGIA - CUSTOM STYLES
   Dr. Jonas Obadia
   ============================================ */

:root {
    --primary: #1a56e8;
    --primary-dark: #1240c4;
    --primary-light: #3b76f7;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --dark: #0a0f1e;
    --dark-card: #0d1526;
    --dark-surface: #111827;
    --text-muted: #94a3b8;
    --border: rgba(255,255,255,0.08);
    --gradient-hero: linear-gradient(135deg, #0a0f1e 0%, #0d1a3a 50%, #0a1628 100%);
    --gradient-blue: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-card: linear-gradient(135deg, rgba(26,86,232,0.15) 0%, rgba(14,165,233,0.05) 100%);
    --shadow-glow: 0 0 40px rgba(26,86,232,0.3);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
    --radius: 16px;
    --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============ NAVBAR ============ */
#mainNav {
    background: rgba(10,15,30,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transition: all 0.3s ease;
}

#mainNav.scrolled {
    background: rgba(10,15,30,0.98);
    padding: 8px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.brand-icon {
    width: 40px; height: 40px;
    background: var(--gradient-blue);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.brand-icon-sm { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }

.brand-name { font-size: 15px; font-weight: 700; color: white; line-height: 1.2; }
.brand-sub { font-size: 10px; color: var(--secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.75) !important;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px !important;
    border-radius: 8px;
    transition: all 0.2s;
}
.navbar-nav .nav-link:hover { color: white !important; background: rgba(255,255,255,0.08); }

/* ============ HERO SECTION ============ */
.hero-section {
    min-height: 100vh;
    background: var(--gradient-hero);
    position: relative;
    display: flex; align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 60% 40%, rgba(26,86,232,0.15) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 20% 70%, rgba(6,182,212,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(26,86,232,0.15);
    border: 1px solid rgba(26,86,232,0.3);
    color: #93c5fd;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}
.hero-badge .dot {
    width: 6px; height: 6px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.08;
    color: white;
    margin-bottom: 20px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #60a5fa, var(--secondary), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.65);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-stats {
    display: flex; gap: 32px; flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-stat .value {
    font-size: 28px; font-weight: 800;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.hero-stat .label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-hero-primary {
    background: var(--gradient-blue);
    border: none;
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(26,86,232,0.4);
    text-decoration: none;
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26,86,232,0.6);
    color: white;
}

.btn-hero-secondary {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
    backdrop-filter: blur(10px);
}
.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

/* Hero Book Mockup */
.hero-visual {
    position: relative;
    display: flex; justify-content: center; align-items: center;
}

.book-mockup {
    position: relative;
    width: 280px;
    filter: drop-shadow(0 30px 60px rgba(26,86,232,0.4));
    animation: float 4s ease-in-out infinite;
}

.book-mockup img {
    width: 100%;
    border-radius: 12px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(-3deg); }
    50% { transform: translateY(-20px) rotate(-3deg); }
}

.book-mockup-placeholder {
    width: 280px; height: 380px;
    background: linear-gradient(135deg, #1a3a6e, #0d2550);
    border-radius: 12px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border: 2px solid rgba(26,86,232,0.4);
    position: relative;
    overflow: hidden;
}

.book-mockup-placeholder::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-blue);
}

.book-glow {
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(26,86,232,0.2) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Floating cards */
.floating-card {
    position: absolute;
    background: rgba(13,21,38,0.9);
    border: 1px solid rgba(26,86,232,0.3);
    border-radius: 12px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    animation: float-card 4s ease-in-out infinite;
}

.floating-card-1 { top: 10%; right: -20px; animation-delay: 0s; }
.floating-card-2 { bottom: 20%; left: -30px; animation-delay: 1.5s; }

@keyframes float-card {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ============ TICKER ============ */
.ticker-wrap {
    background: rgba(26,86,232,0.1);
    border-top: 1px solid rgba(26,86,232,0.2);
    border-bottom: 1px solid rgba(26,86,232,0.2);
    padding: 12px 0;
    overflow: hidden;
}

.ticker-track {
    display: flex;
    gap: 60px;
    animation: ticker 25s linear infinite;
    width: max-content;
}

.ticker-item {
    display: flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.ticker-item i { color: var(--secondary); }

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
section { padding: 80px 0; }

.section-label {
    display: inline-block;
    background: rgba(26,86,232,0.15);
    border: 1px solid rgba(26,86,232,0.3);
    color: #93c5fd;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 540px;
    line-height: 1.7;
}

/* ============ PRODUCT CARDS ============ */
.product-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.product-card:hover {
    border-color: rgba(26,86,232,0.4);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}

.product-card .card-cover {
    height: 200px;
    background: linear-gradient(135deg, #1a3a6e, #0d2550);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card .card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.product-card .card-cover .cover-placeholder {
    font-size: 64px;
    color: rgba(26,86,232,0.5);
}

.lock-overlay {
    position: absolute; inset: 0;
    background: rgba(10,15,30,0.85);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.lock-overlay .lock-icon {
    width: 50px; height: 50px;
    background: rgba(26,86,232,0.2);
    border: 1px solid rgba(26,86,232,0.4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: #60a5fa;
}

.product-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.product-badge.locked { background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.product-badge.free { background: rgba(34,197,94,0.2); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }

.product-card .card-body { padding: 20px; }
.product-card .card-title { font-size: 16px; font-weight: 700; color: white; margin-bottom: 8px; }
.product-card .card-text { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.btn-primary {
    background: var(--gradient-blue) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    transition: all 0.3s !important;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(26,86,232,0.4) !important; }

.btn-outline-primary {
    border-color: rgba(26,86,232,0.5) !important;
    color: #60a5fa !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
}
.btn-outline-primary:hover { background: var(--gradient-blue) !important; color: white !important; border-color: transparent !important; }

/* ============ HOW IT WORKS ============ */
.steps-section { background: var(--dark-surface); }

.step-item {
    display: flex; gap: 20px; align-items: flex-start;
    margin-bottom: 40px;
}

.step-number {
    width: 48px; height: 48px;
    background: var(--gradient-blue);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(26,86,232,0.3);
}

.step-content h5 { font-size: 16px; font-weight: 700; color: white; margin-bottom: 6px; }
.step-content p { font-size: 14px; color: var(--text-muted); }

/* ============ FEATURES GRID ============ */
.feature-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: rgba(26,86,232,0.3);
    background: linear-gradient(135deg, rgba(26,86,232,0.08), var(--dark-card));
}

.feature-icon {
    width: 52px; height: 52px;
    background: rgba(26,86,232,0.15);
    border: 1px solid rgba(26,86,232,0.2);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: #60a5fa;
    margin-bottom: 16px;
}

.feature-card h5 { font-size: 15px; font-weight: 700; color: white; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ============ FAQ ============ */
.faq-section { background: var(--dark-surface); }

.accordion-item {
    background: var(--dark-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    margin-bottom: 8px !important;
}

.accordion-button {
    background: var(--dark-card) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: none !important;
}

.accordion-button::after { filter: invert(1); }

.accordion-button:not(.collapsed) {
    background: rgba(26,86,232,0.1) !important;
    color: #93c5fd !important;
}

.accordion-body {
    background: var(--dark-card) !important;
    color: var(--text-muted) !important;
    font-size: 14px;
    border-top: 1px solid var(--border) !important;
}

/* ============ AUTH PAGES ============ */
.auth-page {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex; align-items: center;
    padding: 100px 0 40px;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 30%, rgba(26,86,232,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.form-label { color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 500; margin-bottom: 6px; }

.form-control {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: white !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
}

.form-control:focus {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(26,86,232,0.5) !important;
    box-shadow: 0 0 0 3px rgba(26,86,232,0.15) !important;
    color: white !important;
}

.form-control::placeholder { color: rgba(255,255,255,0.3) !important; }

.input-group-text {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.4) !important;
    border-radius: 10px !important;
}

/* ============ DASHBOARD ============ */
.dashboard-page {
    min-height: 100vh;
    background: var(--dark);
    padding-top: 80px;
}

.sidebar {
    width: 260px;
    background: var(--dark-card);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 80px);
    padding: 24px 0;
    position: fixed;
    top: 80px; left: 0;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar-nav .nav-link {
    color: #cbd5e1 !important;
    padding: 10px 24px !important;
    font-size: 14px;
    font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    border-radius: 0;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    line-height: 1.4;
}

.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
    color: white !important;
    background: rgba(26,86,232,0.12);
    border-left-color: var(--primary);
}

/* ícones da sidebar: tamanho fixo e alinhamento vertical */
.sidebar-nav .nav-link i {
    font-size: 16px;
    width: 20px;
    min-width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    top: 0;
}

.main-content {
    margin-left: 260px;
    padding: 32px;
    min-height: calc(100vh - 80px);
}

.dashboard-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: 100%;
}

.stat-card {
    background: linear-gradient(135deg, rgba(26,86,232,0.15), rgba(14,165,233,0.05));
    border: 1px solid rgba(26,86,232,0.2);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
}

.stat-icon {
    width: 42px; height: 42px;
    background: rgba(26,86,232,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: #60a5fa;
    flex-shrink: 0;
}

.stat-value { font-size: 22px; font-weight: 800; color: white; line-height: 1; }
.stat-label { font-size: 11px; color: #94a3b8; margin-top: 2px; }

@media (max-width: 400px) {
    .stat-card { padding: 12px 14px; gap: 10px; }
    .stat-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
    .stat-value { font-size: 18px; }
}

/* ============ MATERIAL/READER CARD ============ */
.material-item {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all 0.3s;
    margin-bottom: 12px;
}

.material-item:hover {
    border-color: rgba(26,86,232,0.3);
    background: linear-gradient(135deg, rgba(26,86,232,0.06), var(--dark-card));
}

.material-item-actions {
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .material-item-owned {
        align-items: flex-start;
    }
    .material-item-actions {
        width: 100%;
        margin-top: 12px;
    }
    .material-item-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ============ COMENTÁRIOS ============ */
.comment-section .form-control {
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
    color: white;
    font-size: 13px;
}
.comment-section .form-control:focus {
    background: rgba(255,255,255,0.06);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,232,0.15);
    color: white;
}
.comment-section .comment-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.material-thumb {
    width: 60px; height: 80px;
    background: linear-gradient(135deg, #1e3a6e, #0f2d5a);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    color: #93c5fd;
    flex-shrink: 0;
    border: 1px solid rgba(26,86,232,0.25);
}

/* ============ PDF VIEWER ============ */
.reader-page {
    min-height: 100vh;
    background: #1a1a2e;
    padding-top: 80px;
}

.reader-toolbar {
    background: var(--dark-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
    position: sticky; top: 80px; z-index: 100;
}

.pdf-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

#pdf-viewer {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* ============ ADMIN ============ */
.admin-page { padding-top: 80px; min-height: 100vh; background: var(--dark); }

.admin-sidebar {
    width: 260px;
    background: var(--dark-card);
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 80px);
    padding: 20px 0;
    position: fixed; top: 80px; left: 0;
}

.admin-content { margin-left: 260px; padding: 28px; }

.table-dark {
    --bs-table-bg: var(--dark-card) !important;
    --bs-table-border-color: var(--border) !important;
}

.table-dark th { color: rgba(255,255,255,0.5) !important; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.table-dark td { color: rgba(255,255,255,0.85) !important; font-size: 14px; vertical-align: middle; }

/* ============ ALERTS ============ */
.alert-danger { background: rgba(239,68,68,0.1) !important; border: 1px solid rgba(239,68,68,0.3) !important; color: #fca5a5 !important; border-radius: 10px !important; }
.alert-success { background: rgba(34,197,94,0.1) !important; border: 1px solid rgba(34,197,94,0.3) !important; color: #86efac !important; border-radius: 10px !important; }
.alert-info { background: rgba(26,86,232,0.1) !important; border: 1px solid rgba(26,86,232,0.3) !important; color: #93c5fd !important; border-radius: 10px !important; }

/* ============ FOOTER ============ */
.footer { background: var(--dark-card); border-top: 1px solid var(--border); }
.footer p { color: #94a3b8 !important; }
.footer small { color: #64748b !important; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #94a3b8; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer .text-muted { color: #64748b !important; }

/* ============ UTILITIES ============ */
.text-gradient {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(26,86,232,0.3), transparent);
    margin: 0;
}

/* Alinha o brand do navbar com a sidebar no dashboard */
.has-sidebar #mainNav .navbar-brand {
    width: 260px;
    padding-left: 8px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
    .sidebar, .admin-sidebar { transform: translateX(-100%); z-index: 1000; }
    .sidebar.show, .admin-sidebar.show { transform: translateX(0); }
    .main-content, .admin-content { margin-left: 0; padding: 20px; }
    .has-sidebar #mainNav .navbar-brand { width: auto; padding-left: 0; }
}

@media (max-width: 768px) {
    .hero-section { padding: 100px 0 60px; }
    .hero-stats { gap: 20px; }
    .book-mockup, .book-mockup-placeholder { width: 220px; }
    .auth-card { padding: 28px 20px; }
    .floating-card { display: none; }
}

/* Sidebar como coluna flexível para empurrar links do site ao rodapé */
.sidebar {
    display: flex;
    flex-direction: column;
}
.sidebar .sidebar-nav.flex-grow-1 { flex: 1; }

/* Em mobile, o hamburger ABRE a sidebar (que tem todos os links).
   O collapse horizontal não é usado em páginas com sidebar. */
@media (max-width: 991px) {
    .has-sidebar #mainNav .navbar-toggler  { display: inline-block !important; }
    .has-sidebar #mainNav .navbar-collapse { display: none !important; }
}

/* ============ ANIMATIONS ============ */
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

/* ===== Botões de material (proporcionais, principalmente no mobile) ===== */
.material-item-actions .material-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
@media (max-width: 575px) {
    .material-item-actions { width: 100%; }
    .material-item-actions .material-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 7px 6px;
        font-size: 12px;
    }
}

/* ===== Comentários estilo Instagram ===== */
.cmt-name { color: #fff; font-weight: 600; font-size: 13px; margin-right: 5px; }
.cmt-text { color: #cbd5e1; font-size: 13px; line-height: 1.45; word-break: break-word; }
.cmt-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 14px; padding: 5px 2px 0; font-size: 12px; color: var(--text-muted);
}
.cmt-meta .cmt-action {
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--text-muted); font-size: 12px; font-weight: 600;
}
.cmt-meta .cmt-action:hover { color: #60a5fa; }
.cmt-meta .cmt-action-danger:hover { color: #f87171; }
.cmt-meta .cmt-edited { font-style: italic; }
.cmt-meta .cmt-likecount { font-weight: 600; }
.cmt-like {
    background: none; border: none; padding: 2px; cursor: pointer;
    color: var(--text-muted); font-size: 17px; line-height: 1;
    flex-shrink: 0; transition: transform .12s, color .12s;
}
.cmt-like:hover { color: #f87171; }
.cmt-like.liked { color: #ef4444; }
.cmt-like:active { transform: scale(1.3); }
