/* ==========================================================================
   VirtualPlay · Central de treinamento
   Tema escuro azul · 2026
   ========================================================================== */

:root {
    --bg: #050811;
    --bg-2: #070d1b;
    --bg-3: #0a1326;
    --surface: rgba(14, 23, 42, 0.66);
    --surface-2: rgba(17, 28, 51, 0.82);
    --surface-3: rgba(23, 36, 63, 0.9);
    --line: rgba(148, 180, 255, 0.13);
    --line-strong: rgba(148, 180, 255, 0.26);
    --text: #eaf1ff;
    --soft: #c3d1e9;
    --muted: #93a6c7;
    --brand: #2f8bff;
    --brand-2: #0b57ff;
    --brand-soft: rgba(47, 139, 255, 0.14);
    --cyan: #22d3ee;
    --violet: #8b5cf6;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 9px;
    --shadow: 0 30px 80px -34px rgba(0, 0, 0, 0.9);
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15.5px;
    line-height: 1.62;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.sidebar-open,
body.nav-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: #7fb6ff;
}

h1, h2, h3, h4 {
    margin: 0 0 0.5em;
    line-height: 1.18;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #f4f8ff;
}

h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
h3 { font-size: 1.16rem; font-weight: 700; }
h4 { font-size: 0.98rem; font-weight: 700; }

p {
    margin: 0 0 1rem;
}

p:last-child {
    margin-bottom: 0;
}

code {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.84em;
    color: #9ecbff;
    background: rgba(47, 139, 255, 0.1);
    border: 1px solid rgba(47, 139, 255, 0.18);
    padding: 2px 6px;
    border-radius: 6px;
    word-break: break-word;
}

::selection {
    background: rgba(47, 139, 255, 0.35);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    vertical-align: -3px;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(900px 520px at 12% -10%, rgba(47, 139, 255, 0.22), transparent 62%),
        radial-gradient(760px 480px at 92% 4%, rgba(11, 87, 255, 0.16), transparent 60%),
        radial-gradient(900px 700px at 50% 110%, rgba(34, 211, 238, 0.08), transparent 65%),
        linear-gradient(180deg, #050811 0%, #060b17 55%, #04070f 100%);
}

.bg-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 180, 255, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
    opacity: 0.7;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.muted { color: var(--muted) !important; }
.small { font-size: 0.87rem; }
.center { text-align: center; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.text-success { color: var(--green) !important; }
.text-danger { color: var(--red) !important; }

.grad-text {
    background: linear-gradient(96deg, #8ec6ff 0%, var(--brand) 42%, var(--cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8dbdff;
    margin-bottom: 16px;
}

.eyebrow a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.eyebrow a:hover { color: var(--brand); }
.eyebrow .icon { width: 15px; height: 15px; }

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid rgba(47, 139, 255, 0.28);
    background: rgba(47, 139, 255, 0.1);
    color: #9cc7ff;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

/* ==========================================================================
   Botões
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 19px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn .icon { width: 17px; height: 17px; }

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 12px 30px -12px rgba(47, 139, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
    color: #fff;
    box-shadow: 0 16px 38px -12px rgba(47, 139, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    filter: brightness(1.06);
}

.btn-ghost {
    background: rgba(148, 180, 255, 0.05);
    border-color: var(--line-strong);
    color: var(--soft);
}

.btn-ghost:hover {
    background: rgba(148, 180, 255, 0.12);
    border-color: rgba(148, 180, 255, 0.4);
    color: #fff;
}

.btn-success {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

.btn-success.is-done { cursor: default; }

.btn-danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.32);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.24);
    color: #fecaca;
}

.btn-lg { padding: 14px 24px; font-size: 1rem; border-radius: 13px; }
.btn-sm { padding: 8px 13px; font-size: 0.83rem; border-radius: 10px; gap: 6px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn.danger { color: #fca5a5; }
.btn.danger:hover { color: #fecaca; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.16s ease;
    padding: 0;
}

.icon-btn:hover {
    background: rgba(148, 180, 255, 0.1);
    border-color: var(--line);
    color: #fff;
}

.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn.danger:hover { background: rgba(239, 68, 68, 0.16); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.icon-btn.success:hover { background: rgba(34, 197, 94, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }

.inline-form {
    display: inline-flex;
    margin: 0;
}

.stack-actions { margin: 0 0 10px; }
.stack-actions:last-child { margin-bottom: 0; }

/* ==========================================================================
   Tags / badges / chips
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-success { background: rgba(34, 197, 94, 0.13); color: #86efac; border-color: rgba(34, 197, 94, 0.28); }
.badge-warning { background: rgba(245, 158, 11, 0.13); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.13); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.badge-info { background: rgba(34, 211, 238, 0.11); color: #7dd3fc; border-color: rgba(34, 211, 238, 0.26); }
.badge-neutral { background: rgba(148, 180, 255, 0.08); color: var(--muted); border-color: var(--line); }
.badge-brand { background: rgba(47, 139, 255, 0.14); color: #93c5fd; border-color: rgba(47, 139, 255, 0.3); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.05);
    color: var(--soft);
    font-size: 0.78rem;
    font-weight: 600;
}

.chip .icon { width: 15px; height: 15px; color: #8dbdff; }

.lock-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(5, 9, 18, 0.82);
    border: 1px solid rgba(148, 180, 255, 0.24);
    color: #cbd9f2;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.lock-pill .icon { width: 13px; height: 13px; }

.counter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(47, 139, 255, 0.1);
    border: 1px solid rgba(47, 139, 255, 0.2);
    color: #9fc7ff;
    font-size: 0.78rem;
    font-weight: 700;
}

.counter-pill .icon { width: 13px; height: 13px; }

/* ==========================================================================
   Cabeçalho público / app
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(5, 9, 18, 0.72);
    border-bottom: 1px solid rgba(148, 180, 255, 0.08);
    backdrop-filter: blur(18px) saturate(130%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    flex: none;
}

.brand:hover { color: #fff; }

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #000;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(148, 180, 255, 0.2);
    box-shadow: 0 8px 24px -10px rgba(47, 139, 255, 0.7);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    line-height: 1.1;
}

.brand-text > span { color: var(--brand); }
.brand-text small {
    flex-basis: 100%;
    margin-top: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 9px 14px;
    border-radius: 10px;
    color: var(--soft);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.16s ease;
}

.main-nav a:hover { color: #fff; background: rgba(148, 180, 255, 0.08); }
.main-nav a.active { color: var(--brand); background: var(--brand-soft); }

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

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.06);
}

.user-menu { position: relative; }

.user-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.05);
    cursor: pointer;
    list-style: none;
    color: var(--soft);
    font-size: 0.86rem;
    font-weight: 600;
}

.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { border-color: var(--line-strong); background: rgba(148, 180, 255, 0.1); }
.user-menu[open] summary { border-color: rgba(47, 139, 255, 0.4); }
.user-menu summary .icon { width: 15px; height: 15px; color: var(--muted); }

.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 250px;
    padding: 8px;
    border-radius: 15px;
    border: 1px solid var(--line-strong);
    background: #0a1222;
    box-shadow: var(--shadow);
    z-index: 80;
}

.user-menu-head {
    padding: 10px 12px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 6px;
}

.user-menu-head strong { display: block; font-size: 0.9rem; }
.user-menu-head small { color: var(--muted); font-size: 0.78rem; word-break: break-all; }

.user-menu-panel a,
.user-menu-panel .menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 0.87rem;
    color: var(--soft);
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.user-menu-panel a:hover,
.user-menu-panel .menu-link:hover { background: rgba(148, 180, 255, 0.08); color: #fff; }
.user-menu-panel form { margin: 0; }
.user-menu-panel .menu-link.danger { color: #fca5a5; }
.user-menu-panel .menu-link.danger:hover { background: rgba(239, 68, 68, 0.12); }
.user-menu-panel .icon { width: 16px; height: 16px; }

.app-header .brand-mark { width: 40px; height: 40px; }

.app-main {
    padding: 34px 0 70px;
    min-height: calc(100vh - 74px);
}

.app-footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 9, 18, 0.6);
    padding: 22px 0;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.83rem;
}

.app-footer-inner a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    margin-left: 16px;
}

.app-footer-inner a:hover { color: var(--brand); }
.app-footer-inner .icon { width: 15px; height: 15px; }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    background: linear-gradient(135deg, rgba(47, 139, 255, 0.35), rgba(11, 87, 255, 0.6));
    border: 1px solid rgba(148, 180, 255, 0.3);
    color: #eaf3ff;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 34px; height: 34px; font-size: 0.72rem; }
.avatar-md { width: 42px; height: 42px; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar-xl { width: 104px; height: 104px; font-size: 1.9rem; }

/* ==========================================================================
   Hero / landing
   ========================================================================== */

.hero {
    position: relative;
    padding: 74px 0 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: center;
}

.hero-copy h1 { margin-bottom: 22px; max-width: 620px; }

.hero-lead {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
    display: inline-block;
    flex: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
    50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.05); }
}

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

.hero-stats {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.hero-stats > div {
    padding-right: 30px;
    margin-right: 30px;
    border-right: 1px solid var(--line);
}

.hero-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.hero-stats strong {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.hero-stats span { color: var(--muted); font-size: 0.8rem; }

/* ==========================================================================
   Features / sections
   ========================================================================== */

.section { padding: 64px 0; }

.section-head {
    max-width: 640px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-head p { color: var(--muted); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 26px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(17, 28, 51, 0.7), rgba(8, 14, 27, 0.6));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover { transform: translateY(-4px); border-color: rgba(47, 139, 255, 0.3); }

.feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(47, 139, 255, 0.22), rgba(11, 87, 255, 0.1));
    border: 1px solid rgba(47, 139, 255, 0.26);
    color: #93c5fd;
}

.feature-icon .icon { width: 21px; height: 21px; }
.feature-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Cursos na vitrine */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.course-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(16, 26, 48, 0.8), rgba(7, 12, 24, 0.7));
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.course-card:hover {
    transform: translateY(-5px);
    border-color: rgba(47, 139, 255, 0.32);
    box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.9);
}

.course-card.is-locked { opacity: 0.92; }
.course-card.is-locked:hover { border-color: rgba(245, 158, 11, 0.3); }

