/* ============================================================
   FLUXIFY — Design System
   Dark premium SaaS — marketing digital e IA
   ============================================================ */

:root {
    --bg:           #0A0C10;
    --bg-panel:     #111318;
    --bg-panel-2:   #181C24;
    --bg-hover:     #1E2330;
    --border:       #1E2330;
    --border-light: #252D3D;
    --text:         #E8ECF1;
    --text-muted:   #8A93A6;
    --text-dim:     #555E72;
    --primary:      #3B82F6;
    --primary-dim:  #3B82F61A;
    --signal:       #10B981;
    --signal-dim:   #10B98120;
    --amber:        #F59E0B;
    --amber-dim:    #F59E0B1A;
    --danger:       #EF4444;
    --purple:       #8B5CF6;
    --font-display: 'Sora', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;
    --radius:       10px;
    --radius-lg:    16px;
    --shadow:       0 4px 24px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
textarea, input, button { font-family: var(--font-body); }
.mono { font-family: var(--font-mono); }

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

/* ── Botões ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
    cursor: pointer; border: 1px solid transparent; transition: all .15s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: #2563EB; border-color: #2563EB; }
.btn-signal { background: var(--signal); color: #000; border-color: var(--signal); }
.btn-signal:hover:not(:disabled) { background: #059669; }
.btn-amber { background: var(--amber); color: #000; border-color: var(--amber); font-weight: 700; }
.btn-amber:hover:not(:disabled) { background: #D97706; }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border-light); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }

/* ── Badges ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.badge-pro { background: var(--amber-dim); color: var(--amber); border: 1px solid #F59E0B40; }
.badge-active { background: var(--signal-dim); color: var(--signal); border: 1px solid #10B98140; }
.badge-inactive { background: #EF444420; color: var(--danger); border: 1px solid #EF444440; }
.badge-free { background: var(--bg-panel-2); color: var(--text-muted); border: 1px solid var(--border-light); }

/* ── Topbar ── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; border-bottom: 1px solid var(--border);
    background: rgba(10,12,16,.9); backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 100;
}
.logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 8px; letter-spacing: -.03em; }
.logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-pill { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }

/* ── Hero (landing) ── */
.hero {
    padding: 100px 0 80px;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, #10B98115, transparent);
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 1px; height: 100%; background: linear-gradient(to bottom, transparent, var(--signal), transparent);
    opacity: .15;
}
.hero-eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--signal); letter-spacing: .1em; margin-bottom: 20px; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 5vw, 60px); line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { background: linear-gradient(135deg, var(--signal), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero .lead { font-size: 18px; color: var(--text-muted); max-width: 600px; margin: 0 auto 36px; line-height: 1.6; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Features Section ── */
.features { padding: 80px 0; }
.features-header { text-align: center; margin-bottom: 56px; }
.features-header h2 { font-size: 32px; margin-bottom: 12px; }
.features-header p { color: var(--text-muted); font-size: 16px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 28px; transition: border-color .2s;
}
.feature-card:hover { border-color: var(--border-light); }
.feature-icon { font-size: 32px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── Pricing ── */
.pricing { padding: 80px 0; background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pricing-header { text-align: center; margin-bottom: 56px; }
.pricing-header h2 { font-size: 36px; margin-bottom: 12px; }
.pricing-header p { color: var(--text-muted); font-size: 16px; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; margin: 0 auto; }
.plan-card {
    background: var(--bg-panel-2); border: 2px solid var(--border-light); border-radius: var(--radius-lg);
    padding: 32px; cursor: pointer; transition: all .2s; position: relative;
}
.plan-card.popular { border-color: var(--signal); box-shadow: 0 0 40px #10B98115; }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px #3B82F620; }
.plan-card:hover:not(.selected) { border-color: var(--border-light); transform: translateY(-2px); }
.plan-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--signal); color: #000; font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 20px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.plan-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.plan-price { font-family: var(--font-mono); font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.plan-price small { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.plan-anchor { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.plan-anchor s { color: var(--danger); opacity: .7; }
.plan-savings { font-size: 13px; color: var(--signal); font-weight: 600; margin-bottom: 16px; }
.plan-tagline { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.plan-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Auth ── */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 11px 14px; background: var(--bg-panel-2); border: 1px solid var(--border-light);
    border-radius: var(--radius); color: var(--text); font-size: 14px; outline: none; transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 80px; }

.form-error { font-size: 13px; color: var(--danger); background: #EF444415; border: 1px solid #EF444430; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: none; }
.form-error.show { display: block; }
.form-note { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 16px; }
.form-note a { color: var(--primary); }

/* ── App Layout (dashboard) ── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px; min-height: 100vh; background: var(--bg-panel);
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0;
}
.sidebar-logo { padding: 22px 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-nav { padding: 12px 10px; flex: 1; }
.sidebar-section { font-size: 11px; font-weight: 600; color: var(--text-dim); letter-spacing: .1em; text-transform: uppercase; padding: 10px 10px 6px; }
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer;
    transition: all .15s; margin-bottom: 2px; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--primary-dim); color: var(--primary); }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { padding: 12px 10px; border-top: 1px solid var(--border); }
.sidebar-user { padding: 10px 12px; font-size: 13px; color: var(--text-muted); }
.sidebar-user strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-main { flex: 1; overflow-x: hidden; }
.app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; border-bottom: 1px solid var(--border);
    background: rgba(10,12,16,.9); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50;
}
.app-topbar h1 { font-size: 18px; }
.page-content { padding: 28px; }

/* ── Content Cards ── */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.aula-card {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: border-color .15s, transform .15s; cursor: pointer; position: relative;
}
.aula-card:hover:not(.locked-card) { border-color: var(--border-light); transform: translateY(-2px); }
.aula-thumb {
    width: 100%; aspect-ratio: 16/9; background: var(--bg-panel-2); position: relative;
    display: flex; align-items: center; justify-content: center;
}
.aula-thumb img { width: 100%; height: 100%; object-fit: cover; }
.aula-play {
    position: absolute; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center;
    font-size: 18px; backdrop-filter: blur(4px); transition: transform .15s;
}
.aula-card:hover .aula-play { transform: scale(1.1); }
.aula-body { padding: 14px 16px; }
.aula-category { font-size: 11px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.aula-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.aula-duration { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

.ferramenta-card {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; transition: all .15s; cursor: pointer; display: flex; flex-direction: column; gap: 12px;
}
.ferramenta-card:hover:not(.locked-card) { border-color: var(--border-light); transform: translateY(-2px); }
.ferramenta-top { display: flex; align-items: flex-start; gap: 12px; }
.ferramenta-icon { font-size: 28px; line-height: 1; }
.ferramenta-info { flex: 1; }
.ferramenta-category { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.ferramenta-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ferramenta-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.gpt-card {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: all .15s;
}
.gpt-card:hover:not(.locked-card) { border-color: var(--border-light); }
.gpt-header { display: flex; align-items: center; gap: 10px; }
.gpt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 8px var(--purple); flex-shrink: 0; }
.gpt-title { font-size: 15px; font-weight: 600; color: var(--text); }
.gpt-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.gpt-category { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }

/* ── Lock overlay ── */
.locked-card { position: relative; }
.locked-card > *:not(.lock-overlay) { filter: blur(3px); pointer-events: none; user-select: none; }
.lock-overlay {
    position: absolute; inset: 0; z-index: 10;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: rgba(10,12,16,.6); backdrop-filter: blur(2px);
    cursor: pointer; border-radius: var(--radius); transition: background .15s;
}
.lock-overlay:hover { background: rgba(10,12,16,.75); }
.lock-overlay .lock-icon { font-size: 22px; }
.lock-overlay .lock-text { font-size: 12px; font-weight: 600; color: var(--amber); text-align: center; }

/* ── Section header ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-size: 20px; }
.section-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.category-group { margin-bottom: 36px; }
.category-label { font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

/* ── Upgrade Banner ── */
.upgrade-banner {
    background: linear-gradient(135deg, var(--amber-dim), var(--bg-panel-2));
    border: 1px solid #F59E0B40; border-radius: var(--radius-lg); padding: 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px;
    flex-wrap: wrap;
}
.upgrade-banner h3 { font-size: 18px; margin-bottom: 6px; }
.upgrade-banner p { font-size: 14px; color: var(--text-muted); }

/* ── Embed Modal ── */
.embed-modal-overlay {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.85);
    backdrop-filter: blur(4px); display: none; flex-direction: column;
}
.embed-modal-overlay.show { display: flex; }
.embed-modal-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; background: var(--bg-panel); border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.embed-modal-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.embed-modal-actions { display: flex; gap: 10px; align-items: center; }
.embed-modal-frame { flex: 1; border: none; width: 100%; background: var(--bg); }

/* ── Video Modal ── */
.video-modal-overlay {
    position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.92);
    backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 40px;
}
.video-modal-overlay.show { display: flex; }
.video-modal { width: 100%; max-width: 960px; }
.video-modal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.video-modal-top h3 { font-size: 18px; }
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── Checkout ── */
.checkout-shell { min-height: 100vh; padding: 50px 20px 80px; }
.plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 700px; margin: 0 auto 36px; }
.checkout-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 460px; margin: 0 auto; }
.card-element-box { background: var(--bg-panel-2); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 13px 14px; transition: border-color .15s; }
.card-element-box.focused { border-color: var(--primary); }

/* ── Admin Layout ── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-sidebar .logo { padding: 20px; border-bottom: 1px solid var(--border); font-size: 17px; }
.admin-sidebar nav { padding: 12px; flex: 1; }
.tab-link { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text-muted); margin-bottom: 2px; transition: all .15s; font-weight: 500; }
.tab-link:hover { background: var(--bg-hover); color: var(--text); }
.tab-link.active { background: var(--primary-dim); color: var(--primary); }
.admin-main { flex: 1; padding: 28px; overflow-x: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-header h1 { font-size: 22px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--bg-panel-2); }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: var(--bg-panel-2); }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 520px; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }

/* ── Stats ── */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 700; font-family: var(--font-mono); color: var(--text); }

/* ── Upgrade Modal ── */
.upgrade-modal-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.8); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 20px; }
.upgrade-modal-overlay.show { display: flex; }
.upgrade-modal { background: var(--bg-panel); border: 1px solid var(--amber); border-radius: var(--radius-lg); padding: 36px; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 0 60px #F59E0B20; }
.upgrade-modal h2 { font-size: 24px; margin-bottom: 12px; }
.upgrade-modal p { color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }

/* ── Landing sections ── */
.social-proof { padding: 60px 0; border-top: 1px solid var(--border); }
.social-proof-header { text-align: center; margin-bottom: 40px; }
.social-proof-header h2 { font-size: 28px; margin-bottom: 8px; }
.social-proof-header p { color: var(--text-muted); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.testimonial-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.testimonial-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; font-style: italic; }
.testimonial-author { font-size: 13px; font-weight: 600; color: var(--text); }
.testimonial-role { font-size: 12px; color: var(--text-dim); }

.section-cta { text-align: center; padding: 80px 0; }
.section-cta h2 { font-size: 36px; margin-bottom: 12px; }
.section-cta p { color: var(--text-muted); font-size: 16px; margin-bottom: 32px; }

footer { padding: 32px 28px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
footer p { font-size: 13px; color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .app-layout { flex-direction: column; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 28px; }
    .hero .lead { font-size: 15px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .upgrade-banner { flex-direction: column; }
}
