/* ==========================================================================
   Arraial dos Valentes - Design System & UI Premium v2.0
   Mobile-First • Elegante • Responsivo • Estilo Streaming & Dashboard Pro
   ========================================================================== */

:root {
    /* Superfícies & Fundo */
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-card-hover: #f8fafc;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #3b82f6;

    /* Sidebar & Layout */
    --sidebar-bg: #0b1120;
    --sidebar-surface: rgba(255, 255, 255, 0.04);
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: #2563eb;
    --sidebar-border: rgba(255, 255, 255, 0.07);

    /* Cores de Texto */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Acentos & Paleta Premium */
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-blue-light: #eff6ff;
    --accent-blue-glow: rgba(37, 99, 235, 0.25);

    --accent-gold: #d97706;
    --accent-gold-hover: #b45309;
    --accent-gold-light: #fffbeb;
    --accent-gold-glow: rgba(217, 119, 6, 0.2);

    --accent-green: #10b981;
    --accent-green-hover: #059669;
    --accent-green-light: #ecfdf5;
    --accent-green-glow: rgba(16, 185, 129, 0.2);

    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-red-light: #fef2f2;
    --accent-red-glow: rgba(239, 68, 68, 0.2);

    --accent-purple: #8b5cf6;
    --accent-purple-light: #f5f3ff;

    /* Raios & Bordas */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Sombras & Profundidade */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.22);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.25);

    /* Transições */
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset Global & Tipografia */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, input, button, select, textarea, optgroup {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Proteção Estrita para Font Awesome Icons */
.fa, .fas, .fa-solid, .fa-regular, .far, .fab, .fa-brands,
i[class*="fa-"], [class^="fa-"], [class*=" fa-"],
i[class*="fa-"]::before, [class^="fa-"]::before, [class*=" fa-"]::before,
.fa::before, .fas::before, .fa-solid::before, .fa-regular::before, .far::before, .fab::before, .fa-brands::before {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}
.fa-brands, .fa-brands::before, i.fa-brands::before {
    font-family: "Font Awesome 6 Brands", "FontAwesome" !important;
}
.fa-solid, .fas, .fa-solid::before, .fas::before {
    font-weight: 900 !important;
}
.fa-regular, .far, .fa-regular::before, .far::before {
    font-weight: 400 !important;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.55;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Estrutura de Layout (App Layout)
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Desktop */
.app-sidebar {
    width: 270px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px 18px;
    border-right: 1px solid var(--sidebar-border);
    transition: var(--transition);
}

.sidebar-header {
    margin-bottom: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    list-style: none;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
    position: relative;
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.sidebar-link.active i {
    transform: scale(1.1);
}

.sidebar-badge-count {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    line-height: 1.2;
}

.sidebar-user-card {
    background: var(--sidebar-surface);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

.sidebar-logout-btn {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.08);
}

/* Área de Conteúdo Principal */
.main-wrapper {
    flex-grow: 1;
    margin-left: 270px;
    padding-bottom: 60px;
    transition: var(--transition);
    min-width: 0;
}

/* Top Header Navbar (Mobile) */
.app-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 18px;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-brand img {
    height: 38px;
    object-fit: contain;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.btn-logout-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.btn-logout-icon:hover {
    background: var(--accent-red-light);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Main Container */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
}

/* Page Title Banner */
.page-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-blue), #38bdf8);
}

.page-title h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 700px;
}

/* ==========================================================================
   Cards & Layout em Grade
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.clean-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.clean-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-title-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-title-bar i {
    color: var(--accent-blue);
    font-size: 1.15rem;
}

/* KPI Metric Cards */
.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.kpi-val {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.kpi-label {
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 600;
}

/* ==========================================================================
   Botões & Ações
   ========================================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--accent-blue-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: #ffffff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    color: var(--text-primary);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-xs);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, #059669 100%);
    color: white !important;
    box-shadow: 0 4px 14px var(--accent-green-glow);
}
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red) 0%, #dc2626 100%);
    color: white !important;
    box-shadow: 0 4px 14px var(--accent-red-glow);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* ==========================================================================
   Formulários & Controles de Entrada
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

select.form-control {
    cursor: pointer;
}

.search-bar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 360px;
}

.search-bar-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.filter-pill:hover, .filter-pill.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   Tabelas Responsivas
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    -webkit-overflow-scrolling: touch;
}

.clean-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.clean-table th, .clean-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.clean-table th {
    background: var(--bg-secondary);
    font-weight: 800;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clean-table tbody tr {
    transition: var(--transition);
}

.clean-table tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.5);
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.badge-active {
    background: var(--accent-green-light);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-pending {
    background: var(--accent-gold-light);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-blocked {
    background: var(--accent-red-light);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Progress Bar */
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 9999px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #38bdf8);
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Layout Estilo Streaming / Netflix (Home & Cursos)
   ========================================================================== */
.netflix-hero {
    position: relative;
    width: 100%;
    min-height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 36px;
    background: linear-gradient(135deg, #090e1a 0%, #1e293b 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
    display: flex;
    align-items: flex-end;
}

.netflix-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: brightness(0.85);
    transition: transform 0.8s ease;
}

.netflix-hero:hover .netflix-hero-bg {
    transform: scale(1.02);
}

.netflix-hero-overlay {
    position: relative;
    z-index: 2;
    padding: 40px 36px;
    width: 100%;
    background: linear-gradient(to top, rgba(9, 14, 26, 0.98) 0%, rgba(9, 14, 26, 0.6) 65%, transparent 100%);
    color: #ffffff;
}

.netflix-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-blue);
    color: #ffffff;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.netflix-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.netflix-hero-desc {
    font-size: 0.98rem;
    color: #cbd5e1;
    max-width: 680px;
    margin-bottom: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.netflix-hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-netflix-play {
    background: var(--accent-blue);
    color: #ffffff !important;
    padding: 13px 26px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-netflix-play:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.55);
}