.course-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at 35% 25%, rgba(47, 139, 255, 0.3), rgba(4, 8, 16, 0.95) 62%);
    overflow: hidden;
}

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

.course-card:hover .course-cover img { transform: scale(1.04); }

.course-cover.is-placeholder {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(47, 139, 255, 0.28), transparent 60%),
        linear-gradient(150deg, #0a1222, #04070f);
}

.cover-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(47, 139, 255, 0.16);
    border: 1px solid rgba(47, 139, 255, 0.35);
    color: #8ec6ff;
}

.cover-icon .icon { width: 24px; height: 24px; margin-left: 2px; }

.cover-logo {
    position: absolute;
    bottom: 14px;
    left: 16px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: rgba(234, 241, 255, 0.55);
}

.cover-logo span { color: rgba(47, 139, 255, 0.75); }

.course-level {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(5, 9, 18, 0.78);
    border: 1px solid rgba(148, 180, 255, 0.22);
    color: #c9d8f0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    backdrop-filter: blur(8px);
}

.course-body {
    display: flex;
    flex-direction: column;
    padding: 18px 19px 21px;
    flex: 1;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.course-meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-meta .icon { width: 14px; height: 14px; color: #7fb6ff; }

.course-body h3 { font-size: 1.04rem; margin-bottom: 8px; }
.course-body h3 a { color: inherit; }
.course-body h3 a:hover { color: #fff; }
.course-body p { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }

.course-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 0.83rem;
    font-weight: 700;
    color: #8dbdff;
}

.course-link .icon { width: 15px; height: 15px; transition: transform 0.2s ease; }
.course-card:hover .course-link .icon { transform: translateX(3px); }

.course-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.course-progress span:last-child {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    min-width: 32px;
    text-align: right;
}

.progress {
    height: 7px;
    border-radius: 999px;
    background: rgba(148, 180, 255, 0.12);
    overflow: hidden;
    flex: 1;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--cyan));
    box-shadow: 0 0 14px rgba(47, 139, 255, 0.5);
    transition: width 0.4s ease;
}

.progress-sm { height: 5px; }

/* Acesso */
.access-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    padding: 44px;
    border-radius: 24px;
    border: 1px solid rgba(47, 139, 255, 0.28);
    background:
        radial-gradient(600px 240px at 12% 20%, rgba(47, 139, 255, 0.22), transparent 60%),
        linear-gradient(150deg, rgba(15, 30, 58, 0.9), rgba(6, 12, 24, 0.9));
    box-shadow: var(--shadow);
}

.cta-copy h2 { margin-bottom: 10px; max-width: 560px; }
.cta-copy p { color: var(--muted); margin: 0; max-width: 580px; }

/* Rodapé público */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(4, 7, 14, 0.72);
    padding: 54px 0 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 34px;
}

.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 380px; margin-top: 16px; }

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.site-footer h4 {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8dbdff;
    margin-bottom: 14px;
}

.site-footer .footer-grid > div > a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    color: var(--muted);
    font-size: 0.87rem;
}

.site-footer .footer-grid > div > a:hover { color: var(--brand); }
.site-footer .footer-grid .icon { width: 15px; height: 15px; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: #7d8fb0;
    font-size: 0.8rem;
}

/* ==========================================================================
   Autenticação
   ========================================================================== */

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
}

.auth-visual {
    position: relative;
    display: flex;
    align-items: stretch;
    padding: 54px clamp(32px, 6vw, 84px);
    background:
        radial-gradient(700px 500px at 20% 15%, rgba(47, 139, 255, 0.26), transparent 62%),
        radial-gradient(600px 600px at 80% 90%, rgba(34, 211, 238, 0.1), transparent 60%),
        linear-gradient(160deg, #071022, #04070f);
    border-right: 1px solid var(--line);
    overflow: hidden;
}

.auth-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 180, 255, 0.07) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%);
    pointer-events: none;
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    gap: 40px;
}

.auth-brand img {
    width: min(300px, 74%);
}

.auth-mobile-brand { display: none; }

.auth-pitch h1 { font-size: clamp(2rem, 3.1vw, 2.75rem); margin-bottom: 20px; }
.auth-pitch > p { color: #a9bad6; font-size: 1rem; max-width: 440px; }

.auth-benefits {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    gap: 13px;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c6d5ec;
    font-size: 0.9rem;
}

.auth-benefits .icon { width: 18px; height: 18px; color: var(--green); }

.auth-visual-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.auth-visual-foot strong { display: block; font-size: 0.9rem; }
.auth-visual-foot small { color: var(--muted); font-size: 0.78rem; }

.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 24px;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 34px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(17, 28, 51, 0.86), rgba(7, 12, 24, 0.86));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 22px;
}

.auth-back .icon { width: 15px; height: 15px; }
.auth-back:hover { color: var(--brand); }
.auth-back.center { justify-content: center; display: flex; margin: 20px 0 0; }

.auth-head h2 { margin-bottom: 8px; }
.auth-head p { color: var(--muted); font-size: 0.9rem; }

.auth-form { margin-top: 24px; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-alt { text-align: center; }
.auth-alt p { color: var(--muted); font-size: 0.86rem; margin-bottom: 8px; }
.auth-alt a { font-weight: 700; }

.auth-copy {
    margin-top: 22px;
    color: #6f82a3;
    font-size: 0.76rem;
    text-align: center;
}

.maintenance-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.maintenance-card {
    position: relative;
    width: min(560px, 100%);
    padding: 44px clamp(24px, 5vw, 48px);
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.maintenance-brand {
    display: inline-flex;
    margin-bottom: 26px;
}

.maintenance-brand img {
    height: 44px;
    width: auto;
}

.maintenance-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 20px;
    color: var(--brand);
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.28);
}

.maintenance-mark .icon {
    width: 30px;
    height: 30px;
}

.maintenance-card h1 {
    margin: 14px 0 12px;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.maintenance-card > p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.maintenance-return {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 24px auto 4px;
    padding: 14px 20px;
    text-align: left;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    border: 1px solid var(--line-strong);
}

.maintenance-return .icon {
    width: 26px;
    height: 26px;
    color: var(--brand);
    flex: none;
}

.maintenance-return small {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.maintenance-return strong {
    display: block;
    font-size: 0.98rem;
}

.auth-simple {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-simple-brand { margin-bottom: 30px; }
.auth-simple-brand img { width: min(320px, 80vw); }

.auth-simple-card {
    width: 100%;
    max-width: 440px;
    text-align: center;
    padding: 36px 32px;
}

.auth-simple-card .auth-head { margin-top: 16px; }
.auth-simple-card .auth-form { text-align: left; }

.auth-simple-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.3);
    color: #8ec6ff;
}

.auth-simple-icon .icon { width: 26px; height: 26px; }

.card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(17, 28, 51, 0.82), rgba(7, 12, 24, 0.8));
    box-shadow: var(--shadow);
}

/* ==========================================================================
   Formulários
   ========================================================================== */

.field { margin-bottom: 18px; min-width: 0; }

.field > label,
.field-row > .field > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #b7c7e0;
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid rgba(148, 180, 255, 0.18);
    background: rgba(5, 9, 18, 0.72);
    color: var(--text);
    font-family: inherit;
    font-size: 0.91rem;
    line-height: 1.5;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    min-height: 44px;
}

input::placeholder,
textarea::placeholder { color: #5f7394; }

input:hover,
select:hover,
textarea:hover { border-color: rgba(148, 180, 255, 0.3); }

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(47, 139, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(47, 139, 255, 0.13);
    background: rgba(6, 11, 22, 0.9);
}

input[disabled],
select[disabled],
textarea[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393a6c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 40px;
    cursor: pointer;
}

select option { background: #0a1222; color: var(--text); }

textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.6;
}

textarea.textarea-code {
    font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    font-size: 0.83rem;
    line-height: 1.7;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.85) sepia(0.3) saturate(4) hue-rotate(190deg);
    cursor: pointer;
    opacity: 0.75;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.77rem;
    line-height: 1.5;
}

.field-hint a { font-weight: 700; }

.field-hint.warning-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fcd34d;
}

.field-hint.warning-hint .icon { width: 15px; height: 15px; }

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-sm { max-width: 160px; }
.field-row .field-action { display: flex; align-items: flex-end; }
.field-row .field-action label { visibility: hidden; }

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
}

.label-row label { margin-bottom: 0 !important; }
.label-row a { font-size: 0.78rem; font-weight: 600; }

.input-icon { position: relative; }

.input-icon > .icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #7f95b8;
    pointer-events: none;
}

.input-icon input { padding-left: 42px; }

