/* ============================================================
   VORTEX SYSTEM
   União de todos os estilos do projeto
   Mantido legível, comentado e bem organizado
   ============================================================ */

/* ============================================================
   SEÇÃO 0: VARIÁVEIS GLOBAIS E TEMAS (Root)
   Descrição: Define cores, temas claro/escuro e tokens globais
   ============================================================ */

:root {
    --primary-dark: #0a0e1a;
    --primary-mid: #1a2332;
    --primary-light: #4a90d9;
    --accent: #6c5ce7;
    --vortex-blue: #00b4d8;
    --vortex-dark: #03045e;
}

[data-bs-theme="light"] {
    --bs-body-bg: #f0f4f8;
    --bs-body-color: #1a1a2e;
    --bg-card: #ffffff;
    --bg-card-header: #e8edf3;
    --border-color: rgba(0, 0, 0, 0.1);
    --text-muted: #6c757d;
    --input-bg: #ffffff;
    --input-border: #d1d9e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hero-overlay: rgba(255, 255, 255, 0.03);
    --pill-bg: #e9ecef;
    --pill-active-bg: #00b4d8;
    --pill-active-color: #fff;
    --pill-color: #495057;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0a0e1a;
    --bs-body-color: #e0e0e0;
    --bg-card: #1a2332;
    --bg-card-header: rgba(10, 14, 26, 0.8);
    --border-color: rgba(74, 144, 217, 0.15);
    --text-muted: #4a5a7a;
    --input-bg: rgba(10, 14, 26, 0.6);
    --input-border: rgba(74, 144, 217, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --hero-overlay: rgba(0, 0, 0, 0.3);
    --pill-bg: rgba(255, 255, 255, 0.1);
    --pill-active-bg: #00b4d8;
    --pill-active-color: #fff;
    --pill-color: #adb5bd;
}

/* ============================================================
   SEÇÃO 1: RESET E BASE GLOBAL
   Descrição: Reset de margens, box-sizing e estilos base do body
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bs-body-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    color: var(--bs-body-color);
    transition: background 0.3s, color 0.3s;
}

/* Variação do body para layout em coluna (usado no editor fullscreen) */
body.flex-column {
    flex-direction: column;
}

.container-main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Container para fullscreen (mais largo) */
.container-main.wide {
    max-width: 1400px;
}

/* ============================================================
   SEÇÃO 2: HEADER PADRÃO (Vortex Header)
   Descrição: Cabeçalho com logo, título e controles de tema/usuário
   ============================================================ */

.header-vortex {
    background: linear-gradient(135deg, var(--vortex-dark), var(--primary-dark));
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 180, 216, 0.2);
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.1);
}

