/* =========================================
   TLSHive v0.7.3d - HOJA DE ESTILOS CENTRALIZADA
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-deep: #050810;
    --bg-card: rgba(15, 21, 35, 0.45); 
    --border-subtle: rgba(255, 255, 255, 0.08); 
    --accent-tech: #00E5FF;
    --primary: #00E5FF;
    --secondary: #F59E0B;
    --accent-moon: #E2E8F0;
    --accent-sun: #F59E0B;
    --accent-error: #ef4444;
    --accent-success: #10b981;
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --whatsapp: #25d366;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-tech: 'JetBrains Mono', monospace;
}

/* Base Global Estricta para evitar desbordes */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; margin: 0; padding: 0; scroll-behavior: smooth; }

body:not(.dashboard-page) { padding-bottom: 50px; }

/* Global Keyframes */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInSimple { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(5px); } 60% { transform: translateY(3px); } }

/* Utilidad Compartida */
.glass-card { background: var(--bg-card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border-subtle); }

/* =========================================
   NAVEGACIÓN UNIFICADA (Header & Footer)
   ========================================= */
.unified-header { position: sticky; top: 0; z-index: 1000; background: rgba(5, 8, 16, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: center; width: 100%; }
.unified-header .header-container { max-width: 1200px; width: 100%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; }
.unified-header .logo-container { display: flex; align-items: center; gap: 5px; }
.unified-header .logo { font-size: 1.4rem; font-weight: 800; color: var(--accent-tech); text-decoration: none; letter-spacing: -0.5px; z-index: 1001; }
.unified-header .env-title { font-size: 1.4rem; font-weight: 800; color: var(--text-muted); letter-spacing: -0.5px; z-index: 1001; user-select: none; }
.unified-header .header-actions { display: flex; align-items: center; gap: 20px; }
.unified-header .main-nav { display: flex; gap: 25px; align-items: center; }
.unified-header .main-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: color 0.3s; }
.unified-header .main-nav a:hover, .unified-header .main-nav a.active-link { color: var(--text-main); }
.unified-header .nav-buttons { display: flex; align-items: center; gap: 15px; }
.unified-header .client-login-nav { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; border: 1px solid var(--border-subtle); padding: 8px 16px; border-radius: 6px; transition: all 0.3s ease; display:flex; align-items:center; gap:8px;}
.unified-header .client-login-nav:hover { border-color: var(--text-muted); color: var(--text-main); background: rgba(255,255,255,0.05); }
.unified-header .mobile-menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1001; }
.unified-header .mobile-menu-toggle span { width: 30px; height: 3px; background-color: var(--text-main); border-radius: 3px; transition: all 0.3s ease; }