.input-icon .input-action {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.input-icon .input-action:hover { background: rgba(148, 180, 255, 0.1); color: #fff; }
.input-icon .input-action .icon { width: 16px; height: 16px; }
.input-icon:has(.input-action) input { padding-right: 46px; }

.input-eye { position: relative; }
.input-eye input { padding-right: 46px; }

.eye-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.eye-btn:hover { background: rgba(148, 180, 255, 0.1); color: #fff; }
.eye-btn .icon { width: 16px; height: 16px; }

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--soft);
    font-size: 0.85rem;
    cursor: pointer;
    margin: 4px 0 8px;
}

.checkbox input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-height: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.switch-field {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 16px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
    cursor: pointer;
    margin: 6px 0 18px;
}

.switch-field.inline { height: 100%; margin: 0; align-items: center; }
.switch-field > input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch {
    position: relative;
    width: 44px;
    height: 25px;
    border-radius: 999px;
    background: rgba(148, 180, 255, 0.18);
    border: 1px solid rgba(148, 180, 255, 0.22);
    flex: none;
    margin-top: 1px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #b9c8df;
    transition: transform 0.2s ease, background 0.2s ease;
}

.switch-field input:checked + .switch {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: rgba(47, 139, 255, 0.6);
}

.switch-field input:checked + .switch::after {
    transform: translateX(19px);
    background: #fff;
}

.switch-field input:focus-visible + .switch {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.switch-field strong { display: block; font-size: 0.88rem; color: #dbe7fb; }
.switch-field small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.switch-stack { margin: 4px 0 18px; }

.segmented {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.segmented label { display: block; cursor: pointer; margin: 0; }

.segmented input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.segmented span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.16s ease;
}

.segmented span .icon { width: 15px; height: 15px; }
.segmented input:checked + span {
    border-color: rgba(47, 139, 255, 0.5);
    background: var(--brand-soft);
    color: #bfdbfe;
}

.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.color-field { display: flex; gap: 9px; align-items: center; }
.color-field input[type="color"] {
    width: 46px;
    height: 44px;
    padding: 4px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(5, 9, 18, 0.7);
    cursor: pointer;
    flex: none;
}

.color-field input[type="text"] { font-family: 'JetBrains Mono', monospace; }

.form-card {
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(16, 26, 48, 0.78), rgba(7, 12, 24, 0.72));
    box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.9);
}

.form-card-bare {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.form-card-head { margin-bottom: 24px; }
.form-card-head h2 { font-size: 1.25rem; margin-bottom: 5px; }
.form-card-head p { color: var(--muted); font-size: 0.86rem; margin: 0; }

.form-subsection {
    margin: 28px 0 8px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.form-subsection-head { margin-bottom: 18px; }
.form-subsection-head h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.form-subsection-head h3 .icon { width: 17px; height: 17px; color: #7fb6ff; }
.form-subsection-head p { color: var(--muted); font-size: 0.82rem; margin: 0; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.form-main,
.form-side {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.form-side { align-content: start; }

.form-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8dbdff;
    margin: 26px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.form-section-title:first-of-type { margin-top: 6px; }

.upload-image {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 13px;
    border: 1px dashed rgba(148, 180, 255, 0.24);
    background: rgba(148, 180, 255, 0.03);
}

.upload-image.compact { padding: 12px; gap: 14px; }

.upload-preview {
    width: 132px;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #04070e;
    overflow: hidden;
    display: grid;
    place-items: center;
    flex: none;
    color: var(--muted);
}

.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview .icon { width: 26px; height: 26px; opacity: 0.6; }
.upload-preview.is-empty { background: repeating-linear-gradient(45deg, rgba(148, 180, 255, 0.04) 0 10px, transparent 10px 20px); }
.upload-preview.logo-preview { background: #000; width: 150px; aspect-ratio: 16 / 9; }
.upload-preview.logo-preview img { object-fit: contain; }

.upload-image-body { flex: 1; min-width: 0; }
.upload-image-body input[type="file"] {
    width: 100%;
    padding: 8px;
    font-size: 0.8rem;
    color: var(--muted);
}
.upload-image-body input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.08);
    color: var(--soft);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.inline-upload {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.inline-upload .field { flex: 1; min-width: 220px; margin-bottom: 0; }

.copy-field {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
}

.copy-field input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #9ecbff;
}

/* ==========================================================================
   Alertas
   ========================================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.06);
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: var(--soft);
}

.alert > div { flex: 1; }
.alert-title { display: block; margin-bottom: 3px; font-size: 0.92rem; }

.alert-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    flex: none;
    background: rgba(148, 180, 255, 0.1);
    color: #bfdbfe;
}

.alert-icon .icon { width: 17px; height: 17px; }

.alert-success { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.08); }
.alert-success .alert-icon { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.alert-error { border-color: rgba(239, 68, 68, 0.32); background: rgba(239, 68, 68, 0.08); }
.alert-error .alert-icon { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.alert-warning { border-color: rgba(245, 158, 11, 0.32); background: rgba(245, 158, 11, 0.08); }
.alert-warning .alert-icon { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.alert-info { border-color: rgba(34, 211, 238, 0.28); background: rgba(34, 211, 238, 0.07); }
.alert-info .alert-icon { background: rgba(34, 211, 238, 0.13); color: #7dd3fc; }

.alert .btn { flex: none; align-self: center; }

.alert-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    flex: none;
}

.alert-close:hover { color: #fff; }

/* ==========================================================================
   Páginas do revendedor
   ========================================================================== */

.dash-hero {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 26px;
    align-items: stretch;
    margin-bottom: 26px;
}

.dash-hero-copy {
    padding: 34px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(520px 260px at 8% 0%, rgba(47, 139, 255, 0.2), transparent 62%),
        linear-gradient(160deg, rgba(17, 30, 55, 0.86), rgba(7, 12, 24, 0.8));
    box-shadow: var(--shadow);
}

.dash-hero-copy h1 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); margin-bottom: 12px; }
.dash-hero-copy > p { color: var(--muted); max-width: 520px; }
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.access-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid rgba(47, 139, 255, 0.26);
    background: linear-gradient(160deg, rgba(20, 38, 70, 0.9), rgba(8, 15, 30, 0.88));
    overflow: hidden;
}

.access-panel::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 139, 255, 0.3), transparent 70%);
}

.access-panel.is-locked { border-color: rgba(245, 158, 11, 0.32); }
.access-panel.is-locked::after { background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 70%); }

.access-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.access-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(47, 139, 255, 0.16);
    border: 1px solid rgba(47, 139, 255, 0.3);
    color: #93c5fd;
}

.access-icon .icon { width: 21px; height: 21px; }
.access-panel.is-locked .access-icon { background: rgba(245, 158, 11, 0.13); border-color: rgba(245, 158, 11, 0.3); color: #fcd34d; }

.access-panel h3 { font-size: 1.15rem; margin-bottom: 6px; position: relative; z-index: 1; }
.access-detail { color: var(--muted); font-size: 0.86rem; margin-bottom: 18px; }
.access-detail strong { color: #dbe7fb; }

.access-progress { margin-top: auto; }
.access-progress .progress { margin-top: 8px; }

.access-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

.access-progress-label strong { color: #dbe7fb; }

.access-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 0.83rem;
    font-weight: 700;
    color: #8dbdff;
}

.access-link .icon { width: 15px; height: 15px; }

.admin-callout {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    border-radius: 15px;
    border: 1px solid rgba(139, 92, 246, 0.28);
    background: linear-gradient(120deg, rgba(139, 92, 246, 0.1), rgba(47, 139, 255, 0.06));
    flex-wrap: wrap;
}

.admin-callout-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(139, 92, 246, 0.16);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    flex: none;
}

.admin-callout > div { flex: 1; min-width: 200px; }
.admin-callout strong { display: block; font-size: 0.95rem; }
.admin-callout p { color: var(--muted); font-size: 0.84rem; margin: 2px 0 0; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(16, 26, 48, 0.72), rgba(7, 12, 24, 0.66));
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.24);
    color: #93c5fd;
    flex: none;
}

.stat-icon .icon { width: 20px; height: 20px; }
.stat-card strong { display: block; font-size: 1.2rem; letter-spacing: -0.02em; }
.stat-card span { color: var(--muted); font-size: 0.78rem; }

.continue-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
    margin-bottom: 34px;
    border-radius: 18px;
    border: 1px solid rgba(47, 139, 255, 0.28);
    background: linear-gradient(130deg, rgba(20, 38, 70, 0.85), rgba(7, 13, 26, 0.8));
}

.continue-cover {
    position: relative;
    width: 150px;
    aspect-ratio: 16 / 9;
    border-radius: 11px;
    overflow: hidden;
    flex: none;
    background: #04070f;
    display: grid;
    place-items: center;
}

.continue-cover img { width: 100%; height: 100%; object-fit: cover; }
.continue-cover.is-placeholder { background: radial-gradient(circle at 50% 40%, rgba(47, 139, 255, 0.28), #04070f 70%); }
.continue-cover .cover-logo { font-size: 0.55rem; bottom: 8px; left: 9px; }

.continue-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.continue-play .icon {
    width: 36px;
    height: 36px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(47, 139, 255, 0.92);
    color: #fff;
    box-shadow: 0 8px 22px -8px rgba(47, 139, 255, 0.9);
}

.continue-info { flex: 1; min-width: 0; }
.continue-info .section-tag { margin-bottom: 7px; }
.continue-info h3 { font-size: 1.05rem; margin-bottom: 3px; }
.continue-info p { color: var(--muted); font-size: 0.82rem; margin-bottom: 10px; }

.section-block { margin-top: 10px; }

.section-block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.section-block-head h2 { margin-bottom: 0; }
.section-block-head .section-tag { margin-bottom: 8px; }

.search-box {
    position: relative;
    width: min(300px, 100%);
}

.search-box .icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
}

.search-box input {
    padding-left: 40px;
    min-height: 42px;
    font-size: 0.86rem;
}

.search-compact { width: 240px; }
.search-compact input { min-height: 38px; padding-block: 8px; }

.search-empty { margin-top: 18px; }

.library-hero { margin-bottom: 26px; }

.library-search {
    position: relative;
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 22px;
}

.library-search > .icon {
    position: absolute;
    left: 16px;
    /* centraliza na altura do campo (48px), não do bloco inteiro: no celular o botão fica embaixo */
    top: 24px;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--muted);
    pointer-events: none;
    z-index: 2;
}

.library-search input {
    flex: 1;
    min-width: 0;
    padding-left: 44px;
    min-height: 48px;
    text-overflow: ellipsis;
}

.library-search .btn {
    flex: none;
    min-height: 48px;
}

/* Página do curso */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 22px;
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
}

.breadcrumb a:hover { color: var(--brand); }
.breadcrumb > .icon { width: 13px; height: 13px; opacity: 0.5; }
.breadcrumb span { color: #c6d5ec; }

.course-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        radial-gradient(560px 260px at 85% 0%, rgba(47, 139, 255, 0.16), transparent 60%),
        linear-gradient(160deg, rgba(16, 28, 52, 0.85), rgba(6, 11, 22, 0.82));
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

.course-hero-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #04070f;
    display: grid;
    place-items: center;
}

.course-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-hero-cover.is-placeholder { background: radial-gradient(circle at 50% 35%, rgba(47, 139, 255, 0.24), #04070f 72%); }
.course-hero-cover .cover-logo { font-size: 0.85rem; bottom: 16px; left: 18px; }

.course-hero-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.course-hero-info h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin-bottom: 10px; }
.course-hero-info > p { color: var(--muted); max-width: 640px; margin-bottom: 16px; }

.course-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.course-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.course-hero-meta .icon { width: 15px; height: 15px; color: #7fb6ff; }

.course-hero-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 420px;
    margin-bottom: 16px;
}

.course-hero-progress strong { font-size: 0.84rem; color: #dbe7fb; min-width: 36px; text-align: right; }
.course-hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.locked-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    margin-bottom: 24px;
    border-radius: 16px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.07);
    flex-wrap: wrap;
}