[data-bs-theme="light"] .header-vortex {
    background: linear-gradient(135deg, #1a3a5c, #2a4a6a);
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    color: #fff;
    min-width: 0;
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 300;
    margin: 0;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo-text h1 span {
    color: var(--vortex-blue);
    font-weight: 600;
}

.logo-text .subtitle {
    font-size: 12px;
    color: #8ba4c7;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

/* Dropdown de configurações */
.config-dropdown {
    position: relative;
    display: inline-block;
}

.config-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    min-width: 200px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border-radius: 12px;
    padding: 15px;
    z-index: 1000;
    border: 1px solid var(--border-color);
    margin-top: 5px;
}

.config-dropdown-content.show {
    display: block;
}

.config-dropdown-content .form-label {
    font-size: 10px;
}

.config-dropdown-content .form-select,
.config-dropdown-content .form-control {
    font-size: 12px;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: var(--input-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--input-border);
}

/* ============================================================
   SEÇÃO 3: CARDS PADRÃO (Card Vortex)
   Descrição: Cards com header e body, usados em várias páginas
   ============================================================ */

.card-vortex {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-bottom: 25px;
}

.card-vortex .card-header {
    background: var(--bg-card-header);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
    color: var(--vortex-blue);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-vortex .card-header i {
    margin-right: 10px;
    color: var(--vortex-blue);
}

.card-vortex .card-body {
    padding: 20px;
}

/* ============================================================
   SEÇÃO 4: BOTÕES PADRÃO
   Descrição: Botões primário, outline, sucesso, perigo
   ============================================================ */

.btn-vortex {
    background: linear-gradient(135deg, #00b4d8, #6c5ce7);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-vortex:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-vortex:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.3);
}

.btn-vortex-outline {
    background: transparent;
    border: 1px solid var(--input-border);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s;
    font-size: 12px;
    cursor: pointer;
}

.btn-vortex-outline:hover,
.btn-vortex-outline.active {
    background: rgba(74, 144, 217, 0.1);
    border-color: var(--vortex-blue);
    color: var(--vortex-blue);
}

.btn-vortex-danger {
    background: rgba(220, 53, 69, 0.8);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.btn-vortex-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-vortex-success:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-vortex-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-danger-vortex {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    color: #dc3545;
    font-size: 12px;
    cursor: pointer;
}

.btn-acessar {
    background: linear-gradient(135deg, #00b4d8, #6c5ce7);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-acessar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

/* ============================================================
   SEÇÃO 5: FORMULÁRIOS E INPUTS
   Descrição: Labels, inputs, selects estilizados
   ============================================================ */

.form-label {
    font-weight: 500;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control,
.form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    padding: 10px 14px;
    color: var(--bs-body-color);
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--vortex-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 180, 216, 0.15);
}

/* Textarea monoespaçada (para código) */
textarea.form-control {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    min-height: 400px;
    resize: vertical;
}

/* ============================================================
   SEÇÃO 6: FOOTER PADRÃO
   ============================================================ */

.footer-vortex {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================================
   SEÇÃO 7: UPLOAD AREA (Dropzone)
   Descrição: Área de upload com drag & drop
   ============================================================ */

.upload-area {
    border: 2px dashed var(--input-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
}

.upload-area.drag-over {
    border-color: var(--vortex-blue);
    background: rgba(0, 180, 216, 0.05);
}

.upload-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: nowrap;
}

.upload-btn {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: var(--bs-body-color);
}

.upload-btn:hover {
    border-color: var(--vortex-blue);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.2);
}

.upload-btn i {
    font-size: 28px;
    color: var(--vortex-blue);
}

/* Dropzone alternativo (mais simples) */
.upload-dropzone {
    border: 2px dashed var(--input-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--input-bg);
    margin-bottom: 20px;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
    border-color: var(--vortex-blue);
    background: rgba(0, 180, 216, 0.05);
}

.upload-dropzone i {
    font-size: 40px;
    color: var(--vortex-blue);
    margin-bottom: 10px;
}

.upload-dropzone .file-types {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ============================================================
   SEÇÃO 8: SCANNER AO VIVO (QR Code)
   Descrição: Container de vídeo para leitura de QR Code
   ============================================================ */

#video-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    display: none;
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

.scanner-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* ============================================================
   SEÇÃO 9: RESULTADOS E BADGES (QR Code)
   Descrição: Exibição do resultado da leitura com badges
   ============================================================ */

.result-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    word-break: break-all;
    font-family: monospace;
    font-size: 14px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.format-badge {
    background: linear-gradient(135deg, #00b4d8, #6c5ce7);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: inline-block;
}

.info-badge {
    background: rgba(108, 92, 231, 0.15);
    color: var(--vortex-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    display: inline-block;
}

.selection-badge {
    background: rgba(0, 180, 216, 0.15);
    color: var(--vortex-blue);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
    display: inline-block;
}

.result-text {
    word-break: break-all;
    width: 100%;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.badge-vortex {
    background: linear-gradient(135deg, #00b4d8, #6c5ce7);
    color: #fff;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================================
   SEÇÃO 10: HERO SECTION (Dashboard)
   Descrição: Seção de destaque com animação
   ============================================================ */

.hero-section {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.05), rgba(108, 92, 231, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.03) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.hero-section h2 {
    font-size: 32px;
    font-weight: 300;
    color: var(--bs-body-color);
    margin-bottom: 15px;
}

.hero-section h2 span {
    color: var(--vortex-blue);
    font-weight: 600;
}

.hero-section .hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================================
   SEÇÃO 11: MÓDULOS / CARDS DE MÓDULOS (Dashboard)
   Descrição: Grid de módulos com filtros e badges
   ============================================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--vortex-blue);
}

.pill-filters {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pill-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--input-border);
    background: var(--pill-bg);
    color: var(--pill-color);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.pill-btn:hover {
    border-color: var(--vortex-blue);
    color: var(--bs-body-color);
}

.pill-btn.active {
    background: var(--pill-active-bg);
    color: var(--pill-active-color);
    border-color: var(--pill-active-bg);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.module-card {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    padding: 25px;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--bs-body-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-color);
    border-color: rgba(0, 180, 216, 0.3);
}

.module-card.disabled {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.module-card.hidden {
    display: none;
}

.module-card .module-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(108, 92, 231, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--vortex-blue);
    margin-bottom: 15px;
    flex-shrink: 0;
}

.module-card .module-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.module-card .module-desc {
    font-size: 13px;
    color: var(--text-muted);
    flex-grow: 1;
    line-height: 1.5;
}

.module-card .badge-gratis {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(07, 255, 07, 0.2);
    color: #079507;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(07, 255, 07, 0.3);
}

.module-card .badge-premium {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.module-card .badge-empresa {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(7, 193, 255, 0.2);
    color: #07c1ff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(7, 193, 255, 0.3);
}

/* ============================================================
   SEÇÃO 12: SOBRE E CONTATO (Dashboard)
   ============================================================ */

.sobre-section {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    padding: 30px;
    margin-bottom: 30px;
}

.sobre-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.sobre-section h3 i {
    color: var(--vortex-blue);
    margin-right: 10px;
}

.sobre-section p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.contato-section {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.05), rgba(108, 92, 231, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contato-section .contato-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(108, 92, 231, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--vortex-blue);
    flex-shrink: 0;
}

.contato-section .contato-text {
    font-size: 14px;
    color: var(--bs-body-color);
}

.contato-section .contato-email {
    color: var(--vortex-blue);
    text-decoration: none;
    font-weight: 500;
}

.contato-section .contato-email:hover {
    text-decoration: underline;
}

/* ============================================================
   SEÇÃO 13: MENU DE USUÁRIO (Login + Configurações)
   Descrição: Menu dropdown unificado com avatar e opções
   ============================================================ */

.user-config-dropdown {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-menu-btn.logged-in {
    padding: 3px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-menu-btn.logged-in:hover {
    border-color: var(--vortex-blue);
}

.avatar-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.premium-crown {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
    line-height: 1;
}

.user-menu-btn.logged-out .btn-text {
    font-size: 12px;
}

.user-menu-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-card);
    min-width: 260px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border-radius: 12px;
    z-index: 1000;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.user-menu-content.show {
    display: block;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.avatar-wrapper-lg {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.premium-crown-lg {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.user-details {
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-body-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-premium {
    display: inline-block;
    background: linear-gradient(135deg, #f9a825, #ffb300);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    margin-top: 3px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.menu-section-title {
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--bs-body-color);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.menu-item:hover {
    background: rgba(0, 180, 216, 0.1);
    color: var(--vortex-blue);
}

.menu-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Google One Tap container */
#google_one_tap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* ============================================================
   SEÇÃO 14: WHATSAPP FLUTUANTE
   ============================================================ */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* ============================================================
   SEÇÃO 15: MODAL
   ============================================================ */

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* ============================================================
   SEÇÃO 16: PAINEL DE ADMINISTRAÇÃO (Grid 3 colunas)
   Descrição: Layout com volumes, estatísticas e notificações
   ============================================================ */

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    min-height: 65vh;
}

.volume-list {
    max-height: 500px;
    overflow-y: auto;
}

.volume-item {
    background: rgba(10, 14, 26, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-bs-theme="light"] .volume-item {
    background: rgba(0, 0, 0, 0.03);
}

.volume-item:hover {
    background: rgba(10, 14, 26, 0.6);
}

[data-bs-theme="light"] .volume-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.volume-badge {
    background: linear-gradient(135deg, #00b4d8, #6c5ce7);
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.volume-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.volume-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.result-item {
    background: rgba(10, 14, 26, 0.4);
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

[data-bs-theme="light"] .result-item {
    background: rgba(0, 0, 0, 0.03);
}

.result-item .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.result-item .value {
    font-size: 20px;
    font-weight: 700;
    margin-top: 3px;
}

.result-item.highlight {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(108, 92, 231, 0.1));
    border-color: rgba(0, 180, 216, 0.2);
}

.result-item.highlight .value {
    color: #6c5ce7;
}

/* ============================================================
   SEÇÃO 17: NOTIFICAÇÕES (Toast / Notification)
   Descrição: Sistema de notificações com animações
   ============================================================ */

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 100%;
}

.notification {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.5s ease forwards;
    backdrop-filter: blur(10px);
}

.notification .icon {
    font-size: 20px;
}

.notification .message {
    flex: 1;
    font-size: 14px;
}

.notification .close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

.notification.hiding {
    animation: slideOutRight 0.5s ease forwards;
}

/* Toasts (versão alternativa) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.custom-toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.5s ease forwards;
    backdrop-filter: blur(10px);
    font-size: 14px;
    color: var(--bs-body-color);
}

.custom-toast.success {
    border-color: rgba(40, 167, 69, 0.3);
}
.custom-toast.success .icon {
    color: #28a745;
}

.custom-toast.error {
    border-color: rgba(220, 53, 69, 0.3);
}
.custom-toast.error .icon {
    color: #dc3545;
}

.custom-toast.info {
    border-color: rgba(0, 180, 216, 0.3);
}
.custom-toast.info .icon {
    color: var(--vortex-blue);
}

.custom-toast .icon {
    font-size: 20px;
}
.custom-toast .message {
    flex: 1;
}

.custom-toast .close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

.custom-toast .close-btn:hover {
    color: var(--bs-body-color);
}

.custom-toast.hiding {
    animation: slideOutRight 0.5s ease forwards;
}

/* Animações de notificação */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================================
   SEÇÃO 18: EDITOR DE QR CODE (Canvas / Ferramentas)
   Descrição: Editor com canvas, zoom, grid, régua, toggles
   ============================================================ */

.canvas-wrapper {
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #e0e0e0;
    min-height: 500px;
    max-height: 75vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.canvas-outer {
    position: relative;
    display: inline-block;
    transform-origin: center center;
}

.canvas-container {
    border: 2px solid #aaa;
    background: #ffffff;
    line-height: 0;
    position: relative;
}

.ruler {
    position: absolute;
    z-index: 15;
    pointer-events: none;
}

.ruler-top {
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.ruler-left {
    left: -20px;
    top: 0;
    height: 100%;
    width: 20px;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.toolbar .btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="color"] {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.dropdown-menu {
    min-width: auto;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-switch input {
    height: 0;
    width: 0;
    visibility: hidden;
    position: absolute;
}

.toggle-switch label {
    cursor: pointer;
    width: 40px;
    height: 20px;
    background: #ccc;
    display: inline-block;
    border-radius: 20px;
    position: relative;
}

.toggle-switch label:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 16px;
    transition: 0.3s;
}

.toggle-switch input:checked + label {
    background: #66bb6a;
}

.toggle-switch input:checked + label:after {
    left: calc(100% - 2px);
    transform: translateX(-100%);
}

/* Zoom control */
.zoom-control {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 20;
}

.zoom-control input[type="range"] {
    width: 80px;
}

.code-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.code-tab {
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.code-tab.active {
    color: var(--vortex-blue);
    border-bottom-color: var(--vortex-blue);
}

#codigoPreviewCanvas {
    max-width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* ============================================================
   SEÇÃO 19: SELEÇÃO DE MODO/TIPO (Página de conversão)
   Descrição: Cards para escolher modo e tipo de operação
   ============================================================ */

.mode-selector,
.tipo-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mode-card,
.tipo-card {
    flex: 1;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.mode-card:hover,
.mode-card.active,
.tipo-card:hover,
.tipo-card.active {
    border-color: var(--vortex-blue);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.2);
}

.mode-card.active,
.tipo-card.active {
    background: rgba(0, 180, 216, 0.05);
}

.mode-card i,
.tipo-card i {
    font-size: 32px;
    color: var(--vortex-blue);
    margin-bottom: 10px;
}

.mode-card h3,
.tipo-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.mode-card p,
.tipo-card p {
    font-size: 12px;
    color: var(--text-muted);
}

.tipo-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   SEÇÃO 20: ABAS (Tabs)
   Descrição: Sistema de abas com conteúdo alternado
   ============================================================ */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab.active {
    color: var(--vortex-blue);
    border-bottom-color: var(--vortex-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================
   SEÇÃO 21: PREVIEW BOX (Pré-visualização)
   ============================================================ */

.preview-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-top: 10px;
}

.preview-box canvas,
.preview-box img {
    max-width: 100%;
}

/* ============================================================
   SEÇÃO 22: PREVIEW DE CÓDIGO / VISUALIZAÇÃO (textarea + imagem)
   Descrição: Container para pré-visualização de imagens e texto
   ============================================================ */

.preview-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 10px;
}

.preview-container img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   SEÇÃO 23: EDITOR FULLSCREEN (Canvas em tela cheia)
   Descrição: Toolbar, canvas-wrapper flexível, status-bar, botão fullscreen
   ============================================================ */

#fullscreenContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* A toolbar já foi definida na seção 18, mas aqui reforçamos o estilo para fullscreen */
.toolbar .btn-vortex-outline {
    padding: 8px 14px;
    font-size: 12px;
}

.canvas-wrapper.fullscreen {
    flex: 1;
    overflow: hidden;
    min-height: 600px;
}

/* Status bar */
.status-bar {
    display: flex;
    gap: 20px;
    padding: 8px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    align-items: center;
}

/* Botão fullscreen */
.fullscreen-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 20;
    cursor: pointer;
}

.canvas-wrapper:hover .fullscreen-btn {
    opacity: 1;
}

/* Painel de seleção (aparece ao selecionar algo no canvas) */
.selection-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--bs-body-color);
    display: none;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Comportamento em tela cheia nativo */
#fullscreenContainer:fullscreen .toolbar,
#fullscreenContainer:fullscreen .status-bar {
    display: flex !important;
}

#fullscreenContainer:fullscreen .header-vortex,
#fullscreenContainer:fullscreen .footer-vortex {
    display: none !important;
}

#fullscreenContainer:fullscreen .canvas-wrapper {
    border-radius: 0;
    border: none;
}

/* ============================================================
   SEÇÃO 24: RESPONSIVIDADE
   Descrição: Breakpoints para tablets e mobile
   ============================================================ */

@media (max-width: 992px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-grid {
        grid-template-columns: 1fr;
    }
    .notification-container {
        max-width: 90%;
        right: 5%;
        top: 10px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .logo-text h1 {
        font-size: 18px;
    }
    .card-vortex .card-body {
        padding: 15px;
    }
    .hero-section h2 {
        font-size: 24px;
    }
    .hero-section .hero-subtitle {
        font-size: 14px;
    }
    .modules-grid {
        grid-template-columns: 1fr;
    }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .upload-area {
        padding: 20px;
    }
    .upload-btn {
        padding: 15px 10px;
        font-size: 13px;
    }
    #video-container {
        max-width: 100%;
    }
    .mode-selector,
    .tipo-selector {
        flex-direction: column;
    }
    /* Ajustes para fullscreen */
    .canvas-wrapper.fullscreen {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 25px 20px;
    }
    .hero-section h2 {
        font-size: 20px;
    }
    .logo-text h1 {
        font-size: 16px;
    }
    .logo-text .subtitle {
        display: none;
    }
    .sobre-section {
        padding: 20px;
    }
    .pill-filters {
        flex-wrap: wrap;
    }
    .card-vortex .card-body {
        padding: 15px;
    }
    .result-actions {
        flex-direction: column;
    }
    .upload-options {
        gap: 10px;
    }
    .upload-btn {
        padding: 12px 8px;
        font-size: 12px;
    }
    .upload-btn i {
        font-size: 24px;
    }
    /* Ajustes para o editor fullscreen */
    .toolbar {
        gap: 5px;
        padding: 8px;
    }
    .toolbar .btn-vortex-outline {
        padding: 4px 10px;
        font-size: 11px;
    }
    .fullscreen-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}