.btn-netflix-info {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff !important;
    padding: 13px 22px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: var(--transition);
}

.btn-netflix-info:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Netflix Carrosséis */
.netflix-section {
    margin-bottom: 38px;
}

.netflix-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.netflix-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.netflix-row-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    padding-top: 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.netflix-card {
    min-width: 250px;
    max-width: 270px;
    flex-shrink: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
    text-decoration: none;
}

.netflix-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.netflix-card-thumb {
    position: relative;
    width: 100%;
    height: 145px;
    background: #0f172a;
    overflow: hidden;
}

.netflix-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.netflix-card:hover .netflix-card-thumb img {
    transform: scale(1.07);
}

.netflix-card-play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.netflix-card:hover .netflix-card-play-overlay {
    opacity: 1;
}

.netflix-card-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5);
    transform: scale(0.85);
    transition: transform 0.25s ease;
}

.netflix-card:hover .netflix-card-play-btn {
    transform: scale(1);
}

.netflix-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.netflix-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.netflix-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}

.netflix-card-progress {
    height: 5px;
    background: var(--bg-secondary);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 8px;
}

.netflix-card-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #38bdf8);
    border-radius: 9999px;
}

/* ==========================================================================
   Player de Aula & Componentes de Ensino (aula.php)
   ========================================================================== */
.player-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.verse-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-left: 5px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.reflection-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-left: 5px solid var(--accent-blue);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

/* Navegação entre Aulas */
.lesson-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Navegação Inferior Mobile Flutuante (Estilo App Nativo)
   ========================================================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(11, 17, 32, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 36px;
    justify-content: space-around;
    align-items: center;
    padding: 8px 12px;
    z-index: 120;
    box-shadow: 0 16px 36px rgba(11, 17, 32, 0.35);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 24px;
    position: relative;
}

.mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 999px;
    text-align: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.mobile-nav-item i {
    font-size: 1.2rem;
}

.mobile-nav-item.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

/* ==========================================================================
   Modais & Popups
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
}

.modal-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: modalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Modal de Alerta Customizado (showAlert) */
.custom-alert-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.custom-alert-overlay.active {
    opacity: 1;
}

.custom-alert-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    padding: 32px 28px;
    text-align: center;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-color);
}

.custom-alert-overlay.active .custom-alert-card {
    transform: scale(1) translateY(0);
}

.custom-alert-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
}

.custom-alert-icon.icon-success { background: #dcfce7; color: #16a34a; }
.custom-alert-icon.icon-error { background: #fee2e2; color: #dc2626; }
.custom-alert-icon.icon-warning { background: #fef3c7; color: #d97706; }
.custom-alert-icon.icon-info { background: #dbeafe; color: #2563eb; }

.custom-alert-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.custom-alert-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.55;
    word-break: break-word;
}

.custom-alert-btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.custom-alert-btn:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

/* ==========================================================================
   Media Queries & Responsividade Avançada
   ========================================================================== */
@media (max-width: 991px) {
    .app-sidebar {
        display: none;
    }
    .main-wrapper {
        margin-left: 0;
        padding-bottom: 100px; /* Espaço para nav flutuante */
    }
    .app-header {
        display: flex;
    }
    .mobile-nav {
        display: flex;
    }
    .app-container {
        padding: 20px 16px;
    }
    .page-banner {
        padding: 20px;
        margin-bottom: 20px;
    }
    .page-title h1 {
        font-size: 1.35rem;
    }
    .netflix-hero {
        min-height: 270px;
        margin-bottom: 26px;
    }
    .netflix-hero-overlay {
        padding: 26px 20px;
    }
    .netflix-hero-title {
        font-size: 1.5rem;
    }
    .netflix-card {
        min-width: 220px;
        max-width: 240px;
    }
}

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    .modal-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }
    .clean-table th, .clean-table td {
        padding: 10px 12px;
        font-size: 0.84rem;
    }
    .mobile-nav {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 6px 8px;
    }
    .mobile-nav-item {
        padding: 6px 10px;
        font-size: 0.68rem;
    }
}