.locked-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.13);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
    flex: none;
}

.locked-banner > div { flex: 1; min-width: 220px; }
.locked-banner h3 { font-size: 1rem; margin-bottom: 3px; }
.locked-banner p { color: var(--muted); font-size: 0.86rem; margin: 0; }

.course-content {
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(9, 16, 30, 0.6);
}

.module-list { display: grid; gap: 18px; }

.module-block {
    border-radius: 15px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.025);
    overflow: hidden;
}

.module-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.035);
}

.module-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.22);
    color: #8ec6ff;
    flex: none;
}

.module-icon .icon { width: 17px; height: 17px; }
.module-head h3 { font-size: 0.98rem; margin: 0; }
.module-head small { color: var(--muted); font-size: 0.75rem; }

.lesson-list { display: grid; }

.lesson-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    color: var(--soft);
    border-bottom: 1px solid rgba(148, 180, 255, 0.07);
    transition: background 0.16s ease;
}

.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: rgba(47, 139, 255, 0.06); color: #fff; }
.lesson-row.is-locked { opacity: 0.62; }
.lesson-row.is-done .lesson-number { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.3); color: #86efac; }

.lesson-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.06);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    flex: none;
}

.lesson-number .icon { width: 15px; height: 15px; }

.lesson-row .lesson-main { flex: 1; min-width: 0; display: block; }
.lesson-row .lesson-main strong { display: block; font-size: 0.92rem; font-weight: 600; }
.lesson-row .lesson-main small { color: var(--muted); font-size: 0.75rem; }

.lesson-state { color: var(--muted); flex: none; }
.lesson-state .icon { width: 17px; height: 17px; }
.lesson-row.is-done .lesson-state { color: #86efac; }
.lesson-row.is-locked .lesson-state { color: #fcd34d; }

/* Página da aula */
.lesson-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

.lesson-main { min-width: 0; }

.player-card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #04070e;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.player-embed iframe,
.player-shell iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

.player-watermark {
    position: absolute;
    right: 16px;
    bottom: 52px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    pointer-events: none;
    user-select: none;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.38);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.02em;
    z-index: 3;
}

.player-watermark span:last-child { font-size: 0.62rem; opacity: 0.8; }

.player-locked,
.player-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 60px 28px;
    background:
        radial-gradient(500px 300px at 50% 0%, rgba(47, 139, 255, 0.12), transparent 65%),
        #050a14;
}

.player-locked-icon,
.player-empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #fcd34d;
    margin-bottom: 6px;
}

.player-locked-icon .icon,
.player-empty-icon .icon { width: 28px; height: 28px; }

.player-locked h2,
.player-empty h2 { font-size: 1.25rem; margin-bottom: 2px; }
.player-locked p,
.player-empty p { color: var(--muted); font-size: 0.9rem; max-width: 480px; margin-bottom: 14px; }

.lesson-info {
    margin-top: 22px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(15, 25, 46, 0.72), rgba(7, 12, 24, 0.68));
}

.lesson-info-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.lesson-info-head > div { flex: 1; min-width: 240px; }
.lesson-info-head h1 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin: 6px 0 8px; }

.lesson-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lesson-chips .chip { font-size: 0.73rem; padding: 5px 10px; }

.lesson-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }

.lesson-complete { flex: none; }

.lesson-text {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--soft);
    font-size: 0.94rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.lesson-text h2, .lesson-text h3, .lesson-text h4 { margin-top: 1.4em; }
.lesson-text p { margin-bottom: 1em; }
.lesson-text ul, .lesson-text ol { padding-left: 22px; margin-bottom: 1em; }
.lesson-text li { margin-bottom: 0.35em; }
.lesson-text a { text-decoration: underline; text-underline-offset: 2px; }
.lesson-text img { border-radius: 12px; margin: 1em 0; }
.lesson-text blockquote {
    margin: 1em 0;
    padding: 12px 18px;
    border-left: 3px solid var(--brand);
    background: rgba(47, 139, 255, 0.07);
    border-radius: 0 10px 10px 0;
    color: var(--muted);
}

.attachments { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.attachments h3 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.attachments h3 .icon { width: 17px; height: 17px; color: #7fb6ff; }

.attachment-list { display: grid; gap: 9px; margin-top: 14px; }

.attachment-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
    color: var(--soft);
    transition: all 0.16s ease;
}

.attachment-row:hover { border-color: rgba(47, 139, 255, 0.3); background: rgba(47, 139, 255, 0.07); color: #fff; }

.attachment-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.22);
    color: #93c5fd;
    flex: none;
}

.attachment-icon .icon { width: 17px; height: 17px; }
.attachment-info { flex: 1; min-width: 0; }
.attachment-info strong { display: block; font-size: 0.87rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-info small { color: var(--muted); font-size: 0.74rem; }
.attachment-row > .icon { color: var(--muted); flex: none; }

.lesson-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.lesson-nav-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
    color: var(--soft);
    min-width: 0;
    transition: all 0.16s ease;
}

.lesson-nav-btn:hover { border-color: rgba(47, 139, 255, 0.3); background: rgba(47, 139, 255, 0.06); color: #fff; }
.lesson-nav-btn.next { justify-content: flex-end; text-align: right; }
.lesson-nav-btn > span { min-width: 0; }
.lesson-nav-btn small { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.lesson-nav-btn strong { display: block; font-size: 0.84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-nav-btn .icon { width: 18px; height: 18px; flex: none; }

.lesson-sidebar {
    position: sticky;
    top: 92px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(9, 16, 30, 0.72);
    overflow: hidden;
}

.sidebar-course { padding: 20px; border-bottom: 1px solid var(--line); }
.sidebar-course .section-tag { margin-bottom: 8px; font-size: 0.66rem; }
.sidebar-course h3 { font-size: 0.98rem; margin-bottom: 12px; }
.sidebar-progress { display: grid; gap: 7px; }
.sidebar-progress small { color: var(--muted); font-size: 0.74rem; }

.sidebar-lessons {
    max-height: 480px;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
}

.sidebar-lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--soft);
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.sidebar-lesson:hover { background: rgba(148, 180, 255, 0.07); color: #fff; }
.sidebar-lesson.active { background: var(--brand-soft); border-color: rgba(47, 139, 255, 0.3); color: #fff; }
.sidebar-lesson.is-locked { opacity: 0.55; }

.sl-number {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.05);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    flex: none;
}

.sl-number .icon { width: 12px; height: 12px; }
.sidebar-lesson.active .sl-number { border-color: rgba(47, 139, 255, 0.4); color: #bfdbfe; background: rgba(47, 139, 255, 0.14); }
.sl-title { flex: 1; min-width: 0; }
.sl-title strong { display: block; font-size: 0.8rem; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-title small { color: var(--muted); font-size: 0.68rem; }
.sl-playing { color: var(--brand); flex: none; }
.sl-playing .icon { width: 14px; height: 14px; }

.sidebar-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.sidebar-back:hover { color: var(--brand); background: rgba(148, 180, 255, 0.04); }
.sidebar-back .icon { width: 15px; height: 15px; }

/* Perfil */
.page-heading { margin-bottom: 26px; }
.page-heading h1 { margin-bottom: 6px; }
.page-heading p { color: var(--muted); margin: 0; }

.profile-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.profile-card {
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(17, 29, 53, 0.8), rgba(7, 12, 24, 0.76));
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 4px;
}

.profile-avatar { position: relative; margin-bottom: 6px; }

.profile-crown {
    position: absolute;
    right: -3px;
    bottom: -3px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 2px solid #0b1220;
    color: #fff;
}

.profile-crown .icon { width: 15px; height: 15px; }
.profile-card h2 { font-size: 1.15rem; margin: 6px 0 2px; }
.profile-card > p { font-size: 0.8rem; margin-bottom: 10px; word-break: break-all; }

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 10px;
    margin: 18px 0 6px;
}

.profile-stats > div {
    padding: 12px 10px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
}

.profile-stats strong { display: block; font-size: 1.15rem; }
.profile-stats span { color: var(--muted); font-size: 0.7rem; }

.profile-access,
.profile-grants {
    width: 100%;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.profile-access h3,
.profile-grants h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8dbdff;
    margin-bottom: 10px;
}

.profile-access h3 .icon,
.profile-grants h3 .icon { width: 14px; height: 14px; }

.access-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.access-line strong { color: var(--soft); font-weight: 700; font-size: 0.79rem; text-align: right; }

.grant-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 180, 255, 0.07);
}

.grant-mini:last-child { border-bottom: 0; }
.grant-mini > span { color: #8dbdff; flex: none; }
.grant-mini > span .icon { width: 15px; height: 15px; }
.grant-mini strong { display: block; font-size: 0.78rem; color: var(--soft); font-weight: 600; }
.grant-mini small { color: var(--muted); font-size: 0.7rem; }

.profile-card .btn { margin-top: 18px; }

.profile-forms { display: grid; gap: 24px; }

.avatar-edit {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.avatar-edit .field { flex: 1; min-width: 220px; margin-bottom: 0; }

/* Legal */
.legal-page { padding: 56px 0 70px; }
.legal-container { max-width: 860px; }
.legal-container h1 { margin-bottom: 8px; }
.legal-updated { color: var(--muted); font-size: 0.82rem; margin-bottom: 24px; }

.legal-card {
    padding: 34px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(10, 18, 33, 0.66);
    margin-bottom: 24px;
}

.legal-card h2 { font-size: 1.08rem; margin-top: 26px; margin-bottom: 8px; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card p { color: var(--muted); font-size: 0.92rem; }

/* ==========================================================================
   Administração
   ========================================================================== */

.admin-body { background: #04070e; }

.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: 268px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #070d1a, #050912);
    border-right: 1px solid var(--line);
    transition: transform 0.25s ease;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
}

.sidebar-head .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.sidebar-head .brand-text { font-size: 0.92rem; }
.sidebar-head .brand-text small { font-size: 0.55rem; }
.sidebar-close { display: none; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    scrollbar-width: thin;
}

.sidebar-label {
    display: block;
    padding: 14px 10px 6px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6b7f a0;
    color: #6f83a6;
}

.sidebar-label:first-child { padding-top: 4px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
    border: 1px solid transparent;
    margin-bottom: 2px;
    transition: all 0.16s ease;
}

.sidebar-link .icon { width: 18px; height: 18px; opacity: 0.8; }
.sidebar-link:hover { color: #fff; background: rgba(148, 180, 255, 0.06); }
.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(47, 139, 255, 0.18), rgba(47, 139, 255, 0.05));
    border-color: rgba(47, 139, 255, 0.24);
    box-shadow: inset 2px 0 0 var(--brand);
}

.sidebar-link.active .icon { opacity: 1; color: #8ec6ff; }

.sidebar-foot {
    padding: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
}

.sidebar-user strong { display: block; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: var(--muted); font-size: 0.68rem; }

.sidebar-actions { display: flex; align-items: center; gap: 2px; }
.sidebar-actions a,
.sidebar-actions button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.sidebar-actions a:hover,
.sidebar-actions button:hover { background: rgba(148, 180, 255, 0.1); color: #fff; }
.sidebar-actions .icon { width: 16px; height: 16px; }
.sidebar-actions form { margin: 0; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(2, 5, 10, 0.7);
    backdrop-filter: blur(3px);
}

.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: 268px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 26px;
    background: rgba(4, 8, 16, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.admin-topbar > .icon-btn { display: none; border: 1px solid var(--line); }

.topbar-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--soft);
    letter-spacing: 0.01em;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-content {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 28px 26px 64px;
}

.admin-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.admin-page-head h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: 6px; }
.admin-page-head p { color: var(--muted); font-size: 0.9rem; margin: 0; }

.admin-head-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.admin-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(16, 27, 49, 0.75), rgba(7, 12, 24, 0.7));
}

.admin-stat-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex: none;
    border: 1px solid transparent;
}

.admin-stat-icon .icon { width: 20px; height: 20px; }
.admin-stat-icon.blue { background: rgba(47, 139, 255, 0.14); border-color: rgba(47, 139, 255, 0.28); color: #93c5fd; }
.admin-stat-icon.green { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.26); color: #86efac; }
.admin-stat-icon.cyan { background: rgba(34, 211, 238, 0.11); border-color: rgba(34, 211, 238, 0.24); color: #7dd3fc; }
.admin-stat-icon.violet { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.26); color: #c4b5fd; }
.admin-stat-icon.amber { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.26); color: #fcd34d; }
.admin-stat-icon.red { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.26); color: #fca5a5; }

.admin-stat-body { min-width: 0; }
.admin-stat-body > span { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.admin-stat-body strong { display: block; font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.03em; }
.admin-stat-body small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 22px;
    align-items: start;
}

.panel {
    padding: 22px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.6);
    margin-bottom: 22px;
    min-width: 0;
}

.admin-grid-2 .panel { margin-bottom: 0; }
.panel:last-child { margin-bottom: 0; }

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-head h2 { font-size: 1.02rem; margin-bottom: 3px; }
.panel-head p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.panel-head-wrap { flex-wrap: wrap; }

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #8dbdff;
    white-space: nowrap;
}

.panel-link .icon { width: 14px; height: 14px; }

.mini-list { display: grid; gap: 2px; }

.mini-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    color: var(--soft);
    border: 1px solid transparent;
}