/* Botón Global Volver Arriba */
.back-to-top { position: fixed; bottom: 25px; right: 25px; background: var(--accent-sun); color: #000; width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 9999; }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5); background: #fff; }

/* Footer Global Minimalista */
.unified-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(5, 8, 16, 0.95); backdrop-filter: blur(10px); padding: 10px 5%; border-top: 1px solid rgba(255,255,255,0.05); color: rgba(255,255,255,0.5); font-size: 0.75rem; z-index: 900; text-align: center; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.unified-footer.visible { transform: translateY(0); }
.unified-footer .footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.unified-footer .intranet-link { color: rgba(255,255,255,0.4); text-decoration: none; font-family: var(--font-tech); transition: color 0.3s; }
.unified-footer .intranet-link:hover { color: var(--accent-sun); }

/* Footer en Intranet */
.dashboard-page .unified-footer { position: relative; transform: none; padding: 8px 15px; background: #020617; border-top: 1px solid #1e293b; z-index: 10; flex-shrink: 0; }

@media (max-width: 1024px) {
    .unified-header .mobile-menu-toggle { display: flex; }
    .unified-header .header-actions { position: fixed; top: 0; right: -100%; width: 300px; height: 100vh; background: rgba(5, 8, 16, 0.95); backdrop-filter: blur(20px); border-left: 1px solid var(--border-subtle); flex-direction: column; justify-content: center; align-items: flex-start; padding: 40px; transition: right 0.3s ease; box-shadow: -5px 0 20px rgba(0,0,0,0.5); }
    .unified-header .header-actions.active { right: 0; }
    .unified-header .main-nav { flex-direction: column; align-items: flex-start; gap: 20px; width: 100%; margin-bottom: 30px; }
    .unified-header .nav-buttons { flex-direction: column; width: 100%; align-items: flex-start; }
    .unified-header .client-login-nav { width: 100%; text-align: center; justify-content:center;}
    .unified-header .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .unified-header .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .unified-header .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* =========================================
   1. DASHBOARD HIVE (intranet/hive)
   ========================================= */
.dashboard-page { background: #0f172a; color: #e2e8f0; font-family: system-ui, -apple-system, sans-serif; }
.dashboard-page #app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.dashboard-page #metrics { padding: 10px 20px; background: #020617; font-size: 13px; font-weight: bold; color: #38bdf8; border-bottom: 1px solid #1e293b; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.dashboard-page .status-OK { color: #4ade80; }
.dashboard-page .status-ERROR { color: #f87171; }
.dashboard-page .status-EVALUATING { color: #facc15; }
.dashboard-page #main-content { display: flex; flex: 1; overflow: hidden; width: 100%; }
.dashboard-page #chat-section { flex: 2; display: flex; flex-direction: column; border-right: 1px solid #1e293b; background: #0f172a; transition: flex 0.3s ease; }
.dashboard-page #chat { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; }
.dashboard-page .message { max-width: 85%; margin-bottom: 15px; padding: 12px 16px; border-radius: 12px; white-space: pre-wrap; line-height: 1.5; position: relative; }
.dashboard-page .user { background: #2563eb; align-self: flex-end; border-bottom-right-radius: 2px; }
.dashboard-page .bot { background: #0f766e; align-self: flex-start; border-bottom-left-radius: 2px; }
.dashboard-page .system { background: transparent; color: #94a3b8; align-self: center; font-family: monospace; font-size: 0.85em; margin: 4px 0; padding: 10px; border-left: 3px solid #16a34a; max-width: 95%; background-color: #020617;}
.dashboard-page .msg-actions { display: flex; gap: 5px; margin-top: 5px; justify-content: flex-end; opacity: 0; transition: opacity 0.2s; }
.dashboard-page .message:hover .msg-actions { opacity: 1; }
.dashboard-page .msg-btn { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; cursor: pointer; border-radius: 3px; font-size: 11px; padding: 3px 6px; }
.dashboard-page .msg-btn:hover { background: rgba(0,0,0,0.6); }
.dashboard-page .edit-input { width: 100%; background: #0f172a; border: 1px solid #38bdf8; color: white; padding: 8px; border-radius: 4px; font-family: inherit; resize: vertical; margin-top: 5px; min-height: 60px; box-sizing: border-box; }
.dashboard-page #inputArea { display: flex; padding: 15px; background: #020617; border-top: 1px solid #1e293b; flex-shrink: 0;}
.dashboard-page textarea { flex: 1; height: 60px; background: #1e293b; color: white; border: 1px solid #334155; padding: 10px; border-radius: 6px; resize: none; font-family: inherit; font-size: 14px; }
.dashboard-page textarea:focus { outline: none; border-color: #38bdf8; }
.dashboard-page button { width: 120px; background: #22c55e; border: none; color: #020617; font-weight: bold; font-size: 14px; cursor: pointer; margin-left: 15px; border-radius: 6px; transition: background 0.2s; }
.dashboard-page button:hover { background: #16a34a; }
.dashboard-page #dashboard-section { flex: 1; padding: 20px; overflow-y: auto; background: #020617; transition: flex 0.3s ease, padding 0.3s ease; }
.dashboard-page #dashboard-section h2 { margin-top: 0; font-size: 1.25rem; color: #38bdf8; border-bottom: 1px solid #1e293b; padding-bottom: 10px; margin-bottom: 20px; }
.dashboard-page .panel { background: #1e293b; border-radius: 8px; padding: 15px; margin-bottom: 20px; border: 1px solid #334155;}
.dashboard-page .panel h3 { margin-top: 0; font-size: 1rem; color: #e2e8f0; margin-bottom: 12px; }
.dashboard-page .dash-tabs { display: flex; background: #020617; border-bottom: 1px solid #1e293b; margin-bottom: 20px; border-radius: 4px; overflow: hidden; position: sticky; top: 0; z-index: 100; padding-top: 10px; }
.dashboard-page .dash-tab-btn { flex: 1; padding: 12px 10px; margin: 0; background: #0f172a; color: #94a3b8; border: none; cursor: pointer; font-weight: bold; border-bottom: 3px solid transparent; transition: all 0.2s; border-radius: 0; width: auto; font-size: 13px; }
.dashboard-page .dash-tab-btn:hover { color: #cbd5e1; background: #1e293b; }
.dashboard-page .dash-tab-btn.active { color: #38bdf8; border-bottom: 3px solid #38bdf8; background: #1e293b; }
.dashboard-page .dash-tab-content { display: none; background: transparent; padding: 0; }
.dashboard-page .dash-tab-content.active { display: block; animation: fadeInSimple 0.3s ease; }
.dashboard-page .view-controls { display: flex; gap: 10px; margin-bottom: 15px; justify-content: flex-end; }
.dashboard-page .view-btn { background: #334155; color: white; padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: normal; margin: 0; width: auto; border:none; cursor:pointer;}
.dashboard-page .view-btn:hover { background: #475569; }
.dashboard-page .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dashboard-page .grid-item { background: #0f172a; border: 1px solid #334155; padding: 15px; border-radius: 8px; text-align: center; cursor: pointer; transition: transform 0.2s; }
.dashboard-page .grid-item:hover { transform: translateY(-3px); filter: brightness(1.2); }
.dashboard-page .grid-item .count { font-size: 26px; font-weight: bold; margin-top: 10px; }
.dashboard-page table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.dashboard-page th, .dashboard-page td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #334155; }
.dashboard-page th { color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
.dashboard-page tbody tr:hover { background: #334155; }
.dashboard-page td { color: #cbd5e1; }
.dashboard-page #toast { visibility: hidden; min-width: 250px; background-color: #16a34a; color: white; text-align: center; border-radius: 6px; padding: 16px; position: fixed; z-index: 2000; right: 30px; bottom: 30px; font-weight: bold; font-size: 14px; opacity: 0; transition: opacity 0.3s, bottom 0.3s; }
.dashboard-page #toast.show { visibility: visible; opacity: 1; bottom: 50px; }
.dashboard-page .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(2, 6, 23, 0.85); backdrop-filter: blur(4px); }
.dashboard-page .modal-content { background-color: #0f172a; margin: 5% auto; padding: 25px; border: 1px solid #334155; width: 80%; max-width: 850px; border-radius: 8px; color: #cbd5e1; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.dashboard-page .close { color: #94a3b8; float: right; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.2s;}
.dashboard-page .close:hover { color: #ef4444; }
.dashboard-page .modal-body pre { background: #020617; padding: 12px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; font-family: 'Courier New', Courier, monospace; font-size: 13px; color: #4ade80; border: 1px solid #1e293b; }
.dashboard-page #modal-stderr { color: #f87171; }
.dashboard-page #modal-script { color: #38bdf8; }
.dashboard-page .modal-body h3 { font-size: 1rem; color: #e2e8f0; margin-top: 20px; margin-bottom: 8px; border-bottom: 1px dashed #334155; padding-bottom: 5px; }
.dashboard-page .modal-body ul { list-style-type: none; padding: 0; margin: 0; background: #1e293b; border-radius: 6px; padding: 10px; }
.dashboard-page .modal-body li { padding: 6px 0; border-bottom: 1px solid #334155; font-size: 13px; color: #94a3b8; }
.dashboard-page .modal-body li:last-child { border-bottom: none; }
.dashboard-page .action-btn { padding: 8px 15px; margin-right: 10px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; color: white; transition: opacity 0.2s; }
.dashboard-page .action-btn:hover { opacity: 0.8; }
.dashboard-page .btn-approve { background: #16a34a; }
.dashboard-page .btn-reject { background: #e11d48; }
.dashboard-page .btn-cancel { background: #475569; }
.dashboard-page .status-group { margin-bottom: 10px; }
.dashboard-page .status-header { cursor: pointer; background: #1e293b; padding: 10px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.dashboard-page .status-header:hover { filter: brightness(1.2); }
.dashboard-page .status-list { background: #0f172a; border: 1px solid #1e293b; border-top: none; padding: 10px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.dashboard-page .tabs { display: flex; background: #020617; border-bottom: 1px solid #1e293b; }
.dashboard-page .tab-btn { flex: 1; padding: 10px; margin: 0; background: transparent; color: #94a3b8; border: none; cursor: pointer; font-weight: bold; border-bottom: 2px solid transparent; width: auto; border-radius: 0;}
.dashboard-page .tab-btn.active { color: #38bdf8; border-bottom: 2px solid #38bdf8; background: #0f172a; }
.dashboard-page .wd-card { flex: 1; background: #1e293b; padding: 20px; border-radius: 8px; border: 1px solid #334155; cursor: pointer; text-align: center; transition: transform 0.2s, border-color 0.2s; }
.dashboard-page .wd-card:hover { transform: translateY(-3px); border-color: #38bdf8; background-color: #212c40; }

/* =========================================
   2. PRIVATE LANDING (Bóveda)
   ========================================= */
.private-landing { font-family: var(--font-main); background: radial-gradient(circle at top, #111a2e 0%, #050810 100%); background-attachment: fixed; color: var(--text-main); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; align-items: center; min-height: 100vh; }
.private-landing .welcome-text { font-family: var(--font-tech); color: var(--text-muted); font-size: 0.95rem; margin: 0; padding: 10px 20px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-subtle); border-radius: 20px; display: inline-block; }
.private-landing .welcome-text span { color: var(--text-main); font-weight: bold; }
.private-landing .apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; width: 100%; max-width: 1000px; }
.private-landing .app-card { background: var(--bg-card); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 30px 25px; text-decoration: none; color: var(--text-main); display: flex; flex-direction: column; position: relative; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.private-landing .app-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.5), transparent); opacity: 0; transition: opacity 0.3s ease; }
.private-landing .app-card:hover { transform: translateY(-5px); border-color: rgba(0, 229, 255, 0.3); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 229, 255, 0.05); }
.private-landing .app-card:hover::before { opacity: 1; }
.private-landing .app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; width: 100%; }
.private-landing .app-icon { font-size: 2.5rem; background: rgba(0, 0, 0, 0.3); width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border-subtle); }
.private-landing .app-role { font-family: var(--font-tech); font-size: 0.75rem; background: rgba(0, 229, 255, 0.1); color: var(--accent-tech); padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(0, 229, 255, 0.2); text-transform: uppercase; letter-spacing: 0.5px; }
.private-landing .app-card h2 { margin: 0 0 8px 0; font-size: 1.3rem; font-weight: 600; }
.private-landing .app-url { font-family: var(--font-tech); font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; }
.private-landing .actions { display: flex; gap: 10px; margin-top: auto; width: 100%; }
.private-landing .btn-action { flex: 1; padding: 10px; text-align: center; border-radius: 6px; font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: all 0.2s ease; font-family: var(--font-main); }
.private-landing .btn-primary { background-color: var(--accent-tech); color: #000; }
.private-landing .btn-primary:hover { background-color: #fff; box-shadow: 0 0 15px rgba(0, 229, 255, 0.4); }
.private-landing .btn-secondary { background-color: transparent; color: var(--text-main); border: 1px solid var(--border-subtle); cursor:pointer;}
.private-landing .btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); border-color: var(--text-muted); }
.private-landing .message-box { text-align: center; padding: 20px; border-radius: 8px; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); color: var(--accent-error); font-family: var(--font-tech); margin-top: 40px; display: none; }
.private-landing .loader { width: 40px; height: 40px; border: 3px solid rgba(0, 229, 255, 0.1); border-top: 3px solid var(--accent-tech); border-radius: 50%; animation: spin 1s linear infinite; margin: 50px auto; }

/* =========================================
   3. AUTH PAGE
   ========================================= */
.auth-page { font-family: var(--font-main); background: radial-gradient(circle at center, #111a2e 0%, var(--bg-deep) 100%); display: flex; flex-direction: column; min-height: 100vh; color: var(--text-main); -webkit-font-smoothing: antialiased; }
.auth-page .login-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; padding: 20px; margin: 0 auto; box-sizing: border-box; }
.auth-page .login-container { background: var(--bg-card); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border: 1px solid var(--border-subtle); padding: 40px 30px; border-radius: 12px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 255, 0.05); text-align: center; position: relative; overflow: hidden; width: 100%; }
.auth-page .login-container::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-tech), transparent); opacity: 0.5; }
.auth-page .logo { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 5px; letter-spacing: -0.5px; }
.auth-page .logo span { color: var(--accent-tech); }
.auth-page .login-container h1 { font-size: 1.2rem; color: var(--text-muted); margin: 0 0 25px 0; font-weight: 400; }
.auth-page .login-container p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; line-height: 1.5; }
.auth-page .form-group { margin-bottom: 20px; text-align: left; }
.auth-page .form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.auth-page .form-group input { width: 100%; padding: 14px 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-main); font-family: var(--font-tech); font-size: 1rem; box-sizing: border-box; transition: all 0.3s ease; }
.auth-page .form-group input:focus { outline: none; border-color: var(--accent-tech); background: rgba(0, 229, 255, 0.02); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1); }
.auth-page #token { text-align: center; letter-spacing: 8px; font-size: 1.2rem; font-weight: bold; }
.auth-page .btn { width: 100%; padding: 14px; border: none; border-radius: 6px; background-color: var(--accent-tech); color: #000; font-family: var(--font-main); font-size: 1rem; font-weight: 800; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2); }
.auth-page .btn:hover:not(:disabled) { background-color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4); }
.auth-page .btn:disabled { background-color: var(--border-subtle); color: var(--text-muted); cursor: not-allowed; box-shadow: none; }
.auth-page #token-section { display: none; }
.auth-page .message { margin-top: 20px; padding: 12px 15px; border-radius: 6px; font-size: 0.9rem; display: none; font-weight: 500; font-family: var(--font-tech); }
.auth-page .message.success { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-success); border: 1px solid rgba(16, 185, 129, 0.3); }
.auth-page .message.error { background-color: rgba(239, 68, 68, 0.1); color: var(--accent-error); border: 1px solid rgba(239, 68, 68, 0.3); }
.auth-page #email-section, .auth-page #token-section { animation: fadeIn 0.4s ease-in-out; }

/* =========================================
   4. ERROR PAGE
   ========================================= */
.error-page { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #0f172a; color: #cbd5e1; display: flex; justify-content: center; align-items: center; height: 100vh; text-align: center; }
.error-page .error-container { background-color: #1e293b; padding: 40px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); max-width: 500px; width: 90%; border-top: 4px solid #f43f5e; }
.error-page h1 { font-size: 5rem; margin: 0; color: #f43f5e; }
.error-page h2 { font-size: 1.5rem; color: #f8fafc; margin-top: 10px; }
.error-page p { font-size: 1rem; color: #94a3b8; margin-bottom: 30px; line-height: 1.5; }
.error-page .btn-report { background-color: #0ea5e9; color: white; border: none; padding: 12px 24px; font-size: 1rem; font-weight: bold; border-radius: 6px; cursor: pointer; text-decoration: none; transition: background-color 0.2s; display: inline-block; }
.error-page .btn-report:hover { background-color: #0284c7; }
.error-page .btn-back { background-color: transparent; color: #94a3b8; border: 1px solid #334155; padding: 12px 24px; font-size: 1rem; border-radius: 6px; cursor: pointer; text-decoration: none; transition: all 0.2s; display: inline-block; margin-left: 10px; }
.error-page .btn-back:hover { background-color: #334155; color: #f8fafc; }

/* =========================================
   5. PUBLIC LANDING PAGE
   ========================================= */
.landing-page { position: relative; font-family: var(--font-main); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; background: linear-gradient( to bottom, #050810 0%, #0B1324 25%, #14162B 50%, #231B1A 75%, #301E0A 100% ); background-attachment: scroll; min-height: 100vh; }
.landing-page .hero { text-align: center; padding: 120px 20px 60px 20px; position: relative; overflow: hidden; }
.landing-page .hero::before { content: ''; position: absolute; top: -150px; left: 50%; transform: translateX(-50%); width: 800px; height: 500px; background: radial-gradient(circle at top, rgba(226, 232, 240, 0.12) 0%, rgba(0, 229, 255, 0.05) 40%, transparent 70%); filter: blur(80px); z-index: 0; pointer-events: none; }
.landing-page .hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.landing-page .badge { display: inline-block; padding: 6px 12px; background: rgba(226, 232, 240, 0.05); color: var(--accent-moon); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 50px; font-size: 0.8rem; font-weight: 600; margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; }
.landing-page .hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin: 0 0 20px 0; line-height: 1.1; font-weight: 800; letter-spacing: -1px; }
.landing-page .hero h1 span { background: linear-gradient(90deg, var(--accent-moon), var(--accent-tech)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.landing-page .hero p, .landing-page .about-text p { font-size: 1.15rem; color: var(--text-muted); line-height: 1.8; max-width: 65ch; margin: 0 auto 40px auto; }
.landing-page .hero-actions { display: flex; gap: 15px; justify-content: center; align-items: center; flex-wrap: wrap; }
.landing-page .btn-primary { display: inline-block; background: var(--accent-tech); color: #000; padding: 16px 40px; border-radius: 4px; text-decoration: none; font-weight: 800; font-size: 1.1rem; transition: all 0.3s; box-shadow: 0 4px 20px rgba(0, 229, 255, 0.2); }
.landing-page .btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0, 229, 255, 0.4); }
.landing-page .btn-ghost { display: inline-block; background: transparent; color: var(--text-main); padding: 16px 30px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 1rem; transition: all 0.3s; border: 1px solid var(--border-subtle); }
.landing-page .btn-ghost:hover { border-color: var(--text-muted); background: rgba(255, 255, 255, 0.05); }
.landing-page .section-header { margin-bottom: 40px; text-align: left; }
.landing-page .section-header h2 { font-size: 2.2rem; margin: 0 0 10px 0; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.landing-page .section-header p { color: var(--text-muted); font-size: 1.1rem; margin: 0; max-width: 650px; line-height: 1.6; }
.landing-page .enterprise-section { padding: 20px 5%; max-width: 1200px; margin: 0 auto; }
.landing-page .client-portal-banner { background: linear-gradient(135deg, rgba(15, 21, 35, 0.4) 0%, rgba(0, 229, 255, 0.05) 100%); padding: 40px; border-radius: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.landing-page .client-portal-text h2 { margin: 0 0 10px 0; font-size: 1.5rem; }
.landing-page .client-portal-text p { margin: 0; color: var(--text-muted); max-width: 600px; }
.landing-page .btn-secondary { background: transparent; color: var(--text-main); border: 1px solid var(--text-main); padding: 14px 30px; border-radius: 4px; text-decoration: none; font-weight: 600; transition: all 0.3s; white-space: nowrap; }
.landing-page .btn-secondary:hover { background: var(--text-main); color: #000; }
.landing-page .content-section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.landing-page .playlist-player { display: flex; gap: 20px; border-radius: 12px; overflow: hidden; padding: 20px; }
.landing-page .main-video-area { flex-grow: 1; flex-basis: 70%; }
.landing-page .video-embed-container { position: relative; width: 100%; aspect-ratio: 16 / 9; background-color: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.landing-page .video-embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.landing-page .video-list-container { flex-basis: 30%; max-height: 500px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 5px;}
.landing-page .video-list-container::-webkit-scrollbar { width: 6px; }
.landing-page .video-list-container::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }
.landing-page .video-item { display: flex; gap: 15px; align-items: center; cursor: pointer; padding: 10px; border-radius: 6px; transition: all 0.2s; border: 1px solid transparent; background: rgba(255,255,255,0.03); }
.landing-page .video-item:hover { background-color: rgba(255, 255, 255, 0.08); }
.landing-page .video-item.active { background-color: rgba(0, 229, 255, 0.1); border-color: rgba(0, 229, 255, 0.3); }
.landing-page .video-item img { width: 100px; height: 56px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.landing-page .video-item-title { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; line-height: 1.3; }
.landing-page .video-item.active .video-item-title { color: var(--text-main); font-weight: 600; }
.landing-page #playlist-loader { text-align: center; color: var(--text-muted); padding: 20px; width: 100%;}
.landing-page .services-section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.landing-page .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.landing-page .service-card { padding: 40px 30px; border-radius: 12px; transition: all 0.4s ease; }
.landing-page .service-card:hover { transform: translateY(-5px); border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1); background: rgba(20, 25, 40, 0.6); }
.landing-page .service-icon { font-family: var(--font-tech); color: var(--accent-sun); font-size: 1.2rem; margin-bottom: 15px; display: block;}
.landing-page .service-card h3 { margin: 0 0 15px 0; font-size: 1.4rem; }
.landing-page .service-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.landing-page .about-section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.landing-page .about-content { background: linear-gradient(145deg, rgba(15, 21, 35, 0.4) 0%, rgba(245, 158, 11, 0.05) 100%); padding: 50px; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.landing-page .about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.landing-page .about-text p { margin-bottom: 20px; margin-left: 0; color: rgba(255,255,255,0.85); }
.landing-page .about-text p:last-child { margin-bottom: 0; }
.landing-page .about-text strong { color: var(--accent-sun); font-weight: 700; }
.landing-page .about-highlight { border-left: 3px solid var(--accent-sun); padding-left: 20px; margin: 30px 0; font-family: var(--font-tech); color: var(--text-main); font-size: 0.95rem; }
.landing-page .about-image { width: 100%; position: relative; }
.landing-page .about-image::after { content: ''; position: absolute; top: 10%; left: 10%; right: -10%; bottom: -10%; background: radial-gradient(circle, rgba(245,158,11,0.2) 0%, transparent 70%); z-index: -1; filter: blur(30px); }
.landing-page .about-image img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border-subtle); box-shadow: 0 10px 25px rgba(0,0,0,0.5); object-fit: cover; }
.landing-page .testimonials { padding: 60px 5%; max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.landing-page .testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.landing-page .testimonial-card { padding: 30px; border-radius: 8px; border-left: 3px solid var(--accent-sun); }
.landing-page .testimonial-text { font-style: italic; color: rgba(255,255,255,0.8); margin-bottom: 20px; font-size: 0.95rem; line-height: 1.6; }
.landing-page .testimonial-author { font-family: var(--font-tech); font-size: 0.85rem; color: var(--text-main); }
.landing-page .testimonial-role { display: block; color: var(--accent-sun); font-size: 0.75rem; margin-top: 5px; opacity: 0.8; }
.landing-page .ambient-sunrise { position: absolute; bottom: 0; left: 0; width: 100%; height: 1000px; background: radial-gradient(circle at bottom center, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 40%, transparent 70%); pointer-events: none; z-index: 0; }

@media (max-width: 900px) {
    .landing-page .playlist-player { flex-direction: column; }
    .landing-page .video-list-container { max-height: 300px; flex-direction: row; overflow-x: auto; padding-bottom: 10px; }
    .landing-page .video-item { flex-direction: column; width: 150px; flex-shrink: 0; text-align: center; }
    .landing-page .video-item img { width: 100%; height: 80px; }
    .landing-page .about-content { padding: 30px 20px; }
    .landing-page .about-grid { grid-template-columns: 1fr; }
}

/* =========================================
   6. TUTORIAL PAGE
   ========================================= */
.tutorial-page { font-family: var(--font-main); color: var(--text-main); line-height: 1.6; overflow-x: clip; -webkit-font-smoothing: antialiased; background: linear-gradient( to bottom, #050810 0%, #0B1324 25%, #14162B 50%, #231B1A 75%, #301E0A 100% ); background-attachment: scroll; min-height: 100vh; position: relative; }
.tutorial-page h1, .tutorial-page h2, .tutorial-page h3, .tutorial-page h4 { font-family: var(--font-main); font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.tutorial-page .container { max-width: 1300px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.tutorial-page #progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: rgba(0,0,0,0.5); z-index: 1000; }
.tutorial-page #progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--secondary)); box-shadow: 0 0 10px var(--primary); }
.tutorial-page .hero { padding: 80px 0; display: flex; align-items: center; gap: 50px; min-height: 90vh; position: relative; }
.tutorial-page .hero::before { content: ''; position: absolute; top: -150px; left: 50%; transform: translateX(-50%); width: 800px; height: 500px; background: radial-gradient(circle at top, rgba(226, 232, 240, 0.1) 0%, rgba(0, 229, 255, 0.05) 40%, transparent 70%); filter: blur(80px); z-index: -1; pointer-events: none; }
.tutorial-page .hero-content { flex: 1; }
.tutorial-page .hero-video { flex: 0 0 320px; }
.tutorial-page .badge { display: inline-block; padding: 6px 16px; border-radius: 50px; background: rgba(0, 229, 255, 0.05); color: var(--primary); border: 1px solid rgba(0, 229, 255, 0.2); font-weight: 700; margin-bottom: 25px; font-size: 0.85rem; font-family: var(--font-tech); text-transform: uppercase; }
.tutorial-page h1 { font-size: clamp(2.5rem, 4vw, 3.8rem); line-height: 1.1; margin-bottom: 25px; }
.tutorial-page .abstract { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 35px; border-left: 3px solid var(--secondary); padding-left: 20px; line-height: 1.8; }
.tutorial-page .abstract p { margin-bottom: 15px; }
.tutorial-page .abstract p:last-child { margin-bottom: 0; }
.tutorial-page .hero-cta-btn { color: var(--text-main); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 12px 25px; border-radius: 50px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); transition: all 0.3s ease; }
.tutorial-page .hero-cta-btn:hover { background: rgba(0, 229, 255, 0.1); border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }
.tutorial-page .hero-cta-btn i { animation: bounce 2s infinite; }
.tutorial-page .portrait-frame {width: 100%; aspect-ratio: 9/16; background: #000; border-radius: 24px;border: 1px solid var(--border-subtle); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.6); position: relative;}
.tutorial-page .portrait-frame video, .tutorial-page .portrait-frame iframe { width: 100%; height: 100%; object-fit: cover; border: none; }
.tutorial-page #email-gate { padding: 40px; text-align: center; margin: 0 auto 60px auto; max-width: 800px; scroll-margin-top: 50px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.tutorial-page #email-gate input { padding: 15px 20px; width: 100%; max-width: 350px; border-radius: 50px; border: 1px solid var(--border-subtle); background: rgba(0,0,0,0.5); color: #fff; font-size: 1rem; margin-top: 20px; outline: none; transition: border-color 0.3s; }
.tutorial-page #email-gate input:focus { border-color: var(--primary); }
.tutorial-page .btn-primary { padding: 15px 30px; border-radius: 50px; background: var(--primary); color: #000; border: none; font-weight: 800; font-size: 1rem; cursor: pointer; transition: all 0.3s; margin-left: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2); }
.tutorial-page .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4); background: #fff; }
.tutorial-page #course-container { display: none; padding-bottom: 140px; scroll-margin-top: 10px; }
.tutorial-page .stepper { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 40px; padding: 20px; position: sticky; top: 15px; z-index: 990; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.tutorial-page .step-item { flex: 1; text-align: center; padding: 15px 10px; border-radius: 12px; color: var(--text-muted); background: rgba(5, 8, 16, 0.6); border: 1px solid var(--border-subtle); transition: all 0.3s; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: not-allowed; opacity: 0.6; }
.tutorial-page .step-item.completed { opacity: 1; border-color: var(--success); color: var(--success); cursor: pointer; }
.tutorial-page .step-item.completed:hover { background: rgba(0, 230, 118, 0.1); }
.tutorial-page .step-item.active { opacity: 1; border-color: var(--primary); color: var(--primary); background: rgba(0, 229, 255, 0.08); cursor: pointer; box-shadow: 0 0 20px rgba(0, 229, 255, 0.1); }
.tutorial-page .step-item i { font-size: 1.5rem; }
.tutorial-page .step-item span { font-weight: 700; font-size: 0.9rem; line-height: 1.3; }
.tutorial-page .chapter-section { display: none; animation: fadeIn 0.5s ease-in-out; }
.tutorial-page .chapter-section.active-chapter { display: flex; gap: 40px; }
.tutorial-page .chapter-left { flex: 0 0 320px; }
.tutorial-page .chapter-left .portrait-frame { position: sticky; top: 150px; } 
.tutorial-page .chapter-right { flex: 1; min-width: 0; padding: 40px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.tutorial-page .chapter-desc { font-size: 1.15rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 30px; }
.tutorial-page .chapter-desc p { margin-bottom: 15px; }
.tutorial-page .chapter-desc strong { color: var(--text-main); font-weight: 600; }
.tutorial-page .btn-complete { display: inline-flex; align-items: center; gap: 10px; padding: 18px 30px; border-radius: 50px; background: rgba(0, 229, 255, 0.05); color: var(--primary); border: 1px solid var(--primary); font-weight: 700; font-size: 1.1rem; cursor: pointer; transition: 0.3s; margin-top: 30px; width: 100%; justify-content: center; }
.tutorial-page .btn-complete:hover { background: rgba(0, 229, 255, 0.15); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 229, 255, 0.15); }
.tutorial-page .btn-complete.btn-next-mode { background: var(--primary); color: #000; border: none; }
.tutorial-page .btn-complete.btn-next-mode:hover { box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4); background: #fff; }
.tutorial-page textarea.custom-textarea { width: 100%; padding: 15px; border-radius: 12px; background: rgba(0,0,0,0.4); color: #fff; border: 1px solid var(--border-subtle); font-family: inherit; font-size: 1rem; resize: vertical; outline: none; margin-top: 15px; transition: border-color 0.3s; }
.tutorial-page textarea.custom-textarea:focus { border-color: var(--primary); box-shadow: 0 0 10px rgba(0, 229, 255, 0.1); }
.tutorial-page .quiz-feedback { margin-top: 20px; font-weight: 700; display: none; padding: 15px; border-radius: 8px; text-align: center; }
.tutorial-page .spotify-wrapper { margin: 30px 0; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 229, 255, 0.1); border: 1px solid var(--border-subtle); background: #000; }
.tutorial-page .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tutorial-page .custom-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2001; padding: 30px; max-width: 90%; max-height: 90vh; text-align: center; box-shadow: 0 15px 50px rgba(0,0,0,0.5); overflow-y: auto; }
.tutorial-page .quiz-modal { max-width: 600px; text-align: left; border: 1px solid var(--secondary); box-shadow: 0 15px 50px rgba(245, 158, 11, 0.2); }
.tutorial-page .close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: 0.3s; z-index: 2002; }
.tutorial-page .close-modal:hover { color: var(--error); }
.tutorial-page .scroll-warning { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); border: 1px solid var(--secondary); color: var(--text-main); padding: 12px 25px; border-radius: 50px; z-index: 1990; box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2); transition: bottom 0.4s ease-in-out; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 0.95rem; font-weight: 600; }
.tutorial-page .scroll-warning.show { bottom: 30px; }
.tutorial-page .scroll-warning i { color: var(--secondary); font-size: 1.2rem; }
.tutorial-page .scroll-warning:hover { background: rgba(245, 158, 11, 0.1); }
.tutorial-page .toast-notification { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); border: 1px solid var(--primary); color: #fff; padding: 12px 25px; border-radius: 50px; font-weight: 700; z-index: 3000; box-shadow: 0 5px 20px rgba(0, 229, 255, 0.3); transition: top 0.4s ease-in-out; display: flex; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: 90%; font-size: 0.9rem; pointer-events: none; background: rgba(15, 21, 35, 0.9); backdrop-filter: blur(10px); }
.tutorial-page .toast-notification.show { top: 20px; }
.tutorial-page .toast-notification i { color: var(--primary); }
.tutorial-page .final-cta-section { padding: 60px 0; border-top: 1px solid var(--border-subtle); margin-top: 20px; position: relative; z-index: 1; }
.tutorial-page .cta-card { padding: 50px; text-align: center; box-shadow: 0 15px 50px rgba(0,0,0,0.5); position: relative; overflow: hidden; border: 1px solid var(--secondary); }
.tutorial-page .cta-card::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; height: 100%; background: radial-gradient(circle, rgba(245,158,11,0.05) 0%, transparent 70%); z-index: -1; pointer-events: none; }
.tutorial-page .cta-subtitle { color: var(--text-muted); max-width: 750px; margin: 20px auto 40px auto; font-size: 1.15rem; line-height: 1.8; }
.tutorial-page .cta-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 40px; text-align: left; }
.tutorial-page .feature-item { background: rgba(255,255,255,0.02); padding: 30px; border-radius: 16px; border: 1px solid var(--border-subtle); transition: 0.3s; }
.tutorial-page .feature-item:hover { border-color: var(--primary); background: rgba(0, 229, 255, 0.03); transform: translateY(-3px); }
.tutorial-page .feature-item i { font-size: 2.5rem; margin-bottom: 15px; }
.tutorial-page .text-primary { color: var(--primary); }
.tutorial-page .text-secondary { color: var(--secondary); }
.tutorial-page .btn-whatsapp { display: inline-flex; align-items: center; gap: 10px; padding: 20px 45px; border-radius: 50px; background: var(--whatsapp); color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem; transition: 0.3s; box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2); }
.tutorial-page .btn-whatsapp:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4); color: #fff; }
.tutorial-page .ambient-sunrise { position: absolute; bottom: 0; left: 0; width: 100%; height: 800px; background: radial-gradient(circle at bottom center, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.03) 40%, transparent 70%); pointer-events: none; z-index: 0; }

@media (max-width: 1024px) {
    .tutorial-page .hero, .tutorial-page .chapter-section.active-chapter { flex-direction: column; }
    .tutorial-page h1 { font-size: 2.2rem; }
    .tutorial-page .hero-video, .tutorial-page .chapter-left { width: 100%; max-width: 350px; margin: 0 auto; }
    .tutorial-page .chapter-left .portrait-frame { position: relative; top: 0; margin-bottom: 30px; }
    .tutorial-page .chapter-right { padding: 25px; }
    .tutorial-page .stepper { flex-direction: row; position: sticky; top: 10px; padding: 10px; gap: 5px; z-index: 990; border-radius: 12px; }
    .tutorial-page .step-item { flex-direction: column; justify-content: flex-start; padding: 10px 5px; }
    .tutorial-page .step-item i { font-size: 1.1rem; margin-bottom: 2px; }
    .tutorial-page .step-item span { text-align: center; font-size: 0.75rem; line-height: 1.2; }
    .tutorial-page .cta-card { padding: 30px 20px; }
    .tutorial-page .custom-modal { padding: 20px; width: 95%; }
    .tutorial-page #email-gate input { max-width: 100%; }
    .tutorial-page .btn-primary { width: 100%; margin-left: 0; margin-top: 15px; }
}

/* =========================================
   7. MD VIEWER
   ========================================= */
.mdviewer-page { font-family: Arial, sans-serif; margin: 0; background: #0f172a; color: #e2e8f0; }
.mdviewer-page header { padding: 10px; background: #1e293b; display: flex; gap: 10px; }
.mdviewer-page textarea { width: 100%; height: 200px; background: #020617; color: #e2e8f0; border: none; padding: 10px; resize: vertical; box-sizing: border-box; }
.mdviewer-page button { background: #3b82f6; border: none; padding: 8px 12px; color: white; cursor: pointer; border-radius: 6px; transition: background-color 0.2s; }
.mdviewer-page button:hover { background-color: #2563eb; }
.mdviewer-page #viewer { padding: 20px; }
.mdviewer-page pre { background: #020617; padding: 0; border-radius: 8px; overflow: hidden; margin: 10px 0; border: 1px solid #1e293b; }
.mdviewer-page .code-header { background: #1e293b; padding: 5px 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.mdviewer-page .code-header span { font-size: 12px; opacity: 0.8; font-family: monospace; }
.mdviewer-page .code-actions { display: flex; gap: 5px; }
.mdviewer-page .code-actions button { font-size: 12px; padding: 4px 8px; }
.mdviewer-page .code-content { padding: 10px; overflow-x: auto; display: none; }
.mdviewer-page h1, .mdviewer-page h2, .mdviewer-page h3 { color: #60a5fa; border-bottom: 1px solid #1e293b; padding-bottom: 5px; }
.mdviewer-page a { color: #38bdf8; }