.mini-row:hover { background: rgba(148, 180, 255, 0.05); color: #fff; }
.mini-row-main { flex: 1; min-width: 0; }
.mini-row-main strong { display: block; font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row-main small { color: var(--muted); font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.mini-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.2);
    color: #93c5fd;
    flex: none;
}

.mini-icon .icon { width: 16px; height: 16px; }
.mini-views { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.75rem; }
.mini-views .icon { width: 14px; height: 14px; }

.admin-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-quick a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 15px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
    color: var(--soft);
    font-size: 0.83rem;
    font-weight: 600;
}

.admin-quick a:hover { border-color: rgba(47, 139, 255, 0.3); background: rgba(47, 139, 255, 0.07); color: #fff; }
.admin-quick .icon { width: 17px; height: 17px; color: #8dbdff; }

/* Tabelas */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    scrollbar-width: thin;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 840px;
}

.data-table thead th {
    text-align: left;
    padding: 11px 14px;
    background: rgba(148, 180, 255, 0.05);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 180, 255, 0.06);
    vertical-align: middle;
    color: var(--soft);
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(47, 139, 255, 0.035); }
.data-table tr.row-muted { opacity: 0.64; }

.th-actions, .td-actions { text-align: right; }
.td-actions { white-space: nowrap; }

.td-actions .icon-btn,
.td-actions form { display: inline-flex; vertical-align: middle; }
.td-actions form { margin: 0 0 0 2px; }

.table-user { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.table-user strong { display: block; font-size: 0.86rem; font-weight: 600; color: #e6eefc; }
.table-user small { color: var(--muted); font-size: 0.74rem; word-break: break-all; }

.table-course { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.table-course strong { display: block; font-size: 0.86rem; font-weight: 600; color: #e6eefc; }
.table-course small { color: var(--muted); font-size: 0.72rem; }

.table-thumb {
    width: 54px;
    height: 34px;
    border-radius: 7px;
    overflow: hidden;
    flex: none;
    background: #04070e;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--muted);
}

.table-thumb img { width: 100%; height: 100%; object-fit: cover; }
.table-thumb .icon { width: 15px; height: 15px; }
.table-thumb.is-placeholder { background: radial-gradient(circle at 50% 40%, rgba(47, 139, 255, 0.22), #04070e 72%); color: #8ec6ff; }

.table-link { font-weight: 600; color: var(--soft); }
.table-link:hover { color: var(--brand); }
.table-sub { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 1px; }
.table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 16px;
}

.row-actions { display: inline-flex; align-items: center; gap: 2px; }
.row-actions form { margin: 0; display: inline-flex; }

.checklist { display: grid; gap: 10px; }
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 14, 26, 0.55);
}
.checklist-num {
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #bfdbfe;
    background: rgba(47, 139, 255, 0.16);
    border: 1px solid rgba(47, 139, 255, 0.35);
}
.checklist-item strong { display: block; font-size: 0.9rem; color: var(--text); }
.checklist-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    justify-content: flex-end;
}

.table-foot .pagination { padding-top: 0; }

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
    color: var(--soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.page-btn:hover { border-color: rgba(47, 139, 255, 0.3); background: rgba(47, 139, 255, 0.07); color: #fff; }
.page-btn .icon { width: 14px; height: 14px; }
.page-info { color: var(--muted); font-size: 0.78rem; }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input[type="date"],
.filter-bar input[type="search"],
.filter-bar input[type="text"] {
    width: auto;
    min-height: 38px;
    padding-block: 8px;
    font-size: 0.82rem;
}

.filter-bar select { min-width: 150px; }
.filter-bar input[type="date"] { min-width: 138px; }

.search-input { position: relative; }
.search-input > .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--muted);
    pointer-events: none;
}
.search-input input { padding-left: 36px; min-width: 220px; }

/* Cards laterais / detalhes */
.side-card {
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: rgba(10, 18, 33, 0.62);
}

.side-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.side-card h3 .icon { width: 17px; height: 17px; color: #8dbdff; }
.side-card p { color: var(--muted); font-size: 0.83rem; }
.side-card.soft { background: rgba(47, 139, 255, 0.05); border-color: rgba(47, 139, 255, 0.18); }
.side-card.danger-card { border-color: rgba(239, 68, 68, 0.26); background: rgba(239, 68, 68, 0.05); }
.side-card.danger-card h3 { color: #fca5a5; }

.side-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 180, 255, 0.07);
    font-size: 0.81rem;
}

.side-stat:last-child { border-bottom: 0; padding-bottom: 0; }
.side-stat > span { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.side-stat > span .icon { width: 14px; height: 14px; }
.side-stat > strong { color: var(--soft); font-weight: 700; text-align: right; }

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 6px;
    margin-bottom: 24px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(9, 16, 30, 0.6);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 600;
}

.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: #fff; background: rgba(148, 180, 255, 0.06); }
.tab.active { color: #fff; background: var(--brand-soft); border: 1px solid rgba(47, 139, 255, 0.28); }

/* Escolha de modo / cards */
.choice-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.choice-card {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
    cursor: pointer;
    transition: all 0.18s ease;
}

.choice-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice-card:hover { border-color: var(--line-strong); }
.choice-card.selected { border-color: rgba(47, 139, 255, 0.45); background: rgba(47, 139, 255, 0.08); box-shadow: 0 0 0 1px rgba(47, 139, 255, 0.2) inset; }
.choice-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.25);
    color: #93c5fd;
    margin-bottom: 4px;
}
.choice-icon .icon { width: 18px; height: 18px; }
.choice-card strong { font-size: 0.92rem; }
.choice-card small { color: var(--muted); font-size: 0.79rem; line-height: 1.5; }

/* Modo banner */
.mode-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.mode-banner.is-auto { border-color: rgba(34, 197, 94, 0.28); background: rgba(34, 197, 94, 0.05); }

.mode-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(148, 180, 255, 0.08);
    border: 1px solid var(--line);
    color: var(--soft);
    flex: none;
}

.mode-banner.is-auto .mode-icon { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.28); color: #86efac; }
.mode-banner > div { flex: 1; min-width: 220px; }
.mode-banner strong { display: block; font-size: 0.9rem; }
.mode-banner small { color: var(--muted); font-size: 0.8rem; }

/* Provedores */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.provider-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
}

.provider-card.is-default { border-color: rgba(47, 139, 255, 0.36); background: rgba(47, 139, 255, 0.055); }
.provider-card.is-off { opacity: 0.66; }

.provider-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.provider-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.24);
    color: #93c5fd;
    flex: none;
}

.provider-icon .icon { width: 19px; height: 19px; }
.provider-name { flex: 1; min-width: 130px; }
.provider-name strong { display: block; font-size: 0.92rem; }
.provider-name small { color: var(--muted); font-size: 0.73rem; }
.provider-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.provider-meta { display: grid; gap: 7px; margin: 0 0 14px; }
.provider-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.79rem; }
.provider-meta dt { color: var(--muted); }
.provider-meta dd { margin: 0; color: var(--soft); font-weight: 600; text-align: right; word-break: break-all; }

.provider-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 180, 255, 0.08);
}

/* Listas auxiliares */
.step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: steps;
    display: grid;
    gap: 14px;
}

.step-list li {
    position: relative;
    padding-left: 40px;
    counter-increment: steps;
}

.step-list li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.26);
    color: #93c5fd;
    font-size: 0.76rem;
    font-weight: 800;
}

.step-list strong { display: block; font-size: 0.88rem; }
.step-list span { display: block; color: var(--muted); font-size: 0.81rem; margin-top: 1px; }

.info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.info-list li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.info-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 139, 255, 0.12);
}

.info-list strong { color: var(--soft); }

.quick-links { display: grid; gap: 8px; }

.quick-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
    color: var(--soft);
    font-size: 0.85rem;
    font-weight: 600;
}

.quick-links a:hover { border-color: rgba(47, 139, 255, 0.3); background: rgba(47, 139, 255, 0.07); color: #fff; }
.quick-links .icon { width: 17px; height: 17px; color: #8dbdff; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}

.info-grid > div {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
}

.info-grid dt { color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
.info-grid dd { margin: 2px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--soft); }

.notice-list { display: grid; gap: 10px; }

.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px;
    border-radius: 11px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.045);
}

.notice-item.is-warning { border-color: rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.055); }
.notice-item > .icon { color: #86efac; margin-top: 1px; }
.notice-item.is-warning > .icon { color: #fcd34d; }
.notice-item strong { display: block; font-size: 0.83rem; }
.notice-item small { color: var(--muted); font-size: 0.77rem; }

/* Liberações */
.grant-create {
    padding: 16px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.025);
}

.grant-create .field-row { align-items: flex-start; }
.grant-create .field { margin-bottom: 0; }

.grant-form {
    padding: 16px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.025);
    margin-bottom: 18px;
}
.grant-form .field:last-of-type { margin-bottom: 14px; }

.grant-list { display: grid; gap: 8px; }

.grant-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
}

.grant-row.is-expired { opacity: 0.58; }
.grant-icon { color: #8dbdff; flex: none; }
.grant-icon .icon { width: 17px; height: 17px; }
.grant-info { flex: 1; min-width: 0; }
.grant-info strong { display: block; font-size: 0.85rem; }
.grant-info small { color: var(--muted); font-size: 0.74rem; }
.grant-row form { margin: 0; }

.setup-link-card {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.05);
    margin-bottom: 22px;
}

.setup-link-head { display: flex; align-items: center; gap: 12px; }
.setup-link-head strong { display: block; font-size: 0.88rem; }
.setup-link-head small { color: var(--muted); font-size: 0.77rem; }
.setup-link-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.28);
    color: #7dd3fc;
    flex: none;
}
.setup-link-icon .icon { width: 17px; height: 17px; }

/* Logs */
.log-user { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.log-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 7px;
    background: rgba(47, 139, 255, 0.08);
    border: 1px solid rgba(47, 139, 255, 0.16);
    color: #9fc7ff;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}
.log-action .icon { width: 13px; height: 13px; }
.log-detail { color: var(--muted); font-size: 0.8rem; max-width: 380px; }
.ip-badge { font-size: 0.72rem; white-space: nowrap; }

/* Upload de vídeo */
.upload-video-form {
    padding: 16px;
    border-radius: 13px;
    border: 1px dashed rgba(148, 180, 255, 0.24);
    background: rgba(148, 180, 255, 0.025);
    margin-top: 16px;
}

.upload-video-form .field-row { align-items: flex-end; }
.upload-video-form .field { margin-bottom: 14px; }

.upload-progress { margin: 4px 0 14px; }
.upload-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 180, 255, 0.12);
    overflow: hidden;
    margin-bottom: 6px;
}
.upload-progress-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), var(--cyan));
    transition: width 0.2s ease;
}
.upload-progress small { color: var(--muted); font-size: 0.77rem; }

.current-video {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 13px;
    padding: 13px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.035);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.current-video-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.24);
    color: #93c5fd;
    flex: none;
}

.current-video-icon .icon { width: 19px; height: 19px; }
.current-video-info { flex: 1; min-width: 160px; }
.current-video-info strong { display: block; font-size: 0.86rem; }
.current-video-info small { display: block; color: var(--muted); font-size: 0.74rem; }
.video-ref { display: block; margin-top: 3px; font-size: 0.72rem; color: #7f9dc7; background: none; border: 0; padding: 0; word-break: break-all; }
.current-video form { margin: 0; }

/* ==========================================================================
   Instalador
   ========================================================================== */

.install-body {
    min-height: 100vh;
    padding: 40px 20px 60px;
    background: #04070e;
}

.install-wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.install-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    text-align: center;
}

.install-brand img {
    width: min(360px, 82vw);
}

.install-brand span {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.install-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.75fr;
    gap: 24px;
    align-items: start;
}

.install-card { padding: 30px; }
.install-head { margin-bottom: 22px; }
.install-head h1 { font-size: 1.7rem; margin-bottom: 6px; }
.install-head p { color: var(--muted); font-size: 0.89rem; margin: 0; }

.install-side { display: grid; gap: 18px; }
.install-side h3 { font-size: 0.95rem; margin-bottom: 12px; }

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}

.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-dot {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    flex: none;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.32);
    color: #86efac;
}
.check-list li.fail .check-dot { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.32); color: #fca5a5; }
.check-list strong { display: block; font-size: 0.81rem; color: var(--soft); }
.check-list small { color: var(--muted); font-size: 0.73rem; }

.driver-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.driver-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.03);
    cursor: pointer;
}

.driver-option input { margin-top: 3px; accent-color: var(--brand); }
.driver-option strong { display: block; font-size: 0.84rem; }
.driver-option small { color: var(--muted); font-size: 0.73rem; }
.driver-option:has(input:checked) { border-color: rgba(47, 139, 255, 0.45); background: rgba(47, 139, 255, 0.07); }

.success-orb {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: #000;
    border: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.07);
    overflow: hidden;
    font-size: 2rem;
    color: #86efac;
}

.success-orb img { width: 100%; height: 100%; object-fit: contain; }
.install-card.center { text-align: center; max-width: 560px; margin: 40px auto; }
.install-card.center p { color: var(--muted); margin: 0 auto 24px; max-width: 420px; }

/* ==========================================================================
   Estados vazios
   ========================================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    border-radius: 14px;
    border: 1px dashed rgba(148, 180, 255, 0.18);
    background: rgba(148, 180, 255, 0.02);
}

.panel .empty-state { border: 0; background: none; }

.empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(148, 180, 255, 0.07);
    border: 1px solid var(--line);
    color: #7f9dc7;
    margin-bottom: 14px;
}

.empty-icon .icon { width: 25px; height: 25px; }
.empty-state h3 { font-size: 1rem; margin-bottom: 4px; }
.empty-state p { color: var(--muted); font-size: 0.85rem; max-width: 420px; margin-bottom: 16px; }

/* ==========================================================================
   Avisos, aparelhos, compartilhamento, feedback e relatórios
   ========================================================================== */

.req { color: #fca5a5; font-weight: 700; }
.form-input-sm { min-height: 38px; padding: 7px 12px; font-size: 0.83rem; }

.btn-secondary {
    background: rgba(148, 180, 255, 0.1);
    border: 1px solid var(--line-strong);
    color: #dbe7fb;
}

.btn-secondary:hover { background: rgba(148, 180, 255, 0.17); color: #fff; }

/* Mural de avisos do revendedor */
.notice-board {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(17, 28, 51, 0.78), rgba(7, 12, 24, 0.66));
    margin-bottom: 26px;
}

.notice-board.has-unread { border-color: rgba(47, 139, 255, 0.34); }

.notice-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.notice-board-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #dbe7fb;
}

.notice-board-title .icon { width: 17px; height: 17px; color: #8dbdff; }

.notice-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(47, 139, 255, 0.15);
    border: 1px solid rgba(47, 139, 255, 0.34);
    color: #bfdbfe;
}

.notice-counter .icon { width: 14px; height: 14px; }
.notice-counter.is-clear {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
    color: #86efac;
}

.notice-board .notice-list { gap: 12px; }

.notice-board .notice-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.55);
}

.notice-board .notice-item.is-read { opacity: 0.62; }

.notice-board .notice-item.is-urgent {
    border-color: rgba(245, 158, 11, 0.36);
    background: rgba(245, 158, 11, 0.06);
}

.notice-item-main { flex: 1; min-width: 0; }
.notice-item-main p { color: var(--soft); font-size: 0.86rem; margin: 5px 0 6px; }
.notice-item-main small { color: var(--muted); font-size: 0.75rem; }

.notice-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text);
}

.notice-item-title strong { display: inline; font-size: 0.9rem; }

.notice-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(47, 139, 255, 0.18);
    flex: none;
}

.notice-board form { margin: 0; flex: none; }

/* Aviso no topo do app e contadores da sidebar */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand);
    color: #03070f;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: 6px;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(47, 139, 255, 0.18);
    border: 1px solid rgba(47, 139, 255, 0.34);
    color: #bfdbfe;
    font-size: 0.7rem;
    font-weight: 800;
    font-style: normal;
    margin-left: auto;
}

/* Filtro por aparelho */
.device-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.device-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
}

.device-filter-label .icon { width: 15px; height: 15px; color: #8dbdff; }

.chip-filter { cursor: pointer; text-decoration: none; transition: all 0.16s ease; }
.chip-filter:hover { border-color: rgba(47, 139, 255, 0.42); color: #fff; }
.chip-filter small { color: var(--muted); font-weight: 700; }
.chip-filter.is-active {
    border-color: rgba(47, 139, 255, 0.6);
    background: var(--brand-soft);
    color: #dbe9ff;
}

.chip-device { font-size: 0.75rem; padding: 5px 10px; }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.device-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 13px 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.035);
    margin-bottom: 16px;
}

.device-tags-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.79rem;
    font-weight: 700;
    color: var(--muted);
}

.device-tags-label .icon { width: 15px; height: 15px; color: #8dbdff; }

.lesson-devices { display: inline-flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }

.mini-chip {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.05);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.tag-new,
.chip-new {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.36);
    color: #a5f3fc;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.chip-new .icon { width: 13px; height: 13px; color: #67e8f9; }

.device-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }

.device-check {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.035);
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--soft);
    cursor: pointer;
    transition: all 0.16s ease;
    margin: 0;
}

.device-check input { accent-color: var(--brand); margin: 0; width: auto; min-height: 0; }
.device-check .icon { width: 15px; height: 15px; color: #8dbdff; flex: none; }
.device-check:hover { border-color: rgba(47, 139, 255, 0.4); }
.device-check.selected,
.device-check:has(input:checked) {
    border-color: rgba(47, 139, 255, 0.55);
    background: var(--brand-soft);
    color: #dbe9ff;
}
.device-check:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Caixa de compartilhamento na tela do tutorial */
.share-box {
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(47, 139, 255, 0.24);
    background: linear-gradient(160deg, rgba(47, 139, 255, 0.075), rgba(7, 12, 24, 0.7));
    margin: 20px 0;
}

.share-box-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }

.share-box-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.32);
    color: #9ecbff;
    flex: none;
}

.share-box-icon .icon { width: 19px; height: 19px; }
.share-box-head h3 { font-size: 1rem; margin-bottom: 4px; }
.share-box-head p { color: var(--muted); font-size: 0.84rem; margin: 0; }

.share-active { display: grid; gap: 12px; }
.share-active-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.share-active-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.share-active-actions form { margin: 0; }

.share-create { display: grid; gap: 11px; }
.share-create-label { font-size: 0.82rem; font-weight: 700; color: #b7c7e0; }

.copy-field { display: flex; gap: 9px; align-items: center; }
.copy-field input { flex: 1; min-width: 0; font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }
.copy-field .btn { flex: none; }

/* "Isso ajudou?" */
.feedback-box {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.58);
    margin: 20px 0;
}

.feedback-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.feedback-question h3 { font-size: 0.97rem; margin-bottom: 3px; }
.feedback-question p { color: var(--muted); font-size: 0.82rem; margin: 0; }

.feedback-count {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    border-radius: 13px;
    background: rgba(47, 139, 255, 0.1);
    border: 1px solid rgba(47, 139, 255, 0.26);
}

.feedback-count strong { font-size: 1.15rem; line-height: 1.2; }
.feedback-count span { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.feedback-done {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 13px 0 0;
    padding: 10px 13px;
    border-radius: 11px;
    background: rgba(34, 197, 94, 0.075);
    border: 1px solid rgba(34, 197, 94, 0.24);
    color: #a7f3d0;
    font-size: 0.83rem;
}

.feedback-done .icon { width: 16px; height: 16px; flex: none; }

.feedback-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 13px; }
.feedback-actions form { margin: 0; }

/* Página pública do link do cliente */
.share-container { max-width: 940px; padding: 26px 0 46px; }

.share-denied {
    padding: 44px 26px;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.26);
    background: rgba(10, 17, 32, 0.68);
    text-align: center;
}

.share-denied-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.11);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fca5a5;
    margin-bottom: 18px;
}

.share-denied-icon .icon { width: 27px; height: 27px; }
.share-denied h1 { font-size: 1.45rem; margin-bottom: 8px; }
.share-denied p { color: var(--muted); max-width: 430px; margin: 0 auto 22px; }

.share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.share-brand { display: flex; align-items: center; gap: 12px; }
.share-brand img { width: 44px; height: 44px; border-radius: 13px; object-fit: contain; background: #0a1326; }
.share-brand strong { display: block; font-size: 0.9rem; }
.share-brand small { color: var(--muted); font-size: 0.78rem; }

.share-player video,
.share-player iframe { border-radius: 14px; }

.share-foot { display: grid; gap: 12px; margin-top: 20px; }

.share-foot-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid rgba(47, 139, 255, 0.22);
    background: rgba(47, 139, 255, 0.055);
}

.share-foot-card > .icon { width: 21px; height: 21px; color: #8dbdff; flex: none; }
.share-foot-card strong { display: block; font-size: 0.86rem; }
.share-foot-card small { color: var(--muted); font-size: 0.78rem; }

.share-foot-note { color: var(--muted); font-size: 0.83rem; margin: 0; text-align: center; }
.share-foot-note a { color: #8dbdff; font-weight: 700; }

/* Pedido de tutorial na área do revendedor */
.request-block { margin-top: 8px; }

.request-card {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 26px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(17, 28, 51, 0.7), rgba(7, 12, 24, 0.66));
}

.request-copy h2 { font-size: 1.3rem; margin: 8px 0; }
.request-copy p { color: var(--muted); font-size: 0.86rem; margin: 0; }
.request-form .btn { margin-top: 4px; }

/* Lista de pedidos no admin */
.request-list { display: grid; gap: 12px; }

.request-item {
    padding: 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.55);
    border-left: 3px solid rgba(148, 180, 255, 0.3);
}

.request-item.status-novo { border-left-color: var(--amber); }
.request-item.status-em_producao { border-left-color: var(--brand); }
.request-item.status-publicado { border-left-color: var(--green); }
.request-item.status-descartado { border-left-color: rgba(148, 180, 255, 0.24); opacity: 0.68; }

.request-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.request-item-head strong { font-size: 0.92rem; }
.request-item-detail { color: var(--soft); font-size: 0.84rem; margin: 8px 0 0; }

.request-item-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 9px 0 12px;
    color: var(--muted);
    font-size: 0.78rem;
}

.request-item-meta span { display: inline-flex; align-items: center; gap: 6px; }
.request-item-meta .icon { width: 14px; height: 14px; }

.request-item-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.request-item-actions .inline-form { display: flex; align-items: center; gap: 8px; }
.request-item-actions form { margin: 0; }
.request-item-actions select { width: auto; min-width: 148px; }

/* Ranking de pedidos */
.ranking-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.55);
}

.ranking-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: var(--brand-soft);
    border: 1px solid rgba(47, 139, 255, 0.3);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 800;
    flex: none;
}

.ranking-item:nth-child(1) .ranking-pos { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.34); color: #fcd34d; }
.ranking-item:nth-child(2) .ranking-pos { background: rgba(226, 232, 240, 0.14); border-color: rgba(226, 232, 240, 0.3); color: #e2e8f0; }
.ranking-item:nth-child(3) .ranking-pos { background: rgba(217, 119, 6, 0.16); border-color: rgba(217, 119, 6, 0.32); color: #fbbf24; }

.ranking-text { flex: 1; min-width: 0; }
.ranking-text strong { display: block; font-size: 0.87rem; }
.ranking-text small { color: var(--muted); font-size: 0.75rem; }

.ranking-votes {
    font-size: 0.95rem;
    font-weight: 800;
    color: #8dbdff;
    background: rgba(47, 139, 255, 0.1);
    border-radius: 10px;
    padding: 5px 11px;
    flex: none;
}

/* Pontos de atenção do relatório */
.attention-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }

.attention-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.55);
}

.attention-row a { display: block; min-width: 0; text-decoration: none; }
.attention-row strong { display: block; font-size: 0.86rem; color: var(--text); }
.attention-row small { color: var(--muted); font-size: 0.75rem; }
.attention-row .badge { flex: none; }
.attention-row.bad { border-color: rgba(239, 68, 68, 0.24); background: rgba(239, 68, 68, 0.045); }
.attention-row.cold { border-color: rgba(148, 180, 255, 0.2); background: rgba(148, 180, 255, 0.035); }

/* Aparelhos conectados na conta */
.device-list { display: grid; gap: 9px; }

.device-row {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.55);
}

.device-row-ip strong { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; }
.device-row-ua { flex: 1; min-width: 160px; color: var(--muted); font-size: 0.76rem; }
.device-row-when { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.75rem; }
.device-row-when .icon { width: 14px; height: 14px; }

/* Alerta de conta compartilhada no dashboard */
.share-alert { align-items: flex-start; }
.share-alert-body { min-width: 0; }

.share-alert-list { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }

.share-alert-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 13px;
    border-radius: 11px;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.share-alert-list a { min-width: 0; }
.share-alert-list strong { display: block; font-size: 0.85rem; }
.share-alert-list small { color: var(--muted); font-size: 0.75rem; }
.share-alert-list form { margin: 0; }

/* Botão do WhatsApp */
.wa-btn { color: #4ade80; }
.wa-btn:hover { color: #86efac; border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.09); }
a.wa-btn.btn-ghost { color: #4ade80; }
.icon-btn.wa-btn .icon,
a.wa-btn .icon { color: inherit; }

/* Segmented usado como filtro de período (links) */
.segmented-inline .segmented-opt {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(148, 180, 255, 0.04);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.16s ease;
}

.segmented-inline .segmented-opt:hover { border-color: rgba(47, 139, 255, 0.42); color: #dbe9ff; }

.segmented-inline .segmented-opt.is-active {
    border-color: rgba(47, 139, 255, 0.5);
    background: var(--brand-soft);
    color: #bfdbfe;
}

/* Avisos no admin */
.notice-admin-list { display: grid; gap: 12px; }

.notice-admin {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 32, 0.55);
}

.notice-admin.is-off { opacity: 0.66; }
.notice-admin.is-urgent { border-color: rgba(245, 158, 11, 0.32); background: rgba(245, 158, 11, 0.05); }
.notice-admin-main { flex: 1; min-width: 0; }

.notice-admin-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.notice-admin-title strong { font-size: 0.9rem; }
.notice-admin-main p { color: var(--soft); font-size: 0.84rem; margin: 6px 0 5px; }
.notice-admin-main small { color: var(--muted); font-size: 0.75rem; }
.notice-admin .row-actions { flex: none; }

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 1180px) {
    .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .form-layout { grid-template-columns: 1fr; }
    .form-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-side > *:only-child { grid-column: 1 / -1; }
    .course-hero { grid-template-columns: 280px minmax(0, 1fr); }
    .lesson-layout { grid-template-columns: 1fr; }
    .lesson-sidebar { position: static; }
    .sidebar-lessons { max-height: none; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-card { max-width: none; }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .provider-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
}

@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; }
    .auth-mobile-brand {
        display: flex;
        justify-content: center;
        margin-bottom: 22px;
    }
    .auth-mobile-brand img { width: min(220px, 64vw); }
    .dash-hero { grid-template-columns: 1fr; }
    .hero-copy { text-align: left; }
    .feature-grid { grid-template-columns: 1fr; }
    .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }
    .install-grid { grid-template-columns: 1fr; }
    .install-side { grid-template-columns: 1fr 1fr; }
    .install-side > * { grid-column: auto; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-close { display: inline-flex; }
    .sidebar-overlay.is-open { display: block; }
    .admin-main { margin-left: 0; }
    .admin-topbar > .icon-btn { display: inline-flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .course-hero { grid-template-columns: 1fr; }
    .course-hero-cover { max-width: 520px; }
}

@media (max-width: 760px) {
    .container { padding: 0 18px; }
    .header-inner { min-height: 64px; gap: 12px; }
    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        z-index: 70;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 16px 18px;
        background: rgba(5, 9, 18, 0.98);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 12px 14px; font-size: 0.95rem; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn.hide-sm { display: none; }

    .hero { padding: 46px 0 20px; }
    .hero-actions .btn { width: 100%; }
    .hero-stats { gap: 18px; }
    .hero-stats > div { padding-right: 18px; margin-right: 0; border-right: 0; }
    .hero-stats strong { font-size: 1.3rem; }
    .section { padding: 46px 0; }
    .course-grid { grid-template-columns: 1fr; }
    .section-block-head { align-items: stretch; }
    .search-box { width: 100%; }
    .dash-hero-copy { padding: 24px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .continue-card { flex-direction: column; align-items: stretch; }
    .continue-cover { width: 100%; max-height: 190px; }
    .continue-card .btn { width: 100%; }
    .lesson-layout { gap: 18px; }
    .lesson-info { padding: 20px; }
    .lesson-nav { grid-template-columns: 1fr; }
    .course-content { padding: 18px; }
    .player-locked, .player-empty { padding: 44px 20px; }
    .lesson-info-head { flex-direction: column; }
    .lesson-complete { width: 100%; }
    .form-card { padding: 20px; }
    .request-card { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
    .request-item-actions select { width: 100%; }
    .notice-board .notice-item { flex-direction: column; align-items: stretch; }
    .notice-board .notice-item .btn { width: 100%; }
    .share-box, .feedback-box { padding: 16px; }
    .copy-field { flex-direction: column; align-items: stretch; }
    .copy-field .btn { width: 100%; }
    .share-brand img { width: 38px; height: 38px; }
    .request-item-actions .inline-form { width: 100%; }
    .field-row, .field-row.three { grid-template-columns: 1fr; }
    .field-sm { max-width: none; }
    .choice-cards { grid-template-columns: 1fr; }
    .tabs { gap: 3px; }
    .tab { padding: 8px 10px; font-size: 0.78rem; }
    .admin-content { padding: 20px 16px 56px; }
    .admin-topbar { padding: 10px 16px; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-stat { padding: 14px; gap: 11px; }
    .admin-stat-body strong { font-size: 1.2rem; }
    .admin-stat-icon { width: 38px; height: 38px; }
    .panel { padding: 16px; }
    .form-side { grid-template-columns: 1fr; }
    .filter-bar .search-input { flex: 1 1 100%; }
    .filter-bar .search-input input { min-width: 0; }
    .filter-bar select { flex: 1 1 auto; min-width: 0; }
    .info-grid { grid-template-columns: 1fr; }
    .profile-card { padding: 20px; }
    .auth-card { padding: 26px 22px; border-radius: 18px; }
    .auth-panel { padding: 28px 18px; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .install-side { grid-template-columns: 1fr; }
    .driver-options { grid-template-columns: 1fr; }
    .install-card { padding: 22px; }
    .cta-band { padding: 26px; border-radius: 18px; }
    .page-heading h1 { font-size: 1.7rem; }
    .modal, .user-menu-panel { max-width: calc(100vw - 24px); }
    .user-menu-name { display: none; }
    .legal-card { padding: 22px; }
    .locked-banner { align-items: flex-start; }
    .course-hero { padding: 18px; gap: 18px; }
    .tabs .tab { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 520px) {
    body { font-size: 15px; }
    h1 { font-size: 1.75rem; }
    .admin-stats { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .hero-stats > div { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(148, 180, 255, 0.04); }
    .brand-text { font-size: 0.9rem; letter-spacing: 0.07em; min-width: 0; }
    .brand-text small { display: none; }
    .brand { gap: 10px; min-width: 0; }
    .header-inner { gap: 10px; }
    .header-actions { gap: 6px; }
    .brand-mark { width: 38px; height: 38px; }
    .auth-card { padding: 22px 18px; }
    .btn { padding: 10px 15px; }
    .btn-lg { padding: 12px 18px; font-size: 0.94rem; }
    .upload-image { flex-direction: column; }
    .upload-preview { width: 100%; }
    .current-video { align-items: flex-start; }
    .current-video form { width: 100%; }
    .grant-row { flex-wrap: wrap; }
    .grant-row .badge { order: 3; }
    .setup-link-head { align-items: flex-start; }
    .copy-field { flex-direction: column; align-items: stretch; }
    .copy-field .btn { width: 100%; }
    .user-menu-name { display: none; }
    .filter-bar { width: 100%; }
    .filter-bar select,
    .filter-bar input[type="date"] { width: 100%; min-width: 0; }
    .lesson-chips .chip { font-size: 0.68rem; }
    .library-search { flex-direction: column; }
    .library-search input,
    .library-search .btn { width: 100%; }
    .library-search input::placeholder { font-size: 14px; }
    /* canto superior direito é do botão "abrir em nova janela" do player; marca d'água vai para a esquerda */
    .player-watermark { top: 10px; left: 10px; right: auto; bottom: auto; align-items: flex-start; font-size: 0.6rem; max-width: calc(100% - 70px); }
    .player-watermark span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
   Ajustes de responsividade (celular, tablet e PC)
   ========================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}
img, video, canvas { max-width: 100%; }
.site-header { padding-top: env(safe-area-inset-top, 0px); }

/* Botões de ordem (setas) na lista de tutoriais */
.order-btns { display: inline-flex; align-items: center; gap: 4px; }
.order-btns form { margin: 0; display: inline-flex; }
.order-btn { border-color: var(--line); background: rgba(148, 180, 255, 0.05); }
.order-btn:hover:not([disabled]) { background: rgba(47, 139, 255, 0.18); border-color: rgba(47, 139, 255, 0.45); color: #fff; }
.order-btn[disabled] { opacity: 0.25; cursor: not-allowed; }

/* PC: telas grandes aproveitam melhor o espaço */
@media (min-width: 1600px) {
    .container { max-width: 1360px; }
    .admin-content { max-width: 1560px; }
}

/* Telas de toque: alvos maiores e sem zoom automático em campos */
@media (pointer: coarse) {
    .icon-btn { width: 42px; height: 42px; }
    .btn-sm { min-height: 40px; }
    .sidebar-link, .main-nav a { min-height: 44px; }
}

@media (max-width: 760px) {
    input, select, textarea { font-size: 16px; }
    .auth-panel { min-height: 100dvh; }
    .main-nav { max-height: calc(100dvh - 64px); }
    .admin-page-head { flex-direction: column; align-items: stretch; gap: 14px; }
    .admin-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .admin-head-actions .btn { flex: 1 1 auto; justify-content: center; }
    .admin-topbar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
    .modal { width: calc(100vw - 24px); }
    .table-foot { justify-content: center; }

    /* Tabelas do admin viram cartões no celular */
    .table-wrap { border: 0; overflow: visible; border-radius: 0; }
    .data-table { min-width: 0; display: block; }
    .data-table thead { display: none; }
    .data-table tbody { display: grid; gap: 12px; }
    .data-table tbody tr {
        display: block;
        padding: 4px 14px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: rgba(8, 14, 26, 0.55);
    }
    .data-table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 10px 0;
        text-align: right;
        border-bottom: 1px solid rgba(148, 180, 255, 0.08);
    }
    .data-table tbody td:last-child { border-bottom: 0; }
    .data-table tbody td[data-label]::before {
        content: attr(data-label);
        flex: none;
        color: var(--muted);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        text-align: left;
    }
    .data-table tbody td:first-child { display: block; text-align: left; padding: 12px 0; }
    .data-table tbody td:first-child[data-label]::before { display: none; }
    .data-table tbody td:last-child { justify-content: flex-end; }
    .data-table .table-user, .data-table .table-course { min-width: 0; }
    .data-table .row-actions { flex-wrap: wrap; justify-content: flex-end; }
}

.order-num {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 9px;
    background: rgba(47, 139, 255, 0.14);
    border: 1px solid rgba(47, 139, 255, 0.3);
    color: #bfdcff;
    font-weight: 800;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.order-form { margin: 0; display: inline-flex; }
.order-input {
    width: 58px;
    height: 36px;
    padding: 0 6px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid rgba(47, 139, 255, 0.35);
    background: rgba(47, 139, 255, 0.12);
    color: #d6e8ff;
    font-weight: 800;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}
.order-input::-webkit-outer-spin-button,
.order-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.order-input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 139, 255, 0.25); background: rgba(47, 139, 255, 0.2); }
@media (pointer: coarse) { .order-input { height: 42px; width: 64px; } }

/* Logo do menu lateral do admin: centralizada e maior */
.sidebar-head {
    position: relative;
    justify-content: center;
    padding: 26px 16px 22px;
}
.sidebar-head .brand {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.sidebar-head .brand-mark { width: 84px; height: 84px; border-radius: 22px; }
.sidebar-head .brand-text {
    justify-content: center;
    text-align: center;
    font-size: 1.28rem;
    letter-spacing: 0.14em;
}
.sidebar-head .brand-text small {
    margin-top: 6px;
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-align: center;
}
.sidebar-head .sidebar-close { position: absolute; top: 12px; right: 12px; }

/* Logo do menu: texto centralizado de verdade (compensa o espaçamento entre letras) e imagem sem corte */
.brand-mark img { padding: 0; }
.sidebar-head .brand-text { padding-left: 0.14em; }
.sidebar-head .brand-text small { padding-left: 0.16em; }
.sidebar-head .brand { max-width: 100%; }